# Is log transformation a proper way to reduce the weight of high vs. low values in logistic regression, and how do I diagnose when the DV is binary?

Consider the following case: I am analyzing a the effect of (among other variables) the age of a firm on a specific binary event. Theoretically my perception is that age matters, but not linearly. That is, I don't believe that the age of firms e.g. 300 years matter 15 times more than a firm 20 years old. Can a transformation be used in such case?

Mathematically a log transformation has the properties that i look for as it evens out the weight of very high vs. low values. Below is a visual example. The transformed value chart demonstrates roughly the effect I want to model on the DV in the logistic regression.

To me, intuitively it makes perfect sense, however it is difficult for me to find any examples of this particular case as all sources I have been through covers transformation for normality and linearity in OLS regression, assumptions that do not apply to logistic regression.

I hope anyone can help with this most likely simple question.

y axis: value, x: axis (hypothetical observation, not relevant)

Edit: how can the best transformation be identified when the DV is binary?

When attempting to find the best transformation for a continuous IV in relation to a binary DV, how is this best done? For a continuous DV in e.g. OLS regression, this is possible visually, but when attempting this for a binary variable, it obviously becomes difficult (see below).

• This is answered pretty well at stats.stackexchange.com/questions/4831/… . – EdM Dec 22 '14 at 17:54
• @EdM Ok,so 'transforming to achieve linearity' means exactly transforming to obtain a more accurate model of the phenomenon modeled. The problem is now: how can i visually diagnose the relationship ton decide on the most accurate transformation when the DV is binary? a scatter plot makes no sense with a binary DV. – SuppaiKamo Dec 22 '14 at 18:27
• In R, the spineplot() function is a good way to start visualizing. With a numeric independent variable it displays a 'spinogram' of the relative frequencies of the binary DV outcomes for histogram-like groupings of the independent variable. Or you can do it yourself manually: break down your data into groups by Foreign Subsidiary Count, calculate the proportion of IsWOS for each group, and plot that against the mean or median value of Foreign Subsidiary Count for each group. – EdM Dec 22 '14 at 21:54
• Upon smoothing the data and applying the logit, as suggested in Scortchi's answer, you can apply exploratory techniques to linearize bivariate relationships. An illustrated worked example is carried out in my posts at stats.stackexchange.com/a/35717 and stats.stackexchange.com/a/60455. A way to incorporate theoretical knowledge of a bivariate relationship into a GLM is outlined (with working code) at stats.stackexchange.com/a/64039. – whuber Jan 2 '15 at 17:11
• one way is also to look at the log odds response using for exemple the weight of evidence (woe) for lineraity of the reponse then depending on your aim you can check the relative ordering with a ROC curve. – R. Prost Jan 29 '18 at 9:53