Learn R Programming

EpiBayes (version 0.1.2)

utils_mumhtargetdist: Target Distribution for MH Step for mu

Description

This function caculates realizations from the target distribution for mu in the Metropolis-Hastings (MH) step in the hybrid Gibbs sampler used in the EpiBayes_ns and EpiBayes_s functions. Recall, in the context of disease freedom, mu was the average disease prevalence in a given diseased cluster of subjects.

Usage

utils_mumhtargetdist(mumh, psi, pi, z.pi, muparm)

Arguments

mumh
The proposed or old value of mu.
psi
The current MCMC iteration's value for psi (related to the variability of the disease prevalences among infected clusters of subjects).
pi
The current MCMC iteration's value for pi (the subject-level prevalences in each cluster).
z.pi
The current MCMC iteration's value for z.pi (the indicator variables corresponding to the disease status of each cluster).
muparm
The old first and second shape parameters.

Value

A realization from the target distribution.

References

Norets, A. and Tang, X. MCMC estimation of a finite beta mixture. Technical report, Princeton University, 2010.

See Also

Used in the functions EpiBayes_ns and EpiBayes_s.