Learn R Programming

rsem (version 0.5.1)

rsem.print: Organize the output for Lavaan with robust s.e. and test statistics

Description

Organize the output for Lavaan with robust s.e. and test statistics. Modified from the print function of Lavaan.

Usage

rsem.print(object, robust.se, robust.fit, estimates=TRUE, fit.measures=FALSE, 
standardized=FALSE, rsquare=FALSE, std.nox=FALSE, modindices=FALSE)

Value

If EQSmodel is not supplied

sem

Information for SEM analysis including estimated means, covariance matrix and their sandwich type covariance matrix in the order of mean first and then covariance matrix.

misinfo

Information related to missing data pattern

em

Results from expectation robust algorithm

ascov

Covariance matrix

If EQSmodel is supplied,

sem

Information for SEM analysis including estimated means, covariance matrix and their sandwich type covariance matrix according to the requirement of EQS.

In addition, the following model parameters are from EQS

fit.stat

Fit indices and associated p-values

para

Parameter estimates

eqs

All information from REQS

Arguments

object

Output from lavaan analysis, such as growth, factor, sem functions.

robust.se

Robust standard error from the function rsem.se

robust.fit

Robust fit statistics from the function rsem.fit

estimates

Show parameter estimates

fit.measures

Show fit statistics of lavaan (no need for it)

standardized

standardized coefficients

rsquare

R square for dependent variables.

std.nox

to add

modindices

Modification indices

Author

Ke-Hai Yuan and Zhiyong Zhang

Details

This function will run the robust analysis and output results.

References

Ke-Hai Yuan and Zhiyong Zhang (2011) Robust Structural Equation Modeling with Missing Data and Auxiliary Variables

See Also

rsem.pattern, rsem.emmusig, rsem.Ascov

Examples

Run this code
##\dontrun{
## an example
 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'

pat<-rsem.pattern(mardiamv25)

phi<-0.1
musig<-rsem.emmusig(pat, varphi=phi)

res.lavaan<-sem(fa.model, sample.cov=musig$sigma, sample.mean=musig$mu, sample.nobs=88,mimic='EQS')

ascov<-rsem.Ascov(pat, musig, varphi=phi)

robust.se<-rsem.se(res.lavaan, ascov$Gamma)

robust.fit <- rsem.fit(res.lavaan, ascov$Gamma, musig)

rsem.print(res.lavaan, robust.se, robust.fit)
## }

Run the code above in your browser using DataLab