powered by
Compute the SVD or QR decomposition of the matrix X.
matop(y = NULL, X, method = c("svd", "qr"), bigmat = TRUE)
If the method used is svd then the list containing the following components:
The data vector (numeric, n) NAs allowed.
n
Design Matrix of dimension n x p.
n x p
A vector containing the singular values of X, of lenght min(n,p).
X
min(n,p)
A matrix whose columns contain the left singular vectors of X,
A matrix whose columns contain the right singular vectors of X.
A vector containing the square of D.
D
The cross-product between the matrix L and vector y.
L
y
Number of rows of X.
Number of columns of X.
If the method used is qr then the list containing the following components:
An upper triangular matrix of dimension n x p.
The data vector (numeric, n) NAs allowed. The default value is NULL, It is possible to compute the SVD or QR decomposition without y.
Options for the posterior computation. Two methods, "qr" and "svd" decomposition. The default value for the method is SVD descomposition.
"qr"
"svd"
Use of the bigstatsr package. The default value for bigmat is TRUE.
TRUE
Sergio Perez-Elizalde, Blanca E. Monroy-Castillo, Paulino Perez-Rodriguez.
Use the bigstartsr package when p >> n. Auxiliary in the HDBRR function.
p >> n
qr, svd
qr
svd
n <- 30 p <- 100 X <- matrix(rnorm(n*(p-1),1,1/p),nrow = n,ncol = p-1) Beta <- sample(1:p,p-1,rep = FALSE) Beta <- c(1,Beta) y <- cbind(rep(1,n),X) %*% Beta+rnorm(n,0,1) matop(y, X, bigmat = TRUE)
Run the code above in your browser using DataLab