sparse_linreg: sparse_linreg

Description Usage Arguments Value Examples

View source: R/sparse_linreg.R

Description

Conduct linear regression on sparse matrix

Usage

1

Arguments

X

covariate matrix X

y

outcome vector y

Value

This function would return a data frame

Estimate: the estimated coefficients

SE: standard errors

T: T statistics

p_value: p_value of the corresponding statistics

Examples

1
2
3
4
5
#One dataset from LSQ
data(lsp)
X <- lsp[,3:714]
y_C <- lsp[,1]
lin_fit <- sparse_linreg(X,y_C)

baikunst/SpaReg documentation built on Dec. 19, 2021, 6:39 a.m.