papaya
Class Linear.Significance

java.lang.Object
  extended by papaya.Linear.Significance
Enclosing class:
Linear

public static class Linear.Significance
extends Object

Contains methods used to compute the significance, or pvalue of the input correlations. The significance is computed using the normal of student-t approximations and hence are not to be used for small datasets(i.e. size<20).


Constructor Summary
Linear.Significance()
           
 
Method Summary
static float intercept(float intercept, float interceptStdErr, int df)
          Returns the p-value, or significance, of the computed intercept under the null-hypothesis of intercept = 0 (two-tailed test).
static float slope(float slope, float slopeStdErr, int df)
          Returns the p-value, or significance, of the computed slope under the null-hypothesis of slope = 0 (two-tailed test).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Linear.Significance

public Linear.Significance()
Method Detail

slope

public static float slope(float slope,
                          float slopeStdErr,
                          int df)
Returns the p-value, or significance, of the computed slope under the null-hypothesis of slope = 0 (two-tailed test). The p-value is computed using the student-T distribution with df degrees of freedom and test statistic
 t = slope/slopeStdErr,

Parameters:
slope - the slope of the best fit linear line
slopeStdErr - the standard error of the slope
df - the degrees of freedom (typically (n-2), but could also be (n-1) if the intercept was previously specified.

intercept

public static float intercept(float intercept,
                              float interceptStdErr,
                              int df)
Returns the p-value, or significance, of the computed intercept under the null-hypothesis of intercept = 0 (two-tailed test). The p-value is computed using the student-T distribution with df degrees of freedom and test statistic
t=intercept/interceptStdErr

Parameters:
intercept - the intercept of the best fit linear line
interceptStdErr - the standard error of the intercept
df - the degrees of freedom (n-2)


Processing library papaya by Adila Faruk. (C) 2014