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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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