SDQ: Generating scores in SAS

The scoring algorithm is based on the 25 variables plus impact items for each questionnaire. The algorithm expects to find these variables with specific names: the first letter of each variable name is 'p' for the parent SDQ, 's' for the self-report SDQ and 't' for the teacher SDQ. After this first letter, the variable names are as follows:

consid =Item 1 : considerate
restles =Item 2 : restless
somatic =Item 3 : somatic symptoms
shares =Item 4 : shares readily
tantrum =Item 5 : tempers
loner =Item 6 : solitary
obeys =Item 7 : obedient
worries =Item 8 : worries
caring =Item 9 : helpful if someone hurt
fidgety =Item 10 : fidgety
friend =Item 11 : has good friend
fights =Item 12 : fights or bullies
unhappy =Item 13 : unhappy
popular =Item 14 : generally liked
distrac =Item 15 : easily distracted
clingy =Item 16 : nervous in new situations
kind =Item 17 : kind to younger children
lies =Item 18 : lies or cheats [for the SDQ for 2-4 year olds, replace 'lies' with 'argues']
bullied =Item 19 : picked on or bullied
helpout =Item 20 : often volunteers
reflect =Item 21 : thinks before acting
steals =Item 22 : steals [for the SDQ for 2-4 year olds, replace 'steals' with 'spite']
oldbest =Item 23 : better with adults than with children
afraid =Item 24 : many fears
attends =Item 25 : good attention
ebddiff =Impact question: oveall difficulties in at least one area
distres =Impact question: upset or distressed
imphome =Impact question: interferes with home life
impfrie =Impact question: interferes with friendships
impclas =Impact question: interferes with learning
impleis =Impact question: interferes with leisure

For each of these items, if the first response category (not true, no, not at all) has been selected, this is coded as zero, the next response category (somewhat true, yes-minor, just a little) is coded as one and so on.

For each informant, the algorithm generates six scores. The first letter of each derived variable is 'p' for parent-based scores, 's' for self-report-based scores and 't' for teacher-based scores. After this first letter, the names of the scores are as follows:

emotion =emotional symptoms
conduct =conduct problems
hyper =hyperactivity/inattention
peer =peer problems
prosoc =prosocial
ebdtot =total difficulties
impact =impact

if pconsid ge 0 then ppr1=1;
else ppr1=0;
if pshares ge 0 then ppr2=1;
else ppr2=0;
if pcaring ge 0 then ppr3=1;
else ppr3=0;
if pkind ge 0 then ppr4=1;
else ppr4=0;
if phelpout ge 0 then ppr5=1;
else ppr5=0;
pprotot=sum(pconsid,pshares,pcaring,pkind,phelpout);
pprono=ppr1+ppr2+ppr3+ppr4+ppr5;
pprosoc=round(pprotot*5/pprono,1);
if pprono lt 3 then pprosoc=.;
if ploner ge 0 then ppeer1=1;
else ppeer1=0;
if pfriend ge 0 then ppeer2=1;
else ppeer2=0;
if ppopular ge 0 then ppeer3=1;
else ppeer3=0;
if pbullied ge 0 then ppeer4=1;
else ppeer4=0;
if poldbest ge 0 then ppeer5=1;
else ppeer5=0;
pfrienx=2-pfriend;
ppopulax=2-ppopular;
ppeertot=sum(ploner,pfrienx,ppopulax,pbullied,poldbest);
ppeerno=ppeer1+ppeer2+ppeer3+ppeer4+ppeer5;
ppeer=round(ppeertot*5/ppeerno,1);
if ppeerno lt 3 then ppeer=.;
if prestles ge 0 then pha1=1;
else pha1=0;
if pfidgety ge 0 then pha2=1;
else pha2=0;
if pdistrac ge 0 then pha3=1;
else pha3=0;
if preflect ge 0 then pha4=1;
else pha4=0;
if pattends ge 0 then pha5=1;
else pha5=0;
preflecx=2-preflect;
pattendx=2-pattends;
phatot=sum(prestles,pfidgety,pdistrac,preflecx,pattendx);
phano=pha1+pha2+pha3+pha4+pha5;
phyper=round(phatot*5/phano,1);
if phano lt 3 then phyper=.;
if psomatic ge 0 then pem1=1;
else pem1=0;
if pworries ge 0 then pem2=1;
else pem2=0;
if punhappy ge 0 then pem3=1;
else pem3=0;
if pclingy ge 0 then pem4=1;
else pem4=0;
if pafraid ge 0 then pem5=1;
else pem5=0;
pemtot=sum(psomatic,pworries,punhappy,pclingy,pafraid);
pemno=pem1+pem2+pem3+pem4+pem5;
pemotion=round(pemtot*5/pemno,1);
if pemno lt 3 then pemotion=.;
if ptantrum ge 0 then pco1=1;
else pco1=0;
if pobeys ge 0 then pco2=1;
else pco2=0;
if pfights ge 0 then pco3=1;
else pco3=0;
if plies ge 0 then pco4=1;
else pco4=0;
if psteals ge 0 then pco5=1;
else pco5=0;
pobeyx=2-pobeys;
pcotot=sum(ptantrum,pobeyx,pfights,plies,psteals);
pcono=pco1+pco2+pco3+pco4+pco5;
pconduct=round(pcotot*5/pcono,1);
if pcono lt 3 then pconduct=.;
pebdtot=pemotion+pconduct+phyper+ppeer;
pdistrez=pdistres-1 ;
if pdistres=0 then pdistrez=0;
pimphomz=pimphome-1 ;
if pimphome=0 then pimphomz=0;
pimpfriz=pimpfrie-1 ;
if pimpfrie=0 then pimpfriz=0;
pimpclaz=pimpclas-1 ;
if pimpclas=0 then pimpclaz=0;
pimpleiz=pimpleis-1 ;
if pimpleis=0 then pimpleiz=0;
pimpact=sum(pdistrez,pimphomz,pimpfriz,pimpclaz,pimpleiz);
if pimpact lt 0 and pebddiff=0 then pimpact=0;
drop ppr1 ppr2 ppr3 ppr4 ppr5 pprotot pprono
ppeer1 ppeer2 ppeer3 ppeer4 ppeer5 pfrienx ppopulax ppeertot ppeerno
pha1 pha2 pha3 pha4 pha5 preflecx pattendx phatot phano
pem1 pem2 pem3 pem4 pem5 pemtot pemno
pco1 pco2 pco3 pco4 pco5 sobeyx pcotot pcono;

