set loc setting qua
set loc effort  qua
set loc change  qua
read pedigree inline
# country           setting effort change
1  Bolivia      x x x 46 0  1  
2  Brazil       x x x 74 0  10 
3  Chile        x x x 89 16 29 
4  Colombia     x x x 77 16 25 
5  CostaRica    x x x 84 21 29 
6  Cuba         x x x 89 15 40 
7  DominicanRep x x x 68 14 21 
8  Ecuador      x x x 70 6  0  
9  ElSalvador   x x x 60 13 13 
10 Guatemala    x x x 55 9  4  
11 Haiti        x x x 35 3  0  
12 Honduras     x x x 51 7  7  
13 Jamaica      x x x 87 23 21 
14 Mexico       x x x 83 4  9  
15 Nicaragua    x x x 68 0  7  
16 Panama       x x x 84 19 22 
17 Paraguay     x x x 74 3  6  
18 Peru         x x x 73 0  2  
19 TrinidadTob  x x x 84 15 29 
20 Venezuela    x x x 91 7  11 
run
set loc eff2 qua
set loc eff3 qua
eff2=0
eff3=0
if effort ge 5 and effort le 14 then eff2=1
if effort ge 15 then eff3=1
regress change on setting eff2 eff3
set loc pred qua
set loc res qua
pred=0.1692677*setting+4.1439148*eff2+19.4476086*eff3-5.9540356
res=change-pred
keep res
write
undrop
mix res 1
set ple 1
mix res 2
