Learn R Programming

rsem (version 0.5.1)

rsem.lavaan: Conduct robust SEM analysis using lavaan

Description

Conduct robust SEM analysis using lavaan

Usage

rsem.lavaan(dset, model, select,  varphi=.1, max.it=1000)

Arguments

dset

A data matrix or a data frame

select

Variables to be seleted for SEM analysis. If omitted, all variables in the data set will be used.

model

The model using lavaan syntax

varphi

Proportion of data to be down-weighted. Default is 0.1.

max.it

Maximum number of iterations for EM. Default is 1000

Author

Ke-Hai Yuan and Zhiyong Zhang

Details

This function will run the robust analysis and output results.

References

Yuan, K.-H., & Zhang, Z. (2012). Robust Structural Equation Modeling with Missing Data and Auxiliary Variables. Psychometrika, 77(4), 803-826.

See Also

rsem.pattern, rsem.emmusig, rsem.Ascov

Examples

Run this code

 data(mardiamv25)
 names(mardiamv25)<-paste('V', 1:5, sep='')
 
 fa.model<-'f1 =~ V1 + V2
f2 =~ V4 + V5 
f1 ~ 1
f2 ~ 1
V1 ~0*1
V2 ~0*1
V4 ~0*1
V5 ~0*1'

 analysis<-rsem.lavaan(mardiamv25, fa.model, c(1,2,4,5))

Run the code above in your browser using DataLab