Matching Cohabitating Partners to Their Characteristics in the NLSY97
1st partner's age (Step 5)
blank=.;
array pid (10,4)
partners_id_1_97 partners_id_2_97 blank blank
partners_id_1_98 partners_id_2_98 partners_id_3_98 blank
partners_id_1_99 partners_id_2_99 blank blank
partners_id_1_00 partners_id_2_00 partners_id_3_00 partners_id_4_00
partners_id_1_01 partners_id_2_01 partners_id_3_01 partners_id_4_01
partners_id_1_02 partners_id_2_02 partners_id_3_02 blank
partners_id_1_03 partners_id_2_03 partners_id_3_03 blank
partners_id_1_04 partners_id_2_04 partners_id_3_04 blank
partners_id_1_05 partners_id_2_05 partners_id_3_05 partners_id_4_05
partners_id_1_06 partners_id_2_06 partners_id_3_06 blank;
array puid (10,4)
partners_uid_1_97 partners_uid_2_97 blank blank
partners_uid_1_98 partners_uid_2_98 partners_uid_3_98 blank
partners_uid_1_99 partners_uid_2_99 blank blank
partners_uid_1_00 partners_uid_2_00 partners_uid_3_00 partners_uid_4_00
partners_uid_1_01 partners_uid_2_01 partners_uid_3_01 partners_uid_4_01
partners_uid_1_02 partners_uid_2_02 partners_uid_3_02 blank
partners_uid_1_03 partners_uid_2_03 partners_uid_3_03 blank
partners_uid_1_04 partners_uid_2_04 partners_uid_3_04 blank
partners_uid_1_05 partners_uid_2_05 partners_uid_3_05 partners_uid_4_05
partners_uid_1_06 partners_uid_2_06 partners_uid_3_06 blank;
array page (10,4)
YMAR3200_01_97 YMAR3200_02_97 blank blank
YMAR3200_01_98 YMAR3200_02_98 YMAR3200_03_98 blank
YMAR3200_01_99 YMAR3200_02_99 blank blank
YMAR3200_01_00 YMAR3200_02_00 YMAR3200_03_00 YMAR3200_04_00
YMAR3200_01_01 YMAR3200_02_01 YMAR3200_03_01 YMAR3200_04_01
YMAR3200_01_02 YMAR3200_02_02 YMAR3200_03_02 blank
YMAR3200_01_03 YMAR3200_02_03 YMAR3200_03_03 blank
YMAR3200_01_04 YMAR3200_02_04 YMAR3200_03_04 blank
YMAR3200_01_05 YMAR3200_02_05 YMAR3200_03_05 YMAR3200_04_05
YMAR3200_01_06 YMAR3200_02_06 YMAR3200_03_06 blank;
** for partners no longer in hh, link to characteristics **;
**link to uid **;
do k=1 to 10;
if round eq k then do;
do l=1 to 4;
if pid(k,l) eq firstpid then do;
partuid=puid(k,l); partage=page(k,l);
end;
end;
end;
end;