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 15:17:42 -0800
Reply-To:     anne olean <annekolean@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     DomainKeys? See http://antispam.yahoo.com/domainkeys
From:         anne olean <annekolean@YAHOO.COM>
Subject:      Splitting data
In-Reply-To:  6667
Content-Type: text/plain; charset=us-ascii

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