Repeated measures structural equation modeling I need to analyse a dataset of clinical rehabilitation data. I am interested in hypothesis-driven relationships between quantified "input" (amount of therapy) and changes in health status. Although the dataset is relatively small (n~70) we have repeated data reflecting temporal changes in both. I am familiar with non-linear mixed effects modelling in R however am interested in potential "causal" relationships between input and output here and thus am considering repeated measures applications of SEM
I'd appreciate advice on which if any of the SEM packages for R (sam, lavaan, openmx?) are best suited to repeated measures data, and particularly recommendations for textbooks (is there a "Pinheiro and Bates" of the field?).
 A: I think you want a latent growth curve model. While I have only used LISREL for this, the lavaan package documentation indicates it can be used to fit this type of model.
I don't know of any books that specialise in this subject, the book I am working from for SEM covers a range of methods. Perhaps someone else can answer that aspect of your question.
A: No, there is no "Pinheiro and Bates". You can find a number of books titled like "SEM using AMOS/LISREL/Mplus", but I am not aware of any using R. The best book, mathematically speaking, on SEM is still Bollen (1989). It is written by a sociologist rather than a biostatistician (although a very good one!), and so is aimed at social scientists, and contains few references to software (and you don't want the software from quarter a century ago, anyway). Bollen has also co-authored a good paper recently on causality with Judea Pearl, see http://ftp.cs.ucla.edu/pub/stat_ser/r393.pdf. As far as I can tell, Mulaik (2009) should be good, too, but it is written by a psychologist for psychologists.
I don't think sem package is flexible enough to run this kind of stuff. OpenMx can deal with ordinal data (and hence binary outcomes), but I don't think lavaan can do this.
The software that you will conceptually find the easiest to deal with might be GLLAMM, a package written for Stata. Viewed one way, this is essentially a Stata incarnation of nlme. With an extra tweak (allowing the coefficients of the random effects vary according to values of other variables), it becomes a latent variable modeling package. This all is described in Skrondal and Rabe-Hesketh (2004)... which is a great book per se that you'd want to have even if you just do nlme.
A: As you seem comfortable with generalized linear mixed models, and you don't seem to imply that you're interested in latent variables, perhaps you might want to take a piecewise approach using lmer which you can then evaluate using a D-Sep test.  See Shipley, B. (2009). Confirmatory path analysis in a generalized multilevel context. Ecology, Ecology, 90, 363–368.  http://dx.doi.org/10.1890/08-1034.1 for an example.  He also provides R code in the appendix for how to calculate the test of D-Separation.
If you really want to get into latent variable modeling and SEM using maximum likelihood, check out http://lavaan.org - there's a great tutorial there that covers its capabilities as well as a section on latent growth curve models which may well be what you're after.
