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 (April 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 2 Apr 2007 06:53:53 -0400
Reply-To:     "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject:      Re: random permutations
Comments: To: sas-l@uga.edu

quebecstat@aim.com wrote: > Hi all. > > I would need to create random permutations in order to conduct a > multiple testing experiment using Friedman's chi-squared test. > > Configuration: Each column contains two random permutations of 1,2,3 > as indicated below > > 113 > 232 > 321 > 121 > 212 > 332 > > I was able to obtain those columns one at a time with proc plan. Is > there an easy to obtain those columns?

RANPERM could be the basis of numerous varieties of DATA Step codings. Here is one:

%let NBLOCKS = 2; %let NREPLICATES = 3; %let NITEMS = 3;

data foo; _n_ = 97867564; do block = 1 to &NBLOCKS; do replicate = 1 to &NREPLICATES; array item[&NITEMS] (1:&NITEMS); call ranperm(_n_, of item[*]); output; end; end; run;

proc transpose data=foo out=foot prefix=repl_; by block; id replicate; var item:; run;

proc print; run;

-- Richard A. DeVenezia http://www.devenezia.com/


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