BerOMNPP_MCMC1 function

MCMC Sampling for Bernoulli Population of multiple ordered historical data using Normalized Power Prior

MCMC Sampling for Bernoulli Population of multiple ordered historical data using Normalized Power Prior

Multiple ordered historical data are incorporated together. Conduct posterior sampling for Bernoulli population with normalized power prior. For the power parameter γ\gamma, a Metropolis-Hastings algorithm with independence proposal is used. For the model parameter pp, Gibbs sampling is used.

BerOMNPP_MCMC1(n0, y0, n, y, prior_gamma, prior_p, gamma_ind_prop, gamma_ini, nsample, burnin, thin, adjust = FALSE)

Arguments

  • n0: a non-negative integer vector: number of trials in historical data.
  • y0: a non-negative integer vector: number of successes in historical data.
  • n: a non-negative integer: number of trials in the current data.
  • y: a non-negative integer: number of successes in the current data.
  • prior_gamma: a vector of the hyperparameters in the prior distribution Dirichlet(α1,α2,...,αK)Dirichlet(\alpha_1, \alpha_2, ... ,\alpha_K) for γ\gamma.
  • prior_p: a vector of the hyperparameters in the prior distribution Beta(α,β)Beta(\alpha, \beta) for pp.
  • gamma_ind_prop: a vector of the hyperparameters in the proposal distribution Dirichlet(α1,α2,...,αK)Dirichlet(\alpha_1, \alpha_2, ... ,\alpha_K) for γ\gamma.
  • gamma_ini: the initial value of γ\gamma in MCMC sampling.
  • nsample: specifies the number of posterior samples in the output.
  • burnin: the number of burn-ins. The output will only show MCMC samples after burnin.
  • thin: the thinning parameter in MCMC sampling.
  • adjust: Logical, indicating whether or not to adjust the parameters of the proposal distribution.

Returns

A list of class "NPP" with three elements: - acceptrate: the acceptance rate in MCMC sampling for γ\gamma using Metropolis-Hastings algorithm.

  • p: posterior of the model parameter pp.

  • delta: posterior of the power parameter δ\delta. It is equal to the cumulative sum of γ\gamma.

Details

The outputs include posteriors of the model parameter(s) and power parameter, acceptance rate in sampling γ\gamma. The normalized power prior distribution is given by:

π0(γ)π0(θ)k=1KL(θD0k)(i=1kγi)π0(θ)k=1KL(θD0k)(i=1kγi)dθ. \frac{\pi_0(\gamma)\pi_0(\theta)\prod_{k=1}^{K}L(\theta|D_{0k})^{(\sum_{i=1}^{k}\gamma_i)}}{\int \pi_0(\theta)\prod_{k=1}^{K}L(\theta|D_{0k})^{(\sum_{i=1}^{k}\gamma_i)}d\theta}.

Here, π0(γ)\pi_0(\gamma) and π0(θ)\pi_0(\theta) are the initial prior distributions of γ\gamma and θ\theta, respectively. L(θD0k)L(\theta|D_{0k}) is the likelihood function of historical data D0kD_{0k}, and i=1kγi\sum_{i=1}^{k}\gamma_i is the corresponding power parameter.

Examples

BerOMNPP_MCMC1(n0 = c(275, 287), y0 = c(92, 125), n = 39, y = 17, prior_gamma=c(1,1,1)/3, prior_p=c(1/2,1/2), gamma_ind_prop=rep(1,3)/2, gamma_ini=NULL, nsample = 2000, burnin = 500, thin = 2, adjust = FALSE)

Author(s)

Qiang Zhang zqzjf0408@163.com

References

Ibrahim, J.G., Chen, M.-H., Gwon, Y. and Chen, F. (2015). The Power Prior: Theory and Applications. Statistics in Medicine 34:3724-3749.

Duan, Y., Ye, K. and Smith, E.P. (2006). Evaluating Water Quality: Using Power Priors to Incorporate Historical Information. Environmetrics 17:95-106.

See Also

BerMNPP_MCMC1, BerMNPP_MCMC2, BerOMNPP_MCMC2

  • Maintainer: Zifei Han
  • License: GPL (>= 2)
  • Last published: 2023-12-12

Useful links