plot_all_marginals: Plots the marginal densities for all parameters

View source: R/plot_all_marginals.R

plot_all_marginalsR Documentation

Plots the marginal densities for all parameters


Plots the posterior marginal density of all parameters. Users may specify whether they want a histogram, a density, or both.


plot_all_marginals(MCMC.output, percent.burnin = 0, thinning = 1, 
population.names = NULL)



The standard MCMC output file generated from a BEDASSLE run.


The percent of the sampled MCMC generations to be discarded as "burn-in." If the MCMC is run for 1,000,000 generations, and sampled every 1,000 generations, there will be 1,000 sampled generations. A percent.burnin of 20 will discard the first 200 sampled parameter values from that sample.


The multiple by which the sampled MCMC generations are thinned. A thinning of 5 will sample every 5th MCMC generation.


A vector of length k, where k is the number of populations/individuals (i.e. k = nrow(counts)), giving the name or identifier of each population/individual included in the analysis. These will be used to title the k marginal plots of the phi parameters estimated for each population/individual in the beta-binomial model. If the binomial model is used, population.names will not be used by this function.


The marginal plot is another basic visual tool for MCMC diagnosis. Users should look for marginal plots that are "smooth as eggs" (indicating that the chain has been run long enough) and unimodal (indicating a single peak in the likelihood surface).


Gideon Bradburd

BEDASSLE documentation built on April 11, 2022, 1:07 a.m.