This function serves as an inference tool for the MCMC output
obtained using the function NMixMCMC
. It computes
estimated posterior predictive cumulative distribution function for each margin.
NMixPredCDFMarg(x, ...)# S3 method for default
NMixPredCDFMarg(x, scale, K, w, mu, Li, Krandom=TRUE, ...)
# S3 method for NMixMCMC
NMixPredCDFMarg(x, grid, lgrid=500, scaled=FALSE, ...)
# S3 method for GLMM_MCMC
NMixPredCDFMarg(x, grid, lgrid=500, scaled=FALSE, ...)
An object of class NMixPredCDFMarg
which has the following components:
a list with the grid values for each margin. The components
of the list are named x1
, ... or take names from
grid
argument.
frequency table for the values of \(K\) (numbers of mixture components) in the MCMC chain.
proportions derived from freqK
.
the length of the MCMC used to compute the predictive cdf's.
a list with the computed predictive CDF's for each
margin. The components of the list are named 1
, ..., i.e.,
cdf[[1]]
\(=\)cdf[["1"]]
is the predictive
cdf for margin 1 etc.
a list with the computed predictive CDF's for each
margin, conditioned further by \(K\). The components of the list
are named 1
, .... That is,
cdf[[1]][[1]]
\(=\) cdf[["1"]][[1]]
is the predictive
CDF for margin 1 conditioned by \(K=1\),
cdf[[1]][[2]]
\(=\) cdf[["1"]][[2]]
is the predictive
CDF for margin 1 conditioned by \(K=2\) etc.
Note that cdfK
provides some additional information only
when Krandom
\(=\) TRUE
or when x
results from
the NMixMCMC
call to the reversible jump MCMC.
There is also a plot
method implemented for the resulting object.
an object of class NMixMCMC
for
NMixPredCDFMarg.NMixMCMC
function.
An object of class GLMM_MCMC
for
NMixPredCDFMarg.GLMM_MCMC
function.
A list with the grid values (see below) for
NMixPredCDFMarg.default
function.
a two component list giving the shift
and the scale
.
either a number (when Krandom
\(=\)FALSE
) or a
numeric vector with the chain for the number of mixture components.
a numeric vector with the chain for the mixture weights.
a numeric vector with the chain for the mixture means.
a numeric vector with the chain for the mixture inverse variances (lower triangles only).
a logical value which indicates whether the number of mixture components changes from one iteration to another.
a numeric vector or a list with the grid values in which the predictive CDF should be evaluated.
If x$dim
is 1 then grid
may be a numeric vector. If
x$dim
is higher than then grid
must be a list with
numeric vectors as components giving the grids for each margin.
If grid
is not specified, it is created automatically using
the information from the posterior summary statistics stored in x
.
a length of the grid used to create the grid
if
that is not specified.
if TRUE
, the CDF of shifted and scaled data is
summarized. The shift and scale vector are taken from the
scale
component of the object x
.
optional additional arguments.
Arnošt Komárek arnost.komarek@mff.cuni.cz
Komárek, A. (2009). A new R package for Bayesian estimation of multivariate normal mixtures allowing for selection of the number of components and interval-censored data. Computational Statistics and Data Analysis, 53(12), 3932--3947.
plot.NMixPredCDFMarg
, NMixMCMC
, GLMM_MCMC
.