The R package gesca implements Generalized Structured Component Analysis (GSCA) and its basic extensions, including constrained single and multiple group analysis, and second order latent variable modeling. It enables users to obtain overall and local model fit measures, parameter estimates with bootstrapped standard errors and confidence intervals, and the total and indirect effects of latent variables and indicators. The package allows users to easily specify their hypothesized relationships among latent variables and/or indicators using an intuitive, text-based syntax. This user-friendly syntax involves the use of indicator names and simple numerical operators, making it straightforward and accessible for users.
Currently, gesca offers basic GSCA methods, i.e., component-based structural equation modeling, wherein all constructs are represented by components or weighted sums of observed variable. For those interested in more recently developed GSCA methods, such as GSCA with measurement errors (GSCA_M) and integrated GSCA (IGSCA), we highly recommend GSCA Pro. This free software provides a graphical user interface, making it simpler to model through path diagrams and visualize results effectively.
We are committed to the continuous development of the gesca R package and plan to soon incorporate the latest GSCA methods, including features similar to those found in GSCA Pro. Stay tuned for these exciting updates!
If you are just getting started with gesca, we recommend starting with the tutorial paper and the examples throughout the package.
# install.packages("devtools")
::install_github("QuantMM/gesca") devtools
install.packages("gesca")
Some quick examples using the main function and the built-in dataset
library(gesca)
data(gesca.rick2)
# Model specification
<- "
myModel # Measurement model
OP =~ cei1 + cei2 + cei3
OI =~ ma1 + ma2 + ma3
AC_J =~ orgcmt1 + orgcmt2 + orgcmt3
AC_L =~ orgcmt5 + orgcmt6 + orgcmt8
# Structural model
OI ~ OP
AC_J ~ OI
AC_L ~ OI
"
# A single-group analysis
<- gesca.run(myModel, gesca.rick2)
rick2.GSCA summary(rick2.GSCA)
# Run a multiple-group GSCA with the grouping variable gender:
<- gesca.run(myModel, gesca.rick2, group.name = "gender")
GSCA.group summary(GSCA.group)