Description Usage Arguments Author(s) References See Also Examples
Computes empirical Bayes estimate of power parameter (Gravestock&Held, 2017).
1 2 3 4 | ## S3 method for class 'betaMix'
powerparameter(prior, n, r, p.prior.a = 1, p.prior.b = 1, ...)
## S3 method for class 'normMix'
powerparameter(prior, n, m, sigma, ...)
|
prior |
An RBesT mixture object with a single mixture component |
n |
sample size |
r |
Number of successes |
m |
Sample mean |
sigma |
Sample standard deviation |
p.prior.a |
in case of binary outcome, shape1 parameter of initial beta prior for successes. |
p.prior.b |
in case of binary outcome, shape2 parameter of initial beta prior for successes. |
... |
Manuel Wiesenfarth
Gravestock, I. and Held, L. (2017). Adaptive power priors with empirical bayes for clinical trials. Pharmaceutical statistics, 16(5):349-360.
package StudyPrior
1 2 3 4 5 6 7 8 9 10 11 12 | # Normal Outcome
# standard deviation
sigma=1
# prior with nominal prior ESS=50
info <-mixnorm(informative=c(1, 0,1/sqrt(50)), sigma=sigma)
n=10 # sample size
m=0 #data mean equal to prior mean
powerparameter(info,m=m,n=n,sigma=sigma)
m=2 #prior-data conflict
powerparameter(info,m=m,n=n,sigma=sigma)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.