BookmarkSubscribeRSS Feed
NKormanik
Barite | Level 11

I've conducted many Proc Univariate runs on data, each run creating a seperate small dataset.

 

Dependent Variables (totalling around 200) are discrete, a rank of: 0, 1, 2, 3, 4, 5, 6

 

Independent Variable(s): continuous

 

Example of SAS code for a single run:

 

proc univariate data=SAS_1.combined; var i_50503; class rg5_21705 rg5_21502 ; ods output moments=SAS_1.i_50503__rg5_21705__rg5_21502 ; run;

 

In plain English, my thinking is:

 

50503 is a function of 21705-level and 21502-level

 

Each small resulting dataset contains the Mean for the particular run. As well as lots of other 'moments' numbers.

 

I'd like to compare the Means in the different dataset files.

 

Is there a way for SAS to do this?

 

Or must I extract the individual Means from each dataset, and put into a new Just-Means dataset?

 

Might there be an alternative to Proc Univariate that can look at all possible combinations of the dependent variables levels, along with Mean score for the independent variable?

 

If further information is wanted I'll be happy to provide it.

 

Thanks,
Nicholas Kormanik

 

 

2 REPLIES 2
thomp7050
Pyrite | Level 9

Could you just query dictionary.tables and dictionary.columns to get all table and column names in your library, and write a macro to run your comparison using the full list of tables and columns, and then combine all result sets into a single dataset?  This is what I do.

NKormanik
Barite | Level 11

Please elaborate.  I have 400,000 datasets.  Seems absurd to append them all into one enormous dataset.

 

Would be far, far better to ask of SAS, "Which of these has the largest xyz data value?"

 

Hoping for a better way.

 

Thanks!

 

 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1328 views
  • 0 likes
  • 2 in conversation