Hi,
I computed spearman correlation and output in the table by using following procedure.
Proc Corr Spearman data=mydata outp=corrtable;
var v1-v5;
run;
I want to limit the decimal place (two or three digits after the decimal) in correlation matrix in output table "corrtable" . Could you sugget me the way to accomplish it.
Thanks,
Shyam
I wouldn't actually change the value. Use an appropriate format when displaying the values such as:
proc print data=corrtable;
var v1-v5;
format v1-v5 f5.3;
run;
to show 3 decimals.
You can make this a default for the output set using Proc datasets to change the default format to the one you want.
Thanks Ballardw, However, I would like to change the decimal place in a output table when it output from Proc Corr procedure.
You can do it using data step
data corrtable;
set corrtable(where=(_type_='CORR'));
format _numeric_ 4.3;
run;
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 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.