Description Usage Arguments Value Examples
This function provides the p-value of an adaptation of the Portmanteau statistic to test if there is some dependence in the rows of the residuals matrix given as an argument of the function.
1 |
residuals |
the residuals matrix obtained by fitting a linear model to each column of the response matrix as if they were independent |
the p-value of a whitening test. If the p-value is small (generally smaller than 0.05) it means that the hypothesis that each row of the residuals matrix is a white noise, is rejected.
1 2 3 4 5 | data(copals_camera)
Y <- scale(Y[, 1:100])
X <- model.matrix(~ group + 0)
residuals <- lm(as.matrix(Y) ~ X - 1)$residuals
whitening_test(residuals)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.