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
Consideration on the Expand command : Rename a duplicated observationHi everyone, I am a neophyte on Stata, I don't think this question is complicated but in the help co…
Help Recreating a Graph (Regression line and density at points)I would like to recreate this graph from Mostly Harmless Econometrics: An Empiricist’s Companion (pa…
Using margins, test, and lincom to test hypothesis that two predictive values are equalHi, I'm trying to do something that should be easy but I'm not certain I am doing it/interpreting th…
Persistent class objects with ado programsI'm attempting to create an -ado- program whose purpose is to create an instance of a class and then…
how to use an asterisk(*) for multiple variables with an "if" conditionDear all, i have an issues which iam trying to figure out but i am not getting anywhere and i need u…
Subscribe to:
Post Comments (Atom)
0 Response to Merging Deflator Values to a Panel
Post a Comment