cox.oakes: Cox-Oakes Test of Exponentiality

Description Usage Arguments Details Value References Examples

Description

Performs a Cox-Oakes test of exponentiality of the null that the shape parameter of a Weibull distribution equals 1.

Usage

1
cox.oakes(time, status)

Arguments

time

a numeric vector of survival times.

status

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

Details

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)

Value

A list with class "htest" containing the following components:

statistic

The Cox-Oakes test statistic.

p.value

The p-value of the test.

estimate

An estimate of the hazard rate.

method

A character string indicating the method employed.

data.name

A character string giving the name of the data.

References

Newman (2001), page 197.

Examples

 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)

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