Imbalance + Type III SS = Tricky for the sequence evaluation [🇷 for BE/BA]
Dear all,
Following some previous discussion...
When we have sequence imbalance, type I etc will not save us when we want an output that resembles the type III output from SAS*. If we really want to get a meaningful evaluation of the sequence effect and still use type III SS then we need to play around a little bit. The following is an elmaestrolophystic attempt at getting it right. drop1 for Sequence makes little sense in itself because of the Subject factor. A meaningful type III SS for Sequence therefore is evaluated by comparing the residual from a model with Per and Trt with the residual from a model with Per and Trt and Seq.
So here's my ugly proposal:
The rest is then plain sailing with conversion of the newly acquired Seq SS to the mean square, followed by evaluation against the between-Subj error.
Best regards
EM.
*: This is just a reflection over the fact that some people want to be able to reproduce the SAS type III output. I am not claiming type III SS are superior; that aspect is better dealt with by others.
Following some previous discussion...
drop1
in R gives a SS of roughly zero (plus minus something smaller than the internal convergence criterion for lm) for the sequence effect.When we have sequence imbalance, type I etc will not save us when we want an output that resembles the type III output from SAS*. If we really want to get a meaningful evaluation of the sequence effect and still use type III SS then we need to play around a little bit. The following is an elmaestrolophystic attempt at getting it right. drop1 for Sequence makes little sense in itself because of the Subject factor. A meaningful type III SS for Sequence therefore is evaluated by comparing the residual from a model with Per and Trt with the residual from a model with Per and Trt and Seq.
So here's my ugly proposal:
Lm1=lm(lnAuc~Per+Trt+Subj+Seq)
## standard model, right?T3A=drop1(Lm1, test="F")
## this is our type III anova which gives a dumb Seq SST3A[5,2] = anova(lm(lnAuc~Per+Trt))$Sum[3] - anova(lm(lnAuc~Per+Trt+Seq))$Sum[4]
##
manually corrects the Seq SS accordingly to the text aboveThe rest is then plain sailing with conversion of the newly acquired Seq SS to the mean square, followed by evaluation against the between-Subj error.
Best regards
EM.
*: This is just a reflection over the fact that some people want to be able to reproduce the SAS type III output. I am not claiming type III SS are superior; that aspect is better dealt with by others.
Complete thread:
- Imbalance + Type III SS = Tricky for the sequence evaluationElMaestro 2009-09-07 21:16 [🇷 for BE/BA]
- Imbalance + Type III SS = Tricky for the sequence evaluation yjlee168 2009-09-07 22:23
- Imbalance + Type III SS = Tricky for the sequence evaluation ElMaestro 2009-09-08 16:49
- Imbalance + Type III SS = Tricky for the sequence evaluation yjlee168 2009-09-08 20:02
- Sequential phenomena and some R code ElMaestro 2009-09-08 20:28
- Sequential phenomena and some R code yjlee168 2009-09-08 21:36
- Default in SAS ElMaestro 2009-09-08 21:43
- Sequential phenomena and some R code yjlee168 2009-09-08 21:36
- Sequential phenomena and some R code ElMaestro 2009-09-08 20:28
- Imbalance + Type III SS = Tricky for the sequence evaluation yjlee168 2009-09-08 20:02
- Imbalance + Type III SS = Tricky for the sequence evaluation ElMaestro 2009-09-08 16:49
- Imbalance + Type III SS = Tricky for the sequence evaluation yjlee168 2009-09-07 22:23