# Continuous variable for logistic regression [duplicate]

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?

• Do you mean that the probability of 'success' (Y=1) decreases as the continuous variable moves away from 0 in both directions (positive & negative)? – gung - Reinstate Monica Jan 22 '18 at 17:44
• No the opposite. The probability of succes incease as the continous variable move away from zweo in both directions. – JerryParker Jan 22 '18 at 17:50
• You can square the variable and then see if that turns out to be a more predictive feature – Dan Jan 22 '18 at 17:51
• You could use splines, if the relationship is more complex than linear/quadratic. – Björn Jan 22 '18 at 17:55
• 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). – Nick Cox Jan 22 '18 at 18:00