LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 21 Oct 2010 09:43:48 -0500
Reply-To:   Joe Matise <snoopy369@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Joe Matise <snoopy369@GMAIL.COM>
Subject:   Re: Saving the sub-means
In-Reply-To:   <AANLkTinfNagDPZBHQKccFJgMk8xDwuG65_jpme3aMFE1@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

Indeed, or why not just use a TYPE statement (which I prefer to the NWAY for one-class means, even if it is slightly more typing - more clear what you're doing)? If you're just concerned about not getting the overall row...

proc means data=psy noprint; class student_id; type student_id; var hours gpa; id ACT; output out=need3(drop=_type_ _freq_) mean=hours_mean gpa_mean; run;

Perhaps toby is explaining how to do the other things for a more general purpose however (Teaching how to do those operations without another data step) :)

-Joe

On Thu, Oct 21, 2010 at 9:28 AM, Data _null_; <iebupdte@gmail.com> wrote:

> On Thu, Oct 21, 2010 at 8:52 AM, toby dunn <tobydunn@hotmail.com> wrote: > > The proper way to do the Mean Procedure, I stuck with the Class statement > because one doesn't have to have it sorted like in the previous Data Step > Statement. > > However, that means I had to use the Where data step option on the > resulting data set.: > > > > Proc Means > > Data = Psy NoPrint ; > > Class Student_Id ; > > Var Hours GPA ; > > ID ACT ; > > OutPut Out = Need3 ( Drop = _Type_ _Freq_ > > Where = ( Not Missing( Student_ID ) ) ) > > Mean = Hours_mean GPA_mean ; > > Run ; > > Can you explain this a bit more for us commoners. What is different > about MEANS that a WHERE data set option is needed? Couldn't you use > virtually then same syntax for either MEANS or SUMMARY, e.g. NWAY. >


Back to: Top of message | Previous page | Main SAS-L page