Description Usage Arguments Value Examples
Compare hazard rates of two samples
1 | hazard.test(x, y, alternative = "two.sided")
|
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) |
Returns the test statistic and p-value for the hazard rate test
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.