Description Usage Arguments Value References Examples
Performs a test of the null that the hazard ratio between two groups is 1.
1 2 | hazard.ratio.test(time, status, exposure, Wald = TRUE, conf.level = 0.95,
exact = FALSE)
|
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. |
Wald |
a logical indicating whether to use the Wald or Likelihood Ratio Test. Default is TRUE. |
conf.level |
confidence level of the returned confidence interval. Must be a single number between 0 and 1. Default is 0.95. |
exact |
a logical indicating whether the asymptotic (unconditional) test
or the exact test should be computed. Default is FALSE. The |
rev |
a logical indicating to whether to reverse the order of the factor levels when estimating the hazard ratio. |
A list with class "htest"
containing the following
components:
The chi-square test statistic. Only returned if "exact = FALSE"
.
The p-value of the test.
Hazard ratio estimate.
The null hazard ratio, which is currently set to 1.
A character string describing the alternative hypothesis. Currently only "two.sided".
A character string indicating the method employed.
A character string giving the name of the data.
Newman (2001), page 206 - 213.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Example 10.8
with(breast.survival, hazard.ratio.test(time, status, receptor.level))
with(breast.survival, hazard.ratio.test(time, status, receptor.level, Wald = FALSE))
## Example 10.9
## Receptor Level-Breast Cancer: Stage III
dat <- subset(breast.survival, stage=="III")
hazard.ratio.test(time = dat$time, status = dat$status, exposure = dat$receptor.level)
hazard.ratio.test(time = dat$time, status = dat$status, exposure = dat$receptor.level,
Wald = FALSE)
## Example 10.10
hazard.ratio.test(time = dat$time, status = dat$status, exposure = dat$receptor.level,
exact = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.