Learn R Programming

midasml (version 0.0.6)

path_calc: Computes a sequence of lambda parameters for the mse sg-LASSO regression

Description

Computes a sequence of lambda parameters for the mse sg-LASSO regression

Usage

path_calc(
  X,
  Z,
  y,
  index,
  gamma_w = NULL,
  l1_factor = 0,
  l21_factor = 0,
  dummies_index = 1,
  nlam = NULL,
  min_frac = NULL
)

Arguments

X

T by p data matrix, where t and p respectively denote the sample size and the number of regressors.

Z

dummies matrix left for the interecept.

y

T by 1 vector of outcome.

index

p by 1 vector indicating group membership of each covariate.

gamma_w

sg-LASSO mixing parameter. gamma_w = 1 is LASSO and gamma_w = 0 group LASSO.

l1_factor

penalty term on the intercept. Should be left unpenalized, i.e set to zero (default).

l21_factor

penalty term on the intercept. Should be left unpenalized, i.e set to zero (default).

dummies_index

vector indicating dummies group membership. Should be left unspecified, i.e set to one (default).

nlam

number of \(\lambda\)'s to use in the regularization path.

min_frac

the minimum value of the penalty parameter, as a fraction of the maximum value.

Value

lambdas sequence of \(\lambda\) values for fitting.