Greetings! How to read the data from Table DP05 of the 2019 American Community Survey (ACS) 5-year estimates into SAS? When I deleted the second row on variable definition and read it into SAS, errors came (copied below). When I read all lines starting the third row, all numbers became characters. I reviewed the user groups but could not find a good solution.
I am new to ACS. I plan to run a multilevel analysis of 391 Latinx immigrants interviewed around 2019 to 2021 in Durham North Carolina. I want to generate a neighborhood concentrated disadvantage index using 2015–2019 5-year estimates of American Community Survey (ACS).
Thank you. Best wishes, Qing
NOTE: Invalid data for DP05_0019PE in line 1511 83-83.NOTE: Invalid data for DP05_0019PM in line 1511 85-86.NOTE: Invalid data for DP05_0038PE in line 1511 88-88.NOTE: Invalid data for DP05_0038PM in line 1511 90-91.NOTE: Invalid data for DP05_0071PE in line 1511 93-93.NOTE: Invalid data for DP05_0071PM in line 1511 95-96.WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.1511 1400000US37129990100,"Census Tract 9901, New Hanover County, North Carolina",0,12,-,**,-,**,-,** 96VAR1=1400000US37129990100 NAME=Census Tract 9901, New Hanover County, North Carolina DP05_0001E=0 DP05_0001M=12 DP05_0019PE=.DP05_0019PM=. DP05_0038PE=. DP05_0038PM=. DP05_0071PE=. DP05_0071PM=. _ERROR_=1 _N_=1510NOTE: 2195 records were read from the infile 'C:\Rosa\Data\agerace1.csv'. The minimum record length was 89. The maximum record length was 115.NOTE: The data set WORK.BB has 2195 observations and 10 variables.NOTE: DATA statement used (Total process time): real time 0.09 seconds cpu time 0.07 seconds
Hi Qing -
I think the problem is that some of the rows contain text annotation so that they cannot be read with a numeric informat like BEST12. Your approach could work (PROC IMPORT followed by a DATA…
I'm not a SAS expert, but have you seen the SAS programs they provide for the ACS summary files here:
www.census.gov/.../summary-file-documentation.html
Thank you! Trying. Best,