I am trying to make a multiple linear regression model.

I have a hypothesis that $x$ is a significant predictor of $y$ but only when $x > 0.5$ ($x$ ranges from -2 to + 2).

Is it acceptable to make a dummy variable $x_{Dum}$ for when $x > 0.5$ and from there create an interaction term $x_{Dum}\cdot x$ in the model? I am very new to statistics, and have no formal training, but my thinking was that this would create the model in a way where the effect of $x$ is only attributed when $x$ is greater than $0.5$.

Is this an acceptable way, or should I try and apply some sort of other transformation to my $x$ variable?


1 Answer 1


The interaction term you propose would give you a predictor that is 0 for values of $x$ less than or equal to 0.5 and equal to $x$ for values above that. In principle there's nothing wrong with that formulation of a predictor variable in your regression.

That wouldn't, however, test your hypothesis that "$x$ is a significant predictor of $y$ but only when $x > 0.5$." For that you would have to compare models with and without that restriction.

I would suggest some other approaches. Unless you have solid theoretical reasons for the cutoff value of 0.5, you might be better off letting the data tell you whether there is some change in the relationship between $x$ and $y$ near there. One is to do a change-point analysis, on which there are 200 questions on this site. Another would be to use more flexible splines to model $x$ in your regression, to allow for (and potentially discover) a non-linear relationship between $x$ and $y$.

If your study is important enough to do, it should be important enough to do the analysis well, too. As you are new to statistics it would be good to get the help of someone experienced in statistical analysis who can serve as your guide. It's certainly possible to get by without formal academic training in statistics if you have a solid background in probability, but without a guide you risk going down a lot of roads to nowhere.

  • $\begingroup$ Thank you, I came up with the $x > 0.5 $ cut off by making a simple line graph that was the cumulative value of $y$ plotted against $x$ sorted from lowest to highest. The graph slopped upwards until $x=0.5$ and sloped downwards from that point on. That is why I am trying to model that relationship (among some other variables) in a linear regression model. I will read into change-point and splines. Is the way I initially constructed my analysis with the cumulative value of $y$ vs $x$ a reasonable starting point? $\endgroup$
    – crams
    Jan 15, 2020 at 16:30
  • $\begingroup$ @crams it's always good to look at your data first instead of modeling blindly. When you use what you see to choose the cutoff point, however, then the assumptions underlying statistical tests no longer hold. So if you used the visually identified cutoff of 0.5 to formulate a predictor, p values and confidence intervals for the subsequent regression wouldn't be correct. Having identified an apparent non-linearity between $x$ and $y$ supports using something like splines, for which there are reliable statistical tests along with other variables in your model. $\endgroup$
    – EdM
    Jan 15, 2020 at 16:38

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.