Skip to contents

adalasso conducts adaptive lasso method to selection covariates by using glmnet. This function utilize cross-validation to find optimal lambda (lambda.min) and penalty factors for the adaptive lasso.

Usage

adalasso_refit(
  x,
  y,
  intercept = TRUE,
  family = "gaussian",
  standardize = FALSE,
  refit = TRUE,
  parallel = FALSE,
  ...
)

Arguments

x

The input matrix with dimensions (nobs) and (nvars). It has n rows (obs), and p columns (number of covariates).

y

Response variable. Now, SSCI only supports family="gaussian" with continuous respones y.

intercept

Should intercept(s) be fitted (default=TRUE) or set to zero (FALSE).

family

Response type. Either a character string representing one of the built-in families, or else a glm() family object.

standardize

logical argument whether conduct standardization.

refit

logical. Should conduct a selection + refitting procedure? TRUE, the default, asks the algorithm to conduct the refitting after variable selection.

parallel

If TRUE, use parallel foreach to fit models on bootstrap samples. Must register parallel beforehand, such as doParallel or others. See the example below.

...

Additional optional arguments.

Value

A list with three components: coefficients (estimates), sel_vars (selected variables), and nz (indexes of non-zero coefficients).