This function draws traceplots of selected parameters from the MCMC
simulations ran using NMixMCMC
or
GLMM_MCMC
functions.
tracePlots(x, ...) # S3 method for default
tracePlots(x, ...)
# S3 method for NMixMCMC
tracePlots(x, param=c("Emix", "SDmix", "Cormix", "K", "w", "mu", "sd", "gammaInv"),
relabel=FALSE, order,
auto.layout=TRUE, xlab="Iteration", ylab, col="slateblue", main="", ...)
# S3 method for NMixMCMClist
tracePlots(x, param=c("Emix", "SDmix", "Cormix", "K", "w", "mu", "sd", "gammaInv"),
relabel=FALSE,
auto.layout=TRUE, xlab="Iteration", ylab, col=c("blue3", "red3"), main="", ...)
# S3 method for GLMM_MCMC
tracePlots(x, param=c("Deviance", "Cond.Deviance",
"alpha", "Eb", "SDb", "Corb", "sigma_eps",
"w_b", "mu_b", "sd_b", "gammaInv_b", "gammaInv_eps"),
relabel=FALSE, order,
auto.layout=TRUE, xlab="Iteration", ylab, col="slateblue", main="", ...)
# S3 method for GLMM_MCMClist
tracePlots(x, param=c("Deviance", "Cond.Deviance",
"alpha", "Eb", "SDb", "Corb", "sigma_eps",
"w_b", "mu_b", "sd_b", "gammaInv_b", "gammaInv_eps"),
relabel=FALSE,
auto.layout=TRUE, xlab="Iteration", ylab, col=c("blue3", "red3"), main="", ...)
invisible(x)
an object of appropriate class.
a character string which specifies which sort of parameters is to be plotted.
overall means (for each margin) of the normal mixture;
overall standard deviations (for each margin) of the normal mixture;
overall correlations (each pair) of the normal mixture;
number of mixture components;
weights of each of mixture components.
If relabel
is FALSE
, weights are not re-labeled before plotting;
component means (each margin, each mixture component) of the
normal mixture. The mixture means are shifted and scaled using
x$scale$shift
and x$scale$scale
before plotting.
If relabel
is FALSE
, means are not re-labeled before plotting;
component standard deviations (each margin, each mixture
component) of the normal mixture. The mixture standard deviations are scaled using
x$scale$scale
before plotting.
If relabel
is FALSE
, standard deviations are
not re-labeled before plotting;
variance hyperparameters;
deviance (marginal, with random effects integrated out) of the GLMM;
conditional deviance (given random effects) of the GLMM;
fixed effects of the fitted GLMM;
overall means (for each margin) of the random effects of the fitted GLMM;
overall standard deviations (for each margin) of the random effects of the fitted GLMM;
overall correlations (each pair) of the distribution of the random effects of the fitted GLMM.
standard deviations of the error terms in the (mixed) models for continuous responses.
logical value. It indicates whether the chains with
param
being w
, mu
, sd
, w_b
,
mu_b
, sd_b
should be re-labeled before
plotting. Re-labelling is given by argument order
. If
order
is missing then x$order
or x$order_b
determines re-labelling.
a matrix with \(K\) columns and \(M\) rows where
\(M\) is the length of MCMC. Each row of order
must be a
permutation of \((1, \ldots, K)\).
logical value. If TRUE
, the plotting region
is automatically divided to produce traceplots of all
parameters. Note that layout must be set up automatically if there
are more than 28 parameters to be plotted (often the case for
correlations with param
being Corb
or for mixture
means with param
being mu_b
).
arguments passed to plot
function. They all can be of length one (the value is used on all
plots) or of length equal to the number of parameters to be
plotted.
other arguments passed to plot
function.
Arnošt Komárek arnost.komarek@mff.cuni.cz
NMixMCMC
, GLMM_MCMC
, NMixRelabel
, traceplot
.