1
$\begingroup$

I just ran a regression using

  • time (year)
  • sex (Male = 0; Female = 1)
  • the interaction between the two.

I chose not to recode the year variable (i.e., 2000 = 1, 2001 = 2, etc.) for this analysis, as I've read that doing so only impacts the intercept (per another post on this site). These were the results I obtained from this analysis:

enter image description here

However, when I recode the year variable using the scheme noted above (while making no other changes), these are the results:

enter image description here

Why would changing the coding scheme for the year variable reverse the sign of the coefficient for "Female?"

$\endgroup$
  • 1
    $\begingroup$ What do you understand the coefficient for 'Female' to represent? If you write down the model equations you'll likely answer your own question. $\endgroup$ – Scortchi - Reinstate Monica Apr 12 '18 at 15:56
  • $\begingroup$ Based on what I've read it represents the intercept for the females minus the intercept from the males. $\endgroup$ – professorfarnsworth Apr 12 '18 at 16:13
  • $\begingroup$ Sure, only the intercept is affected by recoding, but it's now crazy. You shouldn't want the bother of explaining that to a readership (could be an examiner or reviewer in your field). $\endgroup$ – Nick Cox Apr 12 '18 at 16:30
2
$\begingroup$

When you have an interaction, be very careful about looking at main effects.

The main effect of female is the effect when year = 0. When year is not recoded, year can't be 0.

Let's take a look. Year = YR + 2000.

Then the first equation is, for males:

$$DV = -1866 + 0.94 *(YR + 2000) = -1866 + .94*YR + 1880 = 14 + .94*YR$$

for females: $$DV = -1866 + 0.94 *(YR + 2000) -646 + 0.32*(YR + 2000) = -1866 + .94YR + 1880 -646 + .32*YR + 640 = 1.36*YR + 8 $$

And that is the same as the second variation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.