Learn R Programming

midasml (version 0.0.6)

path_calc_panel: Computes a sequence of lambda parameters for the sg-LASSO panel regression

Description

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

Usage

path_calc_panel(
  X,
  Z,
  y,
  index,
  gamma_w = NULL,
  l1_factor = NULL,
  l21_factor = NULL,
  dummies_index = NULL,
  nlam = NULL,
  min_frac = NULL
)

Arguments

X

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

Z

dummies matrix for random effects or fixed effects panel data model. If left unspecified, it is computed based on regress_choice choice.

y

nT 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

\(\ell_1\) norm peanlty factor for random or fixed effects (default value is zero which means \(\alpha\) is left unpenalized in \(\ell_1\) norm).

l21_factor

\(\ell_{1,2}\) norm peanlty factor for random or fixed effects (default value is zero which means \(\alpha\) is left unpenalized in \(\ell_{1,2}\) norm).

dummies_index

vector indicating group membership of \(\alpha\).

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.