cpp_COX_gaga {GAGAs}R Documentation

Fit a Cox model via the GAGA algorithm using cpp.

Description

Fit a Cox model via the Global Adaptive Generative Adjustment algorithm. Part of this function refers to the coxphfit function in MATLAB 2016b.

Usage

cpp_COX_gaga(
  X,
  y,
  cens,
  alpha = 2,
  itrNum = 50L,
  thresh = 0.001,
  flag = TRUE,
  lamda_0 = 0.5,
  fdiag = TRUE,
  subItrNum = 20L
)

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

A n*1 matrix, indicating the survival time;

cens

A n*1 matrix, consists of 0 and 1, 1 indicates that the row of data is censored, 0 is opposite.

alpha

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

itrNum

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

thresh

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

flag

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

lamda_0

The initial value of the regularization parameter for ridge regression.

fdiag

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

subItrNum

Maximum number of steps for subprocess iterations.

Value

Coefficient vector


[Package GAGAs version 0.6.2 Index]