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

mcmc_Rhat

Computation of the Rhat Statistic from a Single MCMC Chain


Description

Computes the Rhat statistic from a single MCMC chain.

Usage

mcmc_Rhat(mcmc_object, n_splits=3)

Arguments

mcmc_object

Object of class mcmc

n_splits

Number of splits for MCMC chain

Value

Numeric vector

Examples

## Not run: 
#############################################################################
# EXAMPLE 1: Computation Rhat statistic for 2PNO model fitting by MCMC
#############################################################################

data(data.read)

# estimate 2PNO with MCMC with 3000 iterations and 500 burn-in iterations
mod <- sirt::mcmc.2pno( dat=data.read, iter=1000, burnin=100 )
# plot MCMC chains
plot( mod$mcmcobj, ask=TRUE )
# compute Rhat statistics
round( sirt::mcmc_Rhat( mod$mcmcobj[[1]] ), 3 )

## End(Not run)

sirt

Supplementary Item Response Theory Models

v3.10-118
GPL (>= 2)
Authors
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>)
Initial release
2021-09-22 17:45:34

We don't support your browser anymore

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