if sconsid ge 0 then spr1=1;
else spr1=0;
if sshares ge 0 then spr2=1;
else spr2=0;
if scaring ge 0 then spr3=1;
else spr3=0;
if skind ge 0 then spr4=1;
else spr4=0;
if shelpout ge 0 then spr5=1;
else spr5=0;
sprotot=sum(sconsid,sshares,scaring,skind,shelpout);
sprono=spr1+spr2+spr3+spr4+spr5;
sprosoc=round(sprotot*5/sprono,1);
if sprono lt 3 then sprosoc=.;
if sloner ge 0 then speer1=1;
else speer1=0;
if sfriend ge 0 then speer2=1;
else speer2=0;
if spopular ge 0 then speer3=1;
else speer3=0;
if sbullied ge 0 then speer4=1;
else speer4=0;
if soldbest ge 0 then speer5=1;
else speer5=0;
sfrienx=2-sfriend;
spopulax=2-spopular;
speertot=sum(sloner,sfrienx,spopulax,sbullied,soldbest);
speerno=speer1+speer2+speer3+speer4+speer5;
speer=round(speertot*5/speerno,1);
if speerno lt 3 then speer=.;
if srestles ge 0 then sha1=1;
else sha1=0;
if sfidgety ge 0 then sha2=1;
else sha2=0;
if sdistrac ge 0 then sha3=1;
else sha3=0;
if sreflect ge 0 then sha4=1;
else sha4=0;
if sattends ge 0 then sha5=1;
else sha5=0;
sreflecx=2-sreflect;
sattendx=2-sattends;
shatot=sum(srestles,sfidgety,sdistrac,sreflecx,sattendx);
shano=sha1+sha2+sha3+sha4+sha5;
shyper=round(shatot*5/shano,1);
if shano lt 3 then shyper=.;
if ssomatic ge 0 then sem1=1;
else sem1=0;
if sworries ge 0 then sem2=1;
else sem2=0;
if sunhappy ge 0 then sem3=1;
else sem3=0;
if sclingy ge 0 then sem4=1;
else sem4=0;
if safraid ge 0 then sem5=1;
else sem5=0;
semtot=sum(ssomatic,sworries,sunhappy,sclingy,safraid);
semno=sem1+sem2+sem3+sem4+sem5;
semotion=round(semtot*5/semno,1);
if semno lt 3 then semotion=.;
if stantrum ge 0 then sco1=1;
else sco1=0;
if sobeys ge 0 then sco2=1;
else sco2=0;
if sfights ge 0 then sco3=1;
else sco3=0;
if slies ge 0 then sco4=1;
else sco4=0;
if ssteals ge 0 then sco5=1;
else sco5=0;
sobeyx=2-sobeys;
scotot=sum(stantrum,sobeyx,sfights,slies,ssteals);
scono=sco1+sco2+sco3+sco4+sco5;
sconduct=round(scotot*5/scono,1);
if scono lt 3 then sconduct=.;
sebdtot=semotion+sconduct+shyper+speer;
sdistrez=sdistres-1 ;
if sdistres=0 then sdistrez=0;
simphomz=simphome-1 ;
if simphome=0 then simphomz=0;
simpfriz=simpfrie-1 ;
if simpfrie=0 then simpfriz=0;
simpclaz=simpclas-1 ;
if simpclas=0 then simpclaz=0;
simpleiz=simpleis-1 ;
if simpleis=0 then simpleiz=0;
simpact=sum(sdistrez,simphomz,simpfriz,simpclaz,simpleiz);
if simpact lt 0 and sebddiff=0 then simpact=0;
drop spr1 spr2 spr3 spr4 spr5 sprotot sprono
speer1 speer2 speer3 speer4 speer5 sfrienx spopulax speertot speerno
sha1 sha2 sha3 sha4 sha5 sreflecx sattendx shatot shano
sem1 sem2 sem3 sem4 sem5 semtot semno
sco1 sco2 sco3 sco4 sco5 sobeyx scotot scono;

