Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import delimited "/Users/Downloads/FMR_All_1983_2024.csv", clear
- collapse fmr* pop*, by(fips)
- drop fmr00_0-fmr_area
- rename fmr*_0 fmr_020*
- rename fmr*_1 fmr_120*
- rename fmr*_2 fmr_220*
- rename fmr*_3 fmr_320*
- keep pop* fmr_* fips
- reshape long fmr_0 fmr_1 fmr_2 fmr_3, i(fips) j(year)
- drop if year>2024
- preserve
- keep if year<2010
- collapse fmr* [aw=pop2000], by(year)
- save first10, replace
- restore
- preserve
- keep if year>=2010 & year<2017
- collapse fmr* [aw=pop2010], by(year)
- save second7, replace
- restore
- keep if year>=2017
- collapse fmr* [aw=pop2017], by(year)
- append using first10
- append using second7
- forvalues i = 0/3{
- gen fmrbase`i' = fmr_`i' if year==2001
- egen fmrbase_wide`i' = min(fmrbase`i')
- gen inflation`i'= fmr_`i'/ fmrbase_wide`i'
- }
- keep inflation* year
- twoway (line inflation0 year, sort) (line inflation1 year, sort) (line inflation2 year, sort) (line inflation3 year, sort)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement