getSamples: Get Posterior Samples from Fitted MPT Model

View source: R/getSamples.R

getSamplesR Documentation

Get Posterior Samples from Fitted MPT Model

Description

Extracts MCMC posterior samples as an coda::mcmc.list and relabels the MCMC variables.

Usage

getSamples(
  fittedModel,
  parameter = "mean",
  select = "all",
  names = "par_label"
)

Arguments

fittedModel

a fitted latent-trait MPT model (see traitMPT) or beta MPT model (see betaMPT)

parameter

which parameter(s) of the (hierarchical) MPT model should be returned? (see details in getParam).

select

character vector of parameters to be plotted (e.g., select = c("d", "g"). Can be used to plot subsets of parameters and change the order of parameters.

names

whether and how to rename the variables in the MCMC output: par (internal parameter labels such as mu[1]), label (MPT label from EQN file such as "d"), or par_name (concatenation of both such as "mu[1]_d").

Examples

## Not run: 
getSamples(fittedModel, "mu", select = c("d", "g"))

## End(Not run)

TreeBUGS documentation built on May 31, 2023, 9:21 p.m.