# st: RE: Two-way anova vs linear regression: how can I understand Partial SS

 From "Hoogendoorn, Adriaan" <[email protected]> To "[email protected]" <[email protected]> Subject st: RE: Two-way anova vs linear regression: how can I understand Partial SS Date Wed, 6 Jan 2010 17:39:16 +0100

```Dear David Airey,

Thank you for reacting, though.
Usually the interaction is the part of interest.
Your anwers shows some powerful Stata code, that I was not aware of.

Kind regards,

________________________________________
From: [email protected] [[email protected]] On Behalf Of Airey, David C [[email protected]]
Sent: Wednesday, January 06, 2010 4:22 PM
To: Statalist
Subject: st: Two-way anova vs linear regression: how can I understand Partial SS

.

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,
> 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/

*
*   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/
```