BookmarkSubscribeRSS Feed
b555
Calcite | Level 5

I am trying to run the following code:

 

proc univariate data=table1 normal plot;
var speed height duration distance;
run;

This code works fine, the only thing I want to know is whether I can show each of the results of proc univariate side by side for the 4 variables I have beside the 'var' statement.

 

What I mean is, lets say I get moments by using proc univariate, I want all the moments results of these 4 variables placed one beside the other, then the basic statistics sumry.

 

Currently I get all results for speed first, then for height, duration and distance, one after the other. So for comparing speed and distance basic statistics, I would have to keep on scrolling up and down.

 

Thanks in advance.

1 REPLY 1
PGStats
Opal | Level 21

Use option OUTTABLE and proc transpose :

 

 

proc univariate data=table1 normal outtable=OT;
var speed height duration distance;
run;

proc transpose data=ot out=OTT(drop=_NAME_) label=statistic;
id _VAR_;
var _NUMERIC_;
run;

proc print data=OTT noobs; run;

 

PG

sas-innovate-2024.png

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.

 

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
  • 1 reply
  • 1661 views
  • 0 likes
  • 2 in conversation