Software
Software packages in Stata or otherwise.
Inflate.ado
Inflate is a Stata program that inflates variables to real dollars using the U.S. Consumer Price Index (CPI). Useful for putting time series that vary across years, quarters, or months in real dollars, so you do not have to deal with merging in the CPI series yourself!
Note: The inflate command now requires an API key from FRED. This is because changes in FREDβs data infrastructure forced the command to migrate from freduse to the built-in command import fred. A FRED API key may be obtained from https://fred.stlouisfed.org/docs/api/api_key.html
Install
Inflate is available on SSC. In Stata install by running:
β β ssc install inflate
Example
The following code takes two monthly time series and puts them in real 2020 $.
Load in the nominal M1 and M2 money stocks from FRED.
β β freduse M1SL M2SL
Make year and month variables.
β β gen year = year(daten)
β β gen month = month(daten)
Inflate both series to 2020 $.
β β inflate M1SL M2SL, year(year) month(month) end(2020)
Now there are two new variables named M1SL_real and M2SL_real.