x cd /pub/data/pums2000/Tools; %let pgm=invoke_dosets; filename pgm "&pgm..sas"; /*--Invoke the %doset macro to create observations in the Datasets dataset for this directory. J. Blodgett, OSEDA, June, 2003 Mods 8/05 to add usage note pointing to pdf maps of pumas. -- */ title "Job to Invoke doset Macro for Sets in pums2000, creating pums2000.datasets"; libname pums2000 '/pub/data/pums2000'; /*<=========================Comment out===================================== proc datasets lib=pums2000 nolist; modify datasets; index create dataset=(libname memname) / unique; quit; ===========================End commented out================================ */ *-----Run this step ONLY ONCE------------------------------------------; *----If you need to rerun (start over) then delete the datasets dataset first. doset will not allow initialize mode if the datasets set already exists.---; %*doset(mode=initialize, libname=pums2000,debug=1); *----------------------------------------------------------------------; /* =======================Begin comment================ %doset(mode=,libname=pums2000, memname=_template_precs1, memlabel=%nrstr(Person record data, 1 pct sample for ~stab), geouniv=~statenm, units=Persons, Year=2000, CreatePgm=cnvtpums1, Keywords=pums microdata census 2000 persons, Description=%nrbquote(Each observation on this set represents microdata for a person filling out the Long Form in the 2000 decennial census. This is the 1 pct sample data for ~statenm.), keyvars=puma1 , keyfmats=| , keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site April, 2003), SortedBy=state puma1 serialno, UsageNotes=%nrbquote(), SubType=precs, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch6_Data_Dictionary_1_percent.pdf), filters=, debug=1) %doset(mode=,libname=pums2000, memname=_template_hrecs1, memlabel=%nrstr(Household record data, 1 pct sample for ~stab), geouniv=~statenm, units=Housing Unit or Person in Group Quarters, Year=2000, CreatePgm=cnvtpums1, Keywords=pums microdata census 2000 housing units, Description=%nrbquote(Each observation on this set represents microdata for a housing unit (vacant or occupied) or for group quarters respondent. Look here for data about the housing unit as whole such as geographic codes or information about the house or the total household. This is the 1 pct sample data for ~statenm.), keyvars=puma1 areatyp1 msacmsa1 , keyfmats=| | metro, keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site April, 2003), SortedBy=state puma1 serialno, UsageNotes=%nrbquote(Data for each of the persons associated with the housing unit (if any) are contained in the companion dataset, ~stab.precs1. The value of the variable persons tells you how many such person records to expect.
  • Users without access to and expertise in using statistical software will not find these datasets very useful.
  • SAS users can borrow from the valfmats.sas module containing codebook type info in the form of SAS proc format Value statements. Even non-SAS users should be able to benefit from using this as a quick and dirty codebook file.
  • It is possible to have an obs on this dataset with no corresponding data on the precs dataset since the census includes data for vacant housing units. The Persons variable tells you how many person records are associated with each house record.
  • Remember to always specify the weight variable hweight when creating tables from these data.
  • The smallest geographic units that can be identified on these files is the Super PUMA, stored as variable puma1. The Census Bureau has provided maps of these areas accessible from http://www.census.gov/geo/www/maps/sup_puma.htm .
  • You can access the ~stab.1 view which combines the household data and person data into a single observation. ), SubType=hrecs, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch6_Data_Dictionary_1_percent.pdf), filters=, debug=1) %doset(mode=,libname=pums2000, memname=_template_v1, memlabel=%nrstr(Household + Person data, 1 pct sample for ~stab), geouniv=~statenm, units=Person within housing unit or Vacant unit or Person in Group Quarters, Year=2000, CreatePgm=cnvtpums1, Keywords=pums microdata census 2000 housing units persons, Description=%nrbquote(These observations are the result of using a SAS view to combine the variables from the housing record with that from a person record (if any). This is the 1 pct sample data for ~statenm), keyvars=puma1 areatyp1 msacmsa1 , keyfmats=| | metro, keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site April, 2003), SortedBy=state puma1 serialno, UsageNotes=%nrbquote(), SubType=v1, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch6_Data_Dictionary_1_percent.pdf), filters=, debug=1) %doset(mode=,libname=pums2000, memname=_template_precs5, memlabel=%nrstr(~statenm Person record data, 5 pct sample), geouniv=~statenm, units=Persons, Year=2000, CreatePgm=cnvtpums5, Keywords=pums microdata census 2000 persons, Description=%nrbquote(Each observation on this set represents microdata for a person filling out the Long Form in the 2000 decennial census. This is the 5 pct sample data for ~statenm. Does not contain data regarding the complete household, just individuals.), keyvars=puma1 puma5, keyfmats=| | , keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site summer, 2003), SortedBy=state puma1 puma5 serialno, UsageNotes=%nrbquote(), SubType=precs, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch7_Data_Dictionary_5_percent.pdf), filters=, debug=1) %doset(mode=,libname=pums2000, memname=_template_hrecs5, memlabel=%nrstr(~statenm Household record data, 5 pct sample), geouniv=~statenm, units=Housing Unit or Person in Group Quarters, Year=2000, CreatePgm=cnvtpums5, Keywords=pums microdata census 2000 housing units group quarters, Description=%nrbquote(Each observation on this set represents microdata for a housing unit (vacant or occupied) or for a person residing in group quarters. Look here for data about the housing unit as whole such as geographic codes or information about the house or the total household. This is the 5 pct sample data for ~statenm.), keyvars=puma1 puma5 areatyp5 msacmsa5 , keyfmats=| | | metro, keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site summer, 2003), SortedBy=state puma1 puma5 serialno, UsageNotes=%nrbquote(Data for each of the persons associated with the housing unit (if any) are contained in the companion dataset, ~stab.precs5. The value of the variable Persons (in this dataset) tells you how many such person records to expect. When persons has a value of 0 you are looking at data for a vacant unit.
  • Users without access to and expertise in using statistical software will not find these datasets very useful.
  • SAS users can borrow from the valfmats.sas module containing codebook type info in the form of SAS proc format Value statements. Even non-SAS users should be able to benefit from using this as a quick and dirty codebook file.
  • It is possible to have an obs on this dataset with no corresponding data on the precs dataset since the census includes data for vacant housing units.
  • Remember to always specify the weight variable hweight when creating tables from these data.
  • The smallest geographic units that can be identified on these files is PUMA, stored as variable puma5. The Census Bureau has provided maps of these areas accessible from http://www.census.gov/geo/www/maps/puma5pct.htm .
  • You can access the ~stab.5 view which combines the household data and person data into a single observation. ), SubType=hrecs, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch7_Data_Dictionary_5_percent.pdf), filters=, debug=1) %doset(mode=,libname=pums2000, memname=_template_v5, memlabel=%nrstr(~statenm Household + Person data, 5 pct sample), geouniv=~statenm, units=Person within housing unit in Group Quarters or Vacant unit, Year=2000, CreatePgm=cnvtpums5, Keywords=pums microdata census 2000 housing units persons, Description=%nrbquote(These observations are the result of using a SAS view to combine (merge) the variables from the housing record with that from a person record (if any). This is the 5 pct sample data for ~statenm), keyvars=puma1 puma5 areatyp5 msacmsa5 , keyfmats=| | | metro, keyquals=, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site summer, 2003), SortedBy=state puma1 puma5 serialno, UsageNotes=%nrbquote(), SubType=v5, SetGroup=~stab, VarSet=, URLMeta=%str(https://mcdc.missouri.edu/pub/data/pums2000/Techdoc/Ch7_Data_Dictionary_5_percent.pdf), filters=, debug=1) ; %macro doit1(state,stab); *----OK, we have defined the templates, now lets get on with the actual datasets-----------------------*; %doset(libname=pums2000, memname=&stab.precs1,template=_template_precs1) %doset(libname=pums2000, memname=&stab.hrecs1,template=_template_hrecs1) %doset(libname=pums2000, memname=&stab.1,template=_template_v1) %mend doit1; %dostates(17 20 29,names=1,msgs=1,mac=doit1) ; ======================End comment================== */ %macro doit5(state,stab); %doset(libname=pums2000, memname=&stab.precs5,template=_template_precs5) %doset(libname=pums2000, memname=&stab.hrecs5,template=_template_hrecs5) %doset(libname=pums2000, memname=&stab.5,template=_template_v5) %mend doit5; *---the dostates macro is in /pub/sas/macros/dostates.sas and is used as a "driver" to invoke the doit macro once for each state indicated by having their fips code appear in positional parm. names=1 causes it to assign a value to the global variable statenm containing the name of the state. The templates used contain references to the stab and statenm global variables. ---; %dostates(n=51,names=1,mac=doit5); %doset(libname=pums2000,memname=puma5_puma1, memlabel=%nrstr(For all PUMAs in US shows Superpuma, powpuma5 and migpuma5), geouniv=UnitedStates, units=puma5 within state, Year=2000, CreatePgm=puma5_topuma1, Keywords=pums microdata census 2000 superpuma migpuma powpuma correspondence, Description=%nrbquote(Each observation on this set describes a 5 percent 2000 PUMA code. It reports the corresponding "SuperPUMA" code as well as the Place of Work PUMA and Migration PUMA codes used on the 5 percent sample files.), UsageNotes=%nrbquote(The source for the powpuma5 and migpuma5 codes were the two xls files included as Appendices N and M in the Technical Documentation. We found two typo errors in the POW puma codes that we corrected (in Minnesota and Pennsylvania). See csv file where we did the edits.), keyvars=state puma1 puma5 , keyfmats=state | | , keyquals= | state state, DataSource=%str(2000 Census - Public Use Microdata Sample files as posted on Bureau web site summer, 2003), SortedBy=state puma5 puma1, SubType=georef, SetGroup=, VarSet=, URLMeta=,sortprio=4) *<==================================Need to create entries for variables and varvals metadata sets----------------; *----Adding entries for the 3 US SAS data step views, 3/2004-----*; %let stab=us; %let statenm=United States; %doset(libname=pums2000, memname=&stab.precs5,template=_template_precs5, memlabel=%str(Person record data, 5 pct sample - Entire US), description=%str(Each observation on this set represents microdata for a person filling out the Long Form in the 2000 decennial census. This is the 5 pct sample data for the entire United States. It does not contain data regarding the complete household, just individuals.), universe=UnitedStates, keyvars=state, keyfmats=state, CreatePgm=union_all_states, UsageNotes=%nrbquote(