Wednesday, July 26, 2006

SEM in R (for free)

One of the problems with trying to learn about structural equation modelling (SEM) is that one needs to have access to a relatively expensive program (Mplus, AMOS, Lisrel, EQS), or one needs to use a free program, such as Mx.

Mx is a great program - it can do all sorts of amazingly clever things, but even the authors would admit that it isn't the world's easiest program to use - in fact, it's possibly got the steepest learning curve of any SEM program.

A solution to this is the package sem, written by John Fox, using R. R is a free and open source program which can read an SPSS data file, and sem is a package (add-on) to it. Learning sem (the package) has always been a bit tricky, because there is a bit of a lack of material to help - the help files (like pretty much all R help files) tell you how everything works, but don't really tell you how to do stuff. That's all been solved by a paper, authored by Fox, in the most recent issue of the journal Structural Equation Modeling (a right riveting read, I'll tell you) (Vol 13, Number 3, pages 465-486). Anyway, it's a nice introduction, and you can read it here.