Skip to content

gls vs lme covariance structures

1 message · Szumiloski, John

#
I just wanted to point out that for simple repeated measures, longitudinal data, it --is-- possible to mimic some simple reasonable lme models with gls.

If lme uses the random effects specification

	random = ~1 | Subject

Then gls can mimic that by using 

	correlation = corCompSymm(form = ~1 | Subject)

The resulting parameterizations are different, but they give the same predictions and SEs for the "fixed"/model effects.

-----

I often take this gls paradigm a step further and make it a habit to use

	correlation = corrExp(form = LongitudinalTimeVariable | Subject, nugget = TRUE)

In the limit of the range parameter going to +infinity, the model reduces to the above corCompSymm model equivalent to an lme model.  In the limit as the nugget parameter going to zero, the model reduces to a CAR1 model.  (see ?corrExp and other corXXX)  I see cases of both of these.  But what astonishes me is that how often this two parameter correlation model fits my data so well: it mirrors nearly exactly what a full unrestricted correlation structure, using corSymm, gives.  (of course, that is my data, YMMV.)  Furthermore, the product of the nugget parameter and the overall variance gives an estimate of cross sectional replication variance, a nicety since I don't believe one can use replicated data with the corXXX functions.  

John
John  Szumiloski,  Ph.D.

Senior Biometrician
Biometrics Research
WP53B-120
Merck Research Laboratories
P.O. Box 0004
West Point, PA 19486-0004
-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org [mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of r-sig-mixed-models-request at r-project.org
Sent: Thursday, May 03, 2012 5:17 PM
To: r-sig-mixed-models at r-project.org
Subject: R-sig-mixed-models Digest, Vol 65, Issue 12

Send R-sig-mixed-models mailing list submissions to
	r-sig-mixed-models at r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
or, via email, send a message with subject or body 'help' to
	r-sig-mixed-models-request at r-project.org

You can reach the person managing the list at
	r-sig-mixed-models-owner at r-project.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of R-sig-mixed-models digest..."


Today's Topics:

   1. Re: gls vs lme covariance structures (Joshua Wiley)
   2. Re: Nested subject-longitudinal logit design (arun)
   3. Re: Extracting variances of the estimated variance components
      in lme4 (Joshua Wiley)


----------------------------------------------------------------------

Message: 1
Date: Thu, 3 May 2012 13:59:15 -0700
From: Joshua Wiley <jwiley.psych at gmail.com>
To: Charles Determan Jr <deter088 at umn.edu>
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] gls vs lme covariance structures
Message-ID:
	<CANz9Z_JYcSput9=kB8ibkvooKcABZWfTRDm4QZU9tmYYcxnOHQ at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

Hi Charles,

Well you could post a subset of it, or make up some data that is sharable (whether the data make any sense is not important to us, just nice to have runable code, for example your previous thread about contrasts could have been solved in one email if we could have shown you how to set the contrasts on your data and then it matched your SAS output).  In any case, whether you use lme or gls really depends on your question and goals, I think.  Generalized least squares is not the same as a random effects model.  If you want a random effect, you cannot use gls.  If you just want correlated errors, gls is fine.

This part of your code strikes me as atypical though I cannot promise it is wrong/not what you want: corr=corAR1(ID)

Cheers,

Josh
On Thu, May 3, 2012 at 1:44 PM, Charles Determan Jr <deter088 at umn.edu> wrote: