aftpen: Penalized AFT estimation for right-censored data

View source: R/aftPenCDA.r

aftpenR Documentation

Penalized AFT estimation for right-censored data

Description

Fits a penalized accelerated failure time (AFT) model for right-censored survival data using induced smoothing and a penalized coordinate descent algorithm. Supported penalties include BAR, LASSO, adaptive LASSO, and SCAD.

Usage

aftpen(
  dt,
  lambda,
  se,
  type = c("BAR", "LASSO", "ALASSO", "SCAD"),
  r = 3.7,
  eps = 1e-08,
  max.iter = 100
)

Arguments

dt

A data frame whose first two columns are y and d, where y is the observed survival or censoring time and d is the event indicator (1 for observed event and 0 for right-censoring). The remaining columns are treated as covariates.

lambda

A nonnegative tuning parameter controlling the amount of penalization.

se

A character string specifying the variance estimation method.

"CF"

Closed-form (plug-in) variance estimator based on the analytic expression of the estimating function (see Equation (6)).

"ZL"

Perturbation-based variance estimator using the resampling approach of Zeng and Lin (2008).

type

Penalty type. One of "BAR", "LASSO", "ALASSO", or "SCAD".

r

A positive tuning constant used in the SCAD penalty. Ignored unless type = "SCAD". The default is 3.7.

eps

Convergence tolerance for the outer penalized coordinate descent iterations. The default is 1e-8.

max.iter

Maximum number of iterations for the outer penalized coordinate descent algorithm. The default is 100.

Details

The function first calls the Rcpp backend is_aft_cpp() to obtain an initial estimator together with gradient and Hessian information. A Cholesky-based transformation is then applied, followed by coordinate-wise penalized updates.

For type = "BAR", the update uses the internal BAR_threshold() operator. For type = "LASSO", "ALASSO", and "SCAD", soft-thresholding-based updates are used.

Value

A list containing the following components:

  • beta: final coefficient estimate on the original scale.

Examples

n = 100
p = 10
beta0 = c(rep(1,3),rep(0,7))
x = matrix(rnorm(n * p), n, p)
T = exp(x%*%beta0 + rnorm(n))
C = rexp(n, rate = exp(-2))
d = 1*(T<C)
y = pmin(T,C)
dt = data.frame(y,d,x)
fit <- aftpen(dt, lambda = 0.1, se = "CF", type = "BAR")
fit$beta

aftPenCDA documentation built on April 23, 2026, 9:11 a.m.