rate.test: Asymptotic hazard rate test - single sample

Description Usage Arguments Value References Examples

Description

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

Usage

1
rate.test(time, status, null = 1, conf.level = 0.95, explicit = TRUE)

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.

explicit

a logical indicating whether to calculate an explicit or implicit confidence interval. Default is TRUE.

Value

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

statistic

The chi-square test statistic.

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 205.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Examples 10.5 and 10.6
rate.test(time = 10, status = 2, null = 0.4)
rate.test(time = 25, status = 5, null = 0.4)
rate.test(time = 50, status = 10, null = 0.4)

rate.test(time = 10, status = 2, null = 0.4, explicit = FALSE)
rate.test(time = 25, status = 5, null = 0.4, explicit = FALSE)
rate.test(time = 50, status = 10, null = 0.4, explicit = FALSE)

## Example 10.7
with(breast.survival, rate.test(time = time, status = status, explicit = FALSE))

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