Description Usage Arguments Details Value Author(s) References Examples
Calculate the Effective Sample Size for a marginal posterior sample obtained via MCMC
1 |
x |
a numeric vector of length N assumed to be samples from a Markov chain |
ignoreBurnin |
logical indictating whether or not the first burninProportion of vector x should be ignored |
burninProportion |
if ignoreBurnin == TRUE, the first burninProportion*length(x) samples are removed from x before the ess is calculated |
Calculates the effective sample size of x based on an estimate of the lag autocorrelation function. Details of the method are in Section 11.5 of Bayesian Data Analysis, Third Edition, 2013, Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari, Donald B. Rubin.
Returns the estimated effective sample size for the last (1-burninProportion) samples in x.
David Welch david.welch@auckland.ac.nz, Chris Groendyke cgroendyke@gmail.com
Gelman, A., Carlin, J.B., Stern, H.S., Dunson, D.B., Vehtari, A., Rubin, D.B., 2013 Bayesian Data Analysis, Third Edition, (Section 11.5), Boca Raton, Florida: CRC Press.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.