Description Usage Arguments Examples
View source: R/pec-eha-aftreg.R
Calculate cross-validated prediction error curves
1 2 3 4 5 6 7 8 9  | aft_pec_cv(
  data,
  mod.form,
  ipcw.form,
  times = c(0, 30, 100),
  seed = NULL,
  k = 10,
  ...
)
 | 
data | 
 The data set used for cross-validated brier-score calculation.  | 
mod.form | 
 The model specification used to fit the model in each fold.
Will be passed to   | 
ipcw.form | 
 The specification of the model that calculates the
inverse probability censoring weights (ipcw). Will be passed to
  | 
times | 
 For   | 
seed | 
 If specified this seed will be used (to replicate CV folds for example).  | 
k | 
 Number of folds (an integer).  | 
... | 
 Further arguments passed to   | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | library(eha)
pec_cv_df <- aft_pec_cv(
 data = mort,
 mod.form = "Surv(time = enter, time2 = exit, event = event)~ses",
 ipcw.form = "Surv(time = enter, time2 = exit, event = event)~ses",
 times = seq(0, 10, by = 1),
 method = "cox",
 k = 5)
pec_cv_df <- aft_pec_cv(
 data = mort,
 mod.form = "Surv(time = enter, time2 = exit, event = event)~ses",
 ipcw.form = "Surv(time = enter, time2 = exit, event = event)~ses",
 times = seq(0, 10, by = 1),
 method = "aftreg",
 k = 5)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.