whitening: This function provides an estimation of the inverse of the...

Description Usage Arguments Value Examples

Description

This function provides an estimation of the inverse of the square root of the covariance matrix of each row of the residuals matrix.

Usage

1
whitening(residuals, typeDep, pAR = 1, qMA = 0)

Arguments

residuals

the residuals matrix obtained by fitting a linear model to each column of the response matrix as if they were independent

typeDep

character in c("AR1", "ARMA", "nonparam") defining which type of dependence to use

pAR

numerical, only use if typeDep = "ARMA", the parameter p for the ARMA(p, q) process

qMA

numerical, only use if typeDep = "ARMA", the parameter q for the ARMA(p, q) process

Value

It returns the estimation of the inverse of the square root of the covariance matrix of each row of the residuals matrix.

Examples

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(residuals, "AR1")

MultiVarSel documentation built on May 2, 2019, 7:58 a.m.