YPmodelPhreg-package | R Documentation |
This package fits a semiparametric short term and long term hazard ratio model for the group variable, adjusted for proportional covariate effects. The model was studied in Yang and Prentice (2015), and it extends the two sample results in Yang and Prentice (2005). The model accommodates various non-proportional hazards scenarios including those with crossing hazards or survival functions. The main function of the package is ypreg
, which provides the estimates and confidence intervals of the model parameters, the average hazard ratio, and the hazard ratios at user-specified time points. Plots of point-wise and simultaneous confidence bands are also given.
Package: | YPmodelPhreg |
Type: | Package |
Version: | 1.0.0 |
Date: | 2023-04-21 |
License: | GPL (>= 3) |
No return value, called for side effects
Daewoo Pak and Song Yang Maintainer: Daewoo Pak <dpak@yonsei.ac.kr>
Yang, S., & Prentice, R. (2005). Semiparametric analysis of short-term and long-term hazard ratios with two-sample survival data. Biometrika, 92(1), 1-17.
Yang, S., & Prentice, R. L. (2015). Assessing potentially time-dependent treatment effect from clinical trials and observational studies for survival data, with applications to the Women's Health Initiative combined hormone therapy trial. Statistics in medicine, 34(11), 1801-1817.
ypreg
library(YPmodelPhreg)
data(colonexample)
head(colonexample)
res <- ypreg(colonexample, time.hr = c(1, 7))
res
plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.