[R] Glm and random effects

From: Jorge Cornejo-Donoso <jorgecornejo_at_uach.cl>
Date: Mon 02 Apr 2007 - 21:27:38 GMT

 

Hi, I'm traing to use the GLM to find tendences on my data.

E.G.
Data.frame: MyData

Len Zone	Year
12    1	2002	
21	1	2003
32	1	2004
32	2	2002
32	2	2003
31	2	2004
3	3	2002
4	3	2003
3	3	2004
32	4	2002
4	4	2003
5	4	2004


I want toi fing tendences on the len, if they change over the year (the anova say yes), but I wan't to include the zone as a Random effect So, I have something like this:
 SalGLM <- glm(MyData$Len ~ factor(MyData$year))  summary.glm(SalGLM)

But, I really don't know how to incorporate the zone as a random effect, anybody could help please?

Thanks in advance



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 and provide commented, minimal, self-contained, reproducible code. Received on Tue Apr 03 07:32:26 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 02 Apr 2007 - 22:30:47 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.