marscr: Perform the marginal screening prior to penalized regression

Description Usage Arguments Value Examples

View source: R/marscr.R

Description

This function removes the covariates that are not even weakly associated with the response variable prior to penalized regression to improve the performance of the variable selection and reduce the runtime.

Usage

1
marscr(data, thres = 0.1)

Arguments

data

the sample data

thres

either a number between 0 and 1 or an positive integer. If it is a number between 0 and 1, the function selects the variables whose correlation with the response are greater than the number; if it is an integer, the function selects the top thres variables. Default is 0.1.

Value

A square matrix. The ith row provides the most correlated variables with the ith variable.

Examples

1
2
data <- genER(10, 0.1, 20, 0.5)$X
gEstM <- marscr(data, thres = 5)

yliu433/scZINB documentation built on Nov. 30, 2020, 9:07 p.m.