0
$\begingroup$

Sorry if this is a naive question.

The independent variables are truly having different scale. They need to be standardized. The question is, does statsmodels.OLS do standardization for us as its first step, such that we don't need to do it ourselves?

$\endgroup$
  • 1
    $\begingroup$ Perhapsyou can expand on why you need to standardise them? $\endgroup$ – mdewey Dec 14 '16 at 18:23
  • 1
    $\begingroup$ In general, OLS cares not about the scale of your data; the coefficients will take care of the dimensional analysis and the "relative importance" for you. For an example of when scaling is important, regularization methods (e.g. lasso, ridge, elastic net) are typically applied features of similar scales. But asking about how particular software works is a question better posed to its documentation. $\endgroup$ – Sycorax says Reinstate Monica Dec 14 '16 at 18:27
  • 1
    $\begingroup$ Questions only about how Python works are off topic here. For any statistical issues beyond that I think you will find the information you need in the linked thread. Please read it. If it isn't what you want / you still have a question afterwards, come back here & edit your question to state what you learned & what you still need to know. Then we can provide the information you need without just duplicating material elsewhere that already didn't help you. $\endgroup$ – gung - Reinstate Monica Dec 14 '16 at 18:33
0
$\begingroup$

As discussed by Sycorax, If your model does not have regularization, then scaling usually does not matter too much. On the other hand, If you have regularization in the model, scaling is necessary.

But there are other advantages for scaling data, for example.

  • Scaling may be helpful on numerical issues.

  • Scaling may make the optimization faster (depends on the algorithm you are using).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.