Learn R Programming

NSM3 (version 1.18)

epstein: Epstein

Description

Function to compute the P-value for the observed Epstein E statistic

Usage

epstein(x, alternative = "two.sided", exact=FALSE)

Value

The function returns a list with two elements:

E

the value of the Epstein statistic

p

the corresponding probability

Arguments

x

a vector of data of length n

alternative

the direction of the alternative hypothesis. The choices are two.sided, ifr (for increasing failure rate) and dfr (for decreasing failure rate) with the default value being two.sided.

exact

TRUE/FALSE value that determines whether the exact test or the large sample approximation is used if n >= 9. If n < 9 the exact test is used. The default value is FALSE, so the large sample approximation will be used unless specified not to.

Author

Rachel Becvarik

Examples

Run this code
ex11.1<-c(42, 43, 51, 61, 66, 69, 71, 81, 82, 82)
Ep <- epstein(ex11.1, alt="ifr", exact=TRUE)
Ep$E
Ep$p

#Large Sample Approximation
Ep.lsa <- epstein(ex11.1, alt="ifr")

Run the code above in your browser using DataLab