One simple algorithm is importance sampling from the prior. Draw independently from and assign weight . Then
estimates the Bayesian model evidence, and the normalized weights represent the posterior. A weighted histogram or kernel density estimation of the estimates the marginal ; discarding performs the marginalization.
Estimate each one-dimensional marginal posterior from its individual experiment's weighted samples, for example by weighted kernel density estimation. Combining that density estimate with the individual evidence estimate gives
Their product with can be normalized on the one-dimensional space, avoiding all joint nuisance-parameter sampling.
Discard burn-in from the MCMC output and retain the sampled coordinate. A normalized histogram or kernel density estimation of these draws approximates . Autocorrelation changes the Monte Carlo uncertainty, so uncertainty bands should use the chain's effective sample size rather than its raw length.