CoxModel {PDATK} | R Documentation

## CoxModel constructor

### Description

Build a `CoxModel` object from a `MultiAssayExperiment` of `SurvivalExperiment`s. Allows easy application of the `survival::coxph` function to many `SurvivalExperiment` at once, assuming they share the `survivalPredictor` column.

### Usage

    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

    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')

[Package PDATK version 1.2.0 Index]