Description Usage Arguments Value References See Also Examples
Performs a test of the null that the hazard ratio between k strata is 1.
1 2 | k.hazard.ratio.test(time, status, exposure, strata, Wald = TRUE,
conf.level = 0.95)
|
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 at least 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. |
Wald |
a logical indicating whether to use the Wald or Likelihood Ratio Test. Default is TRUE. Only used in the 2 by 2 by K case. |
conf.level |
confidence level of the returned confidence interval. Must be a single number between 0 and 1. Default is 0.95. Only used in the 2 by 2 by K case. |
A list with class "htest"
containing the following
components:
The chi-square test statistic.
The degrees of freedom of the approximate chi-squared distribution of the test statistic.
The p-value of the test.
Common hazard ratio estimate. Only present in the 2 by 2 by K case.
The null common hazard ratio, which is currently set to 1. Only present in the 2 by 2 by K case.
A character string describing the alternative hypothesis. Currently only "two.sided". Only present in the 2 by 2 by K case.
A character string indicating the method employed.
A character string giving the name of the data.
Newman (2001), page 219 - 221, 226.
hazard.ratio.test
for unstratified survival data and hazard.ratios
for calculating estimated hazard ratios of stratified survival data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Example 10.14
with(breast.survival,
k.hazard.ratio.test(time = time, status = status,
exposure = receptor.level, strata = stage))
## LR Test
with(breast.survival,
k.hazard.ratio.test(time = time, status = status,
exposure = receptor.level, strata = stage,
Wald=FALSE))
## Example 10.18 - polychotomous exposure
with(breast.survival,
k.hazard.ratio.test(time = time, status = status,
exposure = stage, strata = receptor.level))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.