Announcement

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

  • What is the best manner of calculate/ derive the percentage of change of a coefficient?

    0down votefavorite Hi everybody!

    I was wondering if somebody could help me with this question. I am running a regression model in order to obtain the rate of change of a variable over time. Because this unit is hard to interpret I am trying to calculate/derive the percentage of change, out of this coefficient of change.

    I came up with two ways but I am not sure which one is more accurate (or if there is a better one to do it)

    1- Run the model and then obtain the baseline of that variable. Then divide that coefficient by that baseline number and multiply x100. (I do that with the coefficient as well as the confidence intervals)

    2- Obtain/calculate another variable which is the % of change per measurement [(value-baseline)/baseline], run the regression model with this new variable. It will give me the % directly.

    To me, the 1st one sounds more accurate but in my team, people prefer the 2nd option. P-values vary quite a bit in this second case....P-values are more positive in the first way.
    In my team, they say to use the p-values of the raw/absolute coefficient and the % of change obtained by running this model.

    I am not confident about either case...
    Any ideas or suggestions are more than welcome. Thank you so much in advance!

    Best regards

  • #2
    Natalia:
    welcome to this forum.
    As per FAQ, please show us what you typed and what Stata gave you back (via CODE delimiters, please).
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo,

      Thank you so much for your message.
      I didn't share the original code because I thought it was not strictly necessary, apologies. I am trying to show how two groups experience significant rates of change and how much the difference is between both.

      My code is something like this:
      ra=0 if value==1
      ra=1 if value==2

      xtmixed variableA c.time##i.ra || study_id: time || eye: , reml
      lincom time_mri
      lincom time_mri + intrr


      The coefficients, after running it, are:

      lincom time

      ------------------------------------------------------------------------------
      variableA | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      (1) | -.0041271 .0009375 -4.40 0.000 -.0059645 -.0022896
      ------------------------------------------------------------------------------

      lincom time + 1.ra#c.time

      ------------------------------------------------------------------------------
      variable A | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      (1) | -.0023999 .000379 -6.33 0.000 -.0031427 -.0016571
      ------------------------------------------------------------------------------


      My question is. After running that, because the coefficients of each group are so small and they don't really tell anything, I am trying to convert them into %. Deliver the data in a more informative manner.


      My spreadsheet looks like:
      variableA variableA_percentage of change from baseline
      visit1 0.344235 0
      visit2 0.342119 -0.00615
      visit3 0.340435 -0.01104
      The two ways I have in calculating these % of change/year are:
      1. Obtain the baseline of that variable. Then divide that coefficient by that baseline number
      2. calculate another variable which is the % of change per measurement and then, run the regression model with this % of change. It will give me the % directly.


      I hope I explained it properly.

      Thank you so much for all your help!!

      Best regards,
      Natalia
      Last edited by Natalia Gonzalez; 20 Jan 2018, 11:31.

      Comment


      • #4
        Natalia:
        I do not know If I got your question right, but, if you're interested in percentage change of the dependent variable, can't you simply log the -variableA- and create a log-linear model?
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Dear Carlo,

          Thank you so much. I was reading about doing the log, but I wasn't sure. Do you mean that I could just do the log of the variable and run the regression model with this log variable, that way I would be directly obtaining the % of the change?

          I read that the idea is that : LN(Yt) - LN(Yt-1) almost equals (Yt-Yt-1)/Yt-1. When the % of change are <20%.
          I was thinking that if I run this new created variable, the results would still be similar to the one running the percentage of change( % of change from baseline).

          I was wondering if you could elaborate a little more.

          Thank you so much for your help. I really appreciate it.

          Natalia
          Last edited by Natalia Gonzalez; 20 Jan 2018, 14:41.

          Comment


          • #6
            Natalia:
            yes, I meant to log the variable and run the regression model with this log variable to obtain a % change in the dependen variable.
            That said, the best way to calculate the % change is to -exp()- the coefficient(s) of the predictor(s) subtract 1 and then multiply by 100, as you can sse in the following toy-example, which refers to -regress- without loss of generality:
            Code:
            . use "C:\Program Files (x86)\Stata15\ado\base\a\auto.dta"
            (1978 Automobile Data)
            
            . g ln_price=ln(price)
            
            . reg ln_price mpg
            
                  Source |       SS           df       MS      Number of obs   =        74
            -------------+----------------------------------   F(1, 72)        =     22.87
                   Model |  2.70578153         1  2.70578153   Prob > F        =    0.0000
                Residual |  8.51775155        72  .118302105   R-squared       =    0.2411
            -------------+----------------------------------   Adj R-squared   =    0.2305
                   Total |  11.2235331        73  .153747029   Root MSE        =    .34395
            
            ------------------------------------------------------------------------------
                ln_price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            -------------+----------------------------------------------------------------
                     mpg |   -.033277   .0069581    -4.78   0.000    -.0471478   -.0194062
                   _cons |   9.349342    .153489    60.91   0.000     9.043367    9.655317
            ------------------------------------------------------------------------------
            
            . di (exp(-.033277)-1)*100
            -3.2729411
            
            
            . di -.033277*100
            - 3.3277
            As you can see, an 1 increase in -mpg- -pricer- generates a -price- reduction about 3.27% which is a bit lower than -3.32% (obtained by multiplying the coefficient by 100).
            Please also note that, as the absolute value of the coefficients gets bigger (let's say >15%), the -exp()- approach is more precise.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Dear Carlo,

              This is really helpful. Thank you so much!
              For obtaining the % of change of the confidence intervals (of this coefficient) as well, is it still correct to use the same function?
              di (exp(coefficient)-1)*100 Thank you so much! Best regards, Natalia

              Comment


              • #8
                Yes, it is.
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment


                • #9
                  Thank you so much Carlo!

                  Comment

                  Working...
                  X