plot_path {tramnet} | R Documentation |
Plot regularization paths for "prof_*"
classes
Description
Plot regularization paths and optionally log-likelihood trajectories of objects
of class "prof_alpha"
and "prof_lambda"
. Coefficient names are
automatically added to the plot.
Usage
plot_path(object, plot_logLik = FALSE, ...)
Arguments
object |
object of class |
plot_logLik |
Whether logLik trajectory should be plotted (default: |
... |
additional arguments to |
Value
None
Author(s)
Lucas Kook
Examples
library("tramnet")
if (require("survival") & require("penalized")) {
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)
}
[Package tramnet version 0.0-8 Index]