Skin color-AFQT and skin color-Grades within- and between-family among US blacks in the NLSY97 (SPSS syntax)

Read related post here.

SET MXCELLS=20000.

COMPUTE Skincolor = SUM(T3173000, T4584700, T6217800).
EXECUTE.
MISSING VALUES Skincolor (0).

SORT CASES BY R1193000 R0000100.
CASESTOVARS
/ID = R1193000
/GROUPBY = VARIABLE.

Compute FS12 =0.
If R1309100.1=13 or R1309100.1=14 FS12=1.
Compute FS13 =0.
If R1309200.1=13 or R1309200.1=14 FS13=1.
Compute FS14 =0.
If R1309300.1=13 or R1309300.1=14 FS14=1.
Compute FS15 =0.
If R1309400.1=13 or R1309400.1=14 FS15=1.
Compute FS23 =0.
If R1309200.2=13 or R1309200.2=14 FS23=1.
Compute FS24 =0.
If R1309300.2=13 or R1309300.2=14 FS24=1.
Compute FS25 =0.
If R1309400.2=13 or R1309400.2=14 FS25=1.
Compute FS34 =0.
If R1309300.3=13 or R1309300.3=14 FS34=1.
Compute FS35 =0.
If R1309400.3=13 or R1309400.3=14 FS35=1.
Compute FS45 =0.
If R1309400.4=13 or R1309400.4=14 FS45=1.

Compute FS =0.
If FS12=1 or FS13=1 or FS14=1 or FS15=1 or FS23=1 or FS24=1 or FS25=1 or FS34=1 or FS35=1 or FS45=1 FS=1.

Count NFSPAIRS = FS12 to FS45 (1).

Compute HS12 =0.
If R1309100.1>14 and R1309100.1<21 HS12=1.
Compute HS13 =0.
If R1309200.1>14 and R1309200.1<21 HS13=1.
Compute HS14 =0.
If R1309300.1>14 and R1309300.1<21 HS14=1.
Compute HS15 =0.
If R1309400.1>14 and R1309400.1<21 HS15=1.
Compute HS23 =0.
If R1309200.2>14 and R1309200.2<21 HS23=1.
Compute HS24 =0.
If R1309300.2>14 and R1309300.2<21 HS24=1.
Compute HS25 =0.
If R1309400.2>14 and R1309400.2<21 HS25=1.
Compute HS34 =0.
If R1309300.3>14 and R1309300.3<21 HS34=1.
Compute HS35 =0.
If R1309400.3>15 and R1309400.3<21 HS35=1.
Compute HS45 =0.
If R1309400.4>14 and R1309400.4<21 HS45=1.

Compute HS =0.
If HS12=1 or HS13=1 or HS14=1 or HS15=1 or HS23=1 or HS24=1 or HS25=1 or HS34=1 or HS35=1 or HS45=1 HS=1.

Count NHSPAIRS = HS12 to HS45 (1).

Compute UR12 =0.
If R1309100.1>21 UR12=1.
Compute UR13 =0.
If R1309200.1>21 UR13=1.
Compute UR14 =0.
If R1309300.1>21 UR14=1.
Compute UR15 =0.
If R1309400.1>21 UR15=1.
Compute UR23 =0.
If R1309200.2>21 UR23=1.
Compute UR24 =0.
If R1309300.2>21 UR24=1.
Compute UR25 =0.
If R1309400.2>21 UR25=1.
Compute UR34 =0.
If R1309300.3>21 UR34=1.
Compute UR35 =0.
If R1309400.3>21 UR35=1.
Compute UR45 =0.
If R1309400.4>21 UR45=1.

Compute UR=0.
If UR12=1 or UR13=1 or UR14=1 or UR15=1 or UR23=1 or UR24=1 or UR25=1 or UR34=1 or UR35=1 or UR45=1 UR=1.

Count NURPAIRS = UR12 to UR45 (1).

Compute ScWFdiff12 =(Skincolor.1-Skincolor.2).
Compute ScBFdiff12 =(Skincolor.1+Skincolor.2)/2.
Compute AfqtWFdiff12 =(R9829600.1-R9829600.2).
Compute AfqtBFdiff12 =(R9829600.1+R9829600.2)/2.
Compute HGEWFdiff12 =(Z9083800.1-Z9083800.2).
Compute HGEBFdiff12 =(Z9083800.1+Z9083800.2)/2.

