I am using PRCO MEANS in SAS 9.2 on 10 different variable so I have defined a macro variable like %let var = BWT GENDER RACE etc ...
my following code runs but the value of the variable are coming in informat 12. (example: 69.7597143)
proc means N MEAN STD MEDIAN Q1 Q3 MIN MAX data=perflags;
class Group;
var &var ;
output out = STAT (drop = _TYPE_ _FREQ_) ;
run;
Is there a way I can format all the variables to say 8.3 by using my macro variable and not specifying all the variables ? For example something like format &var 8.3?
You can use MAXDEC=3 to control the number of decimals displayed.
You can use MAXDEC=3 to control the number of decimals displayed.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.