Announcement

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

  • Counterfactual with panel data

    Hi everyone,

    I try to build a counterfactual model with panel data from 1995 to 2014 for Germany. I can easily show the evolution of unemployment in this country during this period, using twoway.
    But I would like to add in the twoway graph a line showing the evolution of unemployment if the unit labor cost would have remained the same as in 1995.

    I have then two variables (let's simplify my model): U (unemployment) and ulc (unit labor cost).

    The commands I used are the following (I used a fixed-effect model):
    xtset country year
    xtreg U ulc, fe

    Then I've tried to build my counterfactual but it does not work and I'm not sure of what I am doing actually...

    estimates store unemployment
    xtreg ulc
    estimates store unit
    forecast estimates unemployment
    forecast solve, begin(1996)
    forecast adjust ulc=ulc_1995
    forecast solve, begin(1996) prefix(new_)
    twoway connected U ulc

    Could someone help me please ?

    Thanks a lot for reading.

    BG

  • #2
    Does your data go all the way to 2014? If so, I'm not sure why you need forecast rather than just predict or margins. I note that you did fe on the first model and re on the second so they're not comparable. The dv's are also different. This seems odd if you want to compare the two.


    Comment


    • #3
      Thanks for you answer.
      The data go all the wat to 2014.
      I'm sorry for confusing re and fe, in my do-file I just used re because Hausman gives me no difference and I'm just focusing on Germany for my counterfactual (so fixed effects between countries are not relevant here).

      In fact, I think I succeeded to do something:
      1) I run my model
      xtset country year
      xtreg U ulc
      estimates store U
      xtreg ulc
      estimates store ulc

      2) I remove every country but Germany
      keep if country=="Germany"
      keep if year >=1995&year<=2014
      forecast create U, replace
      forecast estimates U
      forecast estimates ulc
      forecast solve, begin(1996)
      forecast adjust ulc=ulc_1995
      forecast solve, begin(1996) prefix(new_)
      twoway connected U year||connected new_U year

      It looks better because the model takes into account every country, but I just apply to Germany.
      Am I bullshiting or is it something consistent ?

      Comment

      Working...
      X