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 (March 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 17 Mar 2005 18:51:29 -0500
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: Splitting data
Comments: To: Anne Olean <annekolean@YAHOO.COM>

Anne,

Did you first run a proc sort (i.e.,

proc sort data=mydata; by X1 treatment week; run;

??

Art ------ On Thu, 17 Mar 2005 15:17:42 -0800, anne olean <annekolean@YAHOO.COM> wrote:

>Hi all, I have a binary variable X1 in my dataset that >I want to use to split my data, so that I can analyse >it separately for X1 = 0 and X1 = 1. I know I can >simply create two separate files using an "if >statement", however I am wondering if I can avoid >that? >In particular, I want to get the means for each >treatment by week when X1 = 0 and when X1 = 1 (2 >treatments, 10 weeks, 2 levels of X1: > >proc means data=mydata; >by X1 treatment week; >var y; >output out=outputmeans mean=mymean; >run; > >proc print data=outputmeans; >run; > >but that doesn't work at all. Do I have to create >separate files? > >thanks for any feedback. anne > > > >__________________________________ >Do you Yahoo!? >Yahoo! Small Business - Try our new resources site! >http://smallbusiness.yahoo.com/resources/


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