root.matrix.crossprod: Root of X^TX

Description Usage Arguments Value Examples

View source: R/matrix.R

Description

Computes the root of the Gramian X^TX.

Usage

1

Arguments

X

a matrix

Value

a symmetric matrix V where V^2 equals X^TX

Examples

1
2
3
4
5
6
7
8
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

strucchangeRcpp documentation built on May 26, 2021, 9:06 a.m.