trainModel-ClinicalModel-method: Fit a GLM Using Clinical Predictors Specified in a...

Description Usage Arguments Value Examples

Description

Fit a GLM Using Clinical Predictors Specified in a ClinicalModel Object.

Usage

1
2
3
4
5
6
7
## S4 method for signature 'ClinicalModel'
trainModel(
  object,
  ...,
  family = binomial(link = "logit"),
  na.action = na.exclude
)

Arguments

object

A ClinicalModel object, with survival data for the model in the colData slot.

...

Fall through parameters to the stats::glm function.

family

Argument to the family parameter of stats::glm. Defaults to binomial(link='logit'). This parameter must be named.

na.action

Argument to the na.action paramater of stats::glm. Deafults to 'na.omit', dropping rows with NA values in one or more of the formula variables.

Value

A ClinicalModel object with a glm object in the models slot.

Examples

1
2
3
4
5
6
7
data(sampleClinicalModel)
set.seed(getModelSeed(sampleClinicalModel))

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

trainedClinicalModel <- trainModel(sampleClinicalModel)

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