Description Usage Arguments See Also Examples
Determine a sample size for a given power and hyperparameter configuration
1 2 3 |
power |
desired power |
a1 |
alpha, the hyperparameter of the prior distribution of the first poisson rate |
b1 |
beta, the hyperparameter of the prior distribution of the first poisson rate |
a2 |
alpha, the hyperparameter of the prior distribution of the second poisson rate |
b2 |
beta, the hyperparameter of the prior distribution of the second poisson rate |
a |
alpha, the hyperparameter of the prior distribution under the null |
b |
beta, the hyperparameter of the prior distribution under the null |
pi0 |
the prior probability of the null hypothesis |
pi1 |
the prior probability of the alternative hypothesis |
c |
relative loss constant (loss due to type II error divided by loss due to type I error) |
family |
"binomial" or "poisson", depending on test |
method |
"ones" or "halves" |
quiet |
message the user with calls to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
a1 <- 2; b1 <- 6
a2 <- 3; b2 <- 3
plotGamma(c(a1, a2), c(b1, b2))
findSize(power = .8, a1, b1, a2, b2, family = "poisson")
a1 <- 5; b1 <- .2 # E = 1
a2 <- 30; b2 <- .167 # E = 5
findSize(power = .8, a1, b1, a2, b2, family = "poisson")
a1 <- 4; b1 <- 2
a2 <- 6; b2 <- 2
findSize(power = .5, a1, b1, a2, b2)
findSize(power = .6, a1, b1, a2, b2)
findSize(power = .7, a1, b1, a2, b2)
findSize(power = .8, a1, b1, a2, b2) # takes a while
findSize(power = .8, a1, b1, a2, b2, method = "halves")
findSize(power = .9, a1, b1, a2, b2, method = "halves")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.