I am trying around with a few different ways trying to understand about the Error term specified in aov(). I am using the dataset Plasma from package gamlss.data, with 5 columns like below
head(df)
age sex smokstat bmi cholesterol
1 64 2 2 21.48380 170.3
2 76 2 1 23.87631 75.8
3 38 2 2 20.01080 257.9
4 40 2 2 25.14062 332.6
5 72 2 1 20.98504 170.8
6 40 2 2 27.52136 154.6
Firstly, I take that aov fits a model as suggested from this link
At first I fit the model
md <- aov(cholesterol~smokstat+Error(sex/smokstat), df)
when I call coef(md) I get the results:
(Intercept) :
(Intercept)
242.4606
sex :
smokstat2
539.678
sex:smokstat :
smokstat2 smokstat3
11.67864 36.50799
Within :
numeric(0)
I understand that the intercept is the global mean, and the smokstat2 and smokstat3 in sex:smokstat is the amount addded if you choose smokstat 2 over smokstat3 over smokstat1.
However, I don't understand what the block "sex: smokstat2 539.678" is? How I should interpret it? Why it is there instead of the "Residual" from between- subject variance?
Please add more information if I haven't made anything clear as I'm still confused by this rn. Thanks in advance. I appreciate your help.