Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: Re-re-post: Stata 11 - Factor variables in a regression command

 From Richard Williams To statalist@hsphsun2.harvard.edu Subject Re: Re-re-post: Stata 11 - Factor variables in a regression command Date Sat, 01 May 2010 13:59:58 -0500

```At 12:31 PM 5/1/2010, Michael Norman Mitchell wrote:
```
If, instead one specifies -a#b-, this term has (A-1) + (B-1) + (A-1)*(B-1) , and is no longer partitioned into main effect of a, main effect of b, and interaction. The omnibus test of this effect is the overall test of the null hypothesis that there is simultaneously no main effect of a, no main effect of b, and no a by b interaction. As I show below, it simply tests the equality of means in all of the cells. I think this is rarely of research interest when one has this kind of "factorial" layout.
```
```
I agree, although there is probably somebody who likes this parameterization. It does save you doing a little bit of algebra if you want to get the mean for each cell in the cross-classification. Incidentally, for me at least, the equivalencies between the models are more easily seen by using the coefficients than the odds ratios.
```
```
The other thing I don't like about this approach is that it confounds the interaction with the main effects. If you instead do a##b, the interaction term a*b gets presented separately, and you may see that it is insignificant and not needed for the model, i.e. you only need i.a and i.b and not a#b.
```
```
Clever people can probably figure out how to use lincom commands to switch from one parameterization to another, but (unless it takes forever for the model to run) it is probably easier just to run the model different ways and let Stata do all the work.
```

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

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