predictClasses,CohortList,ClinicalModel-method {PDATK} | R Documentation

## Use a Clinical GLM to Predict Classes for a `CohortList` of `SurvivalExperment` Objects.

### Description

Use a Clinical GLM to Predict Classes for a `CohortList` of `SurvivalExperment` Objects.

### Usage

    ## S4 method for signature 'CohortList,ClinicalModel'
    predictClasses(object, model, ..., na.action = "na.exclude", type = "response")

### Arguments

`object` | A `CohortList` with `SurvivalExperiment`s to predict classes for. The colData slot in ALL `SurvivalExperiment`s must have column names which match the formula in the model object.
`model` | A trained `ClinicalModel` object, as return by `trainModel`.
`...` | Fall through parameters to `stats::predict`.
`na.action` | The `na.action` paramter passed to `stats::predict.glm`.
`type` | The `type` parameter passed to `stats::predict.glm`

### Value

A `CohortList` with the model predictions in the colData slot as clinical_prob_good for each `SurvivalExperiment`, and the model in the metadata as predictionModel.

### Examples

    data(sampleClinicalModel)
    data(sampleCohortList)

    # Set parallelization settings
    BiocParallel::register(BiocParallel::SerialParam())

    # Train Model
    trainedClinicalModel <- trainModel(sampleClinicalModel)

    # Make predictions
    ClinicalPredCohortList <- predictClasses(sampleCohortList[c('PCSI', 'TCGA')],
      model=trainedClinicalModel)
    head(colData(ClinicalPredCohortList[[1]]))

[Package PDATK version 1.0.2 Index]