plot.tune.ahazpen {ahaz}R Documentation

Plot a tune.ahazpen object

Description

Plot, as a function of the penalty parameter, the curve of tuning scores produced when tuning a penalized semiparametric additive hazards model.

Usage

## S3 method for class 'tune.ahazpen'
plot(x, df = TRUE, ...)  

Arguments

x

The result of a call to tune.ahazpen.

df

Display number of nonzero parameters in top margin. Default is df=TRUE.

...

Additional graphical arguments passed to the plot function.

Details

A plot is produced displaying the tuning score for each value of penalty parameter (alongside upper and lower standard deviation curves, if cross-validation has been used). The value of lambda which minimizes the estimated tuning score is indicated with a dashed vertical line.

See Also

ahazpen, tune.ahazpen, print.tune.ahazpen.

Examples

data(sorlie)

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

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

# Do 10 fold cross-validation
set.seed(10101)
tune.fit <- tune.ahazpen(surv, X, penalty="lasso",
              dfmax=50, tune = cv.control(nfolds=10))
plot(tune.fit)


[Package ahaz version 1.14 Index]