Re: [R] Fw: Do GLM by groups
Check the following example for by(): require(stats) attach(warpbreaks) by(warpbreaks, tension, function(x) lm(breaks ~ wool, data = x)) or just type: example(by) b On Jul 19, 2007, at 1:18 PM, Hongmei Jia wrote: > > Dear All, > > I'm trying to do 'glm' analysis by groups ju
[R] Fw: Do GLM by groups
Dear All, I'm trying to do 'glm' analysis by groups just like in SAS you use "by variable". I don't know how to do it in R, anyone can help with this? i.e. groupline rep value 1 1 1 0.2 1 1 2 0.3 1 1 3 0.23 1 2