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

Share:

Description

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

Usage

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

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

Details

This function will run the robust analysis and output results.

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

Author(s)

Ke-Hai Yuan and Zhiyong Zhang

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
##\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)
## }