1
$\begingroup$

Besides the issue of collinearity - making coefficients kinda useless and p-values non interpretable, I was wondering, what would be the issue of including a continuous variable and the discretized version of that variable in the same model?

For example, let's say X1 is continuous. I want to include a categorical variable, X2, where X2 is the quartiles of X1. The reason for this is, I want to use X2 to interact with other categorical variables in the model, as opposed to X1.

I'd imagine the upside of doing this is, more observations for the interaction term itself. I also have the hypothesis, that maybe the 4th quartile has an especially strong interaction effect with other variables, as opposed to the other 3 quantiles - and I want to bring out the effect of that quartile.

My goal here is to improve prediction accuracy, and the coefficients themselves aren't as important. The only important thing about the coefficient is if the sign is positive or negative. I know for a fact X1 is significant based on the data I am working with.

$\endgroup$
6
  • 2
    $\begingroup$ It's probably a waste of information. Your model can be characterized as including $X_1$ as a "discontinuous linear spline of constant slope." It requires 4 parameters (assuming there's an intercept already in the model). With this many parameters you could use, say, a quadratic spline and identify a breakpoint (if you really believe there are any discontinuities). In short, instead of asking whether this approach might possibly work, think about what is meaningful to accomplish in your application with the four parameters you're willing to expend on $X_1.$ $\endgroup$
    – whuber
    Feb 25, 2021 at 18:05
  • $\begingroup$ Thanks! In reality, I'm probably more interested in just the 4th quartile as opposed to all 4 quartiles so it would increase the model by one dummy. I was just wondering if there were any huge pitfalls of doing this when ultimately the goal is prediction and secondary is interpretation of coefficients. Unfortunately, I need the original variable X1 in the model for sure, as that's how things have been done previously, and it'll be tough to explain why I changed it/removed it for something else. $\endgroup$
    – confused
    Feb 25, 2021 at 18:09
  • 2
    $\begingroup$ The more parameters you include, the greater your risk of overfitting. That's one reason it's worth paying attention to how many parameters you use. $\endgroup$
    – whuber
    Feb 25, 2021 at 18:12
  • 1
    $\begingroup$ If the goal is prediction, you could really use any transformation or combination. (say at the extreme use every value of your variable x1 as a dummy). The problem there will be, how do you know if the improvement for the in-sample prediction will improve out of sample prediction (the one you should care about). One option...Cross-validation. This is related to @whuber "overfitting" problem. $\endgroup$
    – Fcold
    Feb 25, 2021 at 18:13
  • 2
    $\begingroup$ Yes, that's always possible. $\endgroup$
    – whuber
    Feb 25, 2021 at 18:18

1 Answer 1

4
$\begingroup$

I would say that in principle there is no problem at all. You are simply making a different set of assumptions regarding the functional form.

For instance, rather than modeling as:

$$y=a_0+ a_1 * x + a_2 *z+e$$

you are modeling:

$$y=a_0+ a_1 * x + a_2 *z + a_2 *z * 1(x>0)+e$$

So a different model that is, perhaps more flexible. The problem I would say, is how to estimate marginal effects.

Consider a simpler model:

$$y=a_0+ a_1 * x + a_2 * 1(x>0)+e$$

So $X $ enters linearly, and as a dummy. So lets assume that this is indeed the Population model. The question is, how do you obtain (and what do you report for the marginal effects of $X$?

$$ \frac{\partial y}{\partial x} = a_1 $$ for any values below or above 0, but $$ \frac{\partial y}{\partial x} = a_1 + a_2 $$ For values exactly at 0 (technically just below.

So what do you do? what do you report as an average marginal effect? or do you report at specific values?

I think this is the biggest problem here. HTH

$\endgroup$
2
  • $\begingroup$ I'll probably just explain that the coefficients and p-values may not be accurate. My final model will have many variables and I know some will be correlated with each other - I was hoping that's good enough of an argument to keep them in the model even though p-values may not be significant. For those with high p-values, I plan to do a simple regression to show that on a standalone basis, it is significant. Unless the two variables are extremely related - I plan to do some Chi2 tests of independence or correlation tests, I was thinking of just keeping then in the model. $\endgroup$
    – confused
    Feb 25, 2021 at 18:13
  • $\begingroup$ Why do you care about significance if you intend to use the model for prediction? $\endgroup$ Feb 25, 2021 at 20:54

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.