plot,STBP,missing-method | R Documentation |
Method for signature "STBP"
to display resulting probabilities.
## S4 method for signature 'STBP,missing'
plot(x, y)
x |
Created as a result of a call to |
y |
Unused entry |
A plot with the sequence of posterior probabilities
# Testing the hypothesis of a sampled population being greater than trajectory H
H <- c(2, 5, 10, 20, 40, 40, 20, 10, 5, 2)
# Generating sequential samples (n = 3) from a population that is 1 below H
# (H - 1)
countP <- matrix(NA, 3, 10)
set.seed(101)
for(i in 1:10){
countP[, i] <- rpois(3, lambda = (H[i] - 1))
}
# Running STBP on the sample
test2F <- stbp_composite(data = countP,
greater_than = TRUE,
hypothesis = H,
density_func = "poisson",
prior = 0.5,
lower_bnd = 0,
upper_bnd = Inf,
lower_criterion = 0.001,
upper_criterion = 0.999)
plot(test2F)
## End (Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.