store.xy: Matrix to store results for covariates x and vector response...

Description Usage Arguments Value Examples

View source: R/main_functions.R

Description

Forms a matrix that will be used to store regression results of response y on covariates x.

Usage

1
store.xy(XX, yy)

Arguments

XX

(n by m) matrix of main covariates where m is the number of covariates and n is the sample size.

yy

(n by 1) a matrix corresponding to the response variable.

Value

(m by 1) matrix of zeroes

Examples

1
2
3
4
5
xx = matrix(rnorm(100*5, 0, 1),100,5)
colnames(xx) <- paste0("X",1:ncol(xx))
yy = matrix(2*xx[,1] - 2*xx[,2] + rnorm(100, 0, 1), 100)
colnames(yy) <- "y"
store.xy(xx,yy)

rakheon/d2wlasso documentation built on Feb. 26, 2020, 10:39 p.m.