Perform Spearman rank correlation test¶
Source: man/performSpearmanTest.Rd · Help: ?performSpearmanTest
Computes Spearman's rho between absolute residuals and fitted values.
Usage¶
Arguments¶
model- an object of class
lm. data- optional data frame the model was fitted to. When
NULL, the default, the model frame ofmodelis used. The statistic is computed from the residuals and fitted values ofmodel, sodatadoes not change the result; it is accepted so that every test takes(model, data, ...).
Value¶
An object of class htest containing the test statistic, p-value, degrees of freedom and rho.
Details¶
The squared rank correlation coefficient times the sample size minus 1 approximates a chi-square distribution with one degree of freedom.
References¶
Spearman, C. (1904). The proof and measurement of association between two things. American Journal of Psychology, 15(1), 72–101.