hazard.test: Compare hazard rates of two samples

Description Usage Arguments Value Examples

View source: R/hazard.test.R

Description

Compare hazard rates of two samples

Usage

1
hazard.test(x, y, alternative = "two.sided")

Arguments

x

a vector of data from the first sample

y

a vector of data from the second sample

alternative

a character string specifying the alternative hypothesis for hazard rate ordering, must be one of "two.sided" (x=y), "greater" (x>y) or "less" (x<y)

Value

Returns the test statistic and p-value for the hazard rate test

Examples

1
2
3
4
#Testing if X > Y in hazard rate ordering
x = rexp(n=10, rate=1/10)
y = rexp(n=10, rate=1/5)
hazard.test(x,y, alternative="greater")

wbbreslin/HazardRateTest documentation built on Dec. 23, 2021, 5:08 p.m.