hsemx
1.0.0 — Extended Hierarchical Structural Equation Models via
h-likelihood
Maintainer: Rezzy Eko Caraka
rezzyekocaraka@gmail.com
About
hsemx (hsem extended) is an extended,
re-engineered successor of the CRAN package hsem 1.0
(Caraka, Noh & Lee, 2021). It is released under a new name because
hsem already exists on CRAN. The two packages can be
installed side by side; attach only one per session, because both export
hsem().
What hsemx extends:
- Estimation engine. Exact ML/REML for Gaussian
models and Laplace with observed information otherwise, validated
against lme4, nlme and glmmTMB.
- Random effects. Covariances are estimated within
and across equations (unstructured, block, diagonal, shared-factor or
one-factor).
- Model specification. Any number of equations and
grouping factors, lme4 formula syntax, and dispersion models.
- Effects. Average direct, indirect and total effects
with random slopes (ab + cov(a_j, b_j)).
- Neural networks. MLP, residual, gated and
deep-ensemble networks inside the linear predictor.
- Graphics and checks. Path diagrams with random
effects (classic, two-level, cluster-specific), ridge/forest/correlation
plots and an assumption dashboard, plus lineup tests and cluster
influence.
- Inference and simulation. Bootstrap, LRT,
cross-validation, simulation studies with Monte Carlo SEs, and power
analysis.
References
(h-likelihood work behind hsemx)
- Caraka, R. E., Noh, M., & Lee, Y. (2021). hsem: Hierarchical
Structural Equation Model. R package 1.0, CRAN.
- Caraka, R. E., Lee, Y., Chen, R. C., & Toharudin, T. (2020).
Using hierarchical likelihood towards support vector machine: theory and
its application. IEEE Access, 8, 194795–194807.
https://doi.org/10.1109/ACCESS.2020.3033796
- Caraka, R. E., Noh, M., Chen, R. C., Lee, Y., Gio, P. U., &
Pardamean, B. (2021). Connecting climate and communicable disease to
penta helix using hierarchical likelihood structural equation modelling.
Symmetry, 13(4), 657. https://doi.org/10.3390/sym13040657
- Caraka, R. E., Noh, M., Lee, Y., Toharudin, T., Yusra, Tyasti, A.
E., Royanow, A. F., Dewata, D. P., Gio, P. U., Basyuni, M., &
Pardamean, B. (2022). The impact of social media influencers Raffi Ahmad
and Nagita Slavina on tourism visit intentions across millennials and
zoomers using a hierarchical likelihood structural equation model.
Sustainability, 14(1), 524.
https://doi.org/10.3390/su14010524
- Caraka, R. E., Lee, Y., Han, J., Lee, H., Noh, M., Ha, I. D., Gio,
P. U., et al. (2022). Albatross analytics a hands-on into practice:
statistical and data science application. Journal of Big Data,
9, 70. https://doi.org/10.1186/s40537-022-00626-y
Scripts written for hsem 1.0 can use the wrappers
hsemfit() and hsemmodeling().
install.packages("hsemx_1.0.0.tar.gz", repos = NULL, type = "source")
library(hsemx)
fit <- hsem(list(m ~ x + (1 + x | cluster),
y ~ m + x + (1 + m | cluster)), data = mlmed)
summary(fit)
hsem_effects(fit, "x", "y")
hsem_plot_path(fit) # "classic", "twolevel", "clusters"
plot(hsem_check(fit), "y")
See vignette("hsemx").