Announcement

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

  • cummulative change

    Click image for larger version

Name:	cummulative change.png
Views:	1
Size:	108.5 KB
ID:	1665103
    Dear listers,
    I would like to apologize if my question is too naive. I am using Stata 15.

    I would like to replicate the following graph from Blanchard and Katz (1992) paper. I tried to graph a similar graph using compound average growth rate (CAGR) in the following way :

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    
    
    webuse grunfeld, clear
    
    gen linvest=ln( invest)
    bys company: gen cagr= (linvest[20]/linvest[1])^1/20 -1
    line cagr year if company==6
    I tried the
    cumul
    command as well
    ssc install cumul
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    
    
    sysuse citytemp, clear
           cumul tempjan, gen(cjan)
            cumul tempjuly, gen(cjuly)
            stack cjan tempjan cjuly tempjuly, into(c temp) wide clear
            line cjan cjuly temp, sort
    But the line is far from looking like the one presented in the graph.
    May anyone help me, how I could get a graph similar to theirs please?
    Thank you.
    cummulative change.pdf
    Last edited by Lu Asegu; 17 May 2022, 15:54. Reason: I did attach a figure as an attachment, i wanted it to be an image.

  • #2
    Cumulative change is just summing up change over time. So cumulative change in time \(t=3\) is \(change_{t=2} \;+\; change_{t=3}\), cumulative change in time \(t=4\) is \(change_{t=2} \;+\; change_{t=3}\;+\; change_{t=4}\), and so on. In the attached figure, Blanchard and Katz are summing up change in log employment across a selection of US states, starting in 1945. Here is how you would graph cumulative change in log investment for Company 1 in the Grunfeld dataset.

    Code:
    webuse grunfeld, clear
    gen loginvest= ln(invest)
    xtset company year
    *CUMULATIVE CHANGE IN LOG INVESTMENT
    bys company (year): gen wanted= sum(D.loginvest)
    set scheme s1mono
    xtline wanted if co==1, xtitle("") ytitle("Cumulative Investment Growth") byopts(note("")) subtitle("Company 1: Grunfeld dataset")
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	46.3 KB
ID:	1665174

    Comment


    • #3
      Dear Andrew,

      That's very kind of you to reply to my question. Your explanation is quite simplifying as well, appreciated.

      Comment

      Working...
      X