Description Usage Arguments Value References Examples
Performs a Mantel-Haenszel test of the null that the hazard ratio is 1 for all exposure categories, relative to the reference category. A warning is given if any expected count is less than 5, along with the offending expected count(s).
1 | mantelhaen.pt.test(time, status, exposure)
|
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. |
A list with class "htest"
containing the following
components:
The Mantel-Haenszel X-squared chi-square test statistic.
The p-value of the test.
Hazard ratio estimates. The reference level is 1.
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 216.
1 2 3 4 5 6 | ## Example 10.12
with(breast.survival, mantelhaen.pt.test(time, status, stage))
## Example 10.13, assessment of the Poisson-Exponential Assumption
mantelhaen.pt.test(time = c(2363, 7108), status = c(5,44), exposure = gl(n = 2, k = 1))
## p = 0.017; moderate evidence of unequal hazard rates in the two time intervals.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.