BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Stretlow
Obsidian | Level 7

Hi there.

 

I have a simple problem that I just cant seem to find the answer to.

 

I have a list of observations with two of the variables being AccountNumber and TransactionAmount, there are mutliple transactions for one account.

 

Im trying to find the standard deviaton per account.

 

i currently have the following:-

 

proc means data=OutboundPayments std ;
class AccountNumber ;
var TransactionAmount ;
output sum=TransactionAmount out=Count_Amount ;

run;

 

while the results window does contain the correct standard deviation the output dataset "Count_Amount" does not and im struggling as to why.

 

Any help greatly appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You only requested SUM on the output statement.

Try

output sum=TransactionAmountSum std=TransactionAmountSTD out=Count_Amount ;

View solution in original post

4 REPLIES 4
Reeza
Super User

In your OUTPUT statement you've only specified a SUM. Add STD to the list.

 

 

art297
Opal | Level 21

You asked to output the sum rather than the standard deviation (std). Also, unless you want the overall std, include the nway option. e.g.:

proc means data=sashelp.class std nway;
class sex ;
var height ;
output std=TransactionAmount out=Count_Amount ;
run;

Art, CEO, AnalystFinder.com

 

ballardw
Super User

You only requested SUM on the output statement.

Try

output sum=TransactionAmountSum std=TransactionAmountSTD out=Count_Amount ;

Stretlow
Obsidian | Level 7

Thank you for everyones replys on this.

 

So Simple Smiley Frustrated

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