in case bncoxuk wanted to "recode" using a format:
/* a test dataset */
data one;
a=18; b=19; output;
a=15; b=24; output;
run;
/* recoding using a format */
proc format;
value level
0-< 5 = 1
5-<10 = 2
10-<15 = 3
15-<20 = 4
20-<25 = 5
other = .;
run;
/* recoding */
data two;
set one;
a = input(put(a, level.), best.);
b = input(put(b, level.), best.);
run;
/* check */
proc print data=two;
run;
/* on lst
Obs a b
1 4 4
2 4 5
*/
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.