newton_raphson_mm: Newton-Type MM Algorithm

View source: R/newton_raphson_mm.R

newton_raphson_mmR Documentation

Newton-Type MM Algorithm

Description

This function runs a Newton-type MM (majorization-minimization) algorithm following the algorithm of Oelker & Tutz (2017).

Usage

newton_raphson_mm(
  para,
  y1,
  y2,
  delta1,
  delta2,
  Xmat1,
  Xmat2,
  Xmat3,
  hazard,
  frailty,
  model,
  penalty,
  lambda,
  a,
  penalty_fusedcoef,
  lambda_fusedcoef,
  penalty_fusedbaseline,
  lambda_fusedbaseline,
  penweights_list = penweights_list,
  mm_epsilon,
  verbose,
  maxit = 300,
  step_size_min = 1e-05,
  conv_crit = "nll_pen_change",
  conv_tol = 1e-05,
  num_restarts = 2,
  select_tol = 1e-04
)

Arguments

para

A numeric vector of parameters, arranged as follows: the first k_1+k_2+k_3 elements correspond to the baseline hazard parameters, then the k_1+k_2+k_3+1 element corresponds to the gamma frailty log-variance parameter, then the lastq_1+q_2+q_3 elements correspond with the regression parameters.

y1, y2

Numeric vectors of length n with (possibly censored) non-terminal and terminal event times

delta1, delta2

Numeric vectors of length n with indicators of 1 if the event was observed and 0 otherwise

Xmat1, Xmat2, Xmat3

Numeric matrices with n rows and q_1,q_2,q_3 columns containing covariates.

hazard

String specifying the form of the baseline hazard.

frailty

Boolean indicating whether a gamma distributed subject-specific frailty should be included. Currently this must be set to TRUE.

model

String specifying the transition assumption

penalty

A string value indicating the form of parameterwise penalty to apply. "lasso", "scad", and "mcp" are the options.

lambda

The strength of the parameterwise penalty. Either a single non-negative numeric value for all three transitions, or a length 3 vector with elements corresponding to the three transitions.

a

For two-parameter penalty functions (e.g., scad and mcp), the second parameter.

penalty_fusedcoef

A string value indicating the form of the fusion penalty to apply to the regression parameters. "none" and "fusedlasso" are the options.

lambda_fusedcoef

The strength of the fusion penalty on the regression parameters. Either a single non-negative numeric value for all three transitions, or a length 3 vector with elements corresponding to the three transitions.

penalty_fusedbaseline

A string value indicating the form of the fusion penalty to apply to the baseline hazard parameters. "none" and "fusedlasso" are the options.

lambda_fusedbaseline

The strength of the fusion penalty on the regression parameters. Either a single non-negative numeric value for all three transitions, or a length 3 vector with elements corresponding to the three transitions.

penweights_list

A list of numeric vectors representing weights for each penalty term (e.g., for adaptive lasso.) Elements of the list should be indexed by the names "coef1", "coef2", "coef3", "fusedcoef12", "fusedcoef13", "fusedcoef23", "fusedbaseline12", "fusedbaseline13", and "fusedbaseline23"

mm_epsilon

Positive numeric tolerance parameter for smooth approximation of absolute value function at 0.

verbose

Numeric indicating the amount of iteration information should be printed to the user. Higher numbers provide more detailed information to user, but will slow down the algorithm.

maxit

Positive integer maximum number of iterations.

step_size_min

Positive numeric value for the minimum allowable step size to allow during backtracking.

conv_crit

String (possibly vector) giving the convergence criterion.

conv_tol

Positive numeric value giving the convergence tolerance for the chosen criterion.

num_restarts

Number of times to allow algorithm to restart if it reaches a point where it can make no further progress.

select_tol

Positive numeric value for thresholding estimates to be equal to zero.

Value

A list.


hreed7/SemiCompRisksPen documentation built on Dec. 15, 2024, 5:41 p.m.