MyNixOS website logo
Description

Goodness-of-Fit Testing for Structural Equation Models.

Supports eigenvalue block-averaging p-values (Foldnes, Grønneberg, 2018) <doi:10.1080/10705511.2017.1373021>, penalized eigenvalue block-averaging p-values (Foldnes, Moss, Grønneberg, WIP), penalized regression p-values (Foldnes, Moss, Grønneberg, WIP), as well as traditional p-values such as Satorra-Bentler. All p-values can be calculated using unbiased or biased gamma estimates (Du, Bentler, 2022) <doi:10.1080/10705511.2022.2063870> and two choices of chi square statistics.

semTests

CRAN_Status_Badge R-CMD-check Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped.

An R package for goodness of fit testing of structural equation models. Built on top of lavaan.

Installation

Use the following command from inside R:

# install.packages("remotes")
remotes::install_github("JonasMoss/semTests")

Usage

Call the library function, create a lavaan model, and run the pvalues function.

library("semTests")
model <- "A =~ A1+A2+A3+A4+A5;
          C =~ C1+C2+C3+C4+C5"
n <- 200
object <- lavaan::sem(model, psych::bfi[1:n, 1:10], estimator = "MLM")
pvalues(object)
#> ppeba2_trad ppeba4_trad pols_2_trad  ppeba2_rls  ppeba4_rls  pols_2_rls 
#>  0.04182486  0.04370615  0.04397064  0.04235143  0.04424139  0.04450873

References

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

How to Contribute or Get Help

If you encounter a bug, have a feature request or need some help, open a Github issue. Create a pull requests to contribute.

Metadata

Version

0.5.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows