rsem {rsem}R Documentation

The main function for robust SEM analysis

Description

This is the function to carry out all analysis.

Usage

rsem(dset, select, EQSmodel, moment=TRUE, varphi=.1, st='i', max.it=1000, 
eqsdata='data.txt', eqsweight='weight.txt', EQSpgm="C:/Progra~1/EQS61/WINEQS.EXE", 
serial="1234")

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.

moment

With mean structure. For covariance only, set moment=FALSE.

EQSmodel

The input file for EQS. If omitted, only the first-stage analysis will be conducted.

varphi

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

max.it

Maximum number of iterations for EM. Default is 1000

st

Starting values for EM algorithm. The default is 0 for mean and I for covariance. Alternative, the starting values can be estimated according to MCD.

eqsdata

Data file name used in EQS

eqsweight

File name for weight matrix

EQSpgm

The path to the installed EQS program

serial

The serial no of EQS

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

## Not run: 
## an example
 ## to use eqs, first load the package semdiag
 library(semdiag)
 data(mardiamv25)
 analysis<-rsem(mardiamv25, c(1,2,4,5), 'eqsinput.eqs')
 
## End(Not run)

[Package rsem version 0.5.1 Index]