rcpp_lm_gaga {GAGAs}R Documentation

Fit a linear model via the GAGA algorithm using cpp.

Description

Fit a linear model via the GAGA algorithm using cpp.

Usage

rcpp_lm_gaga(
  X,
  y,
  s_alpha,
  s_itrNum,
  s_thresh,
  s_QR_flag,
  s_flag,
  s_lamda_0,
  s_fix_sigma,
  s_sigm2_0,
  s_fdiag,
  s_frp
)

Arguments

X

Input matrix, of dimension nobs*nvars; each row is an observation. If the intercept term needs to be considered in the estimation process, then the first column of X must be all 1s.

y

Quantitative response N*1 matrix.

s_alpha

Hyperparameter. The suggested value for alpha is 2 or 3.

s_itrNum

The number of iteration steps. In general, 20 steps are enough.

s_thresh

Convergence threshold for beta Change, if max(abs(beta-beta_old))<threshold, return.

s_QR_flag

It identifies whether to use QR decomposition to speed up the algorithm.

s_flag

It identifies whether to make model selection. The default is TRUE.

s_lamda_0

The initial value of the regularization parameter for ridge regression.

s_fix_sigma

It identifies whether to update the variance estimate of the Gaussian noise or not.

s_sigm2_0

The initial variance of the Gaussian noise.

s_fdiag

It identifies whether to use diag Approximation to speed up the algorithm.

s_frp

Pre-processing by OMP method to reduce the number of parameters

Value

Coefficient vector


[Package GAGAs version 0.6.2 Index]