DISC4.0 Algorithms - Module B - Youth Eating Disorders
Diagnostic criteria for 307.1 Anorexia Nervosa
- Refusal to maintain body weight at or above a minimally normal weight for age and height (e.g., weight loss leading to maintenance of body weight less than 85% of that expected, or failure to make expected weight gain during period of growth, leading to body weight less than 85% of that expected).
- Intense fear of gaining weight or becoming fat, even though underweight.
- Disturbance in the way in which ones body weight or shape is experienced, undue influence of body weight or shape on self-evaluation, or denial of the seriousness of the current low body weight.
- In postmenarcheal females, amenorrhea, i.e., the absence of at least three consecutive menstrual cycles. (A woman is considered to have amenorrhea if her periods occur only following hormone, e.g., estrogen, administration.)
Specify type:
Restricting Type: during the current episode of Anorexia Nervosa, the person has not regularly engaged in binge-eating or purging behavior (i.e., self-induced vomiting or the misuse of laxatives, diuretics, or
enemas)
Binge-Eating/Purging Type: during the current episode of Anorexia Nervosa, the person has regularly engaged in binge-eating or purging behavior (i.e., self-induced vomiting or the misuse of laxatives, diuretics, or enemas)
Diagnostic criteria for 307.51 Bulimia Nervosa
- A. Recurrent episodes of binge eating. An episode of binge eating is characterized by both of the following:
- eating, in a discrete period of time (e.g., within any 2-hour period), an amount of food that is definitely larger than most people would eat during a similar period of time and under similar circumstances
- a sense of lack of control over eating during the episode (e.g., a feeling that one cannot stop eating or control what or how much one is eating)
- Recurrent inappropriate compensatory behavior in order to prevent weight gain, such as self-induced vomiting, misuse of laxatives, diuretics, enemas, or other medications, fasting, or excessive exercise.
- The binge eating and inappropriate compensatory behaviors both occur, on average, at least twice a week for 3 months.
- Self-evaluation is unduly influenced by body shape and weight.
- The disturbance does not occur exclusively during episodes of Anorexia Nervosa.
Specify type:
Purging Type: during the current episode of Bulimia Nervosa, the person has regularly engaged in self-induced vomiting or the misuse of laxatives, diuretics, or enemas
Nonpurging Type: during the current episode of Bulimia Nervosa, the person has used other inappropriate compensatory behaviors, such as fasting or excessive exercise, but has not regularly engaged in self-induced vomiting or the misuse of laxatives, diuretics, or enemas
DISC4.0 Algorithms - Module B - Youth Eating Disorders -Data Definition
libname sds "&path";
filename discy "&filein";
data sds.yea0 (drop = card testid);
infile discy end = last pad;
input id $ 1-10 card $ 11-14;
testid = id;
%huid;
do until (testid ne id);
select (card);
when ('B101') do;
input id $ 1-10
yean01 16
yea001f 17
yea001i 18-19
yea001fi 17-19
yea001z 20-22
yean02 23
yea002l 24-26
yea002k 27-28
yea003l 29-31
yea003k 32-33
yean03 34
yea004 35
yea004a 36
yean04 37
yea005 38
yea005a 39
yea005b 40
yea005c 41
yea005d 42
yea006 43
yea006a 44
yea007 45
yea007a 46
yea008 47
yea009 48
yea010 49
yea010a 50
yea010b 51
yea010c 52
yea011 53
yea011a 54
yea011b 55
yea012 56
yea012a 57
yea012b 58
yea012c 59
yea012d 60
yea012e 61
yea012f 62
yea013 63
yea013a 64
yea013b 65
yea013c 66
yea014 67
yea014a 68
yea014b 69
yea014c 70
yea014d 71
yea014e 72;
end;
when ('B102') do;
input id $ 1-10
yea015 16
yea015a 17-18
yea015b 19
yea015c 20
yea015d 21
yea015e 22
yea016 23
yea016a 24-25
yea016b 26
yea016c 27
yea016d 28
yea016e 29
yea016f 30
yea016g 31
yea017 32
yea017a 33
yea017b 34
yea017c 35
yea017d 36
yea017e 37
yea018 38
yea018a 39
yea018b 40
yea018c 41
yea018d 42
yea018e 43
yean05 44
yea019 45
yea020 46
yea020a 47
yea020b 48
yea020c 49
yea020d 50
yea020e 51
yea020f 52
yea020g 53
yea020h 54
yea020i 55
yea021y 56-57
yea021z 58-59
yea021a 60
yea021b 61
yea021c 62
yea021dy 63-64
yea021dz 65-66
yea021e 67;
end;
when ('B103') do;
input id $ 1-10
yea022y 16-17
yea022z 18-19
yea022a 20
yea022b 21
yea022c 22
yea022dy 23-24
yea022dz 25-26
yea022e 27
yea023 28
yea023a 29
yea024 30
yea024a 31
yea025 32
yea025a 33
yea026 34
yea026a 35
yea027 36
yea027a 37
yea028 38
yea028a 39
yea029 40
yea029a 41
yea030 42-43
yea030a 44-45
yea031 46
yea031ay 47-48
yea031az 49-50;
end; /* end WHEN */
otherwise input;
end; /* end SELECT */
testid = id;
if (last) then id = ' ';
else input id $ 1-10 card $ 11-14 @@;
end; /* end DO UNTIL */
id = testid;
LABEL
YEA001f = 'Height - feet'
YEA001i = 'Height - inches'
YEA002l = 'Current weight - lbs'
YEA002k = 'Current weight - kilometers'
YEA003l = 'Lowest weight in last year - lbs'
YEA003k = 'Lowest weight in last year - kilometers'
YEA004 = 'Others worried that person is too thin in last year'
YEA005 = 'Worried they looked fat while others were worrying they were too thin'
YEA006 = 'Said they were fat at the time when they weighed the least'
YEA007 = 'Currently say they are overweight'
YEA008 = 'Said that low weight caused any health problems when weighed the least'
YEA009 = 'Says that current weight could cause health problems'
YEA010 = 'Often felt bad about self, felt fat/overweight'
YEA011 = 'Thought about eating food/all the time for periods in the past year'
YEA012 = 'Eating binge in the last year'
YEA013 = 'Often refused to eat fattening foods in the past year'
YEA014 = 'Thrown up on purpose in past year'
YEA015 = 'Taken pills/medicines to keep from gaining weight or to lose weight in past year'
YEA016 = 'Done things so that they would have to use the toilet a lot in past year'
YEA017A = 'time in past year when there has been no eating for a full 24 hours'
YEA018 = 'Spent a lot of time exercising in the past year to lose weight or keep from gaining it'
YEA019 = 'Done things like responses from 14-18 for 3 months in past year'
YEA020 = 'Has started to menstruate'
YEA021y = 'Age when people started worrying he/she was too thin'
YEA021z = 'Grade when people started worrying he/she was too thin'
YEA022y = 'Age when first started actively trying to lose weight'
YEA022z = 'Grade when first started actively trying to lose weight'
YEA023 = 'Caretakers became upset/annoyed by efforts to lose/keep from gaining weight'
YEA024 = 'Efforts to not gain/lose weight prevented doing things with family'
YEA025 = ' '
YEA026 = 'Efforts to not gain/lose weight caused problems with schoolwork/grades'
YEA027 = 'Efforts to not gain/lose weight caused teachers/boss to become upset/annoyed'
YEA028 = 'Felt bad/upset about efforts to not gain/lose weight when problems were at their worst'
YEA029 = 'Been to get help in last year at a hospital/clinic/at work'
YEA030 = 'Name and information of person seen for help (OPTIONAL)'
YEA031 = 'Since age 5 ever been more concerned with losing/not gaining weight than now';
run;
DISC4.0 Algorithms - Module B - Youth Eating Disorders - Data Recoding
Data Recoding
88, 8 -> 0
99, 9, 77, 7 -> missing
data sds.yea1;
set sds.yea0;
array yeavar(*)
yean03
yea004 yea004a
yea005 yea005a yea005b yea005c yea005d
yea006 yea006a
yea007 yea007a
yea008
yea009
yea010 yea010a yea010b yea010c
yea011 yea011a yea011b
yea012 yea012a yea012b yea012c yea012d yea012e yea012f
yea013 yea013a yea013b yea013c
yea014 yea014a yea014b yea014c yea014d yea014e
yea015 yea015b yea015c yea015d yea015e
yea016 yea016b yea016c yea016d yea016e yea016f yea016g
yea017 yea017a yea017b yea017c yea017d yea017e
yea018 yea018a yea018b yea018c yea018d yea018e
yea019
yea020 yea020a yea020b yea020c yea020d yea020e yea020f yea020g
yea020h yea020i
yea021a yea021b yea021c yea021e
yea022a yea022b yea022c yea022e
yea029 yea029a
yea031 yea023 yea024 yea025 yea026 yea027 yea028;
do i = 1 to dim(yeavar);
if (yeavar(i) = 7 or yeavar(i) = 9) then yeavar(i) = .;
end;
array double(*)
/* yea002k
yea003k */
yea015a
yea016a
yea021y yea021z yea021dy yea021dz
yea022y yea022z yea022dy yea022dz
yea031ay yea031az;
do i = 1 to dim(double);
if (double(i) = 88) then double(i) = 0;
if (double(i) = 99 or double(i) = 77) then double(i) = .;
end;
array eight(*)
yea020
yea026
yea027;
do i = 1 to dim(eight);
if (eight(i) = 8) then eight(i) = 0;
end;
array triple(*)
yea001fi yea001z
yea002l
yea003l;
do i = 1 to dim(triple);
if (triple(i) = 999 or triple(i) = 777) then triple(i) = .;
end;
yea023un=yea023;
run;
DISC4.0 Algorithms - Module B - Youth Eating Disorders - Algorithms
proc sort data=sds.ymodi1; by id;
proc sort data=sds.yea1; by id;
data sds.yea2
(keep = id huid ywkg ywkg1 yhcm yunderw yaxay yaxby yaxcy yaxdy yaxy yaxam yaxbm yaxcm yaxdm yaxm
ybuay ybuby ybucy ybudy ybuey ybuy ybuam ybubm ybucm ybudm ybuem ybum yeay yeam
bmi bmim yunderwm yeaima1 yeaima2 yeaima3 yeaima4 yeaima5 yeaima6 yeaima yeayima
yeamima yeaimb yeayimb yeamimb
yeaimc1 yeaimc2 yeaimc3 yeaimc4 yeaimc5 yeaimc6 yeaimc yeayimc yeamimc yeamimd yeayimd age gender
yaxcrity yaxcritm ybucrity ybucritm yeasymp
yea004 yea010 yea011 yea012 yea020 yeaysubt yeaysubtima yeaysubtimb yeaysubtimc
yeaysubtimd);
merge sds.ymodi1 sds.yea1; by id;
age = yit002;
gender = yitn02;
array eat1(*) yea005-yea009 yea010b yea013b yea014d yea015d yea016e yea017d yea018d;
if yean04=0 then do; do i=1 to dim(eat1); eat1(i)=0; end; end;
array eat2(*) yea013-yea019;
if yean04=0 and yea012d ne 2 then do; do i=1 to dim(eat2); eat2(i)=0;end;end;
array impair(6) yea023 yea024 yea025 yea026 yea027 yea028;
array impaira(6) yea023a yea024a yea025a yea026a yea027a yea028a;
if (0<=sum((yea010a=2), (yea012e=2), (yean05=2), (yea019=2))<=1)
then do; do i=1 to 6; impair[i]=0; end; end;
do i=1 to 6;
if impair[i]=0 then impaira[i]=1;
end;
** Anorexia Nervosa **;
****** Criteria ******;
** Define UNDERWEIGHT;
*-----Last Year;
/* If WEIGHT in KGs is present in question 2 and/or 3, use the responses in KGs. If
it is missing in both questions 2 and 3, use the responses in lbs. Otherwise, it is
coded missing */
if (yea002k ne .) then ywkg1=yea002k;
if (yea002k=.) then ywkg1=yea002l*0.45;
if (yea003k ne .) then ywkg2=yea003k;
if (yea003k=.) then ywkg2=yea003l*0.45;
If ywkg1>0 and ywkg2>0 then ywkg=min(ywkg1, ywkg2);
else if ywkg1>0 and (ywkg2=0 or ywkg2=.) then ywkg=ywkg1;
else if (ywkg1=0 or ywkg1=.) and ywkg2>0 then ywkg=ywkg2;
else if (ywkg1=0 or ywkg1=.) and (ywkg2=0 or ywkg2=.) then ywkg=.;
/* If HEIGHT in CMs is present in question 1, code that as HCM. If it is not present,
then transform the feet and inches to CMs. Otherwise, it is coded missing */
if (yea001z ne .) then yhcm = yea001z;
if (yea001z=. and yea001f ne . and yea001i ne .)
then yhcm=(yea001f*12 + yea001i)*2.54;
if (yea001z=. and yea001f ne . and yea001i = .) then yhcm=(yea001f*12)*2.54;
if (yea001z=. and yea001f = . and yea001i ne .) then yhcm = yea001i*2.54;
hin=yhcm/2.54;
hinm =yhcm/2.54;
If yhcm>0 then
bmi = (ywkg/yhcm**2)*10000; /* Body Mass Index */
else if yhcm=0 or yhcm=. then bmi=.;
/* Determine if child is underweight */
if (bmi ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmi - 3.72) le (0.20 * hin) then yunderw = 1;
else yunderw = 0;
end;
if (11<=AGE<=13) then do;
if (bmi - 5.88) le (0.17 * hin) then yunderw = 1;
else yunderw = 0;
end;
if (14<=AGE) then do;
if (bmi - 22.67) le (-0.07*hin) then yunderw = 1;
else yunderw = 0;
end;
end;
if GENDER = 1 then do;
if (bmi - 4.68) le (0.19 * hin) then yunderw = 1;
else yunderw = 0;
end;
end;
if (bmi = . and 1<=yea004<=2) then yunderw = 1; /* Told seriously underweight by other people */
else if (bmi = . and yea004=0) then yunderw = 0;
*-----Last Month; /* use Q1 and Q2 for bmi, and Q4a for underweight if bmi missing */
bmim = (ywkg1/yhcm**2)*10000;
/* Determine if child is underweight */
if (bmim ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmim - 3.72) le (0.20 * hinm) then yunderwm = 1;
else yunderwm = 0;
end;
if (11<=AGE<=13) then do;
if (bmim - 5.88) le (0.17 * hinm) then yunderwm = 1;
else yunderwm = 0;
end;
if (14<=AGE) then do;
if (bmim - 22.67) le (-0.07*hinm) then yunderwm = 1;
else yunderwm = 0;
end;
end;
if GENDER = 1 then do;
if (bmim - 4.68) le (0.19 * hinm) then yunderwm = 1;
else yunderwm = 0;
end;
end;
if (bmim = . and yea004a=2) then yunderwm = 1; /* Told seriously underweight
by other people */
else if (bmim = . and (yea004=0 or yea004a=0)) then yunderwm = 0;
*-----A;
*-----Past Year;
if ((yunderw = 1) and (yea013b = 2 or yea014d = 2 or yea015d = 2 or yea016e = 2
or yea017d = 2 or yea018d = 2)) then yaxay = 1;
else if ((yunderw = 0) or ((yea013 = 0 or yea013b = 0) and
(yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0 or yea014d = 0) and
(yea015 = 0 or yea015a = 0 or yea015b = 0 or yea015c = 0 or yea015d = 0) and
(yea016 = 0 or yea016b = 0 or yea016c = 0 or yea016d = 0 or yea016e = 0) and
(yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017c = 0 or yea017d = 0) and
(yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0 or yea018d = 0)))
then yaxay = 0;
*-----Past Month;
if ((yunderwm = 1) and ((yea013b = 2 and yea013c = 2) or (yea014d = 2 and
yea014e = 2) or (yea015d = 2 and yea015e = 2) or (yea016e = 2 and yea016f = 2)
or (yea017d = 2 and yea017e = 2) or (yea018d = 2 and yea018e = 2)))
THEN yaxam = 1;
else if ((yunderwm = 0) or ((yea013 = 0 or yea013b = 0 or
yea013c = 0) and (yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0
or yea014d = 0 or yea014e = 0) and (yea015 = 0 or yea015a = 0 or yea015b = 0
or yea015c = 0 or yea015d = 0 or yea015e = 0) and (yea016 = 0 or yea016b = 0
or yea016c = 0 or yea016d = 0 or yea016e = 0 or yea016f = 0) and (yea017 = 0
or yea017a = 0 or yea017b = 0 or yea017c = 0 or yea017d = 0 or yea017e = 0)
and (yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0 or yea018d = 0
or yea018e = 0)))
then yaxam = 0;
*-----B;
*-----Past Year;
if ((yunderw = 1) and (yea005b = 2)) then yaxby = 1;
else if ((yunderw = 0) or (yea005 = 0 or yea005a = 0 or yea005b = 0))
then yaxby = 0;
*-----Past Month;
if (yunderwm = 1 and yea005b = 2 and yea005d = 2) then yaxbm = 1;
else if (yunderwm = 0 or yea005 = 0 or yea005a = 0 or yea005b = 0 or yea005d = 0)
then yaxbm = 0;
*-----C;
*-----Past Year;
if (yunderw = 1) and (yea006 = 2 or yea006a = 0 or yea010b = 2 or yea008 = 0)
then yaxcy = 1;
else if (yunderw = 0) or ((yea006 = 0 and yea006a = 2) and (yea010 = 0 or
yean04 = 0 or yea010b = 0) and yea008 = 2) then yaxcy = 0;
*-----Past Month;
if ((yunderwm = 1) and (yea007 = 2 or yea007a = 0 or (yea010b = 2 and yea010c = 2) or
yea009 = 0)) then yaxcm = 1;
else if ((yunderwm = 0) or ((yea007 = 0 and yea007a = 2) and (yea010 = 0 or
yean04 = 0 or yea010b = 0 or yea010c = 0) and yea009 = 2)) then yaxcm = 0;
*-----D;
*----- Year;
if gender = 2 then do;
if (yea020 = 0 or yea020a = 0 or yea020b = 0) or (yea020c=2 and yea020d = 2) or
(yea020f = 2 and yea020g = 2) or (yea020g = 0 and yea020h = 0) or yea020i=2
then yaxdy = 1;
else if (yea020 = 2 and yea020a= 2 and yea020b = 2) and (yea020c = 0 or
yea020d = 0 or yea020e=2) and
(yea020f=0 or (yea020f = 2 and yea020g = 2) or (yea020f=2 and yea020g=0 and yea020h = 2)
or (yea020f=2 and yea020g=0 and yea020h = 0 and yea020i=2))
then yaxdy = 0;
end;
if (gender = 1 and yunderw = 1) then yaxdy = 1;
else if (gender = 1 and yunderw = 0) then yaxdy = 0;
*----- Month;
if gender = 2 then do;
if (yea020 = 0 or yea020a = 0 or yea020b = 0 or (yea020c=2 and yea020d = 2 and yea020e=0)) OR
((yea020f = 2 and yea020g = 2) or (yea020g = 0 and yea020h = 0) or yea020i=2)
then yaxdm = 1;
else if (yea020 = 2 and yea020a = 2 and yea020b = 2) and (yea020c = 0 or
yea020d = 0 or yea020e=2) and
(yea020f=0 or (yea020f = 2 and yea020g = 2) or (yea020f=2 and yea020g=0 and yea020h = 2)
or (yea020f=2 and yea020g=0 and yea020h = 0 and yea020i=2))
then yaxdm = 0;
end;
if (gender = 1 and yunderwm = 1)then yaxdm = 1;
else if (gender = 1 and yunderwm = 0) then yaxdm = 0;
****** Diagnosis ******;
*-----Past Year;
if (yaxay = 1 and yaxby = 1 and yaxcy = 1 and yaxdy = 1) then yaxy = 1;
else if (yaxay = 0 or yaxby = 0 or yaxcy = 0 or yaxdy = 0) then yaxy = 0;
*-----Past Month;
if (yaxam = 1 and yaxbm = 1 and yaxcm = 1 and yaxdm = 1) then yaxm = 1;
else if (yaxam = 0 or yaxbm = 0 or yaxcm = 0 or yaxdm = 0) then yaxm = 0;
****** Variable Labels ******;
label yaxay = 'Refusal to maintain body weight'
yaxby = 'Intense fear of gaining or becoming fat'
yaxcy = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
yaxdy = 'amenorrhea'
yaxy = 'Past year: diagnosis for anorexia nervosa'
yaxam = 'Refusal to maintain body weight'
yaxbm = 'Intense fear of gaining or becoming fat'
yaxcm = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
yaxdm = 'amenorrhea'
yaxm = 'Past month: diagnosis for anorexia nervosa';
** Bulimia Nervosa **;
****** Criteria ******;
*-----A;
*-----Past Year;
if ((yea012c = 2 or yea012c = 1) and yea012d = 2) then ybuay = 1;
else if (yea012 = 0 or yean04 = 0 or yea012c = 0 or yea012d = 0)
then ybuay = 0;
*-----Past Month;
if (ybuay = 1 and yea012f = 2) then ybuam = 1;
else if (yea012 = 0 or yean04 = 0 or yea012d = 0 or yea012e = 0 or yea012f = 0 or ybuay = 0)
then ybuam = 0;
*-----B;
*-----Past Year;
if (yea014b = 2 or yea015b = 2 or yea016c = 2 or yea017b = 2 or yea018b = 2)
then ybuby = 1;
else if ((yea014 = 0 or yea014a = 0 or yea014b = 0) and (yea015 = 0 or yea015b = 0)
and (yea016 = 0 or yea016b = 0 or yea016c = 0) and (yea017 = 0 or yea017a = 0 or
yea017b = 0) and (yea018 = 0 or yea018a = 0 or yea018b = 0)) then ybuby = 0;
*-----Past Month;
if (yea014e = 2 or yea015e = 2 or yea016f = 2 or yea017e = 2 or yea018e = 2)
then ybubm = 1;
else if ((yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014e = 0) and (yea015 = 0 or
yea015b = 0 or yea015e = 0) and (yea016 = 0 or yea016b = 0 or yea016c = 0 or yea016f = 0)
and (yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017e = 0) and (yea018 = 0 or
yea018a = 0 or yea018b = 0 or yea018e = 0)) then ybubm = 0;
*-----C;
*-----Past Year;
if (yea012e = 2 and (yea019 = 2 or yea014c = 2 or yea015c = 2 or yea016d = 2
or yea017c = 2 or yea018c = 2)) then ybucy = 1;
else if (yea012 = 0 or yean04 = 0 or yea012d = 0 or yea012e = 0)
or (yea019 = 0 and (yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0) and
(yea015 = 0 or yea015b = 0 or yea015c = 0) and (yea016 = 0 or yea016b = 0 or yea016c = 0
or yea016d = 0) and (yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017c = 0) and
(yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0)) then ybucy = 0;
*-----Past Month;
if ybucy = 1 and yea012f = 2 and (yea014e = 2 or yea015e = 2 or yea016g = 2
or yea017e = 2 or yea018e = 2) then ybucm = 1;
else if ybucy = 0 or yea012f = 0 or (yea014e = 0 and yea015e = 0 and yea016g = 0
and yea017e = 0 and yea018e = 0 ) then ybucm = 0;
*-----D;
*-----Past Year;
if (yea010a = 2) then ybudy = 1;
else if (yea010 = 0 or yea010a = 0) then ybudy = 0;
*-----Past Month;
if (yea010a = 2 and yea010c = 2) then ybudm = 1;
else if (yea010 = 0 or yea010a = 0 or yea010c = 0) then ybudm = 0;
*-----E;
*-----Past Year;
if (yaxy = 0) then ybuey = 1;
else if (yaxy = 1) then ybuey = 0;
*-----Past Month;
if (yaxm = 0) then ybuem = 1;
else if (yaxm = 1) then ybuem = 0;
****** Diagnosis ******;
*-----Past Year;
if (ybuay = 1 and ybuby = 1 and ybucy = 1 and ybudy = 1 and ybuey = 1) then ybuy = 1;
else if (ybuay = 0 or ybuby = 0 or ybucy = 0 or ybudy = 0 or ybuey = 0) then ybuy = 0;
*-----Past Month;
if (ybuam = 1 and ybubm = 1 and ybucm = 1 and ybudm = 1 and ybuem = 1) then ybum = 1;
else if (ybuam = 0 or ybubm = 0 or ybucm = 0 or ybudm = 0 or ybuem = 0) then ybum = 0;
if yaxy = 1 or ybuy = 1 then yeay = 1;
else if yaxy = 0 and ybuy = 0 then yeay = 0;
if yaxm = 1 or ybum = 1 then yeam = 1;
else if yaxm = 0 and ybum = 0 then yeam = 0;
******* Variable Labels ******;
label ybuay = 'Recurrent episodes of binge eating'
ybuby = 'Compensatory behavior'
ybucy = 'Binge eating compensatory behaviors twice a week for 3 months'
ybudy = 'Self-evaluation influenced by weight'
ybuey = 'Anorexia not positive'
ybuy = 'Past year: diagnosis for bulemia'
ybuam = 'Recurrent episodes of binge eating'
ybubm = 'Compensatory behavior'
ybucm = 'Binge eating compensatory behaviors twice a week for 3 months'
ybudm = 'Self-evaluation influenced by weight'
ybuem = 'Anorexia not positive'
ybum = 'Past month: diagnosis for bulemia'
;
*------ IMPAIRMENT ALGORITHMS;
*----A; /* One intermediate rating of impairment or distress */
if yea023a = 2 or yea023a = 3 then yeaima1 = 1;
else if yea023a = 1 or yea023a = 7 or yea023a = 9 then yeaima1 = 0;
if yea024a = 2 or yea024a = 3 then yeaima2 = 1;
else if yea024a = 1 or yea024a = 7 or yea024a = 9 then yeaima2 = 0;
if yea025a = 2 or yea025a = 3 then yeaima3 = 1;
else if yea025a = 1 or yea025a = 7 or yea025a = 9 then yeaima3 = 0;
if yea026a = 2 or yea026a = 3 then yeaima4 = 1;
else if yea026a = 1 or yea026a = 7 or yea026a = 9 then yeaima4 = 0;
if yea027a = 2 or yea027a = 3 then yeaima5 = 1;
else if yea027a = 1 or yea027a = 7 or yea027a = 9 then yeaima5 = 0;
if yea028a = 2 or yea028a = 3 then yeaima6 = 1;
else if yea028a = 1 or yea028a = 7 or yea028a = 9 then yeaima6 = 0;
if (sum(yeaima1, yeaima2, yeaima3, yeaima4, yeaima5, yeaima6) ge 1)
then yeaima = 1;
else if ((n(yeaima1, yeaima2, yeaima3, yeaima4, yeaima5, yeaima6) - sum(yeaima1,
yeaima2, yeaima3, yeaima4, yeaima5, yeaima6)) ge 6) then yeaima = 0;
if yeay = 1 and yeaima = 1 then yeayima = 1;
else if yeay = 0 or yeaima = 0 then yeayima = 0;
if yeam = 1 and yeaima = 1 then yeamima = 1;
else if yeam = 0 or yeaima = 0 then yeamima = 0;
*------B; /* Two intermediate ratings of impairment or distress */
if (sum(yeaima1, yeaima2, yeaima3, yeaima4, yeaima5, yeaima6) ge 2)
then yeaimb = 1;
else if ((n(yeaima1, yeaima2, yeaima3, yeaima4, yeaima5, yeaima6) - sum(yeaima1,
yeaima2, yeaima3, yeaima4, yeaima5, yeaima6)) ge 5) then yeaimb = 0;
if yeay = 1 and yeaimb = 1 then yeayimb = 1;
else if yeay = 0 or yeaimb = 0 then yeayimb = 0;
if yeam = 1 and yeaimb = 1 then yeamimb = 1;
else if yeam = 0 or yeaimb = 0 then yeamimb = 0;
*-----C; /* One severe rating of impairment or distress */
if yea023a = 3 then yeaimc1 = 1;
else if yea023a = 1 or yea023a = 2 or yea023a = 7 or yea023a = 9 then yeaimc1 = 0;
if yea024a = 3 then yeaimc2 = 1;
else if yea024a = 1 or yea024a = 2 or yea024a = 7 or yea024a = 9 then yeaimc2 = 0;
if yea025a = 3 then yeaimc3 = 1;
else if yea025a = 1 or yea025a = 2 or yea025a = 7 or yea025a = 9 then yeaimc3 = 0;
if yea026a = 3 then yeaimc4 = 1;
else if yea026a = 1 or yea026a = 2 or yea026a = 7 or yea026a = 9 then yeaimc4 = 0;
if yea027a = 3 then yeaimc5 = 1;
else if yea027a = 1 or yea027a = 2 or yea027a = 7 or yea027a = 9 then yeaimc5 = 0;
if yea028a = 3 then yeaimc6 = 1;
else if yea028a = 1 or yea028a = 2 or yea028a = 7 or yea028a = 9 then yeaimc6 = 0;
if (sum(yeaimc1, yeaimc2, yeaimc3, yeaimc4, yeaimc5, yeaimc6) ge 1)
then yeaimc = 1;
else if ((n(yeaimc1, yeaimc2, yeaimc3, yeaimc4, yeaimc5, yeaimc6) - sum(yeaimc1,
yeaimc2, yeaimc3, yeaimc4, yeaimc5, yeaimc6)) ge 6) then yeaimc = 0;
if yeay = 1 and yeaimc = 1 then yeayimc = 1;
else if yeay = 0 or yeaimc = 0 then yeayimc = 0;
if yeam = 1 and yeaimc = 1 then yeamimc = 1;
else if yeam = 0 or yeaimc = 0 then yeamimc = 0;
*------D; /* Impairment D: present when impairment B or C are satisified */
If yeayimb = 1 or yeayimc = 1 then yeayimd = 1;
else if yeayimb = 0 and yeayimc = 0 then yeayimd = 0;
If yeamimb = 1 or yeamimc = 1 then yeamimd = 1;
else if yeamimb = 0 and yeamimc = 0 then yeamimd = 0;
*****Criterion Count*****;
yaxcrity=sum(of yaxay yaxby yaxcy yaxdy);
ybucrity=sum(of ybuay ybuby ybucy ybudy);
yaxcritm=sum(of yaxam yaxbm yaxcm yaxdm);
ybucritm=sum(of ybuam ybubm ybucm ybudm);
*****Symptom Count *******;
if yea020=8 or yea020=0 or yea020a=0 or Yea020b=0 then Yea020c=0;
if (yea004=1 or yea004=2) then yeasym4=2;
else yeasym4=0;
yeasymp=sum(of yeasym4 yea010-yea012 yea020c)/2;
label
yaxcrity = 'Youth Anorexia Nervosa Criteria Count - Past Year'
yaxcritm = 'Youth Anorexia Nervosa Criteria Count - Past Month'
ybucrity = 'Youth Bulimia Nervosa Criteria Count - Past Year'
ybucritm = 'Youth Bulimia Nervosa Criteria Count - Past Month'
yeasymp = 'Youth Eating Disorders Symptom Count'
;
******Subthreshold diagnosis in last year******;
if (yeay=0 and yea023un >=0)then yeaysubt=1;
else if yeay=. then yeaysubt=.;
else yeaysubt=0;
if yeaysubt = 1 and yeaima = 1 then yeaysubtima = 1;
else if yeaysubt = 0 or yeaima = 0 then yeaysubtima = 0;
if yeaysubt = 1 and yeaimb = 1 then yeaysubtimb = 1;
else if yeaysubt = 0 or yeaimb = 0 then yeaysubtimb = 0;
if yeaysubt = 1 and yeaimc = 1 then yeaysubtimc = 1;
else if yeaysubt = 0 or yeaimc = 0 then yeaysubtimc = 0;
If yeaysubtimb = 1 or yeaysubtimc = 1 then yeaysubtimd = 1;
else if yeaysubtimb = 0 and yeaysubtimc = 0 then yeaysubtimd = 0;
label yeaysubt = 'Subthreshold diagnosis for anorexia/bulimia in last year'
yeaysubtima = 'Subthreshold diagnosis for anorexia/bulimia with impairment A in last year'
yeaysubtimb = 'Subthreshold diagnosis for anorexia/bulimia with impairment B in last year'
yeaysubtimc = 'Subthreshold diagnosis for anorexia/bulimia with impairment C in last year'
yeaysubtimd = 'Subthreshold diagnosis for anorexia/bulimia with impairment D in last year';
run;
DISC4.0 Algorithms - Module B - Parent Eating Disorders
Diagnostic criteria for 307.1 Anorexia Nervosa
- Refusal to maintain body weight at or above a minimally normal weight for age and height (e.g., weight loss leading to maintenance of body weight less than 85% of that expected, or failure to make expected weight gain during period of growth, leading to body weight less than 85% of that expected).
- Intense fear of gaining weight or becoming fat, even though underweight.
- Disturbance in the way in which ones body weight or shape is experienced, undue influence of body weight or shape on self-evaluation, or denial of the seriousness of the current low body weight.
- In postmenarcheal females, amenorrhea, i.e., the absence of at least three consecutive menstrual cycles. (A woman is considered to have amenorrhea if her periods occur only following hormone, e.g., estrogen, administration.)
Specify type:
Restricting Type: during the current episode of Anorexia Nervosa, the person has not regularly engaged in binge-eating or purging behavior (i.e., self-induced vomiting or the misuse of laxatives, diuretics, or enemas)
Binge-Eating/Purging Type: during the current episode of Anorexia Nervosa, the person has regularly engaged in binge-eating or purging behavior (i.e., self-induced vomiting or the misuse of laxatives, diuretics, or enemas)
Diagnostic criteria for 307.51 Bulimia Nervosa
- Recurrent episodes of binge eating. An episode of binge eating is characterized by both of the following:
- (1) eating, in a discrete period of time (e.g., within any 2-hour period), an amount of food that is definitely larger than most people would eat during a similar period of time and under similar circumstances
- (2) a sense of lack of control over eating during the episode (e.g., a feeling that one cannot stop eating or control what or how much one is eating)
- Recurrent inappropriate compensatory behavior in order to prevent weight gain, such as self-induced vomiting, misuse of laxatives, diuretics, enemas, or other medications, fasting, or excessive exercise.
- The binge eating and inappropriate compensatory behaviors both occur, on average, at least twice a week for 3 months.
- Self-evaluation is unduly influenced by body shape and weight.
- E. The disturbance does not occur exclusively during episodes of Anorexia Nervosa.
Specify type:
Purging Type: during the current episode of Bulimia Nervosa, the person has regularly engaged in self-induced vomiting or the misuse of laxatives, diuretics, or enemas
Nonpurging Type: during the current episode of Bulimia Nervosa, the person has used other inappropriate compensatory behaviors, such as fasting or excessive exercise, but has not regularly engaged in self-induced vomiting or the misuse of laxatives, diuretics, or enemas
DISC4.0 Algorithms - Module B - Youth Eating Disorders - Data Definition
libname sds "&path";
filename discp "&filein";
data sds.pea0 (drop = card testid);
infile discp end = last pad;
input id $ 1-10 card $ 11-14;
testid = id;
%huid;
do until (testid ne id);
select (card);
when ('B101') do;
input id $ 1-10
pean01 16
pea001f 17
pea001i 18-19
pea001fi 17-19
pea001z 20-22
pean02 23
pea002l 24-26
pea002k 27-28
pea003l 29-31
pea003k 32-33
pean03 34
pea004 35
pea004a 36
pean04 37
pea005 38
pea005a 39
pea005b 40
pea005c 41
pea005d 42
pea006 43
pea006a 44
pea007 45
pea007a 46
pea008 47
pea009 48
pea010 49
pea010a 50
pea010b 51
pea010c 52
pea011 53
pea011a 54
pea011b 55
pea012 56
pea012a 57
pea012b 58
pea012c 59
pea012d 60
pea012e 61
pea012f 62
pea013 63
pea013a 64
pea013b 65
pea013c 66
pea014 67
pea014a 68
pea014b 69
pea014c 70
pea014d 71
pea014e 72;
end;
when ('B102') do;
input id $ 1-10
pea015 16
pea015a 17-18
pea015b 19
pea015c 20
pea015d 21
pea015e 22
pea016 23
pea016a 24-25
pea016b 26
pea016c 27
pea016d 28
pea016e 29
pea016f 30
pea016g 31
pea017 32
pea017a 33
pea017b 34
pea017c 35
pea017d 36
pea017e 37
pea018 38
pea018a 39
pea018b 40
pea018c 41
pea018d 42
pea018e 43
pean05 44
pea019 45
pea020 46
pea020a 47
pea020b 48
pea020c 49
pea020d 50
pea020e 51
pea020f 52
pea020g 53
pea020h 54
pea020i 55
pea021y 56-57
pea021z 58-59
pea021a 60
pea021b 61
pea021c 62
pea021dy 63-64
pea021dz 65-66
pea021e 67;
end;
when ('B103') do;
input id $ 1-10
pea022y 16-17
pea022z 18-19
pea022a 20
pea022b 21
pea022c 22
pea022dy 23-24
pea022dz 25-26
pea022e 27
pea023 28
pea023a 29
pea024 30
pea024a 31
pea025 32
pea025a 33
pea026 34
pea026a 35
pea027 36
pea027a 37
pea028 38
pea028a 39
pea029 40
pea029a 41
pea030 42-43
pea030a 44-45
pea031 46
pea031ay 47-48
pea031az 49-50;
end; /* end WHEN */
otherwise input;
end; /* end SELECT */
testid = id;
if (last) then id = ' ';
else input id $ 1-10 card $ 11-14 @@;
end; /* end DO UNTIL */
id = testid;
LABEL
PEA001f = 'Height - feet'
PEA001i = 'Height - inches'
PEA002l = 'Current weight - lbs'
PEA002k = 'Current weight - kilometers'
PEA003l = 'Lowest weight in last year - lbs'
PEA003k = 'Lowest weight in last year - kilometers'
PEA004 = 'Others worried that person is too thin in last year'
PEA005 = 'Worried they looked fat while others were worrying they were too thin'
PEA006 = 'Said they were fat at the time when they weighed the least'
PEA007 = 'Currently say they are overweight'
PEA008 = 'Said that low weight caused any health problems when weighed the least'
PEA009 = 'Says that current weight could cause health problems'
PEA010 = 'Often felt bad about self, felt fat/overweight'
PEA011 = 'Thought about eating food/all the time for periods in the past year'
PEA012 = 'Eating binge in the last year'
PEA013 = 'Often refused to eat fattening foods in the past year'
PEA014 = 'Thrown up on purpose in past year'
PEA015 = 'Taken pills/medicines to keep from gaining weight or to lose weight in past year'
PEA016 = 'Done things so that they would have to use the toilet a lot in past year'
PEA017A = 'time in past year when there has been no eating for a full 24 hours'
PEA018 = 'Spent a lot of time exercising in the past year to lose weight or keep from gaining it'
PEA019 = 'Done things like responses from 14-18 for 3 months in past year'
PEA020 = 'Has started to menstruate'
PEA021y = 'Age when people started worrying he/she was too thin'
PEA021z = 'Grade when people started worrying he/she was too thin'
PEA022y = 'Age when first started actively trying to lose weight'
PEA022z = 'Grade when first started actively trying to lose weight'
PEA023 = 'Caretakers became upset/annoyed by efforts to lose/keep from gaining weight'
PEA024 = 'Efforts to not gain/lose weight prevented doing things with family'
PEA025 = ' '
PEA026 = 'Efforts to not gain/lose weight caused problems with schoolwork/grades'
PEA027 = 'Efforts to not gain/lose weight caused teachers/boss to become upset/annoyed'
PEA028 = 'Felt bad/upset about efforts to not gain/lose weight when problems were at their worst'
PEA029 = 'Been to get help in last year at a hospital/clinic/at work'
PEA030 = 'Name and information of person seen for help (OPTIONAL)'
PEA031 = 'Since age 5 ever been more concerned with losing/not gaining weight than now';
run;
DISC4.0 Algorithms - Module B - Parent Eating Disorders - Data Recoding
Data Recoding
77, 7 -> .
99, 9, 88, 8 -> 0
data sds.pea1;
set sds.pea0;
array peavar(*)
pean03
pea004 pea004a
pea005 pea005a pea005b pea005c pea005d
pea006 pea006a
pea007 pea007a
pea008
pea009
pea010 pea010a pea010b pea010c
pea011 pea011a pea011b
pea012 pea012a pea012b pea012c pea012d pea012e pea012f
pea013 pea013a pea013b pea013c
pea014 pea014a pea014b pea014c pea014d pea014e
pea015 pea015b pea015c pea015d pea015e
pea016 pea016b pea016c pea016d pea016e pea016f pea016g
pea017 pea017a pea017b pea017c pea017d pea017e
pea018 pea018a pea018b pea018c pea018d pea018e
pea019
pea020 pea020a pea020b pea020c pea020d pea020e pea020f pea020g
pea020h pea020i
pea021a pea021b pea021c pea021e
pea022a pea022b pea022c pea022e
pea029 pea029a
pea031 pea023 pea024 pea025 pea026 pea027 pea028 ;
do i = 1 to dim(peavar);
if (peavar(i) = 7) then peavar(i) = .;
else if (peavar(i) = 9) then peavar(i) = 0;
end;
array double(*)
/* pea002k
pea003k*/
pea015a
pea016a
pea021y pea021z pea021dy pea021dz
pea022y pea022z pea022dy pea022dz
pea030 pea030a
pea031ay pea031az;
do i = 1 to dim(double);
if (double(i) = 77) then double(i) = .;
if (double(i) = 99 or double(i) = 88) then double(i) = 0;
end;
array eight(*)
pea020
pea026
pea027;
do i = 1 to dim(eight);
if (eight(i) = 8) then eight(i) = 0;
end;
array triple(*)
pea001fi pea001z
pea002l
pea003l;
do i = 1 to dim(triple);
if (triple(i) = 999 or triple(i) = 888) then triple(i) = 0;
else if (triple(i) = 777) then triple(i) = .;
end;
pea023un=pea023 ;
run;
DISC4.0 Algorithms - Module B - Parent Eating Disorders - Algorithms
proc sort data=sds.pmodi1; by id;
proc sort data=sds.pea1; by id;
data sds.pea2
(keep = id huid pwkg pwkg1 phcm punderw paxay paxby paxcy paxdy paxy paxam paxbm paxcm paxdm paxm
pbuay pbuby pbucy pbudy pbuey pbuy pbuam pbubm pbucm pbudm pbuem pbum peay peam
bmi bmim punderwm peaima1 peaima2 peaima3 peaima4 peaima5 peaima6
peaima peayima peamima peaimb peayimb peamimb
peaimc1 peaimc2 peaimc3 peaimc4 peaimc5 peaimc6 peaimc peayimc peamimc age gender
peayimd peamimd paxcrity paxcritm pbucrity pbucritm peasymp
pea004 pea010 pea011 pea012 pea020 peaysubt peaysubtima peaysubtimb peaysubtimc
peaysubtimd);
merge sds.pea1 sds.pmodi1; by id;
age = pit002;
gender = pitn02;
array eat1(*) pea005-pea009 pea010b pea013b pea014d pea015d pea016e pea017d pea018d;
if pean04=0 then do; do i=1 to dim(eat1); eat1[i]=0; end; end;
array eat2(*) pea013-pea019;
if pean04=0 and pea012d ne 2 then do; do i=1 to dim(eat2); eat2[i]=0;end;end;
array impair(6) pea023 pea024 pea025 pea026 pea027 pea028 ;
array impaira(6) pea023a pea024a pea025a pea026a pea027a pea028a ;
if (0<=sum((pea010a=2), (pea012e=2), (pean05=2), (pea019=2))<=1)
then do; do i=1 to 6; impair[i]=0; end; end;
do i=1 to 6;
if impair[i]=0 then impaira[i]=1;
end;
** Anorexia Nervosa **;
****** Criteria ******;
** Define UNDERWEIGHT;
*-----Last pear;
/* If WEIGHT in KGs is present in question 2 and/or 3, use the responses in KGs. If
it is missing in both questions 2 and 3, use the responses in lbs. Otherwise, it is
coded missing */
if (pea002k ne .) then pwkg1=pea002k;
if (pea002k=.) then pwkg1=pea002l*0.45;
if (pea003k ne .) then pwkg2=pea003k;
if (pea003k=.) then pwkg2=pea003l*0.45;
if pwkg1>0 and pwkg2>0 then pwkg=min(pwkg1, pwkg2);
else if pwkg1>0 and (pwkg2=0 or pwkg2=.) then pwkg=pwkg1;
else if (pwkg1=0 or pwkg1=.) and pwkg2>0 then pwkg=pwkg2;
else if (pwkg1=0 or pwkg1=.) and (pwkg2=0 or pwkg2=.) then pwkg=.;
/* If HEIGHT in CMs is present in question 1, code that as HCM. If it is not present,
then transform the feet and inches to CMs. Otherwise, it is coded missing */
if (pea001z ne .) then phcm = pea001z;
if (pea001z=. and pea001f ne . and pea001i ne .)
then phcm=(pea001f*12 + pea001i)*2.54;
if (pea001z=. and pea001f ne . and pea001i = .) then phcm=(pea001f*12)*2.54;
if (pea001z=. and pea001f = . and pea001i ne .) then phcm = pea001i*2.54;
hin=phcm/2.54;
hinm =phcm/2.54;
if phcm>0 then bmi = (pwkg/phcm**2)*10000; /* Body Mass Index */
else if phcm=0 or phcm=. then bmi=.;
/* Determine if child is underweight */
if (bmi ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmi - 3.72) le (0.20 * hin) then punderw = 1;
else punderw = 0;
end;
if (11<=AGE<=13) then do;
if (bmi - 5.88) le (0.17 * hin) then punderw = 1;
else punderw = 0;
end;
if (14<=AGE) then do;
if (bmi - 22.67) le (-0.07*hin) then punderw = 1;
else punderw = 0;
end;
end;
if GENDER = 1 then do;
if (bmi - 4.68) le (0.19 * hin) then punderw = 1;
else punderw = 0;
end;
end;
if (bmi = . and 1<=pea004<=2) then punderw = 1; /* Told seriously underweight
by other people */
else if (bmi = . and pea004=0) then punderw = 0;
*-----Last Month; /* use Q1 and Q2 for bmi, and Q4a for underweight if bmi missing */
bmim = (pwkg1/phcm**2)*10000;
/* Determine if child is underweight */
if (bmim ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmim - 3.72) le (0.20 * hinm) then punderwm = 1;
else punderwm = 0;
end;
if (11<=AGE<=13) then do;
if (bmim - 5.88) le (0.17 * hinm) then punderwm = 1;
else punderwm = 0;
end;
if (14<=AGE) then do;
if (bmim - 22.67) le (-0.07*hinm) then punderwm = 1;
else punderwm = 0;
end;
end;
if GENDER = 1 then do;
if (bmim - 4.68) le (0.19 * hinm) then punderwm = 1;
else punderwm = 0;
end;
end;
if (bmim = . and pea004a=2) then punderwm = 1; /* Told seriously underweight
by other people */
else if (bmim = . and (pea004=0 or pea004a=0)) then punderwm = 0;
*-----A;
*-----Past pear;
if ((punderw = 1) and (pea013b = 2 or pea014d = 2 or pea015d = 2 or pea016e = 2
or pea017d = 2 or pea018d = 2)) then paxay = 1;
else if ((punderw = 0) or ((pea013 = 0 or pea013b = 0) and
(pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0 or pea014d = 0) and
(pea015 = 0 or pea015a = 0 or pea015b = 0 or pea015c = 0 or pea015d = 0) and
(pea016 = 0 or pea016b = 0 or pea016c = 0 or pea016d = 0 or pea016e = 0) and
(pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017c = 0 or pea017d = 0) and
(pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0 or pea018d = 0)))
then paxay = 0;
*-----Past Month;
if ((punderwm = 1) and ((pea013b = 2 and pea013c = 2) or (pea014d = 2 and
pea014e = 2) or (pea015d = 2 and pea015e = 2) or (pea016e = 2 and pea016f = 2)
or (pea017d = 2 and pea017e = 2) or (pea018d = 2 and pea018e = 2)))
then paxam = 1;
else if ((punderwm = 0) or ((pea013 = 0 or pea013b = 0 or
pea013c = 0) and (pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0
or pea014d = 0 or pea014e = 0) and (pea015 = 0 or pea015a = 0 or pea015b = 0
or pea015c = 0 or pea015d = 0 or pea015e = 0) and (pea016 = 0 or pea016b = 0
or pea016c = 0 or pea016d = 0 or pea016e = 0 or pea016f = 0) and (pea017 = 0
or pea017a = 0 or pea017b = 0 or pea017c = 0 or pea017d = 0 or pea017e = 0)
and (pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0 or pea018d = 0
or pea018e = 0)))
then paxam = 0;
*-----B;
*-----Past pear;
if ((punderw = 1) and (pea005b = 2)) then paxby = 1;
else if ((punderw = 0) or (pea005 = 0 or pea005a = 0 or pea005b = 0))
then paxby = 0;
*-----Past Month;
if (punderwm = 1 and pea005b = 2 and pea005d = 2) then paxbm = 1;
else if (punderwm = 0 or pea005 = 0 or pea005a = 0 or pea005b = 0 or pea005d = 0)
then paxbm = 0;
*-----C;
*-----Past pear;
if (punderw = 1) and (pea006 = 2 or pea006a = 0 or pea010b = 2 or pea008 = 0)
then paxcy = 1;
else if (punderw = 0) or ((pea006 = 0 and pea006a = 2) and (pea010 = 0 or
pean04 = 0 or pea010b = 0) and pea008 = 2) then paxcy = 0;
*-----Past Month;
if ((punderwm = 1) and (pea007 = 2 or pea007a = 0 or (pea010b = 2 and pea010c = 2) or
pea009 = 0)) then paxcm = 1;
else if ((punderwm = 0) or ((pea007 = 0 and pea007a = 2) and (pea010 = 0 or
pean04 = 0 or pea010b = 0 or pea010c = 0) and pea009 = 2)) then paxcm = 0;
*-----D;
*----- Year;
if gender = 2 then do;
if (pea020 = 0 or pea020a = 0 or pea020b = 0) or (pea020c=2 and pea020d = 2) or
(pea020f = 2 and pea020g = 2) or (pea020g = 0 and pea020h = 0) or pea020i=2
then paxdy = 1;
else if (pea020 = 2 and pea020a = 2 and pea020b = 2) and (pea020c = 0 or
pea020d = 0 or pea020e=2) and
(pea020f=0 or (pea020f = 2 and pea020g = 2) or (pea020f=2 and pea020g=0 and pea020h = 2)
or (pea020f=2 and pea020g=0 and pea020h = 0 and pea020i=2))
then paxdy = 0;
end;
if (gender = 1 and punderw = 1) then paxdy = 1;
else if (gender = 1 and punderw = 0) then paxdy = 0;
*----- Month;
if gender = 2 then do;
if (pea020 = 0 or pea020a = 0 or pea020b = 0 or (pea020c=2 and pea020d = 2 and pea020e=0)) OR
((pea020f = 2 and pea020g = 2) or (pea020g = 0 and pea020h = 0) or pea020i=2)
then paxdm = 1;
else if (pea020 = 2 and pea020a = 2 and pea020b = 2) and (pea020c = 0 or
pea020d = 0 or pea020e=2) and
(pea020f=0 or (pea020f = 2 and pea020g = 2) or (pea020f=2 and pea020g=0 and pea020h = 2)
or (pea020f=2 and pea020g=0 and pea020h = 0 and pea020i=2))
then paxdm = 0;
end;
if (gender = 1 and punderwm = 1) then paxdm = 1;
else if (gender = 1 and punderwm = 0) then paxdm = 0;
****** Diagnosis ******;
*-----Past pear;
if (paxay = 1 and paxby = 1 and paxcy = 1 and paxdy = 1) then paxy = 1;
else if (paxay = 0 or paxby = 0 or paxcy = 0 or paxdy = 0) then paxy = 0;
*-----Past Month;
if (paxam = 1 and paxbm = 1 and paxcm = 1 and paxdm =1) then paxm = 1;
else if (paxam = 0 or paxbm = 0 or paxcm = 0 or paxdm = 0) then paxm = 0;
****** Variable Labels ******;
label paxay = 'Refusal to maintain body weight'
paxby = 'Intense fear of gaining or becoming fat'
paxcy = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
paxdy = 'amenorrhea'
paxy = 'Past year: diagnosis for anorexia nervosa'
paxam = 'Refusal to maintain body weight'
paxbm = 'Intense fear of gaining or becoming fat'
paxcm = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
paxdm = 'amenorrhea'
paxm = 'Past month: diagnosis for anorexia nervosa';
** Bulimia Nervosa **;
****** Criteria ******;
*-----A;
*-----Past pear;
if ((pea012c = 2 or pea012c = 1) and pea012d = 2) then pbuay = 1;
else if (pea012 = 0 or pean04 = 0 or pea012c = 0 or pea012d = 0)
then pbuay = 0;
*-----Past Month;
if (pbuay = 1 and pea012f = 2) then pbuam = 1;
else if (pea012 = 0 or pean04 = 0 or pea012d = 0 or pea012e = 0 or pea012f = 0 or pbuay = 0)
then pbuam = 0;
*-----B;
*-----Past pear;
if (pea014b = 2 or pea015b = 2 or pea016c = 2 or pea017b = 2 or pea018b = 2)
then pbuby = 1;
else if ((pea014 = 0 or pea014a = 0 or pea014b = 0) and (pea015 = 0 or pea015b = 0)
and (pea016 = 0 or pea016b = 0 or pea016c = 0) and (pea017 = 0 or pea017a = 0 or
pea017b = 0) and (pea018 = 0 or pea018a = 0 or pea018b = 0)) then pbuby = 0;
*-----Past Month;
if (pea014e = 2 or pea015e = 2 or pea016f = 2 or pea017e = 2 or pea018e = 2)
then pbubm = 1;
else if ((pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014e = 0) and (pea015 = 0 or
pea015b = 0 or pea015e = 0) and (pea016 = 0 or pea016b = 0 or pea016c = 0 or pea016f = 0)
and (pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017e = 0) and (pea018 = 0 or
pea018a = 0 or pea018b = 0 or pea018e = 0)) then pbubm = 0;
*-----C;
*-----Past pear;
if (pea012e = 2 and (pea019 = 2 or pea014c = 2 or pea015c = 2 or pea016d = 2
or pea017c = 2 or pea018c = 2)) then pbucy = 1;
else if (pea012 = 0 or pean04 = 0 or pea012d = 0 or pea012e = 0
or (pea019 = 0 and (pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0) and
(pea015 = 0 or pea015b = 0 or pea015c = 0) and (pea016 = 0 or pea016b = 0 or pea016c = 0
or pea016d = 0) and (pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017c = 0) and
(pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0))) then pbucy = 0;
*-----Past Month;
if pbucy = 1 and pea012f = 2 and (pea014e = 2 or pea015e = 2 or pea016g = 2 or pea017e = 2
or pea018e = 2) then pbucm = 1;
else if pbucy = 0 or pea012f = 0 or (pea014e = 0 and pea015e = 0 and pea016g = 0 and pea017e = 0
and pea018e = 0) then pbucm = 0;
*-----D;
*-----Past pear;
if (pea010a = 2) then pbudy = 1;
else if (pea010 = 0 or pea010a = 0) then pbudy = 0;
*-----Past Month;
if (pea010a = 2 and pea010c = 2) then pbudm = 1;
else if (pea010 = 0 or pea010a = 0 or pea010c = 0) then pbudm = 0;
*-----E;
*-----Past pear;
if (paxy = 0) then pbuey = 1;
else if (paxy = 1) then pbuey = 0;
*-----Past Month;
if (paxm = 0) then pbuem = 1;
else if (paxm = 1) then pbuem = 0;
****** Diagnosis ******;
*-----Past pear;
if (pbuay = 1 and pbuby = 1 and pbucy = 1 and pbudy = 1 and pbuey = 1) then pbuy = 1;
else if (pbuay = 0 or pbuby = 0 or pbucy = 0 or pbudy = 0 or pbuey = 0) then pbuy = 0;
*-----Past Month;
if (pbuam = 1 and pbubm = 1 and pbucm = 1 and pbudm = 1 and pbuem = 1) then pbum = 1;
else if (pbuam = 0 or pbubm = 0 or pbucm = 0 or pbudm = 0 or pbuem = 0) then pbum = 0;
if paxy = 1 or pbuy = 1 then peay = 1;
else if paxy = 0 and pbuy = 0 then peay = 0;
if paxm = 1 or pbum = 1 then peam = 1;
else if paxm = 0 and pbum = 0 then peam = 0;
*------ IMPAIRMENT ALGORITHMS;
*----A; /* One intermediate rating of impairment or distress */
if pea023a = 2 or pea023a = 3 then peaima1 = 1;
else if pea023a = 1 or pea023a = 7 or pea023a = 9 then peaima1 = 0;
if pea024a = 2 or pea024a = 3 then peaima2 = 1;
else if pea024a = 1 or pea024a = 7 or pea024a = 9 then peaima2 = 0;
if pea025a = 2 or pea025a = 3 then peaima3 = 1;
else if pea025a = 1 or pea025a = 7 or pea025a = 9 then peaima3 = 0;
if pea026a = 2 or pea026a = 3 then peaima4 = 1;
else if pea026a = 1 or pea026a = 7 or pea026a = 9 then peaima4 = 0;
if pea027a = 2 or pea027a = 3 then peaima5 = 1;
else if pea027a = 1 or pea027a = 7 or pea027a = 9 then peaima5 = 0;
if pea028a = 2 or pea028a = 3 then peaima6 = 1;
else if pea028a = 1 or pea028a = 7 or pea028a = 9 then peaima6 = 0;
if (sum(peaima1, peaima2, peaima3, peaima4, peaima5, peaima6) ge 1)
then peaima = 1;
else if ((n(peaima1, peaima2, peaima3, peaima4, peaima5, peaima6) - sum(peaima1,
peaima2, peaima3, peaima4, peaima5, peaima6)) ge 6) then peaima = 0;
if peay = 1 and peaima = 1 then peayima = 1;
else if peay = 0 or peaima = 0 then peayima = 0;
if peam = 1 and peaima = 1 then peamima = 1;
else if peam = 0 or peaima = 0 then peamima = 0;
*------B; /* Two intermediate ratings of impairment or distress */
if (sum(peaima1, peaima2, peaima3, peaima4, peaima5, peaima6) ge 2)
then peaimb = 1;
else if ((n(peaima1, peaima2, peaima3, peaima4, peaima5, peaima6) - sum(peaima1,
peaima2, peaima3, peaima4, peaima5, peaima6)) ge 5) then peaimb = 0;
if peay = 1 and peaimb = 1 then peayimb = 1;
else if peay = 0 or peaimb = 0 then peayimb = 0;
if peam = 1 and peaimb = 1 then peamimb = 1;
else if peam = 0 or peaimb = 0 then peamimb = 0;
*-----C; /* One severe rating of impairment or distress */
if pea023a = 3 then peaimc1 = 1;
else if pea023a = 1 or pea023a = 2 or pea023a = 7 or pea023a = 9 then peaimc1 = 0;
if pea024a = 3 then peaimc2 = 1;
else if pea024a = 1 or pea024a = 2 or pea024a = 7 or pea024a = 9 then peaimc2 = 0;
if pea025a = 3 then peaimc3 = 1;
else if pea025a = 1 or pea025a = 2 or pea025a = 7 or pea025a = 9 then peaimc3 = 0;
if pea026a = 3 then peaimc4 = 1;
else if pea026a = 1 or pea026a = 2 or pea026a = 7 or pea026a = 9 then peaimc4 = 0;
if pea027a = 3 then peaimc5 = 1;
else if pea027a = 1 or pea027a = 2 or pea027a = 7 or pea027a = 9 then peaimc5 = 0;
if pea028a = 3 then peaimc6 = 1;
else if pea028a = 1 or pea028a = 2 or pea028a = 7 or pea028a = 9 then peaimc6 = 0;
if (sum(peaimc1, peaimc2, peaimc3, peaimc4, peaimc5, peaimc6) ge 1)
then peaimc = 1;
else if ((n(peaimc1, peaimc2, peaimc3, peaimc4, peaimc5, peaimc6) - sum(peaimc1,
peaimc2, peaimc3, peaimc4, peaimc5, peaimc6)) ge 6) then peaimc = 0;
if peay = 1 and peaimc = 1 then peayimc = 1;
else if peay = 0 or peaimc = 0 then peayimc = 0;
if peam = 1 and peaimc = 1 then peamimc = 1;
else if peam = 0 or peaimc = 0 then peamimc = 0;
*------D; /* Impairment D: present when impairment B or C are satisified */
If peayimb = 1 or peayimc = 1 then peayimd = 1;
else if peayimb = 0 and peayimc = 0 then peayimd = 0;
If peamimb = 1 or peamimc = 1 then peamimd = 1;
else if peamimb = 0 and peamimc = 0 then peamimd = 0;
*****Criterion Count*****;
paxcrity=sum(of paxay paxby paxcy paxdy);
pbucrity=sum(of pbuay pbuby pbucy pbudy);
paxcritm=sum(of paxam paxbm paxcm paxdm);
pbucritm=sum(of pbuam pbubm pbucm pbudm);
*****Symptom Count *******;
if pea020=8 or pea020=0 or pea020a=0 or pea020b=0 then pea020c=0;
if (pea004=1 or pea004=2) then peasym4=2;
else peasym4=0;
peasymp=sum(of peasym4 pea010-pea012 pea020c)/2;
******* Variable Labels ******;
label pbuay = 'Recurrent episodes of binge eating'
pbuby = 'Compensatory behavior'
pbucy = 'Binge eating compensatory behaviors twice a week for 3 months'
pbudy = 'Self-evaluation influenced by weight'
pbuey = 'Anorexia not positive'
pbuy = 'Past year: diagnosis for bulemia'
pbuam = 'Recurrent episodes of binge eating'
pbubm = 'Compensatory behavior'
pbucm = 'Binge eating compensatory behaviors twice a week for 3 months'
pbudm = 'Self-evaluation influenced by weight'
pbuem = 'Anorexia not positive'
pbum = 'Past month: diagnosis for bulemia'
;
label
paxcrity = 'Parent Anorexia Nervosa Criteria Count - Past Year'
paxcritm = 'Parent Anorexia Nervosa Criteria Count - Past Month'
pbucrity = 'Parent Bulimia Nervosa Criteria Count - Past Year'
pbucritm = 'Parent Bulimia Nervosa Criteria Count - Past Month'
peasymp = 'Parent Eating Disorders Symptom Count';
******Subthreshold diagnosis in last year******;
if (peay=0 and pea023un >=0)then peaysubt=1;
else if peay=. then peaysubt=.;
else peaysubt=0;
if peaysubt = 1 and peaima = 1 then peaysubtima = 1;
else if peaysubt = 0 or peaima = 0 then peaysubtima = 0;
if peaysubt = 1 and peaimb = 1 then peaysubtimb = 1;
else if peaysubt = 0 or peaimb = 0 then peaysubtimb = 0;
if peaysubt = 1 and peaimc = 1 then peaysubtimc = 1;
else if peaysubt = 0 or peaimc = 0 then peaysubtimc = 0;
If peaysubtimb = 1 or peaysubtimc = 1 then peaysubtimd = 1;
else if peaysubtimb = 0 and peaysubtimc = 0 then peaysubtimd = 0;
label peaysubt = 'Subthreshold diagnosis for anorexia/bulimia in last year'
peaysubtima = 'Subthreshold diagnosis for anorexia/bulimia with impairment A in last year'
peaysubtimb = 'Subthreshold diagnosis for anorexia/bulimia with impairment B in last year'
peaysubtimc = 'Subthreshold diagnosis for anorexia/bulimia with impairment C in last year'
peaysubtimd = 'Subthreshold diagnosis for anorexia/bulimia with impairment D in last year';
run;
DISC4.0 Algorithms - Module B - Both Eating Disorders
libname sds "&PATH";
proc sort data=sds.yea1; by huid;
proc sort data=sds.yea2; by huid;
proc sort data=sds.pea1; by huid;
proc sort data=sds.pea2; by huid;
data sds.bea2
(keep = huid bunderw baxay baxby baxcy baxdy baxy baxam baxbm baxcm baxdm baxm
bbuay bbuby bbucy bbudy bbuey bbuy bbuam bbubm bbucm bbudm bbuem bbum beay beam
bmi age gender bunderwm baxcrity baxcritm bbucrity bbucritm);
merge sds.pea2(in=inp) sds.yea2(in=iny) sds.pea1 sds.yea1;
by huid;
if iny and inp;
array eat1(*) pea005-pea009 pea010b pea013b pea014d pea015d pea016e pea017d pea018d;
if pean04=0 then do; do i=1 to dim(eat1); eat1[i]=0; end; end;
array eat2(*) pea013-pea019;
if pean04=0 and pea012d ne 2 then do; do i=1 to dim(eat2); eat2[i]=0;end;end;
array yeat1(*) yea005-yea009 yea010b yea013b yea014d yea015d yea016e yea017d yea018d;
if yean04=0 then do; do i=1 to dim(yeat1); yeat1(i)=0; end; end;
array yeat2(*) yea013-yea019;
if yean04=0 and yea012d ne 2 then do; do i=1 to dim(yeat2); yeat2(i)=0;end;end;
****** Criteria ******;
** Define UNDERWEIGHT;
if pean01=2 and yean01=2 then bhcm=max(phcm, yhcm);
if pean01=0 and yean01=0 then bhcm=max(phcm, yhcm);
if pean01=2 and yean01^=2 then bhcm=phcm;
if pean01^=2 and yean01=2 then bhcm=yhcm;
if pean02=2 and yean02=2 then bwkg=min(pwkg, ywkg);
if pean02=0 and yean02=0 then bwkg=min(pwkg, ywkg);
if pean02=2 and yean02^=2 then bwkg=pwkg;
if pean02^=2 and yean02=2 then bwkg=ywkg;
hin=bhcm/2.54;
hinm =bhcm/2.54;
bmi = (bwkg/bhcm**2)*10000; /* Body Mass Index */
/* Determine if child is underweight */
if (bmi ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmi - 3.72) le (0.20 * hin) then bunderw = 1;
else bunderw = 0;
end;
if (11<=AGE<=13) then do;
if (bmi - 5.88) le (0.17 * hin) then bunderw = 1;
else bunderw = 0;
end;
if (14<=AGE) then do;
if (bmi - 22.67) le (-0.07*hin) then bunderw = 1;
else bunderw = 0;
end;
end;
if GENDER = 1 then do;
if (bmi - 4.68) le (0.19 * hin) then bunderw = 1;
else bunderw = 0;
end;
end;
if (bmi = . and (1<=pea004<=2 or 1<=yea004<=2)) then bunderw = 1; /* Told seriously underweight
by other people */
else if (bmi = . and (pea004=0 or yea004=0)) then bunderw = 0;
*-----Last Month; /* use Q1 and Q2 for bmi, and Q4a for underweight if bmi missing */
bwkg1=max(pwkg1, ywkg1);
bmim = (bwkg1/bhcm**2)*10000;
/* Determine if child is underweight */
if (bmim ne .) then do;
if GENDER = 2 then do;
if (7<=AGE<=10) then do;
if (bmim - 3.72) le (0.20 * hinm) then bunderwm = 1;
else bunderwm = 0;
end;
if (11<=AGE<=13) then do;
if (bmim - 5.88) le (0.17 * hinm) then bunderwm = 1;
else bunderwm = 0;
end;
if (14<=AGE) then do;
if (bmim - 22.67) le (-0.07*hinm) then bunderwm = 1;
else bunderwm = 0;
end;
end;
if GENDER = 1 then do;
if (bmim - 4.68) le (0.19 * hinm) then bunderwm = 1;
else bunderwm = 0;
end;
end;
if (bmim = . and (pea004a=2 or yea004a=2)) then bunderwm = 1; /* Told seriously underweight
by other people */
else if (bmim = . and ((pea004=0 or pea004a=0) and
(yea004=0 or yea004a=0))) then bunderwm = 0;
*-----A;
*-----Past year;
if (pea013b = 2 or pea014d = 2 or pea015d = 2 or pea016e = 2
or pea017d = 2 or pea018d = 2) then pay = 1;
if ((pea013 = 0 or pea013b = 0) and
(pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0 or pea014d = 0) and
(pea015 = 0 or pea015a = 0 or pea015b = 0 or pea015c = 0 or pea015d = 0) and
(pea016 = 0 or pea016b = 0 or pea016c = 0 or pea016d = 0 or pea016e = 0) and
(pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017c = 0 or pea017d = 0) and
(pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0 or pea018d = 0))
then pay=0;
if ((pea013b = 2 and pea013c = 2) or (pea014d = 2 and
pea014e = 2) or (pea015d = 2 and pea015e = 2) or (pea016e = 2 and pea016f = 2)
or (pea017d = 2 and pea017e = 2) or (pea018d = 2 and pea018e = 2))
then pam=1;
if ((pea013 = 0 or pea013b = 0 or
pea013c = 0) and (pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0
or pea014d = 0 or pea014e = 0) and (pea015 = 0 or pea015a = 0 or pea015b = 0
or pea015c = 0 or pea015d = 0 or pea015e = 0) and (pea016 = 0 or pea016b = 0
or pea016c = 0 or pea016d = 0 or pea016e = 0 or pea016f = 0) and (pea017 = 0
or pea017a = 0 or pea017b = 0 or pea017c = 0 or pea017d = 0 or pea017e = 0)
and (pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0 or pea018d = 0
or pea018e = 0))
then pam=0;
if (yea013b = 2 or yea014d = 2 or yea015d = 2 or yea016e = 2
or yea017d = 2 or yea018d = 2) then yay = 1;
if ((yea013 = 0 or yea013b = 0) and
(yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0 or yea014d = 0) and
(yea015 = 0 or yea015a = 0 or yea015b = 0 or yea015c = 0 or yea015d = 0) and
(yea016 = 0 or yea016b = 0 or yea016c = 0 or yea016d = 0 or yea016e = 0) and
(yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017c = 0 or yea017d = 0) and
(yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0 or yea018d = 0))
then yay=0;
if ((yea013b = 2 and yea013c = 2) or (yea014d = 2 and
yea014e = 2) or (yea015d = 2 and yea015e = 2) or (yea016e = 2 and yea016f = 2)
or (yea017d = 2 and yea017e = 2) or (yea018d = 2 and yea018e = 2))
then yam=1;
if ((yea013 = 0 or yea013b = 0 or
yea013c = 0) and (yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0
or yea014d = 0 or yea014e = 0) and (yea015 = 0 or yea015a = 0 or yea015b = 0
or yea015c = 0 or yea015d = 0 or yea015e = 0) and (yea016 = 0 or yea016b = 0
or yea016c = 0 or yea016d = 0 or yea016e = 0 or yea016f = 0) and (yea017 = 0
or yea017a = 0 or yea017b = 0 or yea017c = 0 or yea017d = 0 or yea017e = 0)
and (yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0 or yea018d = 0
or yea018e = 0))
then yam=0;
if ((bunderw = 1) AND (pay=1 or yay=1 )) then baxay = 1;
else if ((bunderw = 0) or ( pay=0 and yay=0))
then baxay = 0;
*-----Past Month;
if ((bunderwm = 1) AND (pam=1 or yam=1 )) then baxam = 1;
else if ((bunderwm = 0) or ( pam=0 and yam=0))
then baxam = 0;
*-----B;
*-----Past pear;
if ((bunderw = 1) and (pea005b = 2 or yea005b=2)) then baxby = 1;
else if ((bunderw = 0) or( (pea005 = 0 or pea005a = 0 or pea005b = 0)
AND (yea005 = 0 or yea005a = 0 or yea005b = 0)))
then baxby = 0;
*-----Past Month;
if (bunderwm = 1 and ((pea005b = 2 and pea005d = 2)
OR (yea005b = 2 and yea005d = 2) )) then baxbm = 1;
else if (bunderwm = 0 or ( (pea005 = 0 or pea005a = 0 or pea005b = 0 or pea005d = 0)
AND (yea005 = 0 or yea005a = 0 or yea005b = 0 or yea005d = 0)) )
then baxbm = 0;
*-----C;
*-----Past pear;
if (bunderw = 1) and ( (pea006 = 2 or pea006a = 0 or pea010b = 2 or pea008 = 0)
OR (yea006 = 2 or yea006a = 0 or yea010b = 2 or yea008 = 0) )
then baxcy = 1;
else if (bunderw = 0) or ( ((pea006 = 0 and pea006a = 2) and (pea010 = 0 or
pean04 = 0 or pea010b = 0) and pea008 = 2)
AND ((yea006 = 0 and yea006a = 2) and (yea010 = 0 or
yean04 = 0 or yea010b = 0) and yea008 = 2) ) then baxcy = 0;
*-----Past Month;
if ((bunderwm = 1) and ((pea007 = 2 or pea007a = 0 or (pea010b = 2 and pea010c = 2) or
pea009 = 0) OR
(yea007 = 2 or yea007a = 0 or (yea010b = 2 and yea010c = 2) or
yea009 = 0) )) then baxcm = 1;
else if ((bunderwm = 0) or ( ((pea007 = 0 and pea007a = 2) and (pea010 = 0 or
pean04 = 0 or pea010b = 0 or pea010c = 0) and pea009 = 2)
AND ((yea007 = 0 and yea007a = 2) and (yea010 = 0 or
yean04 = 0 or yea010b = 0 or yea010c = 0) and yea009 = 2))) then baxcm = 0;
*-----D;
*----- Year & Month assessments are the same;
if paxdy=1 or yaxdy=1 then baxdy=1;
if paxdy=0 and yaxdy=0 then baxdy=0;
if paxdm=1 or yaxdm=1 then baxdm=1;
if paxdm=0 and yaxdm=0 then baxdm=0;
****** Diagnosis ******;
*-----Past pear;
if (baxay = 1 and baxby = 1 and baxcy = 1 and baxdy = 1) then baxy = 1;
else if (baxay = 0 or baxby = 0 or baxcy = 0 or baxdy = 0) then baxy = 0;
*-----Past Month;
if (baxam = 1 and baxbm = 1 and baxcm = 1 and baxdm = 1) then baxm = 1;
else if (baxam = 0 or baxbm = 0 or baxcm = 0 or baxdm = 0) then baxm = 0;
****** Variable Labels ******;
label baxay = 'Refusal to maintain body weight'
baxby = 'Intense fear of gaining or becoming fat'
baxcy = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
baxdy = 'amenorrhea'
baxy = 'Past pear: diagnosis for anorexia nervosa'
baxam = 'Refusal to maintain body weight'
baxbm = 'Intense fear of gaining or becoming fat'
baxcm = 'Disturbance in weight or shape experienced, self-evaluation,
denial of the seriousness'
baxdm = 'amenorrhea'
baxm = 'Past month: diagnosis for anorexia nervosa';
** Bulimia Nervosa **;
****** Criteria ******;
*-------A B D;
array p {6} pbuay pbuam pbuby pbubm pbudy pbudm;
array y {6} ybuay ybuam ybuby ybubm ybudy ybudm;
array b {6} bbuay bbuam bbuby bbubm bbudy bbudm;
do i=1 to 6;
IF (y[i]=1 OR p[i]=1) THEN b[i]=1;
IF (y[i]=0 AND p[i]=0) THEN b[i]=0;
end;
*-------C;
if pea012e = 2 then pc1y=1;
if (pea012 = 0 or pean04 = 0 or pea012d = 0 or pea012e = 0) then pc1y=0;
if (pea019 = 2 or pea014c = 2 or pea015c = 2 or pea016d = 2
or pea017c = 2 or pea018c = 2)
then pc2y=1;
if (pea019 = 0 and (pea014 = 0 or pea014a = 0 or pea014b = 0 or pea014c = 0) and
(pea015 = 0 or pea015b = 0 or pea015c = 0) and (pea016 = 0 or pea016b = 0 or pea016c = 0
or pea016d = 0) and (pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017c = 0) and
(pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0))
then pc2y=0;
if (pea012e = 2 and pea012f = 2) then pc1m=1;
if (pea012 = 0 or pean04 = 0 or pea012d = 0 or pea012e = 0 or pea012f = 0 )
then pc1m=0;
if ((pea019 = 2 or (pea014e = 2 or pea015e = 2 or
pea016g = 2 or pea017e = 2 or pea018e = 2)) or (pea014c = 2 and pea014e = 2)
or (pea015c = 2 and pea015e = 2) or (pea016d = 2 and pea016g = 2) or (pea017c = 2
and pea017e = 2) or (pea018c = 2 and pea018e = 2))
then pc2m=1;
if (pea019 = 0 and (pea014 = 0 or pea014a = 0 or pea014b = 0
or pea014c = 0 or pea014e = 0) and (pea015 = 0 or pea015b = 0 or pea015c = 0
or pea015e = 0) and (pea016 = 0 or pea016b = 0 or pea016c = 0 or pea016d = 0 or
pea016f = 0
or pea016g = 0) and (pea017 = 0 or pea017a = 0 or pea017b = 0 or pea017c = 0 or
pea017e = 0) and (pea018 = 0 or pea018a = 0 or pea018b = 0 or pea018c = 0 or
pea018e = 0))
then pc2m=0;
if yea012e = 2 then yc1y=1;
if (yea012 = 0 or yean04 = 0 or yea012d = 0 or yea012e = 0) then yc1y=0;
if (yea019 = 2 or yea014c = 2 or yea015c = 2 or yea016d = 2
or yea017c = 2 or yea018c = 2)
then yc2y=1;
if (yea019 = 0 and (yea014 = 0 or yea014a = 0 or yea014b = 0 or yea014c = 0) and
(yea015 = 0 or yea015b = 0 or yea015c = 0) and (yea016 = 0 or yea016b = 0 or yea016c = 0
or yea016d = 0) and (yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017c = 0) and
(yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0))
then yc2y=0;
if (yea012e = 2 and yea012f = 2) then yc1m=1;
if (yea012 = 0 or yean04 = 0 or yea012d = 0 or yea012e = 0 or yea012f = 0 )
then yc1m=0;
if ((yea019 = 2 or (yea014e = 2 or yea015e = 2 or
yea016g = 2 or yea017e = 2 or yea018e = 2)) or (yea014c = 2 and yea014e = 2)
or (yea015c = 2 and yea015e = 2) or (yea016d = 2 and yea016g = 2) or (yea017c = 2
and yea017e = 2) or (yea018c = 2 and yea018e = 2))
then yc2m=1;
if (yea019 = 0 and (yea014 = 0 or yea014a = 0 or yea014b = 0
or yea014c = 0 or yea014e = 0) and (yea015 = 0 or yea015b = 0 or yea015c = 0
or yea015e = 0) and (yea016 = 0 or yea016b = 0 or yea016c = 0 or yea016d = 0 or
yea016f = 0
or yea016g = 0) and (yea017 = 0 or yea017a = 0 or yea017b = 0 or yea017c = 0 or
yea017e = 0) and (yea018 = 0 or yea018a = 0 or yea018b = 0 or yea018c = 0 or
yea018e = 0))
then yc2m=0;
if (pc1y=1 or yc1y=1) and (pc2y=1 or yc2y=1) then bbucy=1;
if (pc1y=0 and yc1y=0) or (pc2y=0 and yc2y=0) then bbucy=0;
if (pc1m=1 or yc1m=1) and (pc2m=1 or yc2m=1) then bbucm=1;
if (pc1m=0 and yc1m=0) or (pc2m=0 and yc2m=0) then bbucm=0;
*-----E;
*-----Past pear;
if (baxy = 0) then bbuey = 1;
else if (baxy = 1) then bbuey = 0;
*-----Past Month;
if (baxm = 0) then bbuem = 1;
else if (baxm = 1) then bbuem = 0;
****** Diagnosis ******;
*-----Past pear;
if (bbuay = 1 and bbuby = 1 and bbucy = 1 and bbudy = 1 and bbuey = 1) then bbuy = 1;
else if (bbuay = 0 or bbuby = 0 or bbucy = 0 or bbudy = 0 or bbuey = 0) then bbuy = 0;
*-----Past Month;
if (bbuam = 1 and bbubm = 1 and bbucm = 1 and bbudm = 1 and bbuem = 1) then bbum = 1;
else if (bbuam = 0 or bbubm = 0 or bbucm = 0 or bbudm = 0 or bbuem = 0) then bbum = 0;
if baxy = 1 or bbuy = 1 then beay = 1;
else if paxy = 0 and bbuy = 0 then beay = 0;
if baxm = 1 or bbum = 1 then beam = 1;
else if paxm = 0 and bbum = 0 then beam = 0;
*****Criterion Count*****;
baxcrity=sum(of baxay baxby baxcy baxdy);
bbucrity=sum(of bbuay bbuby bbucy bbudy);
baxcritm=sum(of baxam baxbm baxcm baxdm);
bbucritm=sum(of bbuam bbubm bbucm bbudm);
*****Symptom Count *******;
Beasymp=sum(yeasymp + peasymp)/2;
******* Variable Labels ******;
label bbuay = 'Recurrent episodes of binge eating'
bbuby = 'Compensatory behavior'
bbucy = 'Binge eating compensatory behaviors twice a week for 3 months'
bbudy = 'Self-evaluation influenced by weight'
bbuey = 'Anorexia not positive'
bbuy = 'Past pear: diagnosis for bulemia'
bbuam = 'Recurrent episodes of binge eating'
bbubm = 'Compensatory behavior'
bbucm = 'Binge eating compensatory behaviors twice a week for 3 months'
bbudm = 'Self-evaluation influenced by weight'
bbuem = 'Anorexia not positive'
bbum = 'Past month: diagnosis for bulemia';
run;