Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
valerieyim
Fluorite | Level 6

Hello SAS Communities, 

I would need to use the MEAN function to to calculate the average daily rainfall.

 

Suppose I have data on the rainfall in my city, with the variables 'Day1', 'Day2,'...,'Day365' containing the value of rainfall for each day of the year. 

 

How should I write my MEAN function?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
novinosrin
Tourmaline | Level 20
avg=mean(of day1-day365);

View solution in original post

3 REPLIES 3
novinosrin
Tourmaline | Level 20
avg=mean(of day1-day365);
Reeza
Super User

That isn't enough information to answer you question.
SAS processes data differently if it's in rows or columns so what works for one data structure won't work for a different data structure.

Here's a rough idea of how to do By group processing within PROC MEANS which seems to be what you're trying to do....there really isn't a good paper or guide on PROC MEANS that I've seen yet to recommend 😞

 

https://github.com/statgeek/SAS-Tutorials/blob/master/proc_means_basic.sas

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3 replies
  • 1060 views
  • 3 likes
  • 4 in conversation