Learn R Programming

lavaSearch2 (version 1.2.0)

lavaSearch: Tools for Model Specification in the Latent Variable Framework

Description

The package contains three main functionalities:

  • compare2: Wald tests/F-tests with improved control of the type 1 error in small samples.

  • glht2: adjustment for multiple comparisons when doing inference for multiple latent variable models.

  • modelsearch2: searching for local dependencies with adjustment for multiple comparisons.

Arguments

Limitations

'lavaSearch2' has been design for Gaussian latent variable models with complete data. This means that it may not work / give valid results:

  • in presence of missing values.

  • in presence of censored or binary outcomes.

  • with stratified models (i.e. object of class multigroup).

Details

The latent variable models (LVM) considered in this package can be written as a measurement model: $$Y_i = \nu + \eta_i \Lambda + X_i K + \epsilon_i$$ and a structural model: $$\eta_i = \alpha + \eta_i B + X_i \Gamma + \zeta_i$$ where \(\Sigma\) is the variance covariance matrix of the residuals \(\epsilon\), and \(\Psi\) is the variance covariance matrix of the residuals \(\zeta\).

The corresponding conditional mean is: $$ \mu_i(\theta) = E[Y_i|X_i] = \nu + (\alpha + X_i \Gamma) (1-B)^{-1} \Lambda + X_i K $$ $$ \Omega(\theta) = Var[Y_i|X_i] = \Lambda^{t} (1-B)^{-t} \Psi (1-B)^{-1} \Lambda + \Sigma $$

The package aims to provides tool for testing linear hypotheses on the model coefficients \(\nu\), \(\Lambda\), \(K\), \(\Sigma\), \(\alpha\), \(B\), \(\Gamma\), \(\Psi\). Searching for local dependency enable to test whether the proposed model is too simplistic and if so to identify which additional coefficients should be added to the model.