Re: [R] Permutations

From: Rolf Turner <rolf_at_math.unb.ca>
Date: Wed 14 Jul 2004 - 08:16:42 EST

Dang!!! Forget it. My random restricted permutation generator doesn't ``quite'' work. Further testing --- which I should've done before posting (sigh) --- reveals that it can get into a situation in which there's nothing left to sample from, and it still needs to fill out the permutation. I.e. it has painted itself into a corner.

Perhaps one could put in a test for this situation and just start again if it happens, but this makes me uneasy. What happens to the ``equal probability'' of all the generated permutations?

Mebbe somebody else can come up with something cleverer. Sorry if I got your hopes up.

                                cheers,

					Rolf Turner
					rolf@math.unb.ca

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jul 14 08:34:50 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:56 EST