findBurnIn | R Documentation |
Given a chains of MCMC output, this function finds an appropriate burn-in across for the chain. It does this by calculating the effective smaple size (ESS) for each variable at a number of potential burn-in values and then selecting the burn-in value for which the sum of these is maximised. This method is somewhat approximate (as it assumes a common order of magnitude for each ESS time series) so we reccomend combining this with makeESSPlots to check if it makes sense.
findBurnIn(
mcmc_data,
max_burn_in = ifelse(is.data.frame(mcmc_data) | coda::is.mcmc(mcmc_data),
nrow(mcmc_data), nrow(mcmc_data[[1]]))/2,
step_size = round(max_burn_in/50)
)
mcmc_data |
A mcmc object (as per the coda package). |
max_burn_in |
The maximum burn-in value to test against. Defaults to half the number of samples present. |
step_size |
The granularity of burn-in values to test (i.e. the distance between subsequent values). Defaults to 0.02 of the max_burn_in. |
An integer. The reccomended burn in for the current chain.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.