Learn R Programming

RprobitB (version 1.2.0)

RprobitB_gibbs_samples_statistics: Create object of class RprobitB_gibbs_samples_statistics

Description

This function creates an object of class RprobitB_gibbs_samples_statistics.

Usage

RprobitB_gibbs_samples_statistics(gibbs_samples, FUN = list(mean = mean))

# S3 method for RprobitB_gibbs_samples_statistics print(x, true = NULL, digits = 2, ...)

Value

An object of class RprobitB_gibbs_samples_statistics, which is a list of statistics from gibbs_samples obtained by applying the elements of FUN.

Arguments

gibbs_samples

An object of class RprobitB_gibbs_samples, which generally is located as object gibbs_samples in an RprobitB_model object.

FUN

A (preferably named) list of functions that compute parameter statistics from the Gibbs samples, for example

  • mean for the mean,

  • sd for the standard deviation,

  • min for the minimum,

  • max for the maximum,

  • median for the median,

  • function(x) quantile(x, p) for the pth quantile,

  • R_hat for the Gelman-Rubin statistic.

true

Either NULL or an object of class RprobitB_parameter.