powered by
This function provides an estimation of the inverse of the square root of the covariance matrix of each row of the residuals matrix.
whitening(residuals, typeDep, pAR = 1, qMA = 0)
the residuals matrix obtained by fitting a linear model to each column of the response matrix as if they were independent
character in c("AR1", "ARMA", "nonparam") defining which type of dependence to use
numerical, only use if typeDep = "ARMA", the parameter p for the ARMA(p, q) process
numerical, only use if typeDep = "ARMA", the parameter q for the ARMA(p, q) process
It returns the estimation of the inverse of the square root of the covariance matrix of each row of the residuals matrix.
# NOT RUN { data(copals_camera) Y <- scale(Y[, 1:100]) X <- model.matrix(~ group + 0) residuals <- lm(as.matrix(Y) ~ X - 1)$residuals whitening(residuals, "AR1") # }
Run the code above in your browser using DataLab