View source: R/posterior_interval.R
posterior_interval.mcmc_fit | R Documentation |
Extract posterior intervals for parameters of the model
## S3 method for class 'mcmc_fit'
posterior_interval(object, prob = 0.9, pars = c("pi", "theta"), ...)
object |
A rater |
prob |
A single probability. The size of the credible interval
returned. By default |
pars |
The parameters to calculate the intervals for |
... |
Other arguments. |
Posterior intervals can only be calculated for models fit with MCMC. In addition, posterior intervals are not meaningful for the latent class (and indeed cannot be calculated). The full posterior distribution of the latent class can be extracted using 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 matrix with 2 columns. The first column is the lower bound of of the credible interval and the second is the upper bound. Each row corresponds to one individuals parameters. The rownames are the parameter names.
fit <- rater(anesthesia, "dawid_skene", verbose = FALSE, chains = 1)
intervals <- posterior_interval(fit)
head(intervals)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.