EVALUATING BAYESIAN CFA USING THE

0 downloads 0 Views 65KB Size Report
Min1 Whether to subtract 1 from the sample size in the equation (default = TRUE; yes). • Ngr Number ... Correct if numerator is smaller than zero nonc[nonc < 0] ...
EVALUATING BAYESIAN CFA USING THE BRMSEA

1

Supplementary Material A BRMSEA syntax for R To retrieve the BRMSEA the observed and replicated chi-square should be saved by Mplus, this is established by adding the following to the input: PLOT: Type = Plot2 ;

This saves the parameters estimates into a gh5-file which are used by Mplus to deploy the plots. This file can, however, also be used to extract several parameters. To extract the parameters R can be used. The following packages should be installed and loaded: # # To extract the number of parameters and observations library(MplusAutomation) # # As helper function library(stringr) # # To extract gh5 files library(rhdf5) # # To extract the gh5 files source("http://www.statmodel.com/mplus-R/mplus.R")

The latter is no package but is a source offered by Mplus to smooth the extraction of parameters estimates. These packages are used in the function to compute the BRMSEA. This function should only be used for identified models with a proper convergence. The function contains the following arguments:

EVALUATING BAYESIAN CFA USING THE BRMSEA

2

A vector with the observed 𝜒𝜒 2 for each iteration



obs:



rep



nvar Number of observed variables (positive integer)



pD

Effective number of estimated parameters (pD)



N

Sample size (N)



ms

Whether the mean structure is estimated (default = TRUE; ms included)



cil

Lower bound, proportion, of the posterior probability interval (default = .05; 5%)



ciu

Upper bound, proportion, of the posterior probability interval (default = .95; 95%)



allout Whether the BRMSEA of each iteration should be provide or only the posterior

A vector with the replicated 𝜒𝜒 2 for each iteration

probability interval (default = FALSE) •

Min1 Whether to subtract 1 from the sample size in the equation (default = TRUE; yes)



Ngr

Number of groups (default = 1; one group; validity of BRMSEA for multiple

groups is not assessed, based on Steiger [1998; doi:10.1080/10705519809540115]) It is important that obs and rep have the same order in respect to the iterations they reflect. The arguments, nvar, pD, and N, should only contain a single element. These arguments are used in the following function to compute the BRMSEA: BayesRmsea