Learn R Programming

dRiftDM (version 0.3.1)

summary.mcmc_dm: Summary for mcmc_dm Objects

Description

Summary and corresponding print methods for objects of the class mcmc_dm, resulting from a call to estimate_bayesian(). mcmc_dm objects contain MCMC samples for Bayesian parameter estimation of drift_dm() objects. The summary includes basic parameter statistics, quantiles, Gelman-Rubin diagnostics, and effective sample sizes.

Usage

# S3 method for mcmc_dm
summary(object, ..., id = NULL)

# S3 method for summary.mcmc_dm print( x, ..., round_digits = drift_dm_default_rounding(), show_statistics = TRUE, show_quantiles = FALSE, show_gr = TRUE, show_eff_n = TRUE )

Value

summary.mcmc_dm() returns an object of class summary.mcmc_dm, which is a list with the following entries:

  • general: General information about the MCMC run.

  • statistics: Basic parameter summary statistics.

  • quantiles: Quantiles for each parameter.

  • gr: Gelman-Rubin diagnostics.

  • eff_n: Effective sample sizes.

print.summary.mcmc_dm() prints selected summary components and returns the input object invisibly.

Arguments

object

an object of class mcmc_dm, as returned by estimate_bayesian()

...

additional arguments passed forward to coda::summary.mcmc.list().

id

optional single numeric or character, specifying one or more participant IDs to subset object in the hierarchical case. Note that id will be converted to character, because dimension names of the chains stored in object are character. If NULL, then the function is applied to group-level parameters.

x

an object of class summary.mcmc_dm, as returned by summary.mcmc_dm().

round_digits

an integer, defining the number of digits for rounding the output.

show_statistics

a logical, if TRUE, print basic parameter statistics (means, SDs, standard errors).

show_quantiles

a logical, if TRUE, print quantile summary.

show_gr

a logical; if TRUE, print Gelman-Rubin convergence diagnostics for each parameter.

show_eff_n

a logical, if TRUE, print effective sample sizes for each parameter.

Details

The summary and diagnostic statistics of the MCMC chains are obtained using the R package coda.

See Also

coda::gelman.diag(), coda::effectiveSize(), coda::summary.mcmc.list()

Examples

Run this code
mcmc_obj <- get_example_fits("mcmc_dm")
print(mcmc_obj)
summary(mcmc_obj)

Run the code above in your browser using DataLab