Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: How to convert variable values in tables and panels to CPI adjusted values
From
Erik Aadland <[email protected]>
To
<[email protected]>
Subject
st: How to convert variable values in tables and panels to CPI adjusted values
Date
Thu, 16 Jun 2011 12:38:01 +0000
Dear all.
I need to convert variable values in tables and panels to CPI (consumer price index) adjusted values.
To do so, I have a unique value for each year and I need to divide variable values in tables and panels for each year by that unique value.
A simple example is outlined below.
I have the following unique values by year:
1997: 0,9
1998: 1
1999: 1,2
2000: 1,3
I have tables with the following structure:
year var1 var2
1997 2.1 2.2
1998 3.3 4.3
1999 4.3 4.0
2000 3.7 3.8
For year 1997 I must divide 2.1 by 0.9 for var1, and divide 2.2 by 0.9 for var2. And so on for the other years.
I also have unbalanced panels of organizations by year with the following structure:
year org_id var1 var2
1997 1 2.1 2.2
1998 1 2.2 2.3
1999 1 2.3 2.4
1998 2 1.5 1.6
1999 2 1.6 1.7
Here I need to make the same division for each year on var1 and var2 for each organization.
How can I accomplish this? I use Stata 10.
Kind regards,
Erik Aadland.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/