pointest {BAMBI} | R Documentation |
Point estimates for parameters from an angmcmc object
Description
Point estimates for parameters from an angmcmc object
Usage
pointest(object, fn = mean, par.name, comp.label, chain.no, ...)
Arguments
object |
angular MCMC object. |
fn |
function, or a single character string specifying its name, to evaluate on MCMC samples to estimate
parameters. Defaults to |
par.name |
vector of names of parameters for which point estimates are to be computed. If |
comp.label |
vector of component labels (positive integers, e.g., |
chain.no |
vector of chain numbers whose samples are to be be used. in the estimation. By default all chains are used. |
... |
additional arguments to be passed to the function. |
Value
Returns a matrix of point estimates, or vector of point estimates if length(par.name)==1
or length(comp.label)==1
.
Examples
# first fit a vmsin mixture model
# illustration only - more iterations needed for convergence
fit.vmsin.20 <- fit_vmsinmix(tim8, ncomp = 3, n.iter = 20,
n.chains = 1)
# estimate parameters by sample mean
(est_mean <- pointest(fit.vmsin.20))
# estimate parameters by sample median
(est_median <- pointest(fit.vmsin.20, fn = median))
# estimate parameters by MAP
(est_median <- pointest(fit.vmsin.20, fn = "MODE"))