Date: Tue, 27 May 2008 13:25:15 -0400
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: RES: Combination (loterry style)
Content-Type: text/plain; charset=ISO-8859-1
Adriano,
Couple of minor changes to Mary's code. I think you will be more likely
to get what you're looking for with the following two changes:
%let c = %sysfunc(comb(25,15));
%put &c;
ods listing close; *<--;
ods output Plan=fifteen_way_set;
proc plan;
factors Block=&c ordered
Treat= 15 of 25 comb;
run;
data fifteen_way_set2;
set fifteen_way_set;
total=sum(of treat1-treat15); *<--;
run;
ods listing;
HTH,
Art
---------
On Tue, 27 May 2008 13:21:21 -0700, Adriano Rodrigues <adriano@GPP.COM.BR>
wrote:
>I see there is proc plan but need some option to just make the dataset and
>not explode my screen : - )
>
>Adriano
>
>
>-----Mensagem original-----
>De: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] Em nome de Adriano
>Rodrigues
>Enviada em: terç¡feira, 27 de maio de 2008 13:03
>Para: SAS-L@LISTSERV.UGA.EDU
>Assunto: Combination (loterry style)
>
>Hi all,
>
>
>
>I have one problem wich is same as lottery style.
>
>
>
>Lets say I have 25 numbers, 1 to 25.
>
>
>
>Need all combinations possible with 15 of 25, and their sums.
>
>
>
>Ex:
>
>Combination 1 à °1+ 02 + 03 + 04 + 05 + 06 + 07 + 08 + 09 + 10 + 11 + 12 +
>13 + 14 + 15 = 120
>
>...
>
>...
>
>...
>
>Combination 3268760 à ²5 + 24 + 23 + 22 + 21 + 20 + 19 + 18 + 17 + 16 + 15 +
>14 + 13 + 12 + 11 = 270
>
>
>
>Questions using SAS: how to produce one file (dataset) with all
>combinations? (if I get this file, I can do the sum of values J )
>
>
>
>Thanks in advance,
>
>Adriano
|