NMixPlugCondDensMarg {mixAK} | R Documentation |
This function serves as an inference tool for the MCMC output
obtained using the function NMixMCMC
. It computes
estimates of univariate conditional densities obtained by using posterior
summary statistics (e.g., posterior means) of mixture weights, means
and variances (plug-in estimate).
NMixPlugCondDensMarg(x, ...) ## Default S3 method: NMixPlugCondDensMarg(x, icond, scale, w, mu, Sigma, ...) ## S3 method for class 'NMixMCMC': NMixPlugCondDensMarg(x, icond, grid, lgrid=50, scaled=FALSE, ...)
x |
an object of class NMixMCMC for
NMixPlugCondDensMarg.NMixMCMC function.
A list with the grid values (see below) for NMixPlugCondDensMarg.default function.
|
icond |
index of the margin by which we want to condition |
scale |
a two component list giving the shift and the
scale . If not given, shift is equal to zero and scale is
equal to one.
|
w |
a numeric vector with posterior summary statistics for the mixture weights. The length of this vector determines the number of mixture components. |
mu |
a matrix with posterior summary statistics for
mixture means in rows. That is, mu has
K rows and p columns, where K denotes the number
of mixture components and p is dimension of the mixture
distribution.
|
Sigma |
a list with posterior summary statistics for mixture covariance matrices. |
grid |
a list with the grid values for each margin in which
the density should be evaluated. The value of grid[[icond]]
determines the values by which we condition.
If grid is not specified, it is created automatically using
the information from the posterior summary statistics stored in x .
|
lgrid |
a length of the grid used to create the grid if
that is not specified.
|
scaled |
if TRUE , the density 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. |
An object of class NMixPlugCondDensMarg
which has the following components:
x |
a list with the grid values for each margin. The components
of the list are named x1 , ... or take names from
grid argument. |
icond |
index of the margin by which we condition. |
dens |
a list with the computed conditional densities for each
value of x[[icond]] . Each dens[[j]] is again a list
with conditional densities for each margin given margin
icond equal to x[[icond]][j] .
The value of dens[[j]][[imargin]] gives a value
of a marginal density of the imargin -th margin at x[[icond]][j] .
|
There is also a plot
method implemented for the resulting object.
Arnošt Komárek arnost.komarek[AT]mff.cuni.cz
plot.NMixPlugCondDensMarg
, NMixMCMC
, NMixPredCondDensMarg
.