Skip to contents

Plots the validation performance against lambda for MDTL elastic net estimates.

Usage

# S3 method for class 'cox_MDTL_enet'
plot(
  x,
  test_z = NULL,
  test_time = NULL,
  test_delta = NULL,
  test_stratum = NULL,
  criteria = c("loss", "CIndex"),
  ...
)

Arguments

x

An object of class "cox_MDTL_enet".

test_z

Matrix of test covariates.

test_time

Vector of test survival times.

test_delta

Vector of test status indicators.

test_stratum

Vector of test strata.

criteria

Metric to plot: "loss" or "CIndex".

...

Additional arguments.

Value

A ggplot object.

Examples

if (FALSE) { # \dontrun{
data(ExampleData_highdim)
train_dat_highdim <- ExampleData_highdim$train
test_dat_highdim <- ExampleData_highdim$test
beta_external_highdim <- ExampleData_highdim$beta_external

cox_MDTL_enet_est <- cox_MDTL_enet(z = train_dat_highdim$z,
                                   delta = train_dat_highdim$status,
                                   time = train_dat_highdim$time,
                                   beta = beta_external_highdim,
                                   vcov = NULL,
                                   eta = 0)

plot.cox_MDTL_enet(cox_MDTL_enet_est,
                   test_z = test_dat_highdim$z,
                   test_time = test_dat_highdim$time,
                   test_delta = test_dat_highdim$status,
                   test_stratum = test_dat_highdim$stratum,
                   criteria = "CIndex")
} # }