Type III SS again [🇷 for BE/BA]
Dear yjlee,
Strictly, as explained before, it is fo interactions. They just happen to have the same meaning as nesting to the model matrix.
As noted elsewhere, the type III SS for a given factor are calculated by fitting the full model and then fitting the full model minus the factor in question and noting the difference between the two residual SS.
When we want type III SS for the Sequence factor, R fits the full model and then a model without Sequence as a factor and then compares the difference in residuals. In your case it is a number very close to zero. It always will be when the single-term-deletion strategy is followed.
This is because the model without Sequence as a factor includes Subjects. The subjects are "nested in sequence" (no pun intended!), so your sequence effect becomes effectively zero* (or to say it differently: you cannot include the subjects without also including the sequence, so in the model without the explicit inclusion of Sequence you have Subjects and therefore Sequence is included implicitly). SAS is clever enough to figure this one out by itself and fiddle with the inclusions.
So in summary: Type III SS are generally calculated by single term deletions. However, uncritical use of single term deletions may result in odd stufff or nested data. R does it un critically, SAS does some clever work for you, and therefore the SAS type III output differs from R's drop1 output.
EM.
❝ Why we do use ":" in R? for nesting purpose, I suppose.
Strictly, as explained before, it is fo interactions. They just happen to have the same meaning as nesting to the model matrix.
❝ Type III SS
❝ Single term deletions
❝
❝ Model:
❝ Cmax ~ seq + prd + drug + subj
❝ Df Sum of Sq RSS AIC F value Pr(F)
❝ <none> 514123 307
❝ seq 0 2.328e-10 514123 307 (do we need this?)
❝
❝ prd 1 37889 552013 307 0.8844 0.3656
❝ drug 1 88706 602830 309 2.0705 0.1757
❝ subj(seq) 12 719310 1233434 307 1.3991 0.2849
As noted elsewhere, the type III SS for a given factor are calculated by fitting the full model and then fitting the full model minus the factor in question and noting the difference between the two residual SS.
When we want type III SS for the Sequence factor, R fits the full model and then a model without Sequence as a factor and then compares the difference in residuals. In your case it is a number very close to zero. It always will be when the single-term-deletion strategy is followed.
This is because the model without Sequence as a factor includes Subjects. The subjects are "nested in sequence" (no pun intended!), so your sequence effect becomes effectively zero* (or to say it differently: you cannot include the subjects without also including the sequence, so in the model without the explicit inclusion of Sequence you have Subjects and therefore Sequence is included implicitly). SAS is clever enough to figure this one out by itself and fiddle with the inclusions.
So in summary: Type III SS are generally calculated by single term deletions. However, uncritical use of single term deletions may result in odd stufff or nested data. R does it un critically, SAS does some clever work for you, and therefore the SAS type III output differs from R's drop1 output.
EM.
- The low value you see is simply a matter of machine precision; the fitting algorithm stops once the residual SS cannot be improved more than a certain small quantity. It does arguably (if you ask SAS) not reflect the actual Sequence effect. Although I am not a fan of SAS, I totally agree on this specific issue.
Complete thread:
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 20:54 [🇷 for BE/BA]
- Let's skip the fancy nesting syntax! yjlee168 2009-08-26 22:29
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 22:46
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 20:54
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-27 22:14
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 20:54
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-26 22:46
- Let's skip the fancy nesting syntax! yjlee168 2009-08-27 22:26
- Let's skip the fancy nesting syntax! ElMaestro 2009-08-27 22:46
- Simple solution ElMaestro 2009-08-27 23:53
- Simple solution yjlee168 2009-09-07 01:53
- Type III SS againElMaestro 2009-09-07 15:47
- Type III SS again yjlee168 2009-09-07 18:08
- Type III SS again ElMaestro 2009-09-07 19:53
- Type III SS again yjlee168 2009-09-07 18:08
- Type III SS againElMaestro 2009-09-07 15:47
- Simple solution yjlee168 2009-09-07 01:53
- Let's skip the fancy nesting syntax! yjlee168 2009-08-26 22:29