View source: R/point_estimate.R
point_estimate | R Documentation |
Extract point estimates of parameters from a fit object
point_estimate(fit, pars = c("pi", "theta", "z"), ...)
fit |
A rater fit object |
pars |
A character vector of parameter names to return. By default
|
... |
Extra arguments |
If the passed fit object was fit using MCMC then the posterior
means are returned. If it was fit through optimisation the maximum a
priori (MAP) estimates are returned. The z parameter returned is the
value of class probabilities which is largest. To return the full
posterior distributions of the latent class use class_probabilities()
.
For the class conditional model the 'full' theta parameterisation (i.e. appearing to have the same number of parameters as the standard Dawid-Skene model) is calculated and returned. This is designed to allow easier comparison with the full Dawid-Skene model.
A named list of the parameter estimates.
class_probabilities()
# A model fit using MCMC.
mcmc_fit <- rater(anesthesia, "dawid_skene")
# This will return the posterior mean (except for z)
post_mean_estimate <- point_estimate(mcmc_fit)
# A model fit using optimisation.
optim_fit <- rater(anesthesia, dawid_skene(), method = "optim")
# This will output MAP estimates of the parameters.
map_estimate <- point_estimate(optim_fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.