Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Do the units of all regression variables have to be the same?

    Hi everyone,

    Is it OK if the units of all variables in OLS or panel data regressions are different? For example: Y (%) = a + b1*X1 ($) + b2*X2 (kg) + b3*X3 (km)...

    If OK, please explain why.

    Thank you in advance.
    --------------------
    (Stata 15.1 MP)

  • #2
    That’s fine. The coefficients take on different units to match.

    Comment


    • #3
      It's okay, because the unit of the coefficient will cancel out the unit of the x variable. Using a one-predictor regression as an example, the regression coefficient is computed as:

      Click image for larger version

Name:	2023-09-22_11-37-40.jpg
Views:	2
Size:	24.4 KB
ID:	1727925

      Assuming the unit of x is "dollar" and the unit of y is "kg", the numerator's unit is "dollar*kg" and the denominator's is "dollar^2". Cancelling one "dollar" from both, we'd end up with "kg/dollar."

      If the regression coefficient is multiplied with x (which is in dollar), their product will then be only in "kg", which works out because it is the unit of y.

      While the formula for multiple linear regression will be more complicated, the overall idea can be applied across and each of the terms, after multiplying the regression coefficient and their corresponding x, will end up having the same unit of y.
      Attached Files
      Last edited by Ken Chui; 22 Sep 2023, 09:49.

      Comment


      • #4
        Thanks Nick and Ken.
        --------------------
        (Stata 15.1 MP)

        Comment

        Working...
        X