plot_path {tramnet} | R Documentation |
"prof_*"
classesPlot regularization paths and optionally log-likelihood trajectories of objects
of class "prof_alpha"
and "prof_lambda"
. Coefficient names are
automatically added to the plot.
plot_path(object, plot_logLik = FALSE, ...)
object |
object of class |
plot_logLik |
Whether logLik trajectory should be plotted (default: |
... |
additional arguments to |
None
Lucas Kook
library("tramnet") library("survival") data("nki70", package = "penalized") nki70$resp <- with(nki70, Surv(time, event)) x <- scale(model.matrix( ~ 0 + DIAPH3 + NUSAP1 + TSPYL5 + C20orf46, data = nki70)) y <- Coxph(resp ~ 1, data = nki70, order = 10, log_first = TRUE) fit1 <- tramnet(y, x, lambda = 0, alpha = 1) pfl <- prof_lambda(fit1) plot_path(pfl) fit2 <- tramnet(y, x, lambda = 1, alpha = 1) pfa <- prof_alpha(fit2) plot_path(pfa)