Dear list,

I am confused on how to explain the interaction term in the context of
"treatment contrast".

for example, I have an data frame as below:
 sub  group      val
1    a group1 3.685625
2    a group1 3.407445
3    a group1 4.040920
4    a group1 2.890875
5    b group1 3.853280
6    b group1 4.113585
7    b group1 3.043250
8    b group1 3.800920
9    c group1 5.394305
10   c group1 5.004290
11   c group1 4.651435
12   c group1 4.286650
13   d group1 4.773440
14   d group1 3.982200
15   d group1 5.718690
16   d group1 4.803815
.....
45   d group3 8.021240
46   d group3 7.641685
47   d group3 7.519445
48   d group3 9.514580

then:

>tapply(val,list(group,sub),mean)
              a        b        c        d
group1 3.506216 3.702759 4.834170 4.819536
group2 4.831503 5.246833 5.930116 6.649191
group3 6.233062 6.648325 7.787651 8.174238

> summary(lm(val~group*sub))

Call:
lm(formula = val ~ group * sub)

Residuals:
     Min       1Q   Median       3Q      Max
-1.24378 -0.50184 -0.03726  0.51748  1.34034

Coefficients:
                 Estimate Std. Error t value Pr(>|t|)
(Intercept)        3.5062     0.3278  10.696 9.98e-13 ***
groupgroup2        1.3253     0.4636   2.859  0.00703 **
groupgroup3        2.7268     0.4636   5.882 9.98e-07 ***
subb               0.1965     0.4636   0.424  0.67411
subc               1.3280     0.4636   2.865  0.00693 **
subd               1.3133     0.4636   2.833  0.00751 **
groupgroup2:subb   0.2188     0.6556   0.334  0.74052
groupgroup3:subb   0.2187     0.6556   0.334  0.74060
groupgroup2:subc  -0.2293     0.6556  -0.350  0.72851
groupgroup3:subc   0.2266     0.6556   0.346  0.73158
groupgroup2:subd   0.5044     0.6556   0.769  0.44671
groupgroup3:subd   0.6279     0.6556   0.958  0.34460
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6556 on 36 degrees of freedom
Multiple R-squared: 0.8607,     Adjusted R-squared: 0.8182
F-statistic: 20.22 on 11 and 36 DF,  p-value: 3.296e-12


My question is:
with "treatment contrast" in R, Coefficients, groupgroup2,groupgroup3, subb,
subc,subd are the difference from Intercept 3.5062 (reference level for
intercepts).
But what is the reference level for the interaction terms? such as
groupgroup2:subb,groupgroup3:subb,and etc.

Thanks.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to