MultinomialNPP function

MCMC Sampling for Multinomial Population using Normalized Power Prior

MCMC Sampling for Multinomial Population using Normalized Power Prior

Conduct posterior sampling for multinomial population with normalized power prior. For the power parameter δ\delta, a Metropolis-Hastings algorithm with either independence proposal, or a random walk proposal on its logit scale is used. For the model parameter vector θ\theta, Gibbs sampling is used. Assume the prior for model parameter θ\theta comes from a Dirichlet distribution.

MultinomialNPP_MCMC(Data.Cur = c(10, 10, 10), Data.Hist = c(10, 10, 10), CompStat = list(n0 = NULL, n1 = NULL), prior = list(theta.dir = c(0.5, 0.5, 0.5), delta.alpha = 1, delta.beta = 1), MCMCmethod = 'IND', rw.logit.delta = 0.1, ind.delta.alpha = 1, ind.delta.beta = 1, nsample = 5000, control.mcmc = list(delta.ini = NULL, burnin = 0, thin = 1))

Arguments

  • Data.Cur: a non-negative integer vector of KK elements: c(number of success in group 1, number of success in group 2, ..., number of success in group KK) in the current data.

  • Data.Hist: a non-negative integer vector of KK elements: c(number of success in group 1, number of success in group 2, ..., number of success in group KK) in the historical data.

  • CompStat: a list of two elements that represents the "compatibility(sufficient) statistics" for θ\theta. Default is NULL so the fitting will be based on the data. If the CompStat is provided then the inputs in Data.Cur and Data.Hist will be ignored. Note: in multinomial case providing CompStat is equivalent to provide the data summary as in Data.Cur and Data.Cur.

    n0 is a non-negative integer vector of KK elements for compatible statistics in historical data: c(number of success in group 1, number of success in group 2, ..., number of success in group KK).

    n1 is a non-negative integer vector of KK elements for compatible statistics in current data: c(number of success in group 1, number of success in group 2, ..., number of success in group KK).

  • prior: a list of the hyperparameters in the prior for both pp and δ\delta.

    theta.dir is a vector of KK elements of the hyperparameter α\alpha

    in the prior distribution Dir(α[1],α[2],...,α[K])Dir(\alpha[1],\alpha[2],...,\alpha[K]) for θ\theta.

    delta.alpha a scalar, the hyperparameter α\alpha in the prior distribution Beta(α,β)Beta(\alpha, \beta) for δ\delta.

    delta.beta a scalar, the hyperparameter β\beta in the prior distribution Beta(α,β)Beta(\alpha, \beta) for δ\delta.

  • MCMCmethod: sampling method for δ\delta in MCMC. It can be either 'IND' for independence proposal; or 'RW' for random walk proposal on logit scale.

  • rw.logit.delta: the stepsize(variance of the normal distribution) for the random walk proposal of logit δ\delta. Only applicable if MCMCmethod = 'RW'.

  • ind.delta.alpha: specifies the first parameter α\alpha when independent proposal Beta(α,β)Beta(\alpha, \beta) for δ\delta is used. Only applicable if MCMCmethod = 'IND'

  • ind.delta.beta: specifies the first parameter β\beta when independent proposal Beta(α,β)Beta(\alpha, \beta) for δ\delta is used. Only applicable if MCMCmethod = 'IND'

  • nsample: specifies the number of posterior samples in the output.

  • control.mcmc: a list of three elements used in posterior sampling.

    delta.ini is the initial value of δ\delta in MCMC sampling.

    burnin is the number of burn-ins. The output will only show MCMC samples after bunrin.

    thin is the thinning parameter in MCMC sampling.

Returns

A list of class "NPP" with four elements: - p: posterior of the model parameter θ\theta.

  • delta: posterior of the power parameter δ\delta.

  • acceptance: the acceptance rate in MCMC sampling for δ\delta using Metropolis-Hastings algorithm.

  • DIC: the deviance information criteria for model diagnostics.

Details

The outputs include posteriors of the model parameter(s) and power parameter, acceptance rate in sampling δ\delta, and the deviance information criteria.

Examples

MultinomialNPP_MCMC(Data.Cur = c(3,11,3,669), Data.Hist = c(9,20,9,473), prior = list(theta.dir = c(1,1,1,1), delta.alpha = 1, delta.beta = 1), MCMCmethod = 'IND', rw.logit.delta = 0.1, ind.delta.alpha = 1, ind.delta.beta = 1, nsample = 10000, control.mcmc = list(delta.ini = NULL, burnin = 2000, thin = 5))

Author(s)

Tianyu Bai tianyu.bai24@gmail.com

Zifei Han hanzifei1@gmail.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

BerNPP_MCMC; NormalNPP_MCMC; PoissonNPP_MCMC

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

Useful links