Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: Strange Behaviour When Selecting Levels For Factor Variables In Regression With i#

 From David Hoaglin To statalist@hsphsun2.harvard.edu Subject Re: st: Strange Behaviour When Selecting Levels For Factor Variables In Regression With i# Date Sat, 19 Jan 2013 08:59:07 -0500

```Sarah,

Richard's output clarifies a lot!

It may not make my earlier explanation clearer, but it's useful to
review the interpretation of an estimated coefficient in a multiple
regression.  Consider the coefficient of patient in these models.  It
summarizes change in bp per unit change in patient after adjusting for
simultaneous change in sex, when, and when*patient.  Each of the three
models makes the same adjustment for the contribution of sex, but the
third model shares that adjustment differently between the predictor
for sex (i0.sex instead of i1.sex) and the constant term.

The interpretation above differs from the common, but oversimplified,
interpretation that talks about holding the other predictors constant.
These models show why one should avoid the "held constant"
interpretation: It's not possible to change patient and hold
when*patient constant.

David Hoaglin

On Sat, Jan 19, 2013 at 1:12 AM, Sarah Elizabeth Edgington
<sedging@ucla.edu> wrote:
> I share Daniel's confusion and this explanation doesn't make it any clearer
> to me.
> If sex were not a binary variable then the other coefficients changing would
> make sense because the different regressions would actually be changing how
> sex is coded.  However, with a variable that's coded 0/1 to begin with,
> isn't i.sex the equivalent of i1.sex?  That is, isn't an indicator for when
> sex=1 exactly the same variable as the original sex variable?  In which case
> you'd expect the first two regression examples to be exactly the same.  The
> fact that they aren't suggests to me that there's something I don't
> understand about the i1.sex factor variable syntax.  What am I missing?
>
> -Sarah
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```