Re: [R] lme and lmer syntax

From: Doran, Harold <HDoran_at_air.org>
Date: Tue 25 Oct 2005 - 06:08:41 EST


Ronaldo

See the article on lmer pasted below for syntax. It is the only current source documenting the code. In lmer(), the nesting structure for the ranmdom effects is handled in a slightly different way. If your observations are nested as you note, then you can use

> lmer(y~x1 + x2 +(1|x1) + (1|x2), data)

@Article{Rnews:Bates:2005,

  author       = {Douglas Bates},
  title	       = {Fitting Linear Mixed Models in {R}},
  journal      = {R News},
  year	       = 2005,
  volume       = 5,
  number       = 1,
  pages	       = {27--30},
  month	       = {May},
  url	       = {http://CRAN.R-project.org/doc/Rnews/},
}

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Ronaldo Reis-Jr. Sent: Monday, October 24, 2005 3:56 PM
To: R-Help
Subject: [R] lme and lmer syntax

Hi,

I have this:

lme(y~x1+x2,random=~1|x1/x2)

How to make this random effect using lmer?

I try this:

lmer(y~x1+x2+(1|x1/x2)

But it dont work.

Any idea?

Thanks
Ronaldo

--
System halted!
--
|>   // | \\   [***********************************]
|   ( §   § )  [Ronaldo Reis J˙nior                ]
|>      V      [UFV/DBA-Entomologia                ]
|    /     \   [36570-000 Višosa - MG              ]
|>  /(.''`.)\  [Fone: 31-3899-4007                 ]
|  /(: :'  :)\ [chrysopa@insecta.ufv.br            ]
|>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
|    ( `-  )   [***********************************]
|>>  _/   \_Powered by GNU/Debian Woody/Sarge

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Oct 25 06:14:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:47 EST