PoiMNPP_MCMC2 {NPP} | R 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 |
prop_delta |
the class of proposal distribution for |
prior_delta_alpha |
a vector of the hyperparameter |
prior_delta_beta |
a vector of the hyperparameter |
rw_delta |
the stepsize(variance of the normal distribution) for the random walk proposal of logit |
delta_ini |
the initial value of |
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 |
lambda |
posterior of the model parameter |
delta |
posterior 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_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)