PoiMNPP_MCMC2: MCMC Sampling for Poisson Population of multiple historical...

View source: R/PoiMNPP_MCMC2.R

PoiMNPP_MCMC2R Documentation

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

Description

Multiple historical data are combined individually. Conduct posterior sampling for Poisson 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 \lambda, Gibbs sampling is used.

Usage

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

Arguments

n0

a natural number vector : number of successes in historical data.

n

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

prior_lambda

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

prop_delta

the class of proposal distribution for \delta.

prior_delta_alpha

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

prior_delta_beta

a vector of the hyperparameter \beta in 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. Only applicable if prop_delta = 'RW'.

delta_ini

the initial value of \delta 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 bunrin.

thin

the thinning parameter in MCMC sampling.

Details

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

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

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

Value

A list of class "NPP" with three elements:

acceptrate

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

lambda

posterior of the model parameter \lambda.

delta

posterior 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_MCMC1; PoiOMNPP_MCMC1; PoiOMNPP_MCMC2

Examples

PoiMNPP_MCMC2(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_MCMC2 in NPP...