calc.GR: Run chains and calculate Gelman and Rubin diagnostics for...

View source: R/mixstock.R

calc.GRR Documentation

Run chains and calculate Gelman and Rubin diagnostics for mixed stock analyses

Description

For a mixed stock analysis data set with R sources, runs R Gibbs-sampler chains (one starting from a majority of the contribution from each source) and calculates Gelman and Rubin diagnostics on the combined set of chains.

Usage

calc.GR(data, tot=20000, burn=1, verbose=FALSE, rseed=1001,
           chainfrac=NULL)

Arguments

data

A mixed stock analysis data set (either an object of type mixstock.data, or any list containing appropriate sourcesamp and mixsamp objects)

tot

Total length of each MCMC chain

burn

Burn-in time for MCMC chains

verbose

Produce verbose output?

chainfrac

Fraction of each chain to discard. By default, chainfrac is set to (1-1/R), so that the total length of the combined chain is equal to (R*tot/R=tot).

rseed

Seed for random-number generator

Details

calls CODA function gelman.diag

Value

Returns the diagnostic from the CODA function

Author(s)

Ben Bolker


bbolker/mixstock documentation built on July 23, 2024, 12:18 p.m.