PoiMNPP_MCMC1: MCMC Sampling for Poisson Population using Normalized Power...

View source: R/PoiMNPP_MCMC1.R

PoiMNPP_MCMC1R Documentation

MCMC Sampling for Poisson Population using Normalized Power Prior with Multiple Historical Data

Description

This function incorporates multiple sets of historical data for posterior sampling in a Poisson population using a normalized power prior. The power parameter \delta uses a Metropolis-Hastings algorithm, which can be either an independence proposal or a random walk proposal on its logit scale. For the model parameter \lambda, Gibbs sampling is employed.

Usage

PoiMNPP_MCMC1(n0, n, prior_lambda, prop_delta, prior_delta_alpha,
              prior_delta_beta, rw_delta, delta_ini, nsample, burnin, thin)

Arguments

n0

A vector of natural numbers: number of successes in historical data.

n

A natural number: number of successes in the current data.

prior_lambda

A vector of hyperparameters for the prior distribution Gamma(\alpha, \beta) of \lambda.

prop_delta

The class of proposal distribution for \delta.

prior_delta_alpha

A vector of hyperparameter \alpha for the prior distribution Beta(\alpha, \beta) for each \delta.

prior_delta_beta

A vector of hyperparameter \beta for the prior distribution Beta(\alpha, \beta) for each \delta.

rw_delta

The stepsize (variance of the normal distribution) for the random walk proposal of logit \delta. This is only applicable if prop_delta = 'RW'.

delta_ini

The initial value for \delta in MCMC sampling.

nsample

Specifies the number of posterior samples in the output.

burnin

The number of burn-ins. Only the MCMC samples after this burn-in will be shown in the output.

thin

The thinning parameter used in MCMC sampling.

Details

The function returns posteriors for both the model and power parameters, as well as the acceptance rate for sampling \delta. The normalized power prior distribution is given by:

\frac{\pi_0(\delta)\pi_0(\lambda)\prod_{k=1}^{K}L(\lambda|D_{0k})^{\delta_{k}}}{\int \pi_0(\lambda)\prod_{k=1}^{K}L(\lambda|D_{0k})^{\delta_{k}} d\lambda}.

Here, \pi_0(\delta) and \pi_0(\lambda) are the initial prior distributions for \delta and \lambda, respectively. L(\lambda|D_{0k}) is the likelihood function based on historical data D_{0k}, with \delta_k being its corresponding power parameter.

Value

A list of class "NPP" comprising:

acceptrate

The acceptance rate in MCMC sampling for \delta using the Metropolis-Hastings algorithm.

lambda

Posterior samples of the model parameter \lambda.

delta

Posterior samples of the power parameter \delta.

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

PoiMNPP_MCMC2, PoiOMNPP_MCMC1, PoiOMNPP_MCMC2

Examples

PoiMNPP_MCMC1(n0 = c(0, 3, 5), n = 3, prior_lambda = c(1, 1/10), prop_delta = "IND",
              prior_delta_alpha = c(1, 1, 1), prior_delta_beta = c(1, 1, 1),
              rw_delta = 0.1, delta_ini = NULL, nsample = 2000, burnin = 500, thin = 2)

NPP documentation built on Sept. 18, 2023, 5:18 p.m.

Related to PoiMNPP_MCMC1 in NPP...