View source: R/pipeline_modules.R
fitCoxPH | R Documentation |
Fit coxph model with a predictor variable and a set of covariates.
fitCoxPH(
modelPredictions,
targetTable,
covariatesTable,
covariateColnames,
pipelineRunInformation,
modelLabel
)
modelPredictions |
A vector of model predictions. |
targetTable |
A matrix/data.frame with columns named 'Event' and 'time_to_event'. 'Event' should correspond to a binary label. 'time_to_event' should correspond to a positive numerical value representing the survival time (when Event == 1) or the time-to-censoring (when Event == 0) |
covariatesTable |
A table that includes columns corresponding to covariates to be included in the model. |
covariateColnames |
A named list with names corresponding to the
covariate column names to be used in the model. The values in the list
should correspond to the actual column name in |
pipelineRunInformation |
The object originally created by
|
modelLabel |
A string that will act as a label for this function call. The label will be used as a prefix for the saved object filenames in this function call. |
A named list consisting of the following elements:
'coxPHModel'
is the fit coxph model object (from the survival
library). 'coxPHModelSummary'
is the result from calling
summary()
on coxPHModel
. 'pseudoR2'
is the pseudo
r-squared value for the model. 'hazardRatio'
is the hazard ratio for
the predictor variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.