README.md

gghazard : Improved Base and Grid Plots for Survival Hazard Cox Regression

The following functions are implemented:

News

Installation

devtools::install_github("hrbrmstr/gghazard")

Usage

library(survival)
library(ggplot2)
library(gghazard)
#> Loading required package: gridExtra

# current verison
packageVersion("gghazard")
#> [1] '0.0.0.9000'

vfit <- coxph(Surv(time, status) ~ trt + factor(celltype) +
              karno + age, data=veteran, x=TRUE)
gg_cox_zph(fortify(cox.zph(vfit)), pred_col="maroon")

par(mfrow=c(2, 3))
plot(cox.zph(vfit), smoothcol="maroon", confcol="maroon")

par(mfrow=c(1, 1))

Test Results

library(gghazard)
library(testthat)

date()
#> [1] "Mon Aug 31 06:40:09 2015"

test_dir("tests/")
#> testthat results ========================================================================================================
#> OK: 0 SKIPPED: 0 FAILED: 0
#> 
#> DONE

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.



hrbrmstr/gghazard documentation built on May 17, 2019, 5:08 p.m.