Help using Base SAS procedures

Export proc univariate output to multiple microsoft excel sheets

Reply
Occasional Learner
Posts: 1

Export proc univariate output to multiple microsoft excel sheets

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.

Respected Advisor
Posts: 4,649

Re: Export proc univariate output to multiple microsoft excel sheets

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
Ask a Question
Discussion stats
  • 1 reply
  • 241 views
  • 0 likes
  • 2 in conversation