tracePlots {mixAK} | R Documentation |
Traceplots for selected parameters
Description
This function draws traceplots of selected parameters from the MCMC
simulations ran using NMixMCMC
or
GLMM_MCMC
functions.
Usage
tracePlots(x, ...)
## Default S3 method:
tracePlots(x, ...)
## S3 method for class '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 class '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 class '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 class '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="", ...)
Arguments
x |
an object of appropriate class.
|
param |
a character string which specifies which sort of
parameters is to be plotted.
- Emix
overall means (for each margin) of the normal mixture;
- SDmix
overall standard deviations (for each margin) of the
normal mixture;
- Cormix
overall correlations (each pair) of the normal
mixture;
- K
number of mixture components;
- w, w_b
weights of each of mixture components.
If relabel is FALSE , weights are not re-labeled before plotting;
- mu, mu_b
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;
- sd, sd_b
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;
- gammaInv, gammaInv_b, gammaInv_eps
variance
hyperparameters;
- Deviance
deviance (marginal, with random effects integrated
out) of the GLMM;
- Cond.Deviance
conditional deviance (given random effects)
of the GLMM;
- alpha
fixed effects of the fitted GLMM;
- Eb
overall means (for each margin) of the random effects of
the fitted GLMM;
- SDb
overall standard deviations (for each margin) of the random effects of
the fitted GLMM;
- Corb
overall correlations (each pair) of the distribution
of the random effects of the fitted GLMM.
- sigma_eps
standard deviations of the error terms in the
(mixed) models for continuous responses.
|
relabel |
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.
|
order |
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) .
|
auto.layout |
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 ).
|
xlab , ylab , col , main |
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.
|
Value
invisible(x)
Author(s)
Arnošt Komárek arnost.komarek@mff.cuni.cz
See Also
NMixMCMC
, GLMM_MCMC
, NMixRelabel
, traceplot
.
[Package
mixAK version 5.7
Index]