plot.ahazpen | R Documentation |
Plots regularization paths for fitted penalized semiparametric additive hazards model.
## S3 method for class 'ahazpen' plot(x, xvar=c("norm","lambda"), labels=FALSE, df=TRUE, ylab="Regression coefficients", xlab=xname,...)
x |
The result of an |
xvar |
Scaling for first axis. Options are the L1 norm of the vector of
regression coefficients (" |
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
lambda, depending on |
... |
Additional graphical arguments passed to the |
ahazpen
, print.ahazpen
, predict.ahazpen
, coef.ahazpen
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.