[R] Fw: Do GLM by groups

Hongmei Jia hongmei.jia at basf.com
Thu Jul 19 19:18:37 CEST 2007


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.

group    line  rep  value
1              1       1       0.2
1              1       2       0.3
1     1       3       0.23
1             2       1       0.2
1             2       2       0.3
1             2      3       0.23
2              1       1       0.2
2              1       2       0.3
2     1       3       0.23
2             2       1       0.2
2             2       2       0.3
2             2      3       0.23

in SAS we say:
model value=line rep;
by group;

How can I do this in R?

Thanks,

Hongmei Jia



More information about the R-help mailing list