----------------------------------------------------------------------------------------------------------------------------------------- log: /disk/homes2c/nber/jroth/ces/yy1_yy1x_have_same_newid_barring_redesign.log log type: text opened on: 15 Oct 2009, 11:02:08 . ** Purpose: Demonstrate that, barring redesigns, YY1 and YY1x files have the same NEWIDs . ** There was a redesign in 2005. . ** by Jean Roth, jroth@nber.org , 2009-10-15 . program loop 1. local year1=`1' 2. local yr1=substr(`"`1'"',3,2) 3. local subdir1="`2'" 4. local year2=`3' 5. local yr2=substr(`"`year2'"',3,2) 6. local subdir2="`4'" 7. display "year1=`1' year2=`year2' yr1=`yr1' yr2=`yr2' subdir1=`subdir1' subdir2=`subdir2'" 8. ! ls -l /homes/data/ces/`year1'/`subdir1'/fmli`yr2'1.dta 9. ! ls -l /homes/data/ces/`year2'/`subdir2'/fmli`yr2'1x.dta 10. use /homes/data/ces/`year1'/`subdir1'/fmli`yr2'1.dta 11. sort newid 12. saveold ~/bulk/ces/fmli`yr2'1.dta, replace 13. use /homes/data/ces/`year2'/`subdir2'/fmli`yr2'1x.dta 14. sort newid 15. ** Merging quietly to suppress messages about recasting of variables from, for example, int to long . quietly merge newid using ~/bulk/ces/fmli`yr2'1 16. tab _merge 17. ** See note below about Sample Redesign in 2005 OR page 6 of Intdoc05.pdf . assert _merge==3 if `year2' != 2005 18. clear 19. end loop . loop 2001 intrvw01 2002 intrvw02 year1=2001 year2=2002 yr1=01 yr2=02 subdir1=intrvw01 subdir2=intrvw02 file ~/bulk/ces/fmli021.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 3 | 7,691 100.00 100.00 ------------+----------------------------------- Total | 7,691 100.00 . loop 2002 intrvw02 2003 Intrvw03 year1=2002 year2=2003 yr1=02 yr2=03 subdir1=intrvw02 subdir2=Intrvw03 file ~/bulk/ces/fmli031.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 3 | 8,086 100.00 100.00 ------------+----------------------------------- Total | 8,086 100.00 . loop 2003 Intrvw03 2004 Intrvw04 year1=2003 year2=2004 yr1=03 yr2=04 subdir1=Intrvw03 subdir2=Intrvw04 file ~/bulk/ces/fmli041.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 3 | 7,976 100.00 100.00 ------------+----------------------------------- Total | 7,976 100.00 . loop 2004 Intrvw04 2005 sas/Intrvw05 year1=2004 year2=2005 yr1=04 yr2=05 subdir1=Intrvw04 subdir2=sas/Intrvw05 file ~/bulk/ces/fmli051.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 1 | 2,630 25.32 25.32 2 | 5,308 51.09 76.41 3 | 2,451 23.59 100.00 ------------+----------------------------------- Total | 10,389 100.00 (null assertion) . loop 2005 sas/Intrvw05 2006 sas/Intrvw06 year1=2005 year2=2006 yr1=05 yr2=06 subdir1=sas/Intrvw05 subdir2=sas/Intrvw06 file ~/bulk/ces/fmli061.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 3 | 7,786 100.00 100.00 ------------+----------------------------------- Total | 7,786 100.00 . loop 2006 sas/Intrvw06 2007 "2007_STATA/Intrvw07" year1=2006 year2=2007 yr1=06 yr2=07 subdir1=sas/Intrvw06 subdir2=2007_STATA/Intrvw07 file ~/bulk/ces/fmli071.dta saved _merge | Freq. Percent Cum. ------------+----------------------------------- 3 | 6,965 100.00 100.00 ------------+----------------------------------- Total | 6,965 100.00 . ******loop 2007 "2007_STATA/Intrvw07" . . ********************************************************************************************* . ** From page6 of Intdoc05.pdf which is the . ** 2005 CONSUMER EXPENDITURE INTERVIEW SURVEY PUBLIC USE MICRODATA DOCUMENTATION, February 16, 2007 . **There was a sample redesign in 2005. . **The sampling frame is now generated from the 2000 Population Census 100-percent-detail file. . **As a result, users will not be able to link all consumer units whose participation spanned 2004 and 2005 sample designs. . **It is suggested that users use the 2003 and 2004 CDs or the 2005 and 2006 (when available) CDs for any micro-level longitudinal analy > sis. . **2005 CD users should be aware that the 2005 first quarter (q051) data on the 2004 CD are from the old sample design, while the q051 d > ata on the 2005 CD are from the new sample design. . ** . ** . **Consequently, the data are not the same. . **Due to the sample design change, there are no January interview data on the q051 files of the 2005 CD. . **Please be aware that collection period estimates (see section V.A.1.b.) will be affected because of this. . **Aggregate collection period estimates will require inflation by factors of 3/2 (for q051 estimates) to 12/11 (for 2005 annual collect > ion period estimates). . **This adjustment will roughly compensate for the missing January interviews. . **For calculations of averages, January interview data are missing from both the numerator and the denominator and these estimates are > not as severely affected. . **Calendar period estimates are not affected because all expenditures from January interviews fall into the q044 time period. . ********************************************************************************************* . end of do-file . exit,clear