set data ../pedigrees
set loc setting qua
set loc effort  qua
set loc change  qua
read pedigree filliben.ped
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
wri
undelete
mix res 1
set ple 1
mix res 2
