Date: Thu, 5 May 2005 14:29:03 -0700
Reply-To: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject: Re: Efficient Way to write out all possibilities
Try a Proc SQL cartesian self-join
create table combinations as
DDS Data Extraction
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Iris
Sent: Thursday, May 05, 2005 2:10 PM
Subject: Efficient Way to write out all possibilities
I have 5 variables:
age (73 categories that go from age 0 to age 72);
education (5 categories, less than high school, hs grad, some college,BA,
sex (2 categories, male, female);
cohort (3 categories, cohort 1,2,3);
trial (2 categories, trial 1, 2);
I need to create a dataset that contains all the possible combination of
these 5 variables. I know the dataset should have 73*5*2*3*2=4380 lines.
What's an efficient way to program SAS to develop that data?
Any help would be highly appreciated!