Merging a Person. Level File to the Hospital Inpatient Stays File 1. Create data set PERS by sorting the MEPS 1997 Full Year Population Characteristics File, by the person identifier, DUPERSID. Keep only variables to be merged on to the hospital inpatient stays file and DUPERSID. 2. Create data set STAZ by sorting the hospital inpatient stays file by person identifier, DUPERSID. 3. Create final data set NEWSTAZ by merging these two files by DUPERSID, keeping only records on the hospital inpatient stays file. The following is an example of SAS code which completes these steps: PROC SORT DATA=HCXXX(KEEP=DUPERSID AGE SEX EDUC) OUT=PERSX; BY DUPERSID; RUN; PROC SORT DATA=STAYS; BY DUPERSID; RUN; DATA NEWSTAYS; MERGE STAYS (IN=A) PERSX(IN=B); BY DUPERSID; IF A; RUN;
Appears in 1 contract
Sources: Data Use Agreement
Merging a Person. Level File to the Hospital Inpatient Stays File
1. Create data set PERS by sorting the MEPS 1997 1998 Full Year Population Characteristics File, by the person identifier, DUPERSID. Keep only variables to be merged on to the hospital inpatient stays file and DUPERSID.
2. Create data set STAZ by sorting the hospital inpatient stays file by person identifier, DUPERSID.
3. Create final data set NEWSTAZ by merging these two files by DUPERSID, keeping only records on the hospital inpatient stays file. The following is an example of SAS code which completes these steps: PROC SORT DATA=HCXXX(KEEP=DUPERSID AGE SEX EDUC) OUT=PERSX; BY DUPERSID; RUN; PROC SORT DATA=STAYS; BY DUPERSID; RUN; DATA NEWSTAYS; MERGE STAYS (IN=A) PERSX(IN=B); BY DUPERSID; IF A; RUN;
Appears in 1 contract
Sources: Data Use Agreement
Merging a Person. Level File to the Hospital Inpatient Stays File
1. Create data set PERS by sorting the MEPS 1997 1999 Full Year Population Characteristics File, by the person identifier, DUPERSID. Keep only variables to be merged on to the hospital inpatient stays file and DUPERSID.
2. Create data set STAZ by sorting the hospital inpatient stays file by person identifier, DUPERSID.
3. Create final data set NEWSTAZ by merging these two files by DUPERSID, keeping only records on the hospital inpatient stays file. The following is an example of SAS code which completes these steps: PROC SORT DATA=HCXXX(KEEP=DUPERSID AGE SEX EDUC) OUT=PERSX; BY DUPERSID; RUN; PROC SORT DATA=STAYS; BY DUPERSID; RUN; DATA NEWSTAYS; MERGE STAYS (IN=A) PERSX(IN=B); BY DUPERSID; IF A; RUN;
Appears in 1 contract
Sources: Data Use Agreement