root.matrix.crossprod {strucchangeRcpp} | R Documentation |
Computes the root of the Gramian X^TX.
root.matrix.crossprod(X)
X |
a matrix |
a symmetric matrix V
where V^2
equals X^TX
set.seed(1)
n <- 100
p <- 3
X <- matrix(rnorm(n*p),nrow=n, ncol=p)
test <- root.matrix.crossprod(X)
## control results
t(X) %*% X
test %*% test