CoxModel: CoxModel constructor

Description Usage Arguments Value Examples

View source: R/class-CoxModel.R

Description

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.

Usage

1
CoxModel(object, survivalPredictor = "metacluster_labels")

Arguments

object

A MultiAssayExperiment containing only SurvivalExperiment objects.

survivalPredictor

A character vector indicating the name of the one or more columns in the colData slot of each SurvivalExperiment to use for testing survival differences between different groups. Must be a valid column in the colData of ALL experiments.

Value

A CoxModel object, with object in the trainData slot.

Examples

1
2
3
4
5
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')

bhklab/PDATK documentation built on Dec. 27, 2021, 7:46 a.m.