lavaSearch2 is a package for the R software (https://www.r-project.org/) containing diagnostic and inference tools for Latent Variable Models (LVM) estimated by maximum likelihood (ML). It is built upon the lava package (see https://github.com/kkholst/lava): the lava package is used to define and estimate LVM. While lava can also be used to perform diagnostics and inference, lavaSearch2 improves some of the existing tools in lava:
- Better control of the type 1 error rate when performing inference
with small samples. The new methods
summary2
andcompare2
replace thesummary
andcompare
functions that performs, respectively, univariate and multivariate Wald tests. The new methods are also applicable to specificgls
andlme
models (nlme package). - Better control of the type 1 error rate when adjusting for multiple
comparisons with small samples (via the multcomp
package). Compared to
glht
, the functionglht2
propagates small sample corrections to multcomp. - Better detection of local dependencies that are not included in the
LVM. The new method
modelsearch2
improves themodelsearch
method by providing p-values adjusted for multiple comparisons.
Limitations: lavaSearch2 has been design for Gaussian linear latent variable models. This means that it may not work / give valid results:
- in presence of censored or binary outcomes.
- with stratified models (i.e. object of class
multigroup
).
You can download and install the latest released version of the software (CRAN version) using:
install.packages("lavaSearch2")
For getting the most recent developments (if any!), you can download and install the latest stable version of the software (Github version) using:
devtools::install_github("bozenne/lavaSearch2")
See the vignette “Overview of the functionalities of the package lavaSearch2” in ./vignettes/overview.pdf