I have a dependent variable Y which is continuous. I want to study the impact of X on Y using OLS in a linear model, but I suspect the impact of X is more important for observations with a high value of Y compared to those with a low value of Y.

I could run a first regression using observations with Y values above the median of Y for instance, and another regression using observations with Y values below the median, but it would of course lead to a sample selection bias.

I suspect I would have the same bias if I were to interact X with a dummy equal to 1 for observations with a value of Y greater than the median of Y for instance. Is it true?

What are the solutions to study the effect of X on Y depending on the values of Y (i.e. high values of Y vs low values of Y). Are quantiles regressions the only solution?

  • $\begingroup$ The problem with the first two approaches is that you really don't know what the true dividing line between "high" and "low" values of Y as far as the relationship between Y and X is concerned. You might think that divider is the median of Y, but what if it is the third quartile of the distribution of Y, say? At least quantile regression will enable you to look objectively at a pre-defined set of dividers. $\endgroup$ – Isabella Ghement Mar 4 '19 at 16:27
  • $\begingroup$ Yes of course. But let's assume I know the dividing line, am I correct in saying that with the first two approaches I have a selection bias? Thanks a lot $\endgroup$ – user6441253 Mar 4 '19 at 16:43
  • $\begingroup$ Can you explicitly define what you mean by selection bias in this context? $\endgroup$ – Isabella Ghement Mar 4 '19 at 16:46
  • $\begingroup$ I mean running the regression using only specific observations, i.e. selecting specific observations. For instance, in the first approach, running two separate regressions, one for "high" values only, and one for "low" values only. If I remember correctly, the fact that we select observations using a threshold for the dependent variable creates a bias in the estimation. $\endgroup$ – user6441253 Mar 4 '19 at 16:49

Check out the package quantreg for formalized quantile regression approach. Using the function rq your are able to compute regression estimates at different quantiles of the outcome without dividing your sample.

| cite | improve this answer | |
  • $\begingroup$ I understand, thanks. Could you maybe tell me what exactly is wrong when using an interaction term to divide in subgroups as I mention? Am I correct in saying that it leads to a sample selection bias? Many thanks. $\endgroup$ – user6441253 Mar 5 '19 at 8:46
  • $\begingroup$ Part of the question is 'why the median?'. What if really high values of X (eg 90 percentile) impact Y even more strongly, then choosing the median may be underpowered. Furthermore by choosing the median you are making a specific assumption that there is something special about the median. Quantile regression does exactly what you want without subgrouping, less arbitrary selection of groups. $\endgroup$ – JustGettinStarted Mar 5 '19 at 17:31

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.