Skip to content
Prev 75147 / 398502 Next

help on regression by subsets in dataset

On 8/8/05, Krishna <snvk4u at gmail.com> wrote:
This defines a model which has a separate intercept and slope for
each value of the grouping variable g:
[1] 1 1 1 2 2 2 3 3 3 4 4 4
Levels: 1 2 3 4
Call:
lm(formula = y ~ g/x - 1)

Coefficients:
      g1        g2        g3        g4      g1:x      g2:x      g3:x      g4:x  
-0.21697   6.40748   0.24710  -3.29170  -0.10459  -1.20787   0.04418   0.34762