This class encapsulates results or specification of a Sequential Probability Ratio Test.
Slots
call
(language) The call to
sprt
.data
(numeric, logical) Either a vector with cumulative counts or NA.
hi_int
(numeric) Intercept of the lower stop line.
low_int
(numeric) Intercept of the higher stop line.
slope
(numeric) Slope of stop lines.
recommendation
(character, logical) Either a recommendation on whether to accept H0 or H1, or keep sampling, or NA.
iterations
(numeric) Number of sequential sampling bouts required or processed.
Examples
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)
show(test11) # returns "accept H1" after 5 sampling bouts processed.
#>
#> Sequential Probability Ratio Test
#> Family: negative binomial
#> H0: mu = 2
#> H1: mu = 4
#>
#> Recommendation based on provided criteria: accept H1
#> Number of sampling bouts processed: 5
## End (Not run)