1
$\begingroup$

I have a binary dependent variable (1/0) and two continuous independent variables that are in different dimensions, one is in kilometers and the other is in years. I used Minitab and binary logistic regression.

Of course, the results haven't been trustworthy especially considering error.

It is obvious that the reason of this is that data are in different dimensions, therefore in different sizes as well. I understand that I should do coding of these independent data, but how?

$\endgroup$
  • 4
    $\begingroup$ I'm not sure what you mean by "the results haven't been trustworthy". The units that the independent variables will not affect your predictions or the fit of your model, just the units of the coefficient. When people want to be able to directly compare the effects of two variables in different units, they will sometimes standardize the variables by subtracting off the mean and dividing by the standard deviation. Again, this won't change the predictions, it will just allow you to interpre coefficients in terms of s.d. differences rather than km / years. $\endgroup$ – BLimkins Sep 18 '17 at 20:52
  • 1
    $\begingroup$ No "of course" or "obvious" here unless you can demonstrate instability somehow (e.g. by showing different results from different programs). Reputable programs are careful about numerical analysis. $\endgroup$ – Nick Cox Sep 19 '17 at 11:15
1
$\begingroup$

The units or the scale does not affect what is predicted by the model, in logistic regression, linear regression or any kind of regression I can think of. The fitted coefficients will simply compensate the scale effect completely, so that the difference is strictly invisible to you.

This is not true, however, if you use regularization or if the scales are so different that the gradient algorithm fails to find the good coefficients. The latter is rather unlikely if the software you use is mature.

However, using regularization can truly impact the result: it says that "coefficients" must be "rather small", and how small depends on the scale and unit.

The best way to make sure scale/units has no influence on your predictions is to normalize the data first: divide each input variable by its standard deviation or use a normalization utility provided by the software.

$\endgroup$

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.