Announcement

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

  • Decomposition by country and over periods of time over sectors

    Dear all,

    Below, I have a formula that decomposes labor productivity change within an economy, Delta Y_{t}, (productivity at time t minus productivity at time t-k) into two components that reflect how much of the labor productivity change is attributable to within sector productivity growth (first term) and how much of the labor productivity change is attributable to workers moving across sectors (second term). Here i represents the sector (n being the total number of sectors in the economy), the small p's represent labor productivity in each sector, and the thetas represent the share of employment of each sector i in the overall economy. The deltas represent changes (variable t minus variable t-k).

    I do have labor productivity per services, agriculture, and manufacturing sectors, respectively (yr_NVSRVEMPLKD, yr_NVAGREMPLKD, and yr_NVINDEMPLKD), and the shares of employment in each sector (yr_SLSRVEMPLZS, yr_SLAGREMPLZS, and yr_SLINDEMPLZS). How could I do this decomposition by periods? for instance from the year 1995-2003 and then from 2005-2019. Sometime ago, I received very useful feedback but I would like to do this analysis by periods. Thank you very much!

    Code:
     * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str52 countryname int year double(yr_NVAGREMPLKD yr_NVSRVEMPLKD yr_NVINDEMPLKD yr_SLINDEMPLZS yr_SLAGREMPLZS)
    "Afghanistan"                 1960                .                .                .                .                .
    "Afghanistan"                 1961                .                .                .                .                .
    "Afghanistan"                 1962                .                .                .                .                .
    "Afghanistan"                 1963                .                .                .                .                .
    "Afghanistan"                 1964                .                .                .                .                .
    "Afghanistan"                 1965                .                .                .                .                .
    "Afghanistan"                 1966                .                .                .                .                .
    "Afghanistan"                 1967                .                .                .                .                .
    "Afghanistan"                 1968                .                .                .                .                .
    "Afghanistan"                 1969                .                .                .                .                .
    "Afghanistan"                 1970                .                .                .                .                .
    "Afghanistan"                 1971                .                .                .                .                .
    "Afghanistan"                 1972                .                .                .                .                .
    "Afghanistan"                 1973                .                .                .                .                .
    "Afghanistan"                 1974                .                .                .                .                .
    "Afghanistan"                 1975                .                .                .                .                .
    "Afghanistan"                 1976                .                .                .                .                .
    "Afghanistan"                 1977                .                .                .                .                .
    "Afghanistan"                 1978                .                .                .                .                .
    "Afghanistan"                 1979                .                .                .                .                .
    "Afghanistan"                 1980                .                .                .                .                .
    "Afghanistan"                 1981                .                .                .                .                .
    "Afghanistan"                 1982                .                .                .                .                .
    "Afghanistan"                 1983                .                .                .                .                .
    "Afghanistan"                 1984                .                .                .                .                .
    "Afghanistan"                 1985                .                .                .                .                .
    "Afghanistan"                 1986                .                .                .                .                .
    "Afghanistan"                 1987                .                .                .                .                .
    "Afghanistan"                 1988                .                .                .                .                .
    "Afghanistan"                 1989                .                .                .                .                .
    "Afghanistan"                 1990                .                .                .                .                .
    "Afghanistan"                 1991                .                .                . 12.4300003051758 63.4300003051758
    "Afghanistan"                 1992                .                .                .  12.210000038147 63.6500015258789
    "Afghanistan"                 1993                .                .                . 11.5699996948242 64.4100036621094
    "Afghanistan"                 1994                .                .                . 11.4799995422363 64.4400024414063
    "Afghanistan"                 1995                .                .                . 11.5100002288818 64.3000030517578
    "Afghanistan"                 1996                .                .                . 11.0799999237061 64.6800003051758
    "Afghanistan"                 1997                .                .                . 10.6899995803833 64.9800033569336
    "Afghanistan"                 1998                .                .                . 10.3299999237061 65.1999969482422
    "Afghanistan"                 1999                .                .                . 9.94999980926514 65.4599990844727
    "Afghanistan"                 2000                .                .                . 9.47999954223633 65.8399963378906
    "Afghanistan"                 2001                .                .                . 8.97999954223633 66.2900009155273
    "Afghanistan"                 2002 1066.79461218051 2156.04111804755 3192.34417034441 9.98999977111816 64.4199981689453
    "Afghanistan"                 2003 1049.99472403988 2245.46184751065  3216.8442988437 10.3500003814697 63.7000007629395
    "Afghanistan"                 2004 780.232893058774 2388.09223557241 3498.83452569231 10.6099996566772 63.2700004577637
    "Afghanistan"                 2005 892.634264323571 2365.93291948594 3534.91227053298 11.3299999237061 62.1500015258789
    "Afghanistan"                 2006 836.608629599039 2422.68215198446 3760.39732078162  11.789999961853 61.2799987792969
    "Afghanistan"                 2007 957.775008708718 2765.20345917691 3831.37263715355 12.1999998092651 60.1399993896484
    "Afghanistan"                 2008 811.907140587037 3056.54573912932 3890.10301728852 12.4799995422363 59.2900009155273
    "Afghanistan"                 2009 1203.54271874097 3397.72122589922 3718.57915250023 13.6300001144409 56.8899993896484
    "Afghanistan"                 2010 1145.14798646176 3756.49075512864 3582.27214323553 14.6599998474121 54.5800018310547
    "Afghanistan"                 2011 1033.99807823704 3839.81392945396 3748.78298769035            14.75  53.560001373291
    "Afghanistan"                 2012 1214.31547954866 4015.91774543851 3556.26277864254 15.7700004577637 51.4000015258789
    "Afghanistan"                 2013 1190.34507864943 3990.08220003555 3427.99296413499 16.3299999237061 49.8199996948242
    "Afghanistan"                 2014 1161.95867756778 3849.81680542148 3257.07902765565 16.7700004577637 48.4099998474121
    "Afghanistan"                 2015 1073.34520324316 3644.98344177073 3154.91442315197 17.1700000762939 47.0699996948242
    "Afghanistan"                 2016 1119.92613041193 3454.68681600087 2974.04014212458 17.3199996948242  45.810001373291
    "Afghanistan"                 2017  1191.8822300237 3198.07722646546 2996.39793912159 18.0300006866455 43.9900016784668
    "Afghanistan"                 2018 1118.64521979987 3104.18059276283 3129.49790766603 18.4599990844727 43.1300010681152
    "Afghanistan"                 2019 1284.51034261624 2907.21690273802 3145.51338563087 18.5499992370605             42.5
    "Afghanistan"                 2020                .                .                .                .                .
    "Afghanistan"                 2021                .                .                .                .                .
    "Africa Eastern and Southern" 1960                .                .                .                .                .
    "Africa Eastern and Southern" 1961                .                .                .                .                .
    "Africa Eastern and Southern" 1962                .                .                .                .                .
    "Africa Eastern and Southern" 1963                .                .                .                .                .
    "Africa Eastern and Southern" 1964                .                .                .                .                .
    "Africa Eastern and Southern" 1965                .                .                .                .                .
    "Africa Eastern and Southern" 1966                .                .                .                .                .
    "Africa Eastern and Southern" 1967                .                .                .                .                .
    "Africa Eastern and Southern" 1968                .                .                .                .                .
    "Africa Eastern and Southern" 1969                .                .                .                .                .
    "Africa Eastern and Southern" 1970                .                .                .                .                .
    "Africa Eastern and Southern" 1971                .                .                .                .                .
    "Africa Eastern and Southern" 1972                .                .                .                .                .
    "Africa Eastern and Southern" 1973                .                .                .                .                .
    "Africa Eastern and Southern" 1974                .                .                .                .                .
    "Africa Eastern and Southern" 1975                .                .                .                .                .
    "Africa Eastern and Southern" 1976                .                .                .                .                .
    "Africa Eastern and Southern" 1977                .                .                .                .                .
    "Africa Eastern and Southern" 1978                .                .                .                .                .
    "Africa Eastern and Southern" 1979                .                .                .                .                .
    "Africa Eastern and Southern" 1980                .                .                .                .                .
    "Africa Eastern and Southern" 1981                .                .                .                .                .
    "Africa Eastern and Southern" 1982                .                .                .                .                .
    "Africa Eastern and Southern" 1983                .                .                .                .                .
    "Africa Eastern and Southern" 1984                .                .                .                .                .
    "Africa Eastern and Southern" 1985                .                .                .                .                .
    "Africa Eastern and Southern" 1986                .                .                .                .                .
    "Africa Eastern and Southern" 1987                .                .                .                .                .
    "Africa Eastern and Southern" 1988                .                .                .                .                .
    "Africa Eastern and Southern" 1989                .                .                .                .                .
    "Africa Eastern and Southern" 1990                .                .                .                .                .
    "Africa Eastern and Southern" 1991 773.449974795376 6569.51407978192 9666.49305326857 10.0189407942246 65.7125715042578
    "Africa Eastern and Southern" 1992 728.668953273282 6396.95803118736  9090.4638309688 9.93182498105105 65.8224644476678
    "Africa Eastern and Southern" 1993 750.563986139039 6587.61018565198 8794.27436841007 9.83552641053598 65.7974694502001
    "Africa Eastern and Southern" 1994 725.357669071519 6477.07215998369 8746.92619483665 9.75389291744394 65.7236739618377
    "Africa Eastern and Southern" 1995 716.974967946431 6420.88755780295 8264.00226364897 9.67378075639856  65.606739522042
    "Africa Eastern and Southern" 1996 769.755558876017 6379.32380845662 8343.32506522076 9.56991114566195 65.4713223302588
    "Africa Eastern and Southern" 1997 771.073887790447  6363.0239644249 8384.16965462676 9.44975706617598  65.440926451169
    end



    Attached Files

  • #2
    Dear Hugo,
    I have skimmed through your text. I think you are trying to do a growth decomposition by country and by sector. Is that correct? Also, you are trying to calculate TFP (labor productivity) in this way, right?
    Kind regards,
    Jorge

    Comment


    • #3
      Originally posted by Jorge L. Guzman View Post
      Dear Hugo,
      I have skimmed through your text. I think you are trying to do a growth decomposition by country and by sector. Is that correct? Also, you are trying to calculate TFP (labor productivity) in this way, right?
      Kind regards,
      Jorge
      I am trying to decompose labor productivity change (not TFP). But the decomposition is by country and sector, that's correct. The idea is to add the changes by each component of the decomposition by sector to get an approximation of how much of labor productivity change is attributable to own sectors' labor productivity growth and how much is attributable to workers moving across sectors. This decomposition was developed initially by Haltiwanger (1997) at the plant level but readapted by Rodrik and McMillan (2011) to explore the sum across sectors.

      Kind regards,

      Hugo

      Comment


      • #4
        Thanks Hugo Rocha for the clarification .
        I see now. Did you already do it for every year, every country and every sector? My guess is that once you have that you can just do it by the period of your choice.
        Kind regards,
        Jorge

        Comment


        • #5
          Originally posted by Jorge L. Guzman View Post
          Thanks Hugo Rocha for the clarification .
          I see now. Did you already do it for every year, every country and every sector? My guess is that once you have that you can just do it by the period of your choice.
          Kind regards,
          Jorge
          You are welcome, I am trying hehe

          Kind regards,

          Hugo

          Comment


          • #6
            Originally posted by Jorge L. Guzman View Post
            Thanks Hugo Rocha for the clarification .
            I see now. Did you already do it for every year, every country and every sector? My guess is that once you have that you can just do it by the period of your choice.
            Kind regards,
            Jorge
            The idea is to add the decomposition by sector and the sum by sector will give you the overall change in the economy attributable to each component

            Comment


            • #7
              Ideally the goal is to obtain bar charts like this (no need for the interaction term). Thanks!
              Attached Files

              Comment


              • #8
                Hugo Rocha I know exactly what you are looking for. I do growth accounting exercises all the time and I also look for specific periods which might be more informative of a reform, a change or something I would like to explore. For instance, for countries, it might be a new constitution or a presidential term.
                Make sure you get all the results, by country, by year and by sector and then you can produce those charts. I have an excel toolkit that produce that, but of course it can be transferred to Stata easily. Feel free to message me privately for further assistance. I would be happy to help you.
                Kind regards,
                Jorge

                Comment

                Working...
                X