Forschungsdaten GESIS2024

Function Random Start Values for CFA (lavaan)

Abstract

Confirmatory factor analysis (CFA) is a widely applied statistical technique in many research areas. However, depending on identification method and starting values, with typical (or robust) maximum likelihood estimation (ML/MLR) analysis models may converge to suboptimal values of the likelihood function (local maxima), thereby threatening the robustness of empirical modelling and inferences about model selection. To ensure model convergence to optimal likelihood values (global maxima), Mplus offers a convenience switch to repeatedly run a model with different random start values. Notably, open-source solutions in R lack a similarly convenient way for overcoming local maxima with the help of random start values. Here, we propose to implement R-code for reproducibe findings of the computationally optimal values for a CFA solution. While drawing on lavaan's cfa-function (Rosseel, 2012), we use a wrapper function for calling lavaan's cfa-function with three additional arguments. The first argument specifies the number of model runs that shall test random start values, mirroring Mplus's "starts" option. The second argument specifies the numerical tolerance, that is, the number of decimals of the likelihood values for evaluating the runs with random start value as equally likely. The third argument can be used to invoke parallel computing in the presence of multiple CPU cores, which increases computational efficiency if large numbers of runs with different random start values were ever required. Several examples demonstrate the functionality, applicability, and utility of the function.

Rosseel, Y. (2012). lavaan: An R Package for Structural Equation Modeling. Journal of Statistical Software, 48(2), 1-36. https://doi.org/10.18637/jss.v048.i02

Problem melden

Wenn Sie Probleme mit dem Zugriff auf einen gefundenen Titel haben, können Sie sich über dieses Formular gern an uns wenden. Schreiben Sie uns hierüber auch gern, wenn Ihnen Fehler in der Titelanzeige aufgefallen sind.