each_param_psr_mplus: Various versions of PSR

View source: R/MplusHelpers.R

each_param_psr_mplusR Documentation

Various versions of PSR

Description

Various versions of PSR

Usage

each_param_psr_mplus(parameters, id.parameter, iterations.range = NULL)

Arguments

parameters

A 3-dimensional array (typically taken from Mplus-produced gh5 file in gh5$bayesian_data$parameters_autocorr$parameters or from any other), where first dimension is parameters, second dimension is iterations, and third dimension is chains

id.parameter

Integer id of parameter

iterations.range

Range of iterations to use. All available are used by default (NULL).

Details

Returns a vector of different versions of PSR:

  • "Rstan" the most up-to-date, provided by the Rhat function (Vehtari et al., 2019).

  • "Gelman" (Gelman et al. (2004)).

  • "Mplus" (Asparouhov and Muthen, 2010),

  • "Naive" which is a raw ratio of sum of a between- and within-chain variances to a within-chain variance.

Examples


## Not run: 
m <- MplusAutomation::readModels("mybayes.out")
eachParamPSRMplus(a$gh5$bayesian_data$parameters_autocorr$parameters, 1)

## End(Not run)


MaksimRudnev/LittleHelpers documentation built on Nov. 5, 2024, 10:16 p.m.