Announcement

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

  • log-differences in a log-log regression

    Dear Stata people,
    i have the following problem i want to measure in a log log regression the effect of differences in growth rates on the dependent variable gdp per capita growth. And to be able to do that i derived already the growth rates of stock variables like the stock of population with the help of ln(xt)-ln(xt-1). But now i'm not 100% sure if the right approach would be to take again the ln of the results i achieved through the method described before or if these growth rates already represents the desired outcome. As in the end i want to have the log log expression to be able to say that if we change x by one percent, we’d expect y to change by β1 percent. I would highly appreciate any comments on my proposed strategy. Thanks in advance for your attention.

    best regards

    Nico

  • #2
    Is your goal to determine what percent GDP change is associated with a 1% change in population? Or do you want to determine what percent change in GDP growth is associated with a 1% change in population growth? These are different questions and require different approaches. I cannot tell from your question which of these you have in mind (or whether, perhaps, you have yet something else in mind.)

    Comment


    • #3
      Nico:
      welcome to the list.
      The difference between two logged variables equals the logged ratio between those two variables calculated on their original metric:

      Code:
      . di ln(4)-ln(3)
      .28768207
      
      . di 4/3
      1.3333333
      
      . di ln(1.3333333)
      .28768205
      Hence, if I can get your query well, I would say that you do not need to log any furter your variables.

      For the future, please consider that yout chances of getting helpful replies are conditional on posting what you typed and what Stata gave you back (as reminded by FAQ). Thanks.

      PS: crossed in the cyberspace with Clyde's reply, who wisely warns you about posting in a more efficient way (again, FAQ covers this topic).
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment


      • #4
        First of all thanks Clyde & Carlo for the fast response :-) i will quickly prepare a dataex output from Stata. And to Clyde i want to determine what percent change in GDP growth is associated with a 1% change in population growth?. I will come back in a second

        Comment


        • #5
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input long country int time double(gdpgrowth populationgrowth laborforcegrowth Investmentgrowthrate inflowgrowth lowskilledgrowth highskilledgrowth)
          1 1990 .06028897243297493 .05732833687693883 .06224921574149711 .01968714056692988 -.3268492236144418 -1.335523436124667 -3.087998711276256
          1 1995 .1495907290418348 .05809558215482369 .06046182270326383 .2429870639499114 .2033954588351374 -.06662088999254578 .420215812817732
          1 2000 .09659618185585472 .06282060507583509 .09320514689706272 .1978838609496378 .4117419540817533 .3559148993905179 .2669534748385018
          1 2005 .06348623542023546 .07720462839411368 .1038266073693457 .1657618300067725 .2453831850003763 -.01085044778039368 .4793290489370179
          1 2010 . . . . . . .
          2 1990 .07526227636518357 .03461574138048995 .08441804822855836 .1071717155455651 . 1.168791006388895 2.07471996378748
          2 1995 .1409600648116207 .007930946158841934 .001570284933190891 .159369988362883 . .1625989474496716 .1963516744325151
          2 2000 .05861367810092233 .02663594129199254 .05226455864731072 -.02081549506581837 .3959589276276603 -.01974934584960231 .1755723564754224
          2 2005 .04791660682632504 .01634333237452523 .05800970160416874 -.00143478010684106 -.01127821858589328 -.1212099858880986 .1646050920330069
          2 2010 . . . . . . .
          3 1990 .02917356081566069 .05471659591504263 .0220992474752606 -.08457111329915534 -.01659930264547071 .001659172290057853 .2244809181748995
          3 1995 .1497431134492508 .04710161634115906 .0761986856010779 .2630041358614967 .06626606819139269 -.02864453441992332 .1824055927728256
          3 2000 .0780683699314153 .04890823873094874 .08694170623686048 .234973279305855 .1423191382046962 -.3206631816081913 .2879391338276953
          3 2005 .005620142284493923 .05107695197260753 .06556274136887552 .1275715768955124 .06796505197983649 .006935030086696159 .3235653526387416
          3 2010 . . . . . . .
          4 1990 .3394655924797778 .07706586848938457 .1175663582395607 .4764141991900246 . .3166614331781243 .6000391521084651
          4 1995 .1370911436155104 .06652695014172494 .07507706102469314 -.01316687595828014 . .3135706831654126 .5379595166000044
          4 2000 .1466755084840425 .05926096402842873 .1033410913109787 .2542443854821421 .7107859078875851 .1354786029263551 .3308051780230397
          4 2005 .1158543723288528 .05549186104894233 .1709092879856176 .159169118841799 .516132756390892 .1539352144846582 .4149730877169286
          4 2010 . . . . . . .
          5 1990 .09773858849702322 .01782025566812706 -.03116723714008884 .05625750898891368 .784153622913415 .1059356414824499 .4099300512210231
          5 1995 .1283565102827691 .02009773699882622 .01422617722828612 .247739504725196 -.3703298621806148 .07165856934405213 .449885289437832
          5 2000 .05203145484243521 .01483727263790158 .0130861084262488 .04638309067131985 -.1222624373825365 .1171818686605253 .2010916966934815
          5 2005 -.02121870195580122 .02338935020089217 .009811659133657002 -.1410627568743266 .5068068375199886 .3682834903566281 .1347980631937826
          5 2010 . . . . . . .
          6 1990 -.04634852468825912 .02404640194079199 -.03919501678553949 -.4533067891489608 .1234491599734966 .5000925477162372 .9184533786024325
          6 1995 .2344335954173626 .01330610971022494 .03876052584831946 .4281855586541568 .2153529016460247 .236659286149969 .4694261383344838
          6 2000 .1144061853165557 .0134112458799347 .011643565729484 .1222386999634715 .3356878613358809 .3340989983205205 .369772435345622
          6 2005 .01855001366605613 .02210497181862259 .02082898019894763 -.007522302540433401 .3570201448647889 .3752246980359253 .4297991687733678
          6 2010 . . . . . . .
          7 1990 .04644706423042955 .01743459595374475 .02244804891619978 -.08934807069628903 -.7409400292013029 .03662943646490113 .285955018447865
          7 1995 .1205981933089024 .02275810893704744 .03280189867624017 .213589863425053 .6322479265904253 -.05424777014936843 .3142988924215668
          7 2000 .04553349473684776 .03653922688726396 .05152242708640031 .09624484531006416 .3912401483640764 -.100481047988545 .1832046533573646
          7 2005 .009541728654552273 .02883283966129468 .0341115485913619 .05423968806319834 .07077931110448077 .1657094950207885 .3769860280865966
          7 2010 . . . . . . .
          8 1990 .07290115019625887 .02787104803717 .06626658145395936 .05779159637982545 -.06076612351025723 .1579524268058545 .655888636706246
          8 1995 .08842835999421794 .006509980101707669 .01317612133843582 .07879982088184079 -.2002507009423926 .07480585012547891 .06914638859886502
          8 2000 .02522999374290613 .003132289948464262 .0208982134434379 -.158522402169897 -.1133731960888227 -.1021393915365394 .144737026275541
          8 2005 .06977603796146958 -.008432407720420088 .01599167970648807 .08036100347909425 .1654468796174768 -.03380777923726797 .1980607077524983
          8 2010 . . . . . . .
          9 1990 .1998734297937883 .02663907740277516 .08574808925182431 .1653038688490298 . .06499213874571375 .4089199472211931
          9 1995 .4266122979073561 .05297505140686276 .1862054196659102 .7533884411884024 .7149662279545854 .2776752813747994 .5843658979197954
          9 2000 .1674625773045122 .0891326814109128 .1572594257657602 .4855107717644742 .8661327261610481 .3035375901207971 .3958891048493438
          9 2005 -.05264842313639839 .09186221319411914 .06377996351560888 -.4807337488704952 -1.017290287920174 -7.372538034289278e-06 .5268311445078115
          9 2010 . . . . . . .
          10 1990 .1260368921422117 .0677700037099811 .046723122546382 .1099945158028355 .0297360674568381 .1171957434980424 .2877783772372418
          10 1995 .2319701099974534 .0655322150851898 .1190580209846299 .3421725835073417 .1179799601596407 .1415950616353125 .2807679492844688
          10 2000 .08152427241193472 .0640470526901975 .09388039967363149 .1480436178662359 .2428880365402257 .01564042914279362 .1046402668134636
          10 2005 .03589686525590707 .08604116430468522 .1373553740637785 .01379289137260287 .1392024682030559 -.008267311693831658 .1105738626281596
          10 2010 . . . . . . .
          11 1990 .07999881320365354 .03337944805686277 .06966884401525064 .0257128873892043 -.1934284924645926 -.008489440815248273 .3054137339380567
          11 1995 .1824713893472065 .02973066830262283 .1002311315245628 .2736003332318653 .3107848439428427 -.01947477660707086 .306837828756171
          11 2000 .04190751556193106 .0244608468277896 .05188055116529533 -.04068007032570975 -.365359039017747 .07967682390560427 .3000829362500497
          11 2005 .0453254542270809 .01794635376932519 .0305912508996844 .02074445737379804 .5529140241295512 -.02370200026921587 .1662000171147984
          11 2010 . . . . . . .
          12 1990 .05886919819280401 .09820542158368184 .1104068414415487 .2384223737006685 . .6811829301681733 -.1511129243987792
          12 1995 .09334440655613996 .04895348725006876 .0604014687244625 .06949461823628056 -.4002276488337202 -.2785170909888866 .1476926985841569
          12 2000 .1283672035106775 .06915012035780599 .1221785805100275 .3688009476176433 .3804600885531162 .05244703340633627 .5398124953804846
          12 2005 .001008608399377664 .05111548037449154 .07040765136800076 -.1780085805743816 .05018132194629388 .1158053667060415 -.05391967137902753
          12 2010 . . . . . . .
          13 1990 .1562002320253022 .02737426930890763 .01278325491686871 .120553476634452 .04886297351818314 .1101725025444402 .3036526756563909
          13 1995 .1481598364845613 .02978316216743337 .07763528222363547 .09917857291788224 .5222274303906929 .1114896722394416 .3123992616640852
          13 2000 .07976660173518368 .02903874311472343 .02147943226914073 .1346652542500912 .1208774372631005 .05894841600870215 .3627602077571908
          13 2005 -.009908660013936199 .05593253738729764 .07236301862488048 .05837389008354066 .7300130262337365 .3031179224751686 .5471317562245375
          13 2010 . . . . . . .
          14 1990 .08019075352280858 .00429378980693329 .00579590525740592 -.05395781698818425 . .344890929305155 .4854159265388027
          14 1995 .1738421608829057 .02596336421448342 .09380314897300757 .3845647806113206 1.153904211374257 .2787086521107831 .5016803537214294
          14 2000 .02258181754561939 .02052971248106772 .04713078862264553 -.1490518074473322 .567155172977376 .104831558891739 .3076472502862622
          14 2005 .02397120882071313 .006620690017740571 .009369193265223785 -.08729346928198467 .5913676645773709 .0929475728885425 .1841334599918465
          14 2010 . . . . . . .
          15 1990 .06105909433518697 .01371697057231458 .05028479105857286 -.08743751756363949 .3527780674508705 .3159424731891605 .4750669254320705
          15 1995 .1781952069481818 .02200205356182394 .09117618595003307 .3718010354093657 2.829397506888405 .520951029099102 .5417988769937008
          15 2000 .08589380548531089 .08083726137325797 .1536294706485322 .3006780039600905 .7243128426697822 .6899619501894758 1.059246665750001
          15 2005 -.01209606013991049 .06482908649401153 .1046801293774422 -.2078382953493332 -.7261126910004538 .02241987022512859 .3772297408353715
          15 2010 . . . . . . .
          16 1990 .00462090411165228 .03084421263844206 -.03747213762472867 -.3560827876467698 -.38834741772353 .08453150759203076 .3682156346822616
          16 1995 .1705227998674186 .00510424041663704 .008692549858697163 .3001952700978165 .1570883174792979 -.02953519269583715 .2523960870464226
          16 2000 .1121131358927769 .01759243292621981 .04266718957282833 .1315661584299157 .1948329748311988 .06133433559813817 .2891286581119008
          16 2005 .04076259743385791 .03787498753579399 .04560600477093502 .08385364015423491 .4322711739370053 .07152985721360494 .3660698951663424
          16 2010 . . . . . . .
          17 1990 -.04076827056608501 .04728463399754901 .03407442386817472 -.2003453810976801 -.1426653759270611 -.01998530877569138 .1903751016143342
          17 1995 .0926897581658288 .02018537931287767 .02258226819150089 .1143859655450221 -.005087211984154294 .05681874526044162 .2193744335259193
          17 2000 .03966380922050128 .03459187487705329 .04254594018913949 .03872633718345497 .07604112990984468 .02772554184466181 .02215172990070791
          17 2005 .05918492828311628 .05082910213959657 .0787229480647973 .04153122977047374 .3520296449042029 -.005469023403358975 .07207627096323321
          17 2010 . . . . . . .
          18 1990 .06878295066179518 .01338558457405625 -.02330929354743461 -.0522501804922193 -.07076907088820761 .1555464330038845 .376330062918969
          18 1995 .1430492972961179 .01494292562533772 .02988995774738257 .1412741750330468 .551675777889761 .1405555786821839 .4326244742147196
          18 2000 .1134705280153359 .02529508582298234 .03829458947196684 .08205475078813507 .4418500316431597 .01264963996491453 .3153003650869621
          18 2005 -.01882726193734641 .03841026919421253 .04199512110719539 -.1067058572249806 .12488910643137 .06742106791732638 .3780760682025974
          18 2010 . . . . . . .
          19 1990 .06310392536063247 .06458909612764785 .0657433375431431 .1073003551478067 -.7573565617704983 -.1118574011196163 .1145305008433972
          19 1995 .1526385226284148 .05794195487506215 .07326380742699712 .3128823139512988 .1550970229600335 .3100807781889987 .2263962762138743
          19 2000 .07891827275714292 .04624217716879642 .03692921705782481 .1133430297423281 .2886064348123529 .2676305788742184 .3770499275592574
          19 2005 -.007856118539210755 .04573817345079334 .03083469531797078 -.1980203158667173 -.07370362234198247 .1159354354033475 .1373228078551918
          19 2010 . . . . . . .
          . . . . . . . . .
          . . . . . . . . .
          . . . . . . . . .
          . . . . . . . . .
          . . . . . . . . .
          end
          label values country country
          label def country 1 "Australia", modify
          label def country 2 "Austria", modify
          label def country 3 "Canada", modify
          label def country 4 "Chile", modify
          label def country 5 "Denmark", modify
          label def country 6 "Finland", modify
          label def country 7 "France", modify
          label def country 8 "Germany", modify
          label def country 9 "Ireland", modify
          label def country 10 "Luxembourg", modify
          label def country 11 "Netherlands", modify
          label def country 12 "New Zealand", modify
          label def country 13 "Norway", modify
          label def country 14 "Portugal", modify
          label def country 15 "Spain", modify
          label def country 16 "Sweden", modify
          label def country 17 "Switzerland", modify
          label def country 18 "United Kingdom", modify
          label def country 19 "United States", modify
          [/CODE]

          The growth rates i derived from the initial stock variables i.e GDP per capita in 1995, 2000, 2005, 2010 etc. by using the formula ln(xt)-ln(xt-1) in Excel. As Carlo already proposed there is no need to generate another variable i.e. lngdpgrowth=ln(gdpgrowth) i excluded these variables from the output above. I have two regressions for my analysis.
          The first one is
          ln(gdppercapitagrowth)=ß0+ß1ln(populationgrowth)+ß 2ln(laborforcegrowth)+ß3ln(investmentgrowth)+ß4ln( inflowgrowth)
          in which the inflow growth variable represents the growth rate of immigrant inflows.
          For the first regression i want to test that immigration inflows lead to lower capital per worker and hence decrease GDP per capita.
          In the second regression i split up the inflow of immigrants by their level of educational attainment lowskilledgrowth & highskillegrowth and exclude the inflowgrowth variable (the rest stay's the same). With the second regression i want to test that highskilled immigrants have a larger postive impact on Gdp per capita then low skilled immigrants.
          So if i get it right what Carlo said i have to exclude the ln's in the first regression & second as the growth rates already represent the "ln(populationgrowth)".

          Comment


          • #6
            Nico:
            as far as your first regression is concerned, you may be interested in somethin along the following lines:
            Code:
            . xtset country time
                   panel variable:  country (unbalanced)
                    time variable:  time, 1990 to 2010, but with gaps
                            delta:  1 unit
            
            . quietly xtreg gdpgrowth populationgrowth laborforcegrowth Investmentgrowthrate inflowgrowth , fe
            
            . estimates store fe
            
            . quietly xtreg gdpgrowth populationgrowth laborforcegrowth Investmentgrowthrate inflowgrowth , re
            
            . estimates store re
            
            
            . hausman fe re, sigmamore
            
                             ---- Coefficients ----
                         |      (b)          (B)            (b-B)     sqrt(diag(V_b-V_B))
                         |       fe           re         Difference          S.E.
            -------------+----------------------------------------------------------------
            population~h |   -1.626657    -.6061707       -1.020486        .4151082
            laborforce~h |   -.0470021       .11688       -.1638821        .1882637
            Investment~e |     .330457     .3349325       -.0044755        .0227963
            inflowgrowth |   -.0192598    -.0141636       -.0050962        .0055925
            ------------------------------------------------------------------------------
                                       b = consistent under Ho and Ha; obtained from xtreg
                        B = inconsistent under Ha, efficient under Ho; obtained from xtreg
            
                Test:  Ho:  difference in coefficients not systematic
            
                              chi2(4) = (b-B)'[(V_b-V_B)^(-1)](b-B)
                                      =       14.86
                            Prob>chi2 =      0.0050
            
            . xtreg gdpgrowth populationgrowth laborforcegrowth Investmentgrowthrate inflowgrowth , fe
            
            Fixed-effects (within) regression               Number of obs     =         69
            Group variable: country                         Number of groups  =         19
            
            R-sq:                                           Obs per group:
                 within  = 0.8577                                         min =          2
                 between = 0.0463                                         avg =        3.6
                 overall = 0.6422                                         max =          4
            
                                                            F(4,46)           =      69.32
            corr(u_i, Xb)  = -0.1850                        Prob > F          =     0.0000
            
            --------------------------------------------------------------------------------------
                       gdpgrowth |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
            ---------------------+----------------------------------------------------------------
                populationgrowth |  -1.626657   .4627606    -3.52   0.001    -2.558145   -.6951678
                laborforcegrowth |  -.0470021    .231761    -0.20   0.840    -.5135128    .4195086
            Investmentgrowthrate |    .330457   .0334829     9.87   0.000     .2630594    .3978545
                    inflowgrowth |  -.0192598   .0105198    -1.83   0.074    -.0404349    .0019154
                           _cons |   .1230132   .0146476     8.40   0.000     .0935291    .1524973
            ---------------------+----------------------------------------------------------------
                         sigma_u |  .04047684
                         sigma_e |  .03277642
                             rho |  .60397157   (fraction of variance due to u_i)
            --------------------------------------------------------------------------------------
            F test that all u_i=0: F(18, 46) = 1.96                      Prob > F = 0.0343
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Well, first I would recommend that you not rely on analyses carried out in Excel. They are inherently undocumentable; nobody can ever verify whether they were carried out correctly or not. It would be better to import the original data into Stata and calculate the log growth rates there, so you have an audit trail of what has been done.

              Be that as it may, these are, according to your formula, ln(xt)-ln(xt-1) logarithms of growth rates, Your goal is " to determine what percent change in GDP growth is associated with a 1% change in population growth." So directly regressing these variables without further transformation is one reasonable way to accomplish that. I would, however, recommend renaming your variables so that the names reflect the fact that these are log growth rates, not growth rates themselves. You risk considerable confusion if you stick with these misleading names.

              Comment


              • #8
                Thank you very much for your detailed response :-). i will adjust it accordingly and hopefully now my analysis will work out !

                Comment

                Working...
                X