Date: Mon, 11 Mar 2002 08:58:36 -0500
Reply-To: Art@DrKendall.org
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Art Kendall <Arthur.Kendall@VERIZON.NET>
Subject: Re: any possible combination of cases position in a datafile
Content-Type: text/plain; charset=us-ascii
Is this what you are looking for
* generate 5**5=3125 cases representing every possible ordering of 5 values.
new file.
input program.
loop i =1 to 5.
loop j = 1 to 5.
loop k = 1 to 5.
loop l = 1 to 5.
loop m = 1 to 5.
leave i j k l m.
end case.
end loop.
end loop.
end loop.
end loop.
end loop.
end file.
end input program.
execute.
Arnaldo Ferrari Nasi wrote:
> Dear Spssers,
>
> I have a data file with 5 cases, sorted in ascending order.
>
> casenum
> 1
> 2
> 3
> 4
> 5
>
> I would have a number of others datafiles (or variables) with any possible
> combination of the position of these cases.
>
> ie
>
> casenum1 casenum2 casenum3 casenum4 ...
> 2 3 2 1
> 3 4 1 3
> 4 5 3 2
> 5 1 4 4
> 1 2 5 5
>
> Does someone know the solution?
>
> TIA
>
> Arnaldo.