ahazpen.pen.control {ahaz}R Documentation

Penalty controls for ahazpen


Describe the penalty function to be used in the penalized semiparametric additive hazards model. Typically only used in a call to ahazpen or tune.ahazpen.


# (Adaptive) lasso/elasticnet
lasso.control(alpha=1, ada.wgt=NULL)

# Stepwise SCAD
sscad.control(a=3.7, nsteps=1, init.sol=NULL, c=NULL)



Elasticnet penalty parameter with default alpha=1 corresponding to the standard lasso; see details.


Optional covariate weights used for fitting the adaptive lasso. Default is not to use weights, i.e. fit the standard lasso. A user-specified init.sol can be a nonnegative vector of length corresponding to the number of covariates in the model.
For advanced use it may also be specified as a function with arguments surv, X and weights precisely; see the details.


Parameter of the stepwise SCAD penalty, see details. Default is a=3.7


Number of steps in stepwise SCAD. Default is nsteps=1.


Optional initial solution for stepwise SCAD consisting of a numerical vector of length corresponding to the number of covariates in the model. Default is a vector of regression coefficients obtained from ahaz if there are more observations than covariates, zero otherwise. For advanced use, initsol it can also be specified as a function with arguments surv, X and weights precisely; see the details.


Optional scaling factor for stepwise SCAD. Usually it is not necessary to change supply this; see the details.


The lasso/elasticnet penalty function takes the form

p(lambda, beta) = lambda*[(1 - alpha)*|beta|_2 + alpha*|beta|_1]

where 0 < alpha <= 1. Choosing alpha<1 encourages joint selection of correlated covariates and may improve the fit when there are substantial correlations among covariates.

The stepwise SCAD penalty function takes the form

p(lambda, beta) = w(lambda, c*|b_1|) * |beta_1| + ... + w(lambda, c*|b_nobs|) * |beta_nobs|

where b is some initial estimate, c is a scaling factor, and for I the indicator function

w(lambda, x) = lambda * I(x <= lambda) + I(x > lambda) * (a*lambda-x)_+ / (a-1)

The scaling factor c controls how ‘different’ the stepwise SCAD penalty is from the standard lasso penalty (and is also used to remove dependency of the penalty on the scaling of the time axis).

The one-step SCAD method of Zou & Li (2008) corresponds to taking b equal to the estimator derived from ahaz. See Gorst-Rasmussen & Scheike (2011) for details. By iterating such one-step SCAD and updating the initial solution b accordingly, the algorithm approximates the solution obtained using full SCAD. Note that calculating the full SCAD solution generally leads to a nonconvex optimization problem: multiple solutions and erratic behavior of solution paths can be an issue.

The arguments ada.wgt and init.sol can be specified as functions of the observations. This is convenient, for example, when using cross-validation for tuning parameter selection. Such a function must be specified precisely with the arguments surv, X and weights and must output a numeric vector of length corresponding to the number of covariates. ahazpen will take care of scaling so the function should produce output on the original scale. See the examples here as well as the examples for tune.ahazpen for usage of this feature in practice.


An object with S3 class "ahaz.pen.control".


Type of penalty.


Function specifying the initial solution, if applicable.


Value of alpha, if applicable.


Number of steps for stepwise SCAD penalty, if applicable.


Parameter for stepwise SCAD penalty, if applicable.


Scaling factor for stepwise SCAD penalty, if applicable.


Function specifying the weights for the adaptive lasso penalty, if applicable.


Gorst-Rasmussen, A. & Scheike, T. H. (2011). Independent screening for single-index hazard rate models with ultra-high dimensional features. Technical report R-2011-06, Department of Mathematical Sciences, Aalborg University.

Leng, C. & Ma, S. (2007). Path consistent model selection in additive risk model via Lasso. Statistics in Medicine; 26:3753-3770.

Martinussen, T. & Scheike, T. H. (2008). Covariate selection for the semiparametric additive risk model. Scandinavian Journal of Statistics; 36:602-619.

Zou, H. & Li, R. (2008). One-step sparse estimates in nonconcave penalized likelihood models, Annals of Statistics; 36:1509-1533.

See Also

ahazpen, tune.ahazpen



# Break ties
time <- sorlie$time+runif(nrow(sorlie))*1e-2

# Survival data + covariates
surv <- Surv(time,sorlie$status)
X <- as.matrix(sorlie[,3:ncol(sorlie)])

# Fit additive hazards regression model with elasticnet penalty
model <- ahazpen(surv,X,penalty=lasso.control(alpha=0.1),dfmax=30)

# Adaptive lasso with weights 1/|beta_i|^0.5. Note that, although
# we do not use 'weights', it MUST be included as an argument
adafun <- function(surv,X,weights)
model <- ahazpen(surv,X[,1:50],penalty=lasso.control(ada.wgt=adafun))

# One-step SCAD with initial solution derived from univariate regressions
scadfun <- function(surv,X,weights){
 fit <- ahaz(surv,X,univariate=TRUE)
model.ssc <- tune.ahazpen(surv,X,dfmax=30,penalty=sscad.control(init.sol=scadfun))

[Package ahaz version 1.14 Index]