Robust Structural Equation Modeling with Missing Data and Auxiliary Variables
Simulated data
Robust Structural Equation Modeling with Missing Data and Auxiliary Va...
Sandwich-type covariance matrix
Generate a duplication matrix
Robust mean and covariance matrix using Huber-type weight
Calculate robust test statistics
Internal function
rsem.index function
rsem.indexv function
rsem.indexvc function
Conduct robust SEM analysis using lavaan
Obtaining missing data patterns
Organize the output for Lavaan with robust s.e. and test statistics
The main function for robust SEM analysis
Calculate robust standard errors
Calculate the squared sum of a matrix
Internal function
swith function
Stacking a matrix to a vector
Stacking lower triange of a matrix to a vector
Calculate weight for each subject
Enumerate the Combinations of the Elements of a Vector
Import of EQS outputs into R
Run EQS from R
A robust procedure is implemented to estimate means and covariance matrix of multiple variables with missing data using Huber weight and then to estimate a structural equation model.