I have an MLR model created in R, regresses the dependent variable y, against the following explanatory variables: age (numerical), hair colour and eye colour (categorical with 5 categories each), birth month (categorical with 12 levels), and gender (male/female).

In building the model, I am only concerned with the coefficient for the gender variable. The reason for including all of the other variables is so that I can see how gender impacts the dependent variable, without the influence of the other factors.

The default in R is to include the first category per variable within the intercept of the model. In my case, this corresponds to, blonde hair, green eyes, January birth month, and female.

In this output, this gave a male coefficient of -10, with respect to an intercept of 200. This is a relative difference of -5%.

However, I want to refactor the variables so that the default levels used are those that are the most prevalent within my sample (i.e., blue eyes, brown hair, December birth month).

When doing so, I am expecting my coefficients for the variables as well as the intercept to change. This was the case for all variables other than gender. The male coefficient is still -10 but the intercept is 150. This gives a relative difference of -6.66%

As the purpose of this model is to look at the relative influence of gender without the influence of the other factors, I am now unsure if looking at the coefficient relative to the intercept is correct, and if it is, why this differs based on the levels used. I am fully expecting the gender coefficient to vary, as the raw data for y does differ when looking at brown-haired, blue eyed males, compared with blonde-haired, brown eyed, males.

The interpretation of an MLR coefficient is to the best of my knowledge:

The change in the response based on a 1-unit change in the corresponding explanatory variable keeping all other variables held constant.

So surely the impact of gender should update following an update to the 'base' variables in the intercept?


1 Answer 1


The coefficient estimate on male is simply the marginal effect of male, relative to female. It doesn't matter if you change the baseline hair, eye color, etc., it will still give you the same marginal effect of male (in this case, being male is associated with 10 units less of y).

If you want an estimate of percent difference, you need to take the natural log of y, $y^* = \ln(y)$. Note that in order to log y, all values of y must be greater than 0.

If you log y and not x (which will be the case here since you can't log x=0), then you can interpret the effect as a percentage in the following way. Let $\beta_{male}$ be the estimated coefficient on male from the regression using $\ln(y)$ as the dependent variable. Then the percent change in y associated with being male is $100 \times \left(\exp\{\beta_{male}\}-1 \right)$. This estimated percentage should be the same regardless of how you identify the base category for hair, eye color etc.

When choosing which regression to use, y or $\ln(y)$, you should inspect the residuals and choose the model that conforms most closely to the OLS assumptions (homoskedastic, etc.)

  • $\begingroup$ Thank you for your response. Does this mean that the marginal effect (coefficient) of male vs. female considers the impact of all the other model variables, and not specifically relative to those in the intercept. I.e., the male vs female coefficient accounts for eye colour, hair colour and birth month (not just blue, brown, January, for example)? If so, why does taking a lot of the dependent variable change the meaning of the percentage difference? $\endgroup$
    – sym246
    Mar 29, 2023 at 17:38
  • 1
    $\begingroup$ The marginal effect of male is unaffected by the types of transformations you are making. You are re-labeling the "base" category. If you plug in blue eyes, brown hair, December in your first regression, and add their coefficients to the intercept, you will find that the intercept is 150, just like the raw intercept in your second regression. When you estimate the regression using "y", you are estimating the marginal effect in units. This is a modeling assumption (the effect of male is the same, regardless of the level of y). When using ln(y), the effect of male varies with the level of y. $\endgroup$
    – Adam Check
    Mar 29, 2023 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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