Compute ScWFdiff13 =(Skincolor.1-Skincolor.3).
Compute ScBFdiff13 =(Skincolor.1+Skincolor.3)/2.
Compute AfqtWFdiff13 =(R9829600.1-R9829600.3).
Compute AfqtBFdiff13 =(R9829600.1+R9829600.3)/2.
Compute HGEWFdiff13 =(Z9083800.1-Z9083800.3).
Compute HGEBFdiff13 =(Z9083800.1+Z9083800.3)/2.

Compute ScWFdiff14 =(Skincolor.1-Skincolor.4).
Compute ScBFdiff14 =(Skincolor.1+Skincolor.4)/2.
Compute AfqtWFdiff14 =(R9829600.1-R9829600.4).
Compute AfqtBFdiff14 =(R9829600.1+R9829600.4)/2.
Compute HGEWFdiff14 =(Z9083800.1-Z9083800.4).
Compute HGEBFdiff14 =(Z9083800.1+Z9083800.4)/2.

Compute ScWFdiff15 =(Skincolor.1-Skincolor.5).
Compute ScBFdiff15 =(Skincolor.1+Skincolor.5)/2.
Compute AfqtWFdiff15 =(R9829600.1-R9829600.5).
Compute AfqtBFdiff15 =(R9829600.1+R9829600.5)/2.
Compute HGEWFdiff15 =(Z9083800.1-Z9083800.5).
Compute HGEBFdiff15 =(Z9083800.1+Z9083800.5)/2.

Compute ScWFdiff23 =(Skincolor.2-Skincolor.3).
Compute ScBFdiff23 =(Skincolor.2+Skincolor.3)/2.
Compute AfqtWFdiff23 =(R9829600.2-R9829600.3).
Compute AfqtBFdiff23 =(R9829600.2+R9829600.3)/2.
Compute HGEWFdiff23 =(Z9083800.2-Z9083800.3).
Compute HGEBFdiff23 =(Z9083800.2+Z9083800.3)/2.

Compute ScWFdiff24 =(Skincolor.2-Skincolor.4).
Compute ScBFdiff24 =(Skincolor.2+Skincolor.4)/2.
Compute AfqtWFdiff24 =(R9829600.2-R9829600.4).
Compute AfqtBFdiff24 =(R9829600.2+R9829600.4)/2.
Compute HGEWFdiff24 =(Z9083800.2-Z9083800.4).
Compute HGEBFdiff24 =(Z9083800.2+Z9083800.4)/2.

Compute ScWFdiff25 =(Skincolor.2-Skincolor.5).
Compute ScBFdiff25 =(Skincolor.2+Skincolor.5)/2.
Compute AfqtWFdiff25 =(R9829600.2-R9829600.5).
Compute AfqtBFdiff25 =(R9829600.2+R9829600.5)/2.
Compute HGEWFdiff25 =(Z9083800.2-Z9083800.5).
Compute HGEBFdiff25 =(Z9083800.2+Z9083800.5)/2.

Compute ScWFdiff34 =(Skincolor.3-Skincolor.4).
Compute ScBFdiff34 =(Skincolor.3+Skincolor.4)/2.
Compute AfqtWFdiff34 =(R9829600.3-R9829600.4).
Compute AfqtBFdiff34 =(R9829600.3+R9829600.4)/2.
Compute HGEWFdiff34 =(Z9083800.3-Z9083800.4).
Compute HGEBFdiff34 =(Z9083800.3+Z9083800.4)/2.

Compute ScWFdiff35 =(Skincolor.3-Skincolor.5).
Compute ScBFdiff35 =(Skincolor.3+Skincolor.5)/2.
Compute AfqtWFdiff35 =(R9829600.3-R9829600.5).
Compute AfqtBFdiff35 =(R9829600.3+R9829600.5)/2.
Compute HGEWFdiff35 =(Z9083800.3-Z9083800.5).
Compute HGEBFdiff35 =(Z9083800.3+Z9083800.5)/2.

Compute ScWFdiff45 =(Skincolor.4-Skincolor.5).
Compute ScBFdiff45 =(Skincolor.4+Skincolor.5)/2.
Compute AfqtWFdiff45 =(R9829600.4-R9829600.5).
Compute AfqtBFdiff45 =(R9829600.4+R9829600.5)/2.
Compute HGEWFdiff45 =(Z9083800.4-Z9083800.5).
Compute HGEBFdiff45 =(Z9083800.4+Z9083800.5)/2.

