mcunit-package: mcunit: Unit Tests for MC Methods

Description Details Author(s) See Also

Description

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>.

Details

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.

Author(s)

Maintainer: Axel Gandy a.gandy@imperial.ac.uk

Authors:

See Also

Useful links:


mcunit documentation built on April 2, 2021, 5:06 p.m.