Examples using the CEPR SIPP extracts
These are some notes on how to use the CEPR SIPP uniform data extracts. You can download the data in STATA format at ceprDATA.org and read some basic notes on their structure here.
Merging Sets in a Panel
Suppose you want to use the 2001 SIPP panel calculate the median household income for adults of different races. You'll need to grab sample weights from Set A, race from Set B, and household income from Set F. Each of these sets is organized in person-month form, so we can use the variables id wave srefmon to uniquely identify observations and to merge across sets:
use id wave srefmon wpfinwgt year using /home/ben/data/sipp/cepr/sipp01/set_a.dta, clear
drop if id == ""
merge id wave srefmon using /home/ben/data/sipp/cepr/sipp01/set_b.dta, keep(race ms age)
drop _merge
sort id wave srefmon
merge id wave srefmon using /home/ben/data/sipp/cepr/sipp01/set_f.dta, keep(thtotinc)
drop _merge
Now we have a data set containing all the relevant info. If we use the table command
table race year [aw=wpfinwgt] if age>=18, c(med thtotinc) row format(%4.0f)
we'll get output like
----------------------------------
| SU: Calendar year for
Race | this reference m
(W,B,H,O) | 2000 2001 2002 2003
----------+-----------------------
White | 4009 4016 4108 4248
Black | 2805 2821 2815 2935
Hispanic | 2958 3200 3160 3282
Other | 4393 4399 4336 4603
|
Total | 3736 3800 3872 4000
----------------------------------
Merging topical module panels
coming soon...
Combining different panels
coming soon...