mcmc_Rhat.Rd
Computes the Rhat statistic from a single MCMC chain.
mcmc_Rhat(mcmc_object, n_splits=3)
mcmc_object | Object of class |
---|---|
n_splits | Number of splits for MCMC chain |
Numeric vector
if (FALSE) { ############################################################################# # 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 ) }