This is something that would be really useful if someone who is actually competent in the area would fix it. I did make a start, and I know that some of this is wrong; some is probably not sufficiently general; and some does indeed match the sem output exactly. So it is a start. Someone, please fix it and include with OpenMx, this would be very useful for a whole bunch of ignoramuses like me who occasionally need to run an SEM or path analysis and aren't covered by the sem package (e.g., need multi-group models).

# starter R code to compute the usual assortment of fit indices

#

# based on (what I understood of):

# Tabachnick & Fidell, pp. 697-702

# Klein, pp. 135-144

# also http://www.tau.ac.il/cc/pages/docs/sas8/stat/chap19/sect34.htm

#

fit.index

indep indep.chi indep.df

model model.chi model.df

model.ml N N.est.param N.manifest observed.cov estimate.cov observed.cor estimate.cor residual.cov residual.cor F0 if (F0

NFI NNFI PNFI IFI CFI RMSEA MFI GFI AGFI PGFI AIC AIC2 CAIC CAIC2 BIC BIC2 RMR SRMR

indices return(indices)

}