Computes an approximation of the posterior mean of a parameter functional, based on a posterior parameters sample.
posteriorMean(
post.sample,
FUN = function(par, ...) {
par
},
from = NULL,
to = NULL,
thin = 50,
displ = TRUE,
...
)A list made of
A matrix : each column is the result of FUN applied to a parameter from the posterior sample.
The posterior mean
The posterior standard deviation
A posterior sample as returned by posteriorMCMC
a parameter functional returning a vector.
Integer or NULL. If NULL, the default value is used. Otherwise, should be greater than post.sample$Nbin. Indicates the index where the averaging process should start. Default to post.sample$Nbin +1
Integer or NULL. If NULL, the default
value is used. Otherwise, must be lower than Nsim+1.
Indicates where the averaging process should stop.
Default to post.sample$Nsim.
Thinning interval.
logical. Should a plot be produced ?
Additional parameters to be passed to FUN.
Only a sub-sample is used: one out of thin parameters is used
(thinning). Further, only the parameters produced between time
from and time to (included) are kept.
posteriorMCMC.