Learn R Programming

dclone (version 0.9-0)

mcmcapply: Calculations on mcmc.list objects

Description

Conveniently calculates statistics for mcmc.list objects, or combining them.

Usage

mcmcapply(x, FUN, ...)
## S3 method for class 'mcmc.list':
print(x, ...)

Arguments

x
Objects of class mcmc.list.
FUN
A function to be used in the calculations.
...
Other arguments passed to FUN.

Value

  • Returns statistic value based on FUN, using all values in all chains of the MCMC object.

encoding

UTF-8

Details

The mcmcapply returns a certain statistics based on FUN. The print method prints the object (without possible attributes).

Examples

Run this code
data(regmod)
mcmcapply(regmod, mean)
mcmcapply(regmod, sd)

Run the code above in your browser using DataLab