ypreg {YPmodelPhreg}R Documentation

Fit a short-term and long-term hazard ratio model with proportional adjustment

Description

The main results of the function are the estimations of:

Usage

## Default S3 method:
ypreg(data, alpha = 0.05, time.hr = NULL,
  L = NULL, U = NULL, repnum = 5000, tau = NULL, ...)

Arguments

...

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 colonexample.

alpha

A numeric value for the significance level. The default is 0.05.

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 [L, U] over which the simultaneous confidence bands for the hazard function are calculated. There must be at least one uncensored observation after the value of L and L < U.

U

A numeric value for the upper bound of the range [L, U] over which the simultaneous confidence bands for the hazard function are calculated. There must be at least one uncensored observation before the value of U and U > L.

repnum

The number of replications for the re-sampling method. The default is 5000.

tau

A numeric value for the maximum follow-up time. The default is 0.9\timesthe maximum of all observations.

Details

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.

Value

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 time.hr

References

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.

See Also

plot.ypreg

Examples

library(YPmodelPhreg)
data(colonexample)
head(colonexample)

res <- ypreg(colonexample, time.hr = c(1, 7))
res
plot(res)


[Package YPmodelPhreg version 1.0.0 Index]