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
Stationarity, Markov switchingHi everyone, I was trying to model times series with markov switching regimes. Preliminarily, do I n…
Identifying missing Data & Interpolation of Panel DataHello, I've created a dataset of 30 countries over 30 years for 29 different variables. For some of…
Out of sample estimation following xtdpdgmmStata throws a 301 error (last estimates not found) whenever I try to use estimates from a dynamic m…
Reading image properties such as GPS and date takenHi everyone, I was wondering if there is a way to read photo/ image properties such as date taken, d…
Shifting observations across rowsHello, I am fairly new to Stata and am having trouble even starting on this problem. I am working wi…
Subscribe to:
Post Comments (Atom)
0 Response to Merging Deflator Values to a Panel
Post a Comment