Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inspectSampleCov

Observed Variable Correlation Matrix from a Model and Data


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

inspectSampleCov(model, data, ...)

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

Author(s)

Jarrett Byrnes


lavaan

Latent Variable Analysis

v0.6-10
GPL (>= 2)
Authors
Yves Rosseel [aut, cre] (<https://orcid.org/0000-0002-4129-4477>), Terrence D. Jorgensen [aut] (<https://orcid.org/0000-0001-5111-6773>), Nicholas Rockwood [aut] (<https://orcid.org/0000-0001-5931-183X>), Daniel Oberski [ctb], Jarrett Byrnes [ctb], Leonard Vanbrabant [ctb], Victoria Savalei [ctb], Ed Merkle [ctb], Michael Hallquist [ctb], Mijke Rhemtulla [ctb], Myrsini Katsikatsou [ctb], Mariska Barendse [ctb], Florian Scharf [ctb], Han Du [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.