Description Usage Arguments Value Examples
View source: R/sparse_logreg.R
Conduct logistic regression on sparse matrix
1 | sparse_logreg(outcome_column, design_columns, data_frame)
|
outcome_column |
the column name of the binary outcome |
design_columns |
the column names corresponding to the covariates |
data_frame |
the name of the data frame |
A matrix with same number of rows the length of the design_columns argument (corresponding to β estimates) and 4 columns.
Estimate
: the estimated coefficients
SE
: standard errors
T
: T statistics
p_value
: p_value of the corresponding statistics
1 2 3 4 5 6 7 8 | # simulate mateix
set.seed(12032020)
sample.space<-c(rep(0,40),seq(1,10))
mat<-matrix(sample(sample.space,50000*100,replace=TRUE),nrow=50000,ncol=100)
mat<-cbind(sample(c(0,1),100,replace=TRUE),mat)
colnames(mat)<-c('environment',paste0('gene',seq(1,100)))
test<-as.data.frame(mat)
log_fit<-sparse_logreg(outcome_column = 'environment',design_columns = paste0('gene',seq(1,15)),data_frame = test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.