ypreg | R Documentation |
The main results of the function are the estimations of:
parameters in the covariate-adjusted short-term and long-term hazard ratio model with confidence intervals;
the average hazard ratio with the confidence interval; and
the hazard ratio function along with point-wise and simultaneous confidence bands (confidence intervals for the hazard ratios at specific user input time points are also given).
## Default S3 method:
ypreg(data, alpha = 0.05, time.hr = NULL,
L = NULL, U = NULL, repnum = 5000, tau = NULL, ...)
... |
for S4 method only. |
data |
A numeric matrix containing all variables in the data set. The columns must follow this order: 1) time until event or censoring, 2) censoring status (1 = event, 0 = censored), 3) binary group indicator taking values of 0 and 1 (e.g., 1 = treatment, 0 = control for a randomized trial), and 4) a set of numeric vectors of covariates. See the data structure of |
alpha |
A numeric value for the significance level. The default is |
time.hr |
A numeric vector of time points at which hazard ratios will be estimated along with confidence intervals. |
L |
A numeric value for the lower bound of the range [ |
U |
A numeric value for the upper bound of the range [ |
repnum |
The number of replications for the re-sampling method. The default is |
tau |
A numeric value for the maximum follow-up time. The default is |
The confidence intervals for the hazard ratios are obtained using the logarithmic transformation. When the user input interval [L
, U
] is different from the default interval, the intersection of the user input interval and the default interval is used. The point-wise confidence intervals and the simultaneous confidence bands can be plotted by supplying the object being returned by the function ypreg
to the function plot.ypreg
.
an object of S3 ypreg
class representing the fit. The object also includes the results of the Cox proportional hazards model, implemented by using the coxph
function in the survival
library.
A list with at least the following elements:
fit_coxph |
estimation results from the Cox proportional hazards model |
best_b0 |
the estimates from the short-term and long-term hazard ratio model without proportional adjustment |
best_ypx |
the estimates from the short-term and long-term hazard ratio model with proportional adjustment |
res_summ |
summary of estimation results with the covariate-adjusted short-term and long-term hazard ratio model |
res_hrci |
estimation results of hazard ratios at |
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.
plot.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.