predictClasses-SurvivalExperiment-ClinicalModel-method: Predict Survival Prognosis Classes and Risk Scores for A...

Description Usage Arguments Value Examples

Description

Predict Survival Prognosis Classes and Risk Scores for A SurvivalModel Using a ClinicalModel Object.

Usage

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

Arguments

object

A SurvivalExperiment object with the correct columns in colData to match the formula for the ClinicalModel 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 SurvivalExperiment with the model predictions in the colData slot as clinical_prob_good.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(sampleClinicalModel)
data(samplePCSIsurvExp)

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

# Train Model
trainedClinicalModel <- trainModel(sampleClinicalModel)

# Make predictions
ClinicalPredSurvExp <- predictClasses(samplePCSIsurvExp,
  model=trainedClinicalModel)
head(colData(ClinicalPredSurvExp))

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