[R-sig-ME] covariance structures for longitudinal models

Ben Bolker bbolker at gmail.com
Fri Jan 6 19:40:28 CET 2012


Antonio P. Ramos <ramos.grad.student at ...> writes:

> 
> Thanks for your replies. To complement my own question: would  MCMCglmm do
> the job?

  I don't think so, because your models all seem to be expressed in
terms of R-side correlation, and MCMCglmm (although quite a bit more
flexible than lmer) does not seem to be as flexible as lme (or GLIMMIX/
NLMIXED) in specifying R-side correlations.  There aren't a huge
number of examples of the use of the 'rcov' argument in the MCMCglmm
course notes, but the examples there are show things like

  rcov=~us(trait):units 

  this is for a multi-response model, so the residual variance is
modeled within units, with 'us' (unstructured) and different variances
for each trait (so, e.g. ~us(time):units should fit an unstructured
correlation model)

  rcov=~idh(trait):units allows different variances by trait but
enforces independence

  The only other option that makes sense here is ~idv (equal variances)
which basically reduces to unstructured residuals.

    I started working on a 'corClass' definition that follows
the antecedent model you requested (and, if it worked, could serve
as a model for implementing other possibilities, such as the
anisotropic spatial correlation models people have asked about
previously on the list).  It's not quite working -- I still
have some confusions about when transformed vs untransformed
(or in lme's terminology "unconstrained" vs "constrained"
parameters are used -- but it's a start, and in case I don't
get around to doing anything further with it I thought I
would make it available at 
<http://www.math.mcmaster.ca/bolker/R/misc/newcorstruct.R>

> 
> On Mon, Jan 2, 2012 at 8:13 AM, Joshua Wiley <jwiley.psych at ...> wrote:
> 
> > Hi Antonio,
> >
> > I am not familiar with antedependence models so no comment there.
> >
> > For factor analysis and that genre, I like OpenMx (also see sem and
> > lavaan).  One thing I like about OpenMx is while it caters to SEM, it
> > is a general purpose matrix optimizer, and it really is not difficult
> > to access that power.  So in principal, you can have whatever matrices
> > you want, roll your own objective function, and away it'll go.
> >
> > For BUGS you have a lot of options including: R2OpenBUGS and R2WinBUGS
> > among others.
> >
> > Cheers,
> >
> > Josh
> >
> > On Mon, Jan 2, 2012 at 12:41 AM, Antonio P. Ramos
> > <ramos.grad.student at ...> wrote:
> > > Hi all,
> > >
> > > I've trying to use R to fit some longitudinal models, mostly via lme and
> > > nlme packages. However, it seems that many standard models are lacking,
> > > such as antedependence models or factor analytic models for covariance
> > > matrices. These models are readily available in SAS. Does an recommend
> > > other packages for the job in R? I don't really care if I am in
> > frequentist
> > > or bayesian world as long as I have more modeling flexibility. I would
> > also
> > > be interested in doing that in WINBUGS/JAGS.
> > >
> > > All the best,
> > >
> > > Antonio.
> > >
> > >        [[alternative HTML version deleted]]
> > >
> > > _______________________________________________
> > > R-sig-mixed-models at ... mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
> >
> >
> > --
> > Joshua Wiley
> > Ph.D. Student, Health Psychology
> > Programmer Analyst II, Statistical Consulting Group
> > University of California, Los Angeles
> > https://joshuawiley.com/
> >
> 
> 	[[alternative HTML version deleted]]
> 
>




More information about the R-sig-mixed-models mailing list