The extra > comes from the ">10-high" portion, not the specification of the range.
You have the somewhat right idea, but you need to include the < symbol in between the values and it means include the end points.
proc format;
values yrs_monthly_usefmt
low-<5 = "< 5 yrs"
5-<10 = "5-10 yrs"
10-high = "> 10 yrs";
run;
data demo;
do i=0 to 12 by 0.5;
month = put(i, yrs_monthly_usefmt.);
output;
end;
run;
proc print data=demo;
run;
I believe by default the end point is included in the interval. But you can modify that with the < symbol. Try playing around with including it inside the ranges.
The extra > comes from the ">10-high" portion, not the specification of the range.
You have the somewhat right idea, but you need to include the < symbol in between the values and it means include the end points.
proc format;
values yrs_monthly_usefmt
low-<5 = "< 5 yrs"
5-<10 = "5-10 yrs"
10-high = "> 10 yrs";
run;
data demo;
do i=0 to 12 by 0.5;
month = put(i, yrs_monthly_usefmt.);
output;
end;
run;
proc print data=demo;
run;
I believe by default the end point is included in the interval. But you can modify that with the < symbol. Try playing around with including it inside the ranges.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.