
Dear experts
 
I need to fit a model with nested random effects (cow within herd and season), and I’m not sure how to do it with R.
 
 
Using LME  I know how to fit:   cow within herd
 
fit4 <- lme(milk ~ days + season + season*days , data=xxx, random = ~1 + days| herd/cow)
 
How I can fit:  cow within herd and season?
 
 

In SAS I would write it:
 
Proc mixed data=xxx;
Class  herd cow season;
Model  milk= days  season  days*season;
Random intercept days/type=cs    subject = cow(herd season) ;
 
  
Thank for your help
 
Maria
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
	[[alternative HTML version deleted]]

