Description Usage Arguments Details Value References Examples
Performs a Cox-Oakes test of exponentiality of the null that the shape parameter of a Weibull distribution equals 1.
1 |
time |
a numeric vector of survival times. |
status |
a numeric vector of censoring indicators, with 0 = censored and 1 = dead. |
Under the null the Weibull distribution simplifies to an exponential distribution, implying a constant hazard function. Large values of the test statistic provide evidence against the exponential assumption of a constant hazard function. According to Newman (2001): "The correct interpretation is as follows: Given that we have decided to fit the data using using a Weibull model, not rejecting the null means there is no reason not to choose the exponential model (which is a type of Weibull model)." (p. 197)
A list with class "htest"
containing the following
components:
The Cox-Oakes test statistic.
The p-value of the test.
An estimate of the hazard rate.
A character string indicating the method employed.
A character string giving the name of the data.
Newman (2001), page 197.
1 2 3 4 5 6 7 8 9 10 11 | ## Example 10.1
cox.oakes(time = breast.survival$time, status = breast.survival$status)
## Provides moderate evidence that exponential assumption may not be satisfied.
## A graphical assessment can also be performed by plotting the estimated
## exponential survival curve and the Kaplan-Meier curve and deciding subjectively
## whether the latter appears to be exponential in appearance.
## Fig 10.2(a), p. 198
require(flexsurv)
fit.exp <- flexsurvreg(formula = Surv(time, status) ~ 1, data = breast.survival, dist="exp")
plot(fit.exp, ci=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.