| aftpen | R Documentation |
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.
aftpen(
dt,
lambda,
se,
type = c("BAR", "LASSO", "ALASSO", "SCAD"),
r = 3.7,
eps = 1e-08,
max.iter = 100
)
dt |
A data frame whose first two columns are |
lambda |
A nonnegative tuning parameter controlling the amount of penalization. |
se |
A character string specifying the variance estimation method.
|
type |
Penalty type. One of |
r |
A positive tuning constant used in the SCAD penalty. Ignored unless
|
eps |
Convergence tolerance for the outer penalized coordinate descent
iterations. The default is |
max.iter |
Maximum number of iterations for the outer penalized
coordinate descent algorithm. The default is |
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.
A list containing the following components:
beta: final coefficient estimate on the original scale.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.