Skip to content

Suggestion: a new function ggcoxadjustedcurves to fix #67 #133

@pbiecek

Description

@pbiecek

In #67 @markdanese proposed to add survival curves for cox model.
Not curves for average values of variables but curves averages over the distribution of variables observed in the data (like here: https://cran.r-project.org/web/packages/survival/vignettes/adjcurve.pdf, or in Marks' code here: https://gist.github.com/markdanese/d1ddfdb2f618373c719bdb444ca34be9)

Suggestion: add a ggcoxadjustedcurves() function, that will plot survival curve for the whole dataset (average over all individual curves) or for subsets generated by a given variable.

In addition, al individual curves may be also added to the plot.

Some examples:
For whole dataset

screen shot 2017-02-01 at 23 39 12

For selected variables

screen shot 2017-02-01 at 23 25 35

screen shot 2017-02-01 at 23 25 17

btw: I am not familiar with data.table, so this function uses dplyr and tidyr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions