Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/PosteriorChecks.R
Not to be confused with posterior predictive checks, this function
provides additional information about the marginal posterior
distributions of continuous parameters, such as the probability that
each posterior coefficient of the parameters (referred to generically
as theta), is greater than zero
[p(theta > 0)], the estimated number of modes,
the kurtosis and skewness of the posterior distributions, the burnin
of each chain (for MCMC only), integrated autocorrelation time,
independent samples per minute, and acceptance rate. A posterior
correlation matrix is provided only for objects of class
demonoid
or pmc
.
For discrete parameters, see the Hangartner.Diagnostic
.
1  PosteriorChecks(x, Parms)

x 
This required argument accepts an object of class

Parms 
This argument accepts a vector of quoted strings to be
matched for selecting parameters. This argument defaults to

PosteriorChecks
is a supplemental function that returns
a list with two components. Following is a summary of popular uses of
the PosteriorChecks
function.
First (and only for MCMC users), the user may be considering the
current MCMC algorithm versus others. In this case, the
PosteriorChecks
function is often used to find the two MCMC
chains with the highest IAT
, and these chains are
studied for nonrandomness with a joint trace plot, via the
joint.density.plot
function. The best algorithm has the
chains with the highest independent samples per minute (ISM).
Posterior correlation may be studied between model updates as well as
after a model seems to have converged. While frequentists consider
multicollinear predictor variables, Bayesians tend to consider
posterior correlation of the parameters. Models with multicollinear
parameters take more iterations to converge. Hierarchical models often
have high posterior correlations. Posterior correlation often
contributes to a lower effective sample size (ESS
).
Common remedies include transforming the predictors,
reparameterization to reduce posterior correlation, using WIPs
(WeaklyInformative Priors), or selecting a different numerical
approximation algorithm. An example of reparameterization is to
constrain related parameters to sum to zero. Another approach is to
specify the parameters according to a multivariate distribution that
is assisted by estimating a covariance matrix. Some algorithms are
more robust to posterior correlation than others. For example,
posterior correlation should generally be less problematic for twalk
than AMWG in LaplacesDemon
. Posterior correlation may be
plotted with the plotMatrix
function, and may be useful
for blocking parameters. For more information on blockwise sampling,
see the Blocks
function.
After a user is convinced of the applicability of the current MCMC
algorithm, and that the chains have converged, PosteriorChecks
is often used to identify multimodal marginal posterior distributions
for further study or model respecification.
Although many marginal posterior distributions appear normally distributed, there is no such assumption. Nonetheless, a marginal posterior distribution tends to be distributed the same as its prior distribution. If a parameter has a prior specified with a Laplace distribution, then the marginal posterior distribution tends also to be Laplacedistributed. In the common case of normality, kurtosis and skewness may be used to identify discrepancies between the prior and posterior, and perhaps this should be called a 'priorposterior check'.
Lastly, parameter importance may be considered, in which case it is
recommended to be considered simultaneously with variable importance
from the Importance
function.
PosteriorChecks
returns an object of class
posteriorchecks
that is a list with the following components:
Posterior.Correlation 
This is a correlation matrix of the parameters selected with the

Posterior.Summary 
This is a matrix in which each row is a
parameter and there are eight columns: p(theta > 0), N.Modes,
Kurtosis, Skewness, BurnIn, IAT, ISM, and AR. The first column,
p(theta > 0), indicates parameter importance by reporting how much
of the distribution is greater than zero. An important parameter
distribution will have a result at least as extreme as 0.025 or
0.975, and an unimportant parameter distribution is centered at
0.5. This is not the importance of the associated variable relative
to how well the model fits the data. For variable importance, see
the 
Statisticat, LLC. [email protected]
AcceptanceRate
,
Blocks
,
burnin
,
ESS
,
Hangartner.Diagnostic
,
joint.density.plot
,
IAT
,
Importance
,
IterativeQuadrature
,
LaplaceApproximation
,
LaplacesDemon
,
Modes
,
plotMatrix
,
PMC
, and
VariationalBayes
.
1  ### See the LaplacesDemon function for an example.

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