# If no data is provided, an object of class "SPRT" is returned from which a
# chart with stop lines or a summary of the test with coefficients for stop lines
# can be extracted.
test00 <- sprt(mu0 = 2,
mu1 = 4,
density_func = "negative binomial",
overdispersion = 4.6,
alpha = 0.1,
beta = 0.1)
test00 # returns test specification and stop lines coefficients
plot(test00) # returns a chart with stop lines
# If data is provided, an object of class "SPRT" is returned with test results.
counts <- c(2, 5, 6, 2, 7)
test11 <- sprt(data = counts,
mu0 = 2,
mu1 = 4,
density_func = "negative binomial",
overdispersion = 4.6,
alpha = 0.1,
beta = 0.1)
test11 # returns "accept H1" after 5 sampling bouts processed.
## End (Not run)
Run the code above in your browser using DataLab