Compute FS13NO=0.
IF FS12=0 and FS13=1 FS13NO=1.
Compute FS14NO=0.
IF FS12=0 and FS13=0 and FS14=1 FS14NO=1.
Compute FS15NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=1 FS15NO =1.
Compute FS23NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=1 FS23NO=1.
Compute FS24NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=1 FS24NO=1.
Compute FS25NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=1 FS25NO=1.
Compute FS34NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=1 FS34NO=1.
Compute FS35NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=0 and FS35=1 FS35NO=1.
Compute FS45NO=0.
IF FS12=0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=0 and FS35=0 and FS45=1 FS45NO=1.

Compute FSNO=0.
IF FS12=1 or FS13NO=1 or FS14NO=1 or FS15NO=1 or FS23NO=1 or FS24NO=1 or FS25NO=1 or FS34NO=1 or FS35NO=1 or FS45NO=1 FSNO=1.
MISSING VALUES FSNO (0).

Compute HS13NO =0.
IF HS12=0 and HS13=1 HS13NO=1.
Compute HS14NO =0.
IF HS12=0 and HS13=0 and HS14=1 HS14NO=1.
Compute HS15NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=1 HS15NO=1.
Compute HS23NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=1 HS23NO=1.
Compute HS24NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=1 HS24NO=1.
Compute HS25NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=1 HS25NO=1.
Compute HS34NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=1 HS34NO=1.
Compute HS35NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=0 and HS35=1 HS35NO=1.
Compute HS45NO =0.
IF HS12=0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=0 and HS35=0 and HS45=1 HS45NO=1.

Compute HSNO=0.
If HS12=1 or HS13NO=1 or HS14NO=1 or HS15NO=1 or HS23NO=1 or HS24NO=1 or HS25NO=1 or HS34NO=1 or HS35NO=1 or HS45NO=1 HSNO=1.
MISSING VALUES HSNO (0).

Compute UR13NO =0.
IF UR12 =0 and UR13=1 UR13NO=1.
Compute UR14NO =0.
IF UR12 =0 and UR13=0 and UR14=1 UR14NO=1.
Compute UR15NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =1 UR15NO=1.
Compute UR23NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=1 UR23NO=1.
Compute UR24NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=0 and UR24=1 UR24NO=1.
Compute UR25NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=0 and UR24=0 and UR25=1 UR25NO=1.
Compute UR34NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=0 and UR24=0 and UR25=0 and UR34=1 UR34NO=1.
Compute UR35NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=0 and UR24=0 and UR25=0 and UR34=0 and UR35=1 UR35NO=1.
Compute UR45NO =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15 =0 and UR23=0 and UR24=0 and UR25=0 and UR34=0 and UR35=0 and UR45=1 UR45NO=1.

Compute URNO=0.
IF UR12=1 or UR13NO=1 or UR14NO=1 or UR15NO=1 or UR23NO=1 or UR24NO=1 or UR25NO=1 or UR34NO=1 or UR35NO=1 or UR45NO=1 URNO=1.
MISSING VALUES URNO (0).

Do if (FS12 eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff12).
End if.
Do if (FS13NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff13).
End if.
Do if (FS14NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff14).
End if.
Do if (FS15NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff15).
End if.
Do if (FS23NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff23).
End if.
Do if (FS24NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff24).
End if.
Do if (FS25NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff25).
End if.
Do if (FS34NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff34).
End if.
Do if (FS35NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff35).
End if.
Do if (FS45NO eq 1).
Compute HGEWFdiffFSNO= (HGEWFdiff45).
End if.

Do if (FS12 eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff12).
end if.
Do if (FS13NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff13).
end if.
Do if (FS14NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff14).
end if.
Do if (FS15NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff15).
end if.
Do if (FS23NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff23).
end if.
Do if (FS24NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff24).
end if.
Do if (FS25NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff25).
end if.
Do if (FS34NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff34).
end if.
Do if (FS35NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff35).
end if.
Do if (FS45NO eq 1).
Compute HGEBFdiffFSNO= (HGEBFdiff45).
end if.

Do if (FS12 eq 1).
Compute ScWFdiffFSNO= (ScWFdiff12).
end if.
Do if (FS13NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff13).
end if.
Do if (FS14NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff14).
end if.
Do if (FS15NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff15).
end if.
Do if (FS23NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff23).
end if.
Do if (FS24NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff24).
end if.
Do if (FS25NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff25).
end if.
Do if (FS34NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff34).
end if.
Do if (FS35NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff35).
end if.
Do if (FS45NO eq 1).
Compute ScWFdiffFSNO= (ScWFdiff45).
end if.

