DATA Step, Macro, Functions and more

finding an average via long data longitunidal data output (doc attached has the display)

Reply
Contributor
Posts: 23

finding an average via long data longitunidal data output (doc attached has the display)

Hi again.  

 

Thank you for reading this!  

 

 

If any of you know how to sum all the S1 scores/n where n=15 …… S20 scores/15, please let me know. 

 

I have done this before and it has been a long time. But I am in need of help. 

 

Thank you once again. 

 

See the attachment.  I want to calculate the mean of each column (s1-s20).

 

 

PROC Star
Posts: 1,805

Re: finding an average via long data longitunidal data output (doc attached has the display)

Have you tried Proc means or Proc summary. A simple google search and copy paste is what you need i think

Contributor
Posts: 23

Re: finding an average via long data longitunidal data output (doc attached has the display)

Posted in reply to novinosrin

I   tried finding a link, but could not find one.   Thanks. 

PROC Star
Posts: 1,805

Re: finding an average via long data longitunidal data output (doc attached has the display)

proc means data=your_dataset;
var s1-s20;
output out=want mean = / AUTONAME;
run;

Super User
Posts: 23,724

Re: finding an average via long data longitunidal data output (doc attached has the display)

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

 

Not sure where you're searching but try starting at LexJansen.com though make sure to get the later results since SAS goes back to 1980's at least on there. 

 

Many more resources:

https://www.lexjansen.com/search/searchresults.php?q=proc%20means%20beginner

 


@mgrzyb wrote:

I   tried finding a link, but could not find one.   Thanks. 


 

Ask a Question
Discussion stats
  • 4 replies
  • 80 views
  • 0 likes
  • 3 in conversation