Description Usage Arguments Details Author(s) References See Also Examples
The Cumulative Sample Function (CSF) is a visual MCMC diagnostic in
which the user may select a measure (such as a variable, summary
statistic, or other diagnostic), and observe a plot of how the measure
changes over cumulative posterior samples from MCMC, such as the
output of LaplacesDemon
. This may be considered to be a
generalized extension of the cumuplot
in the coda package,
which is a more restrictive form of the cusum diagnostic introduced by
Yu and Myckland (1998).
Yu and Myckland (1998) suggest that CSF plots should be examined after
traditional trace plots seem convergent, and assert that faster mixing
chains (which are more desirable) result in CSF plots that are more
‘hairy’ (as opposed to smooth), though this is subjective and has been
debated. The LaplacesDemon
package neither supports nor
contradicts the suggestion of mixing and ‘hairiness’, but suggests
that CSF plots may be used to provide additional information about a
chain. For example, a user may decide on a practical
burnin
given when a conditional mean obtains a certain
standard error.
1 
x 
This is a vector of posterior samples from MCMC. 
name 
This is an optional name for vector 
method 
This is a measure that will be observed over the course
of cumulative samples of 
quantiles 
This optional argument applies only when

output 
Logical. If 
When method="ESS"
, the effective sample size (ESS) is observed
as a function of the cumulative samples of x
. For more
information, see the ESS
function.
When method="Geweke.Diagnostic"
, the Zscore output of the
Geweke diagnostic is observed as a function of the cumulative samples
of x
. For more information, see the
Geweke.Diagnostic
function.
When method="HPD"
, the Highest Posterior Density (HPD) interval
is observed as a function of the cumulative samples of x
. For
more information, see the p.interval
function.
When method="is.stationary"
, stationarity is logically
tested and the result is observed as a function of the cumulative
samples of x
. For more information, see the
is.stationary
function.
When method="Kurtosis"
, kurtosis is observed as a function of
the cumulative samples of x
.
When method="MCSE"
, the Monte Carlo Standard Error (MCSE)
estimated with the IMPS
method is observed as a function of
the cumulative samples of x
. For more information, see the
MCSE
function.
When method="MCSE.bm"
, the Monte Carlo Standard Error (MCSE)
estimated with the batch.means
method is observed as a
function of the cumulative samples of x
. For more information,
see the MCSE
function.
When method="MCSE.sv"
, the Monte Carlo Standard Error (MCSE)
estimated with the sample.variance
method is observed as a
function of the cumulative samples of x
. For more information,
see the MCSE
function.
When method="Mean"
, the mean is observed as a function of
the cumulative samples of x
.
When method="Mode"
, the estimated mode is observed as a
function of the cumulative samples of x
. For more information,
see the Mode
function.
When method="N.Modes"
, the estimated number of modes is
observed as a function of the cumulative samples of x
. For
more information, see the Modes
function.
When method="Precision"
, the precision (inverse variance) is
observed as a function of the cumulative samples of x
.
When method="Quantiles"
, the quantiles selected with the
quantiles
argument are observed as a function of the
cumulative samples of x
.
When method="Skewness"
, skewness is observed as a function of
the cumulative samples of x
.
Statisticat, LLC. software@bayesianinference.com
Yu, B. and Myckland, P. (1997). "Looking at Markov Samplers through Cusum Path Plots: A Simple Diagnostic Idea". Statistics and Computing, 8(3), p. 275–286.
burnin
,
ESS
,
Geweke.Diagnostic
,
is.stationary
,
LaplacesDemon
,
MCSE
,
Mode
,
Modes
, and
p.interval
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  #Commentedout because of runtime for package builds
#library(LaplacesDemon)
#x < rnorm(1000)
#CSF(x, method="ESS")
#CSF(x, method="Geweke.Diagnostic")
#CSF(x, method="HPD")
#CSF(x, method="is.stationary")
#CSF(x, method="Kurtosis")
#CSF(x, method="MCSE")
#CSF(x, method="MCSE.bm")
#CSF(x, method="MCSE.sv")
#CSF(x, method="Mean")
#CSF(x, method="Mode")
#CSF(x, method="N.Modes")
#CSF(x, method="Precision")
#CSF(x, method="Quantiles")
#CSF(x, method="Skewness")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.