Description Usage Arguments Value References
Updates all of the parameters (location, amplitude, std. dev., and scale) using a single Metropolis
Hastings step, such that the baseline cancels out in the MH ratio, using the marginalisation identity
of Chib (1995).
Note: if npart > 1
, then multiple MCMC chains will be executed independently in parallel using
OpenMP. This means that all functions used for the proposal distributions and to evaluate the MH ratio
need to be threadsafe. Specifically, no calls to R::rnorm
, R::dnorm
, nor their
Rcpp equivalents, can be made from within the parallel portion of the code.
1 2 3 4 5 6 7 8 9 10 11  mhUpdateVoigt(
spectra,
n,
kappa,
conc,
wavenum,
thetaMx,
logThetaMx,
mhChol,
priors
)

spectra 

n 
number of observations to use in calculating the likelihood. 
kappa 
likelihood tempering parameter. 
conc 
Vector of 
wavenum 
Vector of 
thetaMx 

logThetaMx 

mhChol 
lowertriangular Cholesky factorisation of the covariance matrix for the random walk proposals. 
priors 
List of hyperparameters for the prior distributions. 
The number of RWMH proposals that were accepted.
Chib (1995) "Marginal Likelihood from the Gibbs Output," JASA 90(432): 1313–1321, doi: 10.1080/01621459.1995.10476635
Rosenthal (2000) "Parallel computing and Monte Carlo algorithms" Far East J. Theor. Stat. 4(2): 207–236, URL: https://www.pphmj.com/abstract/1961.htm
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.