Re: [R] lme syntax for P&B examples

From: Doran, Harold <>
Date: Thu 09 Feb 2006 - 00:01:03 EST


It is a little difficult to understand what you are trying to translate since you do not show what the model would look like using lme. If you show lme, then it is easy to translate into lmer syntax.

A few thoughts, first, use lmer in the Matrix package and not in lme4. Second, see the Bates article in R news at the link below for dealing with nesting structures. Last, a colleague and I have a paper in press showing how to fit models using lme which we submitted a year or so ago. Since lme has evolved to lmer, we created an appendix that translates all of our lme models to the lmer syntax so readers can see equivalences. I am happy to send this to you (or others) upon request.


-----Original Message-----
[] On Behalf Of Paul Cossens Sent: Wednesday, February 08, 2006 12:08 AM To:
Subject: [R] lme syntax for P&B examples

Hi helpeRs,  

I've been working through some examples in Pinhiero & Bates( 2000) trying to understand how to translate to the new Lme4 syntax but without much luck.
Below is what I think I should do, but either the answers don't come out the same or I get errors.
In the Oxide problems I'm particularly interested in obtaining the levels coeficients but this options no longer seems to be available in lme4. How can levels infor be obtained in lme4?  

If someone can recreate the examples below in lme4 syntax so I can follow what is happening in the text I'd be grateful.  


Paul Cossens    

# P&B(2000) p40-45  

Pixel<-read.csv("Pixel.csv",header=TRUE); Pixel$Side<-as.factor(Pixel$Side)

(fm1Pixel <- lmer(pixel ~ day + I(day^2) +(day|Dog)+(1|Side), data =
(fm2Pixel <- lmer(pixel ~ day + I(day^2) +(day|Dog), data = Pixel))
(fm3Pixel <- lmer(pixel ~ day + I(day^2) +(1|Dog:Side), data = Pixel))
or should I do it this way?
(fm3Pixel <- lmer(pixel ~ day + I(day^2) +(1|DS), data = Pixel))

(fm4Pixel <- lmer(pixel ~ day + I(day^2) +Side , data = Pixel))

# P&B(2000) p167-170  



fm1Oxide<-lmer(Thickness~ (1|Lot)+(1|Lot:Wafer),data=Oxide) )
(fm2Oxide<-lmer(Thickness~ (1|Lot),data=Oxide) )

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Thu Feb 09 00:23:52 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:26 EST