testSSEF: Effective Sample Size

View source: R/testSSEF.R

testSSEFR Documentation

Effective Sample Size

Description

The effective sample size (ESS) is an estimate of the sample size required to achieve the same level of precision if that sample was a simple random sample. In Bayesian statistics, it is common to use the posterior draws from Markov chain Monte Carlo (MCMC) for statistical inference. The MCMC process causes the draws to be correlated. This means that the effective sample size is generally lower than the number of draws. For this reason, the effective sample size – rather than the actual sample size – is typically used when determining if an MCMC model has converged.

Usage

testSSEF(model, plot = T)

Arguments

model

a runjags object containing model results

plot

a boolean object specifying whether or not a plot should be generated

Value

If any SSEF values are less than or equal to 300, these variables will be returned in a data.frame along with their values. If all values are greater than 300, a message will state "All SSeff values > 300".


soniamitchell/SpARKjags documentation built on May 5, 2022, 12:09 p.m.