| CoxModel {PDATK} | R Documentation |
Build a CoxModel object from a MultiAssayExperiment of
SurvivalExperiments. Allows easy application of the
survival::coxph function to many SurvivalExperiment at once,
assuming they share the survivalPredictor column.
CoxModel(object, survivalPredictor = "metacluster_labels")
object |
A |
survivalPredictor |
A |
A CoxModel object, with object in the trainData slot.
library(MultiAssayExperiment)
data(CSPC_MAE)
experiments(CSPC_MAE) <- endoapply(experiments(CSPC_MAE), SurvivalExperiment,
event_occurred='vital_status', survival_time='days_to_death')
coxModel <- CoxModel(CSPC_MAE, survivalPredictor='sample_type')