Hello @AnaVelloso,
Maybe it's even easier and you just need to specify order=internal in the PROC GLM statement. This would be sufficient if '<12' etc. were just formatted values of variable Educ, whose internal values (e.g., numeric values 1, 2, ...) reflected the desired sort order. (This is a common technique to avoid exactly these sorting issues.) Can you check in PROC CONTENTS output if Educ is numeric or character and whether a format is associated with it?
If, however, Educ is an unformatted character variable with values '<12' etc. you can create a view before the PROC GLM step and use this instead of another dataset:
proc sql;
create view _incomes as
select * from incomes
order by whichc(educ,'<12','12','13-15','16','>16');
quit;
ods graphics on;
proc glm data = _incomes plots=diagnostics order=data;
...
... View more