Hi, I have a panel data (large n and small T) with -id- as the panel variable and -year- as the time variable. The year variable ranges from 2000-2003 and id captures the number of firms.
In addition to this, I have sales value for each of the firm. It is an unbalanced panel.
Just a snippet of how it looks (I have around 20,000 firms):
--id-- --year-- --sales
1 2000 43,722
2 2000 32,000
2 2001 16,000
3 2000 20,001
3 2001 22,768
3 2002 26,890
3 2003 21,760
Now, I have another dataset (dta.file) which has CPI deflator values by year i.e. from 2000-2003.
In order to get sales (in real terms), for example, for firm 1, I have to divide the sales by the 2000 deflator value and multiply by 100. While, I can do this manually, I am looking for a code to first add the deflator using some code and then generating the real sales.
How to proceed?
Related Posts with Merging Deflator Values to a Panel
Struggling with -mkspline-I'm struggling on interpreting the output after using the mkspline command. I have a continuous exp…
Near perfect correlation between dummy variable and outcome variable, all checks on data indicate there is no problem with underlying data.I am facing a bit of a problem and I can't seem to figure out what the issue might be. I am currentl…
Stacked bar graph for multiple policies for states across yearsIs there any efficient way of illustrating these following policies in a stacked bar graph like the …
Missing dataHello! I am currently figuring out how to deal with with missing data. According to the user guide,…
Inlcude industry- and year-fixed effects in regressionHello, I want to do a regression with one dependent variable and an independent variable and a few …
Subscribe to:
Post Comments (Atom)
0 Response to Merging Deflator Values to a Panel
Post a Comment