Announcement

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

  • compare variable (gdp) development

    Hey, I want to compare the development of log(gdp) of some countries in one graph. But for a better comparison I want that the first entry is 100% for every country and so on. So basically I want to generate a new index. (I don't want to compare gdp growth of the cuntries.)

    The command I use is: xtline lngdp, overlay t(date) i(country)

    Thankful for any replies!

  • #2
    Since you want to rescale each series to start at 100, I would be inclined to use gdp rather than log(gdp) because thinking about the meaning of a 10% increase in log(gdp) makes my head hurt. But the general idea shown below should work for your lngdp as well.
    Code:
    by country (date), sort: generate relative_gdp = gdp/gdp[1]
    xtline relative_gdp, overlay t(date) i(country)

    Comment


    • #3
      Thank you very much!

      Comment

      Working...
      X