|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpapaya.Correlation.Significance
public static class Correlation.Significance
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).
Method Summary | |
---|---|
static float |
durbinWatson(float[] data)
The Durbin-Watson statistic is a test statistic used to detect the presence of autocorrelation ( Correlation.auto(float[], int, float, float) )
in the residuals (prediction errors) from a regression analysis. |
static float |
linear(float r,
int size)
Returns the p-value, or significance level of the linear correlation r
between two datasets under the null hypothesis of no correlation. |
static float |
spearman(float rho,
int size)
Returns the p-value, or significance level of the Spearman rank-correlation rho
between two datasets under the null hypothesis of no correlation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static float durbinWatson(float[] data)
Correlation.auto(float[], int, float, float)
)
in the residuals (prediction errors) from a regression analysis.
If e_t
is the residual associated with the observation at time t
,
and there are T
observations, then the test statistic, d
is
d = Sum_{from t=2 to T} ( e_t - e_{t-1} )^2 / Sum_{from t=1 to T} ( e_t )^2
public static float linear(float r, int size)
r
between two datasets under the null hypothesis of no correlation.
That is, H_0: ρ=0
(No linear correlation; Two-tailed test). The p-value is
computed by transforming the correlation to create a t-statistic
having n-2 degrees of freedom:
t = r * sqrt( (n-2)/(1-r^2) ),where n is the size of the corresponding datasets.
r
- the linear correlation coefficientsize
- the size of the corresponding datasets (i.e. number of rows/observations).
IllegalArgumentException
- if the size is less than 20. Below this,
the student-T approximation is inaccurate.public static float spearman(float rho, int size)
rho
between two datasets under the null hypothesis of no correlation.
That is, H_0: ρ_0=0
(No linear correlation; Two-tailed test).
The p-value is computed by transforming the correlation to create a t-statistic
having n-2 degrees of freedom:
t = rho * sqrt( (n-2)/(1-rho^2) ),where n is the size of the corresponding datasets.
rho
- the Spearman-correlation coefficientsize
- the size of the corresponding datasets (i.e. number of rows/observations).
IllegalArgumentException
- if the size is less than 20. Below this,
the student-T approximation is inaccurate.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |