hazard.ratios: Hazard ratios of stratified survival data

Description Usage Arguments Details Value References Examples

Description

Returns hazard ratios and confidence intervals for each stratum.

Usage

1
hazard.ratios(time, status, exposure, strata, method = "wald")

Arguments

time

a numeric vector of survival times.

status

a numeric vector of censoring indicators, with 0 = censored and 1 = dead.

exposure

a factor vector with two levels indicating exposure. The first level is assumed to be the exposed condition.

strata

a factor vector with at least two levels indicating strata.

method

method for calculating hazard ratio and confidence interval. Choices are "wald" (default) and "midp".

Details

Hazard ratios and their confidence intervals are calculated with the Wald method using epitools::rateratio. This can be changed to median-unbiased estimation by setting method="midp".

Value

A list containing a hazard ratio estimate and confidence interval for each stratum.

References

Newman (2001), page 208.

Examples

1
2
3
4
5
## Table 10.15 from Example 10.14
with(breast.survival, hazard.ratios(time, status, receptor.level, stage))

## using the "midp" method
with(breast.survival, hazard.ratios(time, status, receptor.level, stage, method="midp"))

clayford/bme documentation built on May 13, 2019, 7:37 p.m.