predictClasses-CohortList-ClinicalModel-method: Use a Clinical GLM to Predict Classes for a 'CohortList' of...

Description Usage Arguments Value Examples

Description

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

Usage

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

Arguments

object

A CohortList with SurvivalExperiments to predict classes for. The colData slot in ALL SurvivalExperiments 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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]]))

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