help for cpigen

Add US price index CPI-U to current data


cpigen [, replace]

options Description ------------------------------------------------------------------------- replace replace existing variables named cpi and cpiu -------------------------------------------------------------------------


cpigen uses that a numeric variable year on the current data, and a numeric variable quarter or a numeric variable month if available, defining calendar time in the usual way, to generate two variables cpi and cpiu containing versions of the Consumer Price Index commonly used to convert US dollar amounts to "real" dollars. The first, cpi (supported range 1913-2006), is the research series (applying more consistent methods over time) CPI-U-RS or CPI-U-X1 where available, and an adjusted version of the CPI-U where no research series is available, as is standard Census practice. The second, cpiu (supported range 1913-2007), is the seasonally adjusted CPI-U, for all goods, for urban consumers, also available from freduse CPIAUCSL.

The research series data for 1978 to 2006 comes from the BLS publication http://www.bls.gov/cpi/cpiurs1978_2006.pdf updated at http://www.bls.gov/cpi/cpiursai1978_2010.pdf. For more discussion of these series, and other indices in the CPI family, see http://www.bls.gov/cpi and the article by Kenneth J. Stewart and Stephen B. Reed, "CPI Research Series Using Current Methods, 1978-98," in the Monthly Labor Review, June 1999, downloadable at http://stats.bls.gov/opub/mlr/1999/06/cpimlr.pdf. A useful basic description is http://www.irp.wisc.edu/faqs/faq5.htm.

Earlier data (monthly CPI-U data for 1913 through 1920) comes from ftp://ftp.bls.gov/pub/special.requests/cpi/cpiai.txt. Though undocumented, this source matches the unadjusted CPI-U freduse data, which shows 174 for December 2000, whereas the seasonally adjusted CPI-U is 174.6; the ratio of December 2006 to December 1977 is 3.250 for unadjusted and 3.255 for seasonally adjusted CPI-U, whereas that ratio is 2.96 for the research series (seasonal adjustment matters more for ratios formed from months within a year, i.e. short term inflation, but such differences are likely swamped by measurement error in the CPI).

Note that the indices cpi and cpiu created by cpigen apply to national trends in prices of all goods and services purchased by the 9/10 of consumers who are classified as urban. Many indices are available for particular categories of goods, e.g. food or clothing or medical care (1998 clothing prices were about 1.5 times 1978 prices, while 1998 medical care prices were about 4 times 1978 prices), or geographic areas, e.g. New York or large northeastern cities or small southern cities (large northeastern cities tend to have prices nearly twice as high as small southern cities). See Stewart and Reed (link above) or http://www.bls.gov/cpi/cpifaq.htm#Question_16 http://www.bls.gov/cpi/cpifaq.htm#Question_19 for more.

For indices not in the CPI family, see e.g. http://www.bea.gov/papers/pdf/cpi_pce.pdf and http://www.ssa.gov/OACT/COLA/AWI.html.

The variables cpi and cpiu created by cpigen are normalized to 2000 dollars in annual data, or December 2000 dollars in monthly data. To turn nominal income, say, into real income measured in 2000 dollars, simply divide income by cpi. To turn nominal income into real income measured in 2005 dollars, first divide income by cpi, then multiply by the value of cpi in 2005. The idea is, what cost a dollar in 2000 cost about 1.13 in 2005, so a dollar of income in 2005 made you about as well off as 88.5 cents of income in 2000.


webuse nlswork, clear replace year=year+1900 cpigen g nomwage=exp(ln_w)*cpi su cpi if year==1978 g wage78=nomwage/cpi*r(mean) la var wage78 "Real Wage, 1978 dollars" g x=exp(_n/20-1) in 1/80 kdensity wage78 if year==1968, at(x) g(d68) nogr kdensity wage78 if year==1978, at(x) g(d78) nogr kdensity wage78 if year==1988, at(x) g(d88) nogr la var d68 "1968 Wages" la var d78 "1978 Wages" la var d88 "1988 Wages" line d68 d78 d88 x, xsc(log)


Austin Nichols Urban Institute Washington, DC, USA austinnichols@gmail.com

Also see

On-line: freduse (on SSC)