exact.rate.test: Exact hazard rate test - single sample

Description Usage Arguments Value References Examples

Description

Performs an exact test of the null that a single sample hazard rate is equal to some value.

Usage

1
exact.rate.test(time, status, null = 1, conf.level = 0.95, upper = 100)

Arguments

time

a numeric vector of survival times.

status

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

null

the null hazard rate. Default is 1.

conf.level

confidence level of the returned confidence interval. Must be a single number between 0 and 1.

upper

upper end point of the interval to be searched for one dimensional root (zero) finding (passed to uniroot)

Value

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

p.value

The p-value of the test.

estimate

An estimate of the hazard rate.

null.value

The null hazard rate.

conf.int

A confidence interval for the hazard rate.

alternative

A character string describing the alternative hypothesis. Currently only "two.sided".

method

A character string indicating the method employed.

data.name

A character string giving the name of the data.

References

Newman (2001), page 203-4.

Examples

1
2
3
4
5
6
## Example 10.3
exact.rate.test(time = 10, status = 2, null = 0.4)

## With Breast Cancer Survival data
with(breast.survival, exact.rate.test(time = time, status = status))
with(breast.survival, exact.rate.test(time = time, status = status, null = 0.01))

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