Do if (FS12 eq 1).
Compute ScBFdiffFSNO= (ScBFdiff12).
end if.
Do if (FS13NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff13).
end if.
Do if (FS14NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff14).
end if.
Do if (FS15NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff15).
end if.
Do if (FS23NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff23).
end if.
Do if (FS24NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff24).
end if.
Do if (FS25NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff25).
end if.
Do if (FS34NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff34).
end if.
Do if (FS35NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff35).
end if.
Do if (FS45NO eq 1).
Compute ScBFdiffFSNO= (ScBFdiff45).
end if.

Do if (FS12 eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff12).
end if.
Do if (FS13NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff13).
end if.
Do if (FS14NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff14).
end if.
Do if (FS15NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff15).
end if.
Do if (FS23NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff23).
end if.
Do if (FS24NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff24).
end if.
Do if (FS25NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff25).
end if.
Do if (FS34NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff34).
end if.
Do if (FS35NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff35).
end if.
Do if (FS45NO eq 1).
Compute AfqtWFdiffFSNO= (AfqtWFdiff45).
end if.

Do if (FS12 eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff12).
end if.
Do if (FS13NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff13).
end if.
Do if (FS14NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff14).
end if.
Do if (FS15NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff15).
end if.
Do if (FS23NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff23).
end if.
Do if (FS24NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff24).
end if.
Do if (FS25NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff25).
end if.
Do if (FS34NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff34).
end if.
Do if (FS35NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff35).
end if.
Do if (FS45NO eq 1).
Compute AfqtBFdiffFSNO= (AfqtBFdiff45).
end if.

Do if (HS12 eq 1).
Compute ScWFdiffHSNO= (ScWFdiff12).
end if.
Do if (HS13NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff13).
end if.
Do if (HS14NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff14).
end if.
Do if (HS15NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff15).
end if.
Do if (HS23NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff23).
end if.
Do if (HS24NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff24).
end if.
Do if (HS25NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff25).
end if.
Do if (HS34NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff34).
end if.
Do if (HS35NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff35).
end if.
Do if (HS45NO eq 1).
Compute ScWFdiffHSNO= (ScWFdiff45).
end if.

Do if (HS12 eq 1).
Compute ScBFdiffHSNO= (ScBFdiff12).
end if.
Do if (HS13NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff13).
end if.
Do if (HS14NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff14).
end if.
Do if (HS15NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff15).
end if.
Do if (HS23NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff23).
end if.
Do if (HS24NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff24).
end if.
Do if (HS25NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff25).
end if.
Do if (HS34NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff34).
end if.
Do if (HS35NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff35).
end if.
Do if (HS45NO eq 1).
Compute ScBFdiffHSNO= (ScBFdiff45).
end if.

Do if (HS12 eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff12).
end if.
Do if (HS13NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff13).
end if.
Do if (HS14NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff14).
end if.
Do if (HS15NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff15).
end if.
Do if (HS23NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff23).
end if.
Do if (HS24NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff24).
end if.
Do if (HS25NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff25).
end if.
Do if (HS34NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff34).
end if.
Do if (HS35NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff35).
end if.
Do if (HS45NO eq 1).
Compute AfqtWFdiffHSNO= (AfqtWFdiff45).
end if.

Do if (HS12 eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff12).
end if.
Do if (HS13NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff13).
end if.
Do if (HS14NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff14).
end if.
Do if (HS15NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff15).
end if.
Do if (HS23NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff23).
end if.
Do if (HS24NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff24).
end if.
Do if (HS25NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff25).
end if.
Do if (HS34NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff34).
end if.
Do if (HS35NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff35).
end if.
Do if (HS45NO eq 1).
Compute AfqtBFdiffHSNO= (AfqtBFdiff45).
end if.

Do if (HS12 eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff12).
End if.
Do if (HS13NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff13).
End if.
Do if (HS14NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff14).
End if.
Do if (HS15NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff15).
End if.
Do if (HS23NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff23).
End if.
Do if (HS24NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff24).
End if.
Do if (HS25NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff25).
End if.
Do if (HS34NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff34).
End if.
Do if (HS35NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff35).
End if.
Do if (HS45NO eq 1).
Compute HGEWFdiffHSNO= (HGEWFdiff45).
End if.

