0
$\begingroup$

I'm new in machine learning and have a question regarding a continuous variable which I want to use in my logistic regression.

On the first view the variable seems to increase the probability of the event (to be true) when it recedes from 0 in both direction. In other words: when the variable approximates 0, the probability for the event to be true decreases. Now to my question: how can I model this in my logistic regression? Should I use a dummy variable or is there a way to transform the variable? Is there a test with which I can prove this behaviour?

$\endgroup$
  • 1
    $\begingroup$ Do you mean that the probability of 'success' (Y=1) decreases as the continuous variable moves away from 0 in both directions (positive & negative)? $\endgroup$ – gung - Reinstate Monica Jan 22 '18 at 17:44
  • $\begingroup$ No the opposite. The probability of succes incease as the continous variable move away from zweo in both directions. $\endgroup$ – JerryParker Jan 22 '18 at 17:50
  • $\begingroup$ You can square the variable and then see if that turns out to be a more predictive feature $\endgroup$ – Dan Jan 22 '18 at 17:51
  • $\begingroup$ You could use splines, if the relationship is more complex than linear/quadratic. $\endgroup$ – Björn Jan 22 '18 at 17:55
  • $\begingroup$ Logistic regression that fits a quadratic in a single predictor is approximately fitting a bell on the probability scale (in ecology this is sometimes called Gaussian logit regression; the name isn't especially apt, but it's a search term). $\endgroup$ – Nick Cox Jan 22 '18 at 18:00