HRatio: Estimate hazard ratio between two subjects

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/HRatio.R

Description

This function estimates the hazard ratio between two subjects at given times, along with the associated 95% confidence interval.

Usage

1
HRatio(x, times, NumStra, NumZ=NULL, DemStra, DemZ=NULL)

Arguments

x

results from the model fit returned by the icweib function.

times

the vector of times at which the hazard ratio is estimated.

NumStra

the strata of the subject in the numerator. If the model is unstratified, then set it to be the constant that is used for strata argument in icweib function, e.g. "ALL".

NumZ

the vector of values of the explanatory variables for the subject in the numerator. The order and length should match the estimated coefficients as shown in x$coef. The default is NULL, corresponding to all 0 or baseline.

DemStra

the strata of the subject in the denominator. If the model is unstratified, then set it to be the constant that is used for strata argument in icweib function, e.g. "ALL".

DemZ

the vector of values of the explanatory variables for the subject in the denominator. The order and length should match the estimated coefficients as shown in x$coef. The default is NULL, corresponding to all 0 or baseline.

Details

The hazard ratio between two subjects is obtained from the maximum likelihood estimates from the stratified Weibull regression model, along with the corresponding 95% confidence interval.

Value

A data frame of estimated hazard ratios and confidence intervals for two subjects at each time point is returned.

Author(s)

Xiangdong Gu and Raji Balasubramanian

See Also

icweib, plot

Examples

1
2
3
data(tooth24)
fit <- icweib(L = left, R = right, data = tooth24, strata = dmf, covariates = ~sex)
HRatio(fit, times = 1:7, NumStra = 0, NumZ=0, DemStra = 1, DemZ=0)

sachsmc/straweib documentation built on Jan. 13, 2018, 12:14 a.m.