Learn R Programming

CSUV (version 0.1.1)

get.compare.fit: Helper function, please do not use

Description

Helper function, please do not use

Usage

get.compare.fit(x, y, intercept, method.names, current.compare.fit = NULL)

Arguments

x

covariates (n times p matrix, n: number of entries, p: number of covariates)

y

response (vector with n entries)

intercept

TRUE to fit the data with an intercept, FALSE to fit the data without an intercept

method.names

vector of method names to be used in cross validation. Choose among "lasso", "elastic", "relaxo", "mcp" and "scad". Default is to use all methods listed above

current.compare.fit

(optional)

Value

a list which includes the estimated coefficients (est.b) and the corresponding ordinary least square fit from stats::lm()