plot.ahazpen {ahaz} | R Documentation |
Plot an ahazpen object
Description
Plots regularization paths for fitted penalized semiparametric additive hazards model.
Usage
## S3 method for class 'ahazpen'
plot(x, xvar=c("norm","lambda"), labels=FALSE, df=TRUE,
ylab="Regression coefficients", xlab=xname,...)
Arguments
x |
The result of an |
xvar |
Scaling for first axis. Options are the |
labels |
Try to display indices for the regression coefficients in the right-hand
margin. Default is |
df |
Display number of nonzero parameters in top margin. Default
is |
ylab |
Label for y-axis. |
xlab |
Label for x-axis. The default is either "L1 norm" or
|
... |
Additional graphical arguments passed to the |
See Also
ahazpen
, print.ahazpen
, predict.ahazpen
, coef.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)])
# Fit additive hazards regression model
fit <- ahazpen(surv, X, dfmax=50)
par(mfrow=c(1,2)); plot(fit); plot(fit,xvar="lambda")
# With labels only
plot(fit,labels=TRUE,df=FALSE)
[Package ahaz version 1.15 Index]