BookmarkSubscribeRSS Feed
sonyk
Calcite | Level 5
Hi

I have to tabulate the N,mean,stddev of acess data set. My code for that is below

proc means data=Sasuser.ClinicalExam nonobs n mean stddev maxdec=2;
label pulse = 'pulse'
Bpsytolic = 'Systolic BP'
BpDiastolic = 'Diastolic BP';
Var pulse bpsys bpdias;
run;

My result is having 5 columns :

variable label N mean stddev

but i shud have only the below in result :

Label N Mean Stddev

how to ignore Variable column fro the result ?
3 REPLIES 3
ballardw
Super User
Quickest would be to use Tabulate:

Proc tabulate data=Sasuser.ClinicalExam ;
label pulse = 'pulse'
Bpsytolic = 'Systolic BP'
BpDiastolic = 'Diastolic BP';
Var pulse bpsys bpdias;

table pulse bpsys bpdias, n mean*f=f10.2 stddev*f=f10.2;
run;

Also,since you don't have and CLASS variables you don't need the NONOBS in your MEANS example.
sonyk
Calcite | Level 5
Thanks.But i have to get column name 'Label' above pulse,bpsystolic and bpdiastolic
ballardw
Super User
table pulse bpsys bpdias, n mean*f=f10.2 stddev*f=f10.2
/box='Label';

will put Label at the top of the column of variables.
What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1486 views
  • 0 likes
  • 2 in conversation