Hello Superuser, I don't know what I am doing wrong, I about to die, I have been unable to solve this problem since last week. I have tried what you advised. So I went ahead and categorized the two BMI categories. data ALLMH05TO15; set ALLMH05TO15;
if BMI_2015 <= 24.794988736 then BMICAT=0;
if BMI_2015 => 25.004109139 then BMICAT=1;
run; I then went ahead to classify my metabolic syndrome. Metabolic healthy with Normal weight (MHNW) Metabolically healthy overweight/obese (MHO) Metabolically Unhelathy Normla weight (MUNW) Metabolically unhealthy overweight/obese (MUO) in other words, I need to combine the MetS_total_2015 and he BMI category which I have included up there to meet the conditions for the MHNW, MUNW, MHO, MUO. SAS Output MetS_Total_2015 Frequency Percent CumulativeFrequency CumulativePercent012345 24 8.89 24 8.89 85 31.48 109 40.37 79 29.26 188 69.63 52 19.26 240 88.89 27 10.00 267 98.89 3 1.11 270 100.00 I have attempted to classify data ALLMH05TO15; set ALLMH05TO15;
if MetS_Total_2015 <= 2 & BMICAT=0 then MHNW=0;
if MetS_Total_2015 =>3 & BMICAT=0 then MUNW=0;
if MetS_Total_2015 <= 2 & BMICAT=1 then MHNW=1;
if MetS_Total_2015 =>3 & BMICAT=1 then MUNW=1;
run; These are the results I am getting SAS Output MHNWMHNW Frequency Percent CumulativeFrequency CumulativePercent01 155 57.41 155 57.41 115 42.59 270 100.00 MUNW Frequency Percent CumulativeFrequency CumulativePercent01Frequency Missing = 188 20 24.39 20 24.39 62 75.61 82 100.00 The second set of results are correct (MUNW). however, the first set (MHNW) is wrong, it is including all the data to give me a total of 270, yet I should have a total of 188 and not 270. Please, I hope someone can understand my problem. I have a feeling the problem lies in the metabolic syndrome category... but I keep getting an error, 1024 data ALLMH05TO15; set ALLMH05TO15;
1025 met_s=0;
1026 if MetS_Total>=3 then met_s=1;
1027 array score score0-score5;
1028 do i=0 to 5;
1029 score[i]=0;
1030 end;
1031 if Gender_Code_2005=1 & Waist_2015>=94 then
1031! score1=1;*codes for men;
1032 else if Gender_Code_2005=2 & Waist_2015>=80 then
1032! score1=1;*codes for women;
1033
1034 if TRIG2015>=1.7 then score2=1;
1035
1036 if Gender_Code_2005=1 & HDLC32015<=1 then score3=1
1036! ;*codes for men;
1037 else if Gender_Code_2005=2 & HDLC32015<=1.3 then score3=1
1037! ;*codes for women;
1038
1039 if SBPOmr2015>=130 or DBP2015>=85 or HT_MED2015=1 then score4=1;*codes for men;
1040 if Glucose2015>=5.6 or DIAB_MED2015=1 then score5=1;*codes for
1040! men;
1041 MetS_Total=sum(of score0-score5);
1042 met_s2=0;if MetS_Total>=3 then met_s2=1;
1043
1044 run;
ERROR: Array subscript out of range at line 1029 column 1. I have no help, I am depending on all of you;). Thank you Achieng
... View more