PoiMNPP_MCMC1 {NPP} | R 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 |
prop_delta |
The class of proposal distribution for |
prior_delta_alpha |
A vector of hyperparameter |
prior_delta_beta |
A vector of hyperparameter |
rw_delta |
The stepsize (variance of the normal distribution) for the random walk proposal of logit |
delta_ini |
The initial value for |
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 |
lambda |
Posterior samples of the model parameter |
delta |
Posterior samples of the power parameter |
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)