Announcement

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

  • Which regression form to use

    Hi all,

    I have an independent variable which ranges from 0 - 1 in theory, but has a practical range of 0.18 to 0.67. When using a normal linear regression, it calculates the effect of a one unit increase in x. However, here that is unrealistic and as such, tells me nothing. How should I transform my variables to get a correct, interpretable result?

    Kind regards,
    Maarten

  • #2
    Hello Maarten Loomans. I gather you would like to work out the change in the fitted value of Y for some smaller than one unit increase in X, but you have not said what that increase is! For the sake of argument, suppose it is 0.01. You could get the result you want via -lincom-, like this:

    Code:
    lincom  0.01*_b[x]
    Here is a more fully worked example.
    Code:
    clear
    use https://www.stata-press.com/data/r18/regress
    summarize y x1
    regress y x1
    regress, coeflegend
    * Get change in Yhat for increase of 0.1 in X1
    * First, use -margins- to show Yhat values for x1 = 3.1 and 3.0
    margins, at(x1=(3.1 3.0))
    * Get the same Yhat values via -lincom-
    lincom _b[_cons] + 3.1*_b[x1]
    lincom _b[_cons] + 3.0*_b[x1]
    * Now get the difference between the Yhat values via -lincom-
    lincom  3.1*_b[x1] - 3.0*_b[x1]
    * Get the same result more simply
    lincom  0.1*_b[x1]
    I hope this helps.

    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

    Comment


    • #3
      In addition to Bruce's excellent suggestion, you can also rescale the variable to something more appropriate. A common rescaling option is standardization or z-scoring a variable, which subtracts the mean and then divides by the standard deviation. This gives you a variable that has a mean of 0 and a 1 unit increase is equivalent to 1 standard deviation increase.
      Code:
      egen z_x1 = std(x1)
      Another option would be to divide x1 by 0.01. This would translate all the decimals to whole numbers (e.g.,.18/.01 = 18). Then a 1 unit increase is equivalent to going up .01 on the original variable.

      Comment


      • #4
        You can dichotomise the variable into lower values (0.00-0.5) and higher values (0.51-1.00) to make it a nonlinear predictor. Consequently, you will code the variable at two levels, lower or higher value in your statistical software.

        Comment


        • #5
          Hello Saka Kamil, and welcome to Statalist. I respectfully disagree with the advice you gave in #4. This datamethods.org web page lists and discusses many problems that arise when continuous variables are carved into categories: I hope this helps!
          --
          Bruce Weaver
          Email: [email protected]
          Version: Stata/MP 18.5 (Windows)

          Comment


          • #6
            You just multiply the change you are interested in by the coefficient (as Bruce does with the lincom command). If the DV is log, then it's a little more complicated.

            Comment

            Working...
            X