Particle Metropolis Within Gibbs
An altered version of the utils:txtProgressBar that shows acceptance r...
Return the acceptance rate for new particles across all subjects
Return a CODA mcmc object with the required samples
Augment existing sampler object to have subject specific epsilon stora...
Check whether the adaptation phase has successfully completed
Check for efficient proposals if necessary
Test the arguments to the run_stage function for correctness
Obtain the efficent mu and sigma from the adaptation phase draws
Create distribution parameters for efficient proposals
Extend the main data store with empty space for new samples
Extract relevant samples from the list for conditional dist calc
Generate proposal particles
Gibbs step of the Particle Metropolis within Gibbs sampler
Error handler for the gibbs_step call
Initialise values for the random effects
Test whether object is a pmwgs
Create a list with the last samples in the pmwgs object
Generate particles and select one to be the new sample
Error handler forany error in new_sample function call(s)
Check and normalise the number of each particle type from the mix_prop...
Generate a cloud of particles from a multivariate normal distribution
Error handler for the particle selection call
pmwg: Particle Metropolis Within Gibbs.
Create a PMwG sampler and return the created object
Relabel requested burn-in samples as adaptation
The Inverse Wishart Distribution
Run a stage of the PMwG sampler
The Wishart Distribution
Create a new list for storage samples in the pmwgs object
Set default values for epsilon
Set default values for mix
Setup the proposal distribution arguments (if in sample stage)
Test that the sampler has successfully adapted
Trim the unneeded NA values from the end of the sampler
Unwinds variance matrix to a vector
Update the subject specific scaling parameters (epsilon)
A function that updates the accept_progress_bar with progress and acce...
Winds a variance vector back to a vector
Provides an R implementation of the Particle Metropolis within Gibbs sampler for model parameter, covariance matrix and random effect estimation. A more general implementation of the sampler based on the paper by Gunawan, D., Hawkins, G. E., Tran, M. N., Kohn, R., & Brown, S. D. (2020) <doi:10.1016/j.jmp.2020.102368>. An HTML tutorial document describing the package is available at <https://university-of-newcastle-research.github.io/samplerDoc/> and includes several detailed examples, some background and troubleshooting steps.
Useful links