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.
PoiMNPP_MCMC1(n0, n, prior_lambda, prop_delta, prior_delta_alpha,
prior_delta_beta, rw_delta, delta_ini, nsample, burnin, thin)
A list of class "NPP" comprising:
The acceptance rate in MCMC sampling for \(\delta\) using the Metropolis-Hastings algorithm.
Posterior samples of the model parameter \(\lambda\).
Posterior samples of the power parameter \(\delta\).
A vector of natural numbers: number of successes in historical data.
A natural number: number of successes in the current data.
A vector of hyperparameters for the prior distribution \(Gamma(\alpha, \beta)\) of \(\lambda\).
The class of proposal distribution for \(\delta\).
A vector of hyperparameter \(\alpha\) for the prior distribution \(Beta(\alpha, \beta)\) for each \(\delta\).
A vector of hyperparameter \(\beta\) for the prior distribution \(Beta(\alpha, \beta)\) for each \(\delta\).
The stepsize (variance of the normal distribution) for the random walk proposal of logit \(\delta\). This is only applicable if prop_delta = 'RW'
.
The initial value for \(\delta\) in MCMC sampling.
Specifies the number of posterior samples in the output.
The number of burn-ins. Only the MCMC samples after this burn-in will be shown in the output.
The thinning parameter used in MCMC sampling.
Qiang Zhang zqzjf0408@163.com
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.
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.
PoiMNPP_MCMC2
,
PoiOMNPP_MCMC1
,
PoiOMNPP_MCMC2
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)
Run the code above in your browser using DataLab