* --------------------------------------------------------------------------------------------- * * The National Health Interview Survey (NHIS) 2020 * * Sample Adult Longitudinal data file * * This program loads the NHIS sample adult longitudinal ASCII data file downloaded from the * NCHS website (https://www.cdc.gov/nchs/nhis/index.htm) to an SPSS dataset. * * The program creates descriptive variable labels and formats with meaningful * category labels. It has a sample frequency to verify that the data were correctly * loaded. * * BEFORE RUNNING THIS PROGRAM, PLEASE: * - Create a folder called C:\NHIS2020 (on a machine running Windows) * - Download the sample adult ASCII file to the folder C:\NHIS2020 * (on a machine running Windows) * * --------------------------------------------------------------------------------------------- FILE HANDLE TEMP /NAME='C:\NHIS2020\adultlong20.dat' /RECFORM=VARIABLE. SET BLANKS=SYSMIS / UNDEFINED = NOWARN. SET MXWARNS=0. DATA LIST FILE=TEMP FIXED RECORDS=1 TABLE / RECTYPE 1 - 2 SRVY_YR 3 - 6 HHX_2019 7 - 13 (A) HHX_2020 14 - 20 (A) WTSA_L 21 - 28 (F,3) . VARIABLE LABELS RECTYPE "Record type" SRVY_YR "Year of the National Health Interview Survey" HHX_2019 "Randomly assigned household number unique to a household" HHX_2020 "Randomly assigned household number unique to a household" WTSA_L "Longitudinal weight" . VALUE LABELS RECTYPE 10 "10 Sample Adult" 20 "20 Sample Child" 30 "30 Sample Adult Income" 40 "40 Sample Child Income" 50 "50 Paradata" 60 "60 Sample Adult Longitudinal" 70 "70 Sample Adult Partial" . FREQUENCIES GENERAL = RECTYPE. EXECUTE.