V149 is constructed using the education levels and grades found in v106 and v107, using the following function:
function AttnEduc( edlevel, edgrade )
numeric z;
box edlevel : edgrade => z;
notappl : => notappl;
missing : => missing;
8 : => 8;
0 : => 0; { Preschool and no education counted as 0 years }
1 : 6 => 2; { !! 6 = years of primary school !! }
1 : => 1;
2 : 6 => 4; { !! 6 = years of secondary school !! }
2 : => 3;
3 : => 5;
endbox;
AttnEduc = z;
end;
V149 = AttnEduc( V106, V107 );
The 6 years of primary and 6 years of secondary above are examples and are replaced by the highest grade for primary and the highest grade for secondary. These are typically based on the ISCED classification, but sometimes are adapted, especially when an education system has changed in a substantive way.