inspectSampleCov: Observed Variable Correlation Matrix from a Model and Data

Description Usage Arguments Details See also Author(s)

View source: R/ctr_modelcov.R

Description

The lavaan model syntax describes a latent variable model. Often, the user wants to see the covariance matrix generated by their model for diagnostic purposes. However, their data may have far more columns of information than what is contained in their model.

Usage

1

Arguments

model

The model that will be fit by lavaan.

data

The data frame being used to fit the model.

...

Other arguments to sem for how to deal with multiple groups, missing values, etc.

Details

One must supply both a model, coded with proper model.syntax and a data frame from which a covariance matrix will be calculated. This function essentially calls sem, but doesn't fit the model, then uses lavInspect to get the sample covariance matrix and meanstructure.

See also

sem, lavInspect

Author(s)

Jarrett Byrnes


lavaan documentation built on March 10, 2021, 5:05 p.m.