Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getSamples

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

Hierarchical Multinomial Processing Tree Modeling

v1.4.7
GPL-3
Authors
Daniel W. Heck [aut, cre] (<https://orcid.org/0000-0002-6302-9252>), Nina R. Arnold [aut, dtc], Denis Arnold [aut], Alexander Ly [ctb], Marius Barth [ctb] (<https://orcid.org/0000-0002-3421-6665>)
Initial release
2021-01-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.