My database looks like this
cid (country id) | time | d_u (change in unemployment) | d_inf (change in inflation) | control variables |
1 | 2000q1 | 0.038 | 0.08273 | ... |
1 | 2000q2 | ... | ... | ... |
1 | ... | |||
1 | 2020q4 | |||
... | ... | ... | ... | ... |
21 | 2000q1 | ... | ... | ... |
... | ... | ... | ... | ... |
21 | 2020q4 | ... | ... | ... |
So what I would do is
code :
reg d_inf d_u i.cid i.cid##d_u i.time
I am not sure it is the right way to do it ...
Furthermore I would like to "extract" the coefficient to estimate the natural rate of unemployment
I would do it like that : gen b1=_b[_cid##d_u]
It gives me : invalid matrix stripe;
cid##d_u
r(198) ;
Is there another way to do it ?
To sum up : a) Is there a regression that would give me coefficient for each country on each time period for the effect of a change in unemployment on the change in inflation ?
b) How can I "get out" the coefficient results of the regression ?
Please do not hesitate to tell me if I need to give more details
Thank you
Sander De Rudder
0 Response to Create new variable using coefficient from a variable containing time dummy
Post a Comment