|Date: ||Fri, 21 Jul 2006 10:19:36 -0700|
|Reply-To: ||"White, Scott" <scottwh@AMAZON.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"White, Scott" <scottwh@AMAZON.COM>|
|Subject: ||Re: Proc Freq Question|
|Content-Type: ||text/plain; charset="US-ASCII"|
Oops, forgot to include the obligatory "Thanks in advance!"
From: White, Scott
Sent: Friday, July 21, 2006 10:16 AM
To: 'SAS(r) Discussion'
Subject: Proc Freq Question
Let's say I have a data set with just three variables: observation id (oid), binary predicted value (pred) and dollar amount of transaction which we are making a prediction for (amt). Is there a way with just one proc statement to output a table that shows for both types of predictions both how many orders and what the total dollar amount was for each type? Basically the format of the desired output looks like this:
Target|# Orders|$ Amount
The way I do it right now is to use two proc freqs one that uses the statement "weight amt;" and one that doesn't and then I merge the two to get the desired result.