The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
An R package for goodness of fit testing of structural equation
models. Built on top of lavaan
. Implements the
p-values of (Foldnes, Moss, Grønneberg, 2024).
Either install from CRAN
,
install.packages("semTests")
Or install the development version using the following command inside
R
:
# install.packages("remotes")
::install_github("JonasMoss/semTests") remotes
Call the library
function, create a lavaan
model, and run the pvalues
function.
library("semTests")
<- "A =~ A1+A2+A3+A4+A5;
model C =~ C1+C2+C3+C4+C5"
<- 200
n <- lavaan::sem(model, psych::bfi[1:n, 1:10], estimator = "MLM")
object pvalues(object)
#> sb_ug_rls peba2_ug_rls peba4_rls peba6_rls pols2_rls
#> 0.04396777 0.04930207 0.04424139 0.04488057 0.04450873
Foldnes, N., Moss, J., & Grønneberg, S. (2024). Improved goodness of fit procedures for structural equation models. Structural Equation Modeling: A Multidisciplinary Journal, 1–13. https://doi.org/10.1080/10705511.2024.2372028
Foldnes, N., & Grønneberg, S. (2018). Approximating Test Statistics Using Eigenvalue Block Averaging. Structural Equation Modeling, 25(1), 101–114. https://doi.org/10.1080/10705511.2017.1373021
Grønneberg, S., & Foldnes, N. (2019). Testing Model Fit by Bootstrap Selection. Structural Equation Modeling, 26(2), 182–190. https://doi.org/10.1080/10705511.2018.1503543
Marcoulides, K. M., Foldnes, N., & Grønneberg, S. (2020). Assessing Model Fit in Structural Equation Modeling Using Appropriate Test Statistics. Structural Equation Modeling, 27(3), 369–379. https://doi.org/10.1080/10705511.2019.1647785
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
If you encounter a bug, have a feature request or need some help, open a Github issue. Create a pull requests to contribute.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.