Learn R Programming

midasml (version 0.0.6)

cpp_sgl_fitpath: Computes a path solution for \(\lambda\) and fixed \(\gamma\) values

Description

Computes a path solution for \(\lambda\) and fixed \(\gamma\) values

Usage

cpp_sgl_fitpath(
  X,
  Z,
  y,
  index,
  dummies,
  l1_frac,
  l21_frac,
  dummies_index,
  lambdas,
  gamma_w,
  innerIter,
  outerIter,
  thresh,
  outerThresh,
  gamma_solver,
  step,
  reset
)

Arguments

X

(mat) matrix of covariates.

Z

(mat) matrix of dummies.

y

(vec) vector of response.

index

(vec) vector indicating group membership of each covariate.

dummies

(double) add dummy variables in a regression (dummies = 1) or not (dummies = 0).

l1_frac

\(\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_frac

\(\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\).

lambdas

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

gamma_w

(double) sg-LASSO mixing parameter.

innerIter

(int) max number of inner iterations.

outerIter

(int) max number of outer iterations.

thresh

(double) convergence threshold of inner loop.

outerThresh

(double) convergence threshold of outer loop.

gamma_solver

(double) solver parameter.

step

(double) solver parameter.

reset

(int) solver parameter.