I need help creating this age group variable. In my data age is measured to 9 decimal places. I can decide the categories I just picked the quartiles. But I keep getting these errors...
"ERROR 388-185: Expecting an arithmetic operator. ERROR 200-322: The symbol is not recognized and will be ignored."
I have tried rounding and changing the le to <= but it still gives the same error... :(
data sta310.hw4;
set sta310.gbcshort;
age_cat=.;
if age le 41.950498302 then age_cat = 1;
if age > 41.950498302 and le 49.764538386 then age_cat=2;
if age > 49.764538386 and le 56.696966378 then age_cat=3;
if age > 56.696966378 then age_cat=4;
run;