plotSurvivalCurves,CoxModel-method {PDATK} | R Documentation

## Plot Survival Curves from a Fit `CoxModel` Object

### Description

Plot Survival Curves from a Fit `CoxModel` Object

### Usage

    ## S4 method for signature 'CoxModel'
    plotSurvivalCurves(object, byCohort = TRUE, ..., facet.by = "cohort")

### Arguments

`object` | A `CoxModel` object with survival curves fit via the `trainModel` method.
`byCohort` | `TRUE` to return a single plot object faceted by `facet.by`, `FALSE` to get a list of individual survival curves per cohort.
`...` | Fall through parameters to `survminer::ggsurvplot` function.
`facet.by` | What column of the object `modelDT` to use for faceting the survival plot. Defaults to 'cohorts'. Only used if `byCohort` is `TRUE`.

### Value

A `ggplot` or `list` of ggplot objects containing the survival curves for each cohort in the `trainData` slot of the `CoxModel`.

[Package PDATK version 1.0.2 Index]