Description Usage Arguments Value Author(s) References See Also Examples
Convert RBesT mix object into powerprior object allowing the computation of empirical Bayes power priors (Gravestock&Held, 2017).
1 | as.powerprior(prior, p.prior.a = 1, p.prior.b = 1)
|
prior |
An RBesT betaMix or normMix mixture object with a single mixture component |
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 |
A powerprior object which can be used, e.g. in postmix.powerprior
to compute posterior.
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 13 14 15 | ######################
# 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
postmix(info,m=m,se=sigma/sqrt(n))
postmix(as.powerprior(info),m=m,se=sigma/sqrt(n))
m=2 #prior-data conflict
postmix(info,m=m,se=sigma/sqrt(n))
postmix(as.powerprior(info),m=m,se=sigma/sqrt(n)) #variance inflation
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.