posterior_interval.mcmc_fit: Extract posterior intervals for parameters of the model

View source: R/posterior_interval.R

posterior_interval.mcmc_fitR Documentation

Extract posterior intervals for parameters of the model

Description

Extract posterior intervals for parameters of the model

Usage

## S3 method for class 'mcmc_fit'
posterior_interval(object, prob = 0.9, pars = c("pi", "theta"), ...)

Arguments

object

A rater mcmc_fit object.

prob

A single probability. The size of the credible interval returned. By default 0.9.

pars

The parameters to calculate the intervals for

...

Other arguments.

Details

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.

Value

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.

Examples



fit <- rater(anesthesia, "dawid_skene", verbose = FALSE, chains = 1)

intervals <- posterior_interval(fit)
head(intervals)




rater documentation built on Sept. 12, 2023, 1:13 a.m.