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

plotPrior

Plot Prior Distributions


Description

Plots prior distributions for group means, standard deviation, and correlations of MPT parameters across participants.

Usage

plotPrior(prior, probitInverse = "mean", M = 5000, nCPU = 3, ...)

Arguments

prior

a named list defining the priors. For the traitMPT, the default is list(mu = "dnorm(0,1)", xi="dunif(0,10)", V=diag(S), df=S+1), where S is the number of free parameters. For the betaMPT, the default is list(alpha ="dgamma(1,.1)", beta = "dgamma(1,.1)"). Note that the normal distribution "dnorm(mu,prec)" is parameterized as in JAGS by the mean and precision (= 1/variance).

probitInverse

which latent-probit parameters (for traitMPT model) to transform to probability scale. Either "none", "mean" (simple transformation Φ(μ)), or "mean_sd" (see probitInverse)

M

number of random samples to approximate priors of group-level parameters

nCPU

number of CPUs used for parallel sampling. For large models and many participants, this may require a lot of memory.

...

further arguments passed to plot

Details

This function samples from a set of hyperpriors (either for hierarchical traitMPT or betaMPT structure) to approximate the implied prior distributions on the parameters of interest (group-level mean, SD, and correlations of MPT parameters). Note that the normal distribution "dnorm(mu,prec)" is parameterized as in JAGS by the mean and precision (= 1/variance).

See Also

Examples

## Not run: 
# default priors for traitMPT:
plotPrior(list(mu = "dnorm(0,1)", xi="dunif(0,10)",
          V=diag(2), df=2+1), M=4000)

# default priors for betaMPT:
plotPrior(list(alpha ="dgamma(1,.1)",
          beta = "dgamma(1,.1)"), M=4000)

## 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.