if tconsid ge 0 then tpr1=1;
else tpr1=0;
if tshares ge 0 then tpr2=1;
else tpr2=0;
if tcaring ge 0 then tpr3=1;
else tpr3=0;
if tkind ge 0 then tpr4=1;
else tpr4=0;
if thelpout ge 0 then tpr5=1;
else tpr5=0;
tprotot=sum(tconsid,tshares,tcaring,tkind,thelpout);
tprono=tpr1+tpr2+tpr3+tpr4+tpr5;
tprosoc=round(tprotot*5/tprono,1);
if tprono lt 3 then tprosoc=.;
if tloner ge 0 then tpeer1=1;
else tpeer1=0;
if tfriend ge 0 then tpeer2=1;
else tpeer2=0;
if tpopular ge 0 then tpeer3=1;
else tpeer3=0;
if tbullied ge 0 then tpeer4=1;
else tpeer4=0;
if toldbest ge 0 then tpeer5=1;
else tpeer5=0;
tfrienx=2-tfriend;
tpopulax=2-tpopular;
tpeertot=sum(tloner,tfrienx,tpopulax,tbullied,toldbest);
tpeerno=tpeer1+tpeer2+tpeer3+tpeer4+tpeer5;
tpeer=round(tpeertot*5/tpeerno,1);
if tpeerno lt 3 then tpeer=.;
if trestles ge 0 then tha1=1;
else tha1=0;
if tfidgety ge 0 then tha2=1;
else tha2=0;
if tdistrac ge 0 then tha3=1;
else tha3=0;
if treflect ge 0 then tha4=1;
else tha4=0;
if tattends ge 0 then tha5=1;
else tha5=0;
treflecx=2-treflect;
tattendx=2-tattends;
thatot=sum(trestles,tfidgety,tdistrac,treflecx,tattendx);
thano=tha1+tha2+tha3+tha4+tha5;
thyper=round(thatot*5/thano,1);
if thano lt 3 then thyper=.;
if tsomatic ge 0 then tem1=1;
else tem1=0;
if tworries ge 0 then tem2=1;
else tem2=0;
if tunhappy ge 0 then tem3=1;
else tem3=0;
if tclingy ge 0 then tem4=1;
else tem4=0;
if tafraid ge 0 then tem5=1;
else tem5=0;
temtot=sum(tsomatic,tworries,tunhappy,tclingy,tafraid);
temno=tem1+tem2+tem3+tem4+tem5;
temotion=round(temtot*5/temno,1);
if temno lt 3 then temotion=.;
if ttantrum ge 0 then tco1=1;
else tco1=0;
if tobeys ge 0 then tco2=1;
else tco2=0;
if tfights ge 0 then tco3=1;
else tco3=0;
if tlies ge 0 then tco4=1;
else tco4=0;
if tsteals ge 0 then tco5=1;
else tco5=0;
tobeyx=2-tobeys;
tcotot=sum(ttantrum,tobeyx,tfights,tlies,tsteals);
tcono=tco1+tco2+tco3+tco4+tco5;
tconduct=round(tcotot*5/tcono,1);
if tcono lt 3 then tconduct=.;
tebdtot=temotion+tconduct+thyper+tpeer;
tdistrez=tdistres-1 ;
if tdistres=0 then tdistrez=0;
timpfriz=timpfrie-1 ;
if timpfrie=0 then timpfriz=0;
timpclaz=timpclas-1 ;
if timpclas=0 then timpclaz=0;
timpact=sum(tdistrez,timpfriz,timpclaz);
if timpact lt 0 and tebddiff=0 then timpact=0;
drop tpr1 tpr2 tpr3 tpr4 tpr5 tprotot tprono
tpeer1 tpeer2 tpeer3 tpeer4 tpeer5 tfrienx tpopulax tpeertot tpeerno
tha1 tha2 tha3 tha4 tha5 treflecx tattendx thatot thano
tem1 tem2 tem3 tem4 tem5 temtot temno
tco1 tco2 tco3 tco4 tco5 tobeyx tcotot tcono tdistrez timpfriz timpclaz;


Last modified: 26/07/02