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

plotInd

Plots individual posterior distributions, using the stan_plot function of the rstan package


Description

Plots individual posterior distributions, using the stan_plot function of the rstan package

Usage

plotInd(obj = NULL, pars, show_density = T, ...)

Arguments

obj

An output of the hBayesDM. Its class should be 'hBayesDM'.

pars

(from stan_plot's help file) Character vector of parameter names. If unspecified, show all user-defined parameters or the first 10 (if there are more than 10)

show_density

T(rue) or F(alse). Show the density (T) or not (F)?

...

(from stan_plot's help file) Optional additional named arguments passed to stan_plot, which will be passed to geoms. See stan_plot's help file.

Examples

## Not run: 
# Run a model
output <- dd_hyperbolic("example", 2000, 1000, 3, 3)

# Plot the hyper parameters ('k' and 'beta')
plot(output)

# Plot individual 'k' (discounting rate) parameters
plotInd(output, "k")

# Plot individual 'beta' (inverse temperature) parameters
plotInd(output, "beta")

# Plot individual 'beta' parameters but don't show density
plotInd(output, "beta", show_density = F)

## End(Not run)

hBayesDM

Hierarchical Bayesian Modeling of Decision-Making Tasks

v1.1.1
GPL-3
Authors
Woo-Young Ahn [aut, cre], Nate Haines [aut], Lei Zhang [aut], Harhim Park [ctb], Jaeyeong Yang [ctb], Jethro Lee [ctb]
Initial release
2021-05-04

We don't support your browser anymore

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