.
Now I see what you wanted. What I said did not make much sense except for the
interaction given the default encodings, sorry.
You had to use effect coding instead of the default indicator coding
to match the ANOVA, and then the difference in total sum of squares
between the reduced and full models gives the partial sum of squares
of interest. Stata 11's factor coding doesn't handle different
encodings like the user written ado's -xi3- and -desmat-.
> Dear Statalist,
>
> My question is more about statistics than about Stata, but also so elementary
> that I'd like to post this problem here.
>
> In ANOVA I have difficulty in understanding the notion of Partial Sum of
> Squares - being the default option in Stata's anova.
>
> In understanding statistical methods, I use linear regression (OLS) as a
> reference method, since regression allows me to draw pictures in my mind
> and is a method that I feel comfortable with. ANOVA is not so intuitive
> to me. But since the underlying methods of OLS and ANOVA are essentially
> the same (both General Linear Models - GLMs), I regard the difference
> between these methods as "different interfaces" to the same GLM.
>
> My question is:
> 'How can I obtain the Partial Sum of Squares of each of
> the variables in the case of a two way anova with interaction by us of
> regression analysis?'
>
> or - more applied - :
> How do I get the Partial SS of foreign in:
> *---------------- begin example --------------------------
> sysuse auto, clear
> anova mpg foreign rep78 foreign#rep78
> *------------------ end example -----------------------------
> using regression analysis?
>
> Kind regards,
> Adriaan Hoogendoorn
> GGZ inGeest, Amsterdam.
>
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/