postmix.powerprior: Posterior Analysis for empirical Bayes powerprior

Description Usage Arguments Details Author(s) References See Also Examples

Description

Calculates the posterior distribution given data data and prior priormix, where the prior is an empirical Bayes powerprior (Gravestock&Held, 2017). Supports beta-binomial and normal-normal model.

Usage

1
2
3
4
5
6
## S3 method for class 'powerprior'
postmix(priormix, data, n, r, m, se, p.prior.a, p.prior.b, ...)
## S3 method for class 'betaMix'
powerprior(prior, n, r, p.prior.a, p.prior.b, ...)
## S3 method for class 'normMix'
powerprior(prior, n, m, sigma, ...)

Arguments

priormix

prior object created by as.powerprior

prior

An RBesT mixture object with a single mixture component

data

individual data as in postmix. If the individual data is not given, then summary data has to be provided

n

sample size

r

number of successes

m

sample mean

se

sample standard error

sigma

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

...

currently not supported

Details

Extends postmix. See its documentation for further details on arguments. powerprior and postmix.powerprior are equivalent except that the former accepts a single component mixture object while the latter accepts a powerprior object created by as.powerprior. powerprior may be deprecated in the future.

Author(s)

Manuel Wiesenfarth

References

Gravestock, I. and Held, L. (2017). Adaptive power priors with empirical bayes for clinical trials. Pharmaceutical statistics, 16(5):349-360.

See Also

package StudyPrior

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
######################
# Normal Outcome
  # standard deviation
    sigma=1
  # prior with nominal prior ESS=50
    inf=c(0,1/sqrt(50))
    info <-mixnorm(informative=c(1, inf), sigma=sigma)

  n=10
  posterior=postmix(as.powerprior(info),n = n,m=1,se=sigma/sqrt(n))
  plot(posterior)
  pmix(posterior, 1.5, lower.tail = FALSE)

wiesenfa/ESS documentation built on June 19, 2019, 4:19 p.m.