Description Details Author(s) See Also
Unit testing for Monte Carlo methods, particularly Markov Chain Monte Carlo (MCMC) methods, are implemented as extensions of the 'testthat' package. The MCMC methods check whether the MCMC chain has the correct invariant distribution. They do not check other properties of successful samplers such as whether the chain can reach all points, i.e. whether is recurrent. The tests require the ability to sample from the prior and to run steps of the MCMC chain. The methodology is described in Gandy and Scott (2020) <arXiv:2001.06465>.
If you want to test an MCMC sampler then the main function that you are going to need from this package are expect_mcmc and expect_mcmc_reversible which can be used as part of unit testing in the framework of the testthat package. They test if MCMC algorithms have the correct invariant distribution.
1 2 3 | If you are testing iid samples then [expect_mc_iid_mean],
[expect_mc_iid_ks], [expect_mc_iid_chisq] and [expect_mc_test]
will be useful.
|
Maintainer: Axel Gandy a.gandy@imperial.ac.uk
Authors:
James Scott james.scott15@imperial.ac.uk
Useful links:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.