If type = 'point-est'
, density is evaluated/random samples are generated at a point estimate of
the parameter values. To estimate the mixture density, first the parameter vector \(\eta\) is estimated
by applying fn
on the MCMC samples (using the function pointest), yielding the (consistent) Bayes estimate \(\hat{\eta}\).
Then the mixture density \(f(x|\eta)\) at any point \(x\) is (consistently) estimated by
\(f(x|\hat{\eta})\). The random deviates are generated from the estimated mixture density \(f(x|\hat{\eta})\).
If type == 'post-pred'
, posterior predictive samples and densities are returned. That
is, the average density \(S^{-1} \sum_{s = 1}^S f(x | \eta_s)\) is returned in d_fitted
,
where \(\eta_1, \dots, \eta_S\) is the set posterior MCMC samples obtained from object
. In
r_fitted
, first a random sub-sample \(\eta_{(1)}, \dots, \eta_{(n)}\) of size n
from the
set of posterior samples \(\eta_1, \dots, \eta_S\) is drawn (with replacement if n
> S). Then
the i-th posterior predictive data point is generated from the mixture density
\(f(x|\eta_{(i)})\) for i = 1,..., n.