Do if (HS12 eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff12).
end if.
Do if (HS13NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff13).
end if.
Do if (HS14NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff14).
end if.
Do if (HS15NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff15).
end if.
Do if (HS23NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff23).
end if.
Do if (HS24NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff24).
end if.
Do if (HS25NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff25).
end if.
Do if (HS34NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff34).
end if.
Do if (HS35NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff35).
end if.
Do if (HS45NO eq 1).
Compute HGEBFdiffHSNO= (HGEBFdiff45).
end if.

Do if (UR12 eq 1).
Compute ScWFdiffURNO= (ScWFdiff12).
end if.
Do if (UR13NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff13).
end if.
Do if (UR14NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff14).
end if.
Do if (UR15NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff15).
end if.
Do if (UR23NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff23).
end if.
Do if (UR24NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff24).
end if.
Do if (UR25NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff25).
end if.
Do if (UR34NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff34).
end if.
Do if (UR35NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff35).
end if.
Do if (UR45NO eq 1).
Compute ScWFdiffURNO= (ScWFdiff45).
end if.

Do if (UR12 eq 1).
Compute ScBFdiffURNO= (ScBFdiff12).
end if.
Do if (UR13NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff13).
end if.
Do if (UR14NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff14).
end if.
Do if (UR15NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff15).
end if.
Do if (UR23NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff23).
end if.
Do if (UR24NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff24).
end if.
Do if (UR25NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff25).
end if.
Do if (UR34NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff34).
end if.
Do if (UR35NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff35).
end if.
Do if (UR45NO eq 1).
Compute ScBFdiffURNO= (ScBFdiff45).
end if.

Do if (UR12 eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff12).
end if.
Do if (UR13NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff13).
end if.
Do if (UR14NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff14).
end if.
Do if (UR15NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff15).
end if.
Do if (UR23NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff23).
end if.
Do if (UR24NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff24).
end if.
Do if (UR25NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff25).
end if.
Do if (UR34NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff34).
end if.
Do if (UR35NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff35).
end if.
Do if (UR45NO eq 1).
Compute AfqtWFdiffURNO= (AfqtWFdiff45).
end if.

Do if (UR12 eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff12).
end if.
Do if (UR13NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff13).
end if.
Do if (UR14NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff14).
end if.
Do if (UR15NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff15).
end if.
Do if (UR23NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff23).
end if.
Do if (UR24NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff24).
end if.
Do if (UR25NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff25).
end if.
Do if (UR34NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff34).
end if.
Do if (UR35NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff35).
end if.
Do if (UR45NO eq 1).
Compute AfqtBFdiffURNO= (AfqtBFdiff45).
end if.

Do if (UR12 eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff12).
End if.
Do if (UR13NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff13).
End if.
Do if (UR14NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff14).
End if.
Do if (UR15NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff15).
End if.
Do if (UR23NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff23).
End if.
Do if (UR24NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff24).
End if.
Do if (UR25NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff25).
End if.
Do if (UR34NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff34).
End if.
Do if (UR35NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff35).
End if.
Do if (UR45NO eq 1).
Compute HGEWFdiffURNO= (HGEWFdiff45).
End if.

Do if (UR12 eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff12).
end if.
Do if (UR13NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff13).
end if.
Do if (UR14NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff14).
end if.
Do if (UR15NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff15).
end if.
Do if (UR23NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff23).
end if.
Do if (UR24NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff24).
end if.
Do if (UR25NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff25).
end if.
Do if (UR34NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff34).
end if.
Do if (UR35NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff35).
end if.
Do if (UR45NO eq 1).
Compute HGEBFdiffURNO= (HGEBFdiff45).
end if.

Compute Weight12 =(R1236201.1+R1236201.2)/2.
Compute Weight13 =(R1236201.1+R1236201.3)/2.
Compute Weight14 =(R1236201.1+R1236201.4)/2.
Compute Weight15 =(R1236201.1+R1236201.5)/2.
Compute Weight23 =(R1236201.2+R1236201.3)/2.
Compute Weight24 =(R1236201.2+R1236201.4)/2.
Compute Weight25 =(R1236201.2+R1236201.5)/2.
Compute Weight34 =(R1236201.3+R1236201.4)/2.
Compute Weight35 =(R1236201.3+R1236201.5)/2.
Compute Weight45 =(R1236201.4+R1236201.5)/2.

Compute FS12WEIGHT =0.
IF FS12 =1 FS12WEIGHT=(Weight12).

Compute FS13NOWEIGHT =0.
IF FS12 =0 and FS13=1 FS13NOWEIGHT=(Weight13).

Compute FS14NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=1 FS14NOWEIGHT=(Weight14).

Compute FS15NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=1 FS15NOWEIGHT=(Weight15).

Compute FS23NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=1 FS23NOWEIGHT=(Weight23).

Compute FS24NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=1 FS24NOWEIGHT=(Weight24).

Compute FS25NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=1 FS25NOWEIGHT=(Weight25).

Compute FS34NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=1 FS34NOWEIGHT=(Weight34).

Compute FS35NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=0 and FS35=1 FS35NOWEIGHT=(Weight35).

Compute FS45NOWEIGHT =0.
IF FS12 =0 and FS13=0 and FS14=0 and FS15=0 and FS23=0 and FS24=0 and FS25=0 and FS34=0 and FS35=0 and FS45=1 FS45NOWEIGHT=(Weight45).

Compute FSNOWEIGHT = SUM(FS12WEIGHT, FS13NOWEIGHT, FS14NOWEIGHT, FS15NOWEIGHT, FS23NOWEIGHT, FS24NOWEIGHT, FS25NOWEIGHT, FS34NOWEIGHT, FS35NOWEIGHT, FS45NOWEIGHT).

Compute HS12WEIGHT =0.
IF HS12 =1 HS12WEIGHT=(Weight12).

Compute HS13NOWEIGHT =0.
IF HS12 =0 and HS13=1 HS13NOWEIGHT=(Weight13).

Compute HS14NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=1 HS14NOWEIGHT=(Weight14).

Compute HS15NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=1 HS15NOWEIGHT=(Weight15).

Compute HS23NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=1 HS23NOWEIGHT=(Weight23).

Compute HS24NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=1 HS24NOWEIGHT=(Weight24).

Compute HS25NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=1 HS25NOWEIGHT=(Weight25).

Compute HS34NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=1 HS34NOWEIGHT=(Weight34).

Compute HS35NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=0 and HS35=1 HS35NOWEIGHT=(Weight35).

Compute HS45NOWEIGHT =0.
IF HS12 =0 and HS13=0 and HS14=0 and HS15=0 and HS23=0 and HS24=0 and HS25=0 and HS34=0 and HS35=0 and HS45=1 HS45NOWEIGHT=(Weight45).

Compute HSNOWEIGHT = SUM(HS12WEIGHT, HS13NOWEIGHT, HS14NOWEIGHT, HS15NOWEIGHT, HS23NOWEIGHT, HS24NOWEIGHT, HS25NOWEIGHT, HS34NOWEIGHT, HS35NOWEIGHT, HS45NOWEIGHT).

Compute UR12WEIGHT =0.
IF UR12 =1 UR12WEIGHT=(Weight12).

Compute UR13NOWEIGHT =0.
IF UR12 =0 and UR13=1 UR13NOWEIGHT=(Weight13).

Compute UR14NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=1 UR14NOWEIGHT=(Weight14).

Compute UR15NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=1 UR15NOWEIGHT=(Weight15).

Compute UR23NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=1 UR23NOWEIGHT=(Weight23).

Compute UR24NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=0 and UR24=1 UR24NOWEIGHT=(Weight24).

Compute UR25NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=0 and UR24=0 and UR25=1 UR25NOWEIGHT=(Weight25).

Compute UR34NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=0 and UR24=0 and UR25=0 and UR34=1 UR34NOWEIGHT=(Weight34).

Compute UR35NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=0 and UR24=0 and UR25=0 and UR34=0 and UR35=1 UR35NOWEIGHT=(Weight35).

Compute UR45NOWEIGHT =0.
IF UR12 =0 and UR13=0 and UR14=0 and UR15=0 and UR23=0 and UR24=0 and UR25=0 and UR34=0 and UR35=0 and UR45=1 UR45NOWEIGHT=(Weight45).

Compute URNOWEIGHT = SUM(UR12WEIGHT, UR13NOWEIGHT, UR14NOWEIGHT, UR15NOWEIGHT, UR23NOWEIGHT, UR24NOWEIGHT, UR25NOWEIGHT, UR34NOWEIGHT, UR35NOWEIGHT, UR45NOWEIGHT).

This entry was posted in Stats, Softwares, Syntax and tagged . Bookmark the permalink.