s-news
[Top] [All Lists]

Re: sampling from an uniform with a minimum distance between

To: "Rosenfeld, Simon (NIH/NCI)" <rosenfes@mail.nih.gov>
Subject: Re: sampling from an uniform with a minimum distance between
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Mon, 22 Nov 2004 17:59:23 +0000 (GMT)
Cc: carcappe@unina.it, s-news@lists.biostat.wustl.edu
In-reply-to: <CE0E73903DB53F43B4B0938747F34F8A7B145B@nihexchange7.nih.gov>
References: <CE0E73903DB53F43B4B0938747F34F8A7B145B@nihexchange7.nih.gov>
On Mon, 22 Nov 2004, Rosenfeld, Simon (NIH/NCI) wrote:

The sequences obtained by this method are not uniform and,
more importantly, are not iid.

Given that there is a constraint on the joint distribution, the latter is impossible.

It is also not clear what is meant by `uniform'. Is it marginally uniform, or jointly uniform over the constrained subspace?

The latter is a hard-core Strauss process in one dimension, and there are MCMC algorithms for it (but no exact ones AFAIK).

S
-----Original Message-----
From: David L Lorenz [mailto:lorenz@usgs.gov]
Sent: Monday, November 22, 2004 11:12 AM
To: David L Lorenz
Cc: carcappe@unina.it; s-news@lists.biostat.wustl.edu;
s-news-owner@lists.biostat.wustl.edu
Subject: Re: [S] sampling from an uniform with a minimum distance
between the



Melina,
 Sorry again.  I just remembered that the method that I have seen
recommended for this particular problem is to sequentially add random
numbers that satisfy the separation criterion.  This is not efficient in
terms of S+ programming. But, I believe that it produces a distribution
that is more nearly uniform in distribution.
 Here's a snippet of code that generates 6 random numbers separated by at
least 1 on a uniform distribution from 0 to 10:
  x3.1 <- runif(1,0,10)
  for(j in 2:6) {
     x3.2 <- runif(1,0,10)
        while(min(diff(sort(c(x3.1, x3.2)))) < 1)
           x3.2 <- runif(1,0,10)
     x3.1 <- c(x3.1, x3.2)
  }
Dave





                     "David L Lorenz"

                     <lorenz@usgs.gov>                To:
carcappe@unina.it
                     Sent by:                         cc:
s-news@lists.biostat.wustl.edu,
                     s-news-owner@lists.biosta
s-news-owner@lists.biostat.wustl.edu
                     t.wustl.edu                      Subject:  Re: [S]
sampling from an uniform with a minimum distance between
                                                       the



                     11/22/2004 09:47 AM










Melina,
 I am not sure that this simple approach gives a uniform distribution. I
believe that the random numbers that are selected using that procedure
results in a higher number of values that are close to the limits of the
distribution. This effect is more pronounced as the spacing gets to be a
larger proportion of the limits of the distribution. If it is very small,
then the effect is negligible.
 Sorry, I do not have an unbiased method.
Dave




                     carcappe@unina.it

                     Sent by:                         To:
s-news@lists.biostat.wustl.edu
                     s-news-owner@lists.biosta        cc:

                     t.wustl.edu                      Subject:  [S]
sampling from an uniform with a minimum distance between the
                                                       sampled values


                     11/21/2004 10:59 AM








Many thanks to  Henrik Nielsen, James Hotlman, Simon Rosenfeld and Alan
Gross
for replaying to my message.
A special thank to Juhlin Kenton and Greg Snow who gave me the right hint
to
sort the problem out.
the right script is
if (min(range(diff(sort(x))))<c)

melina

Carmela Cappelli
Department of Statistics, School of Political Science
University of Naples Federico II
phone: +39-081-2537553
fax:+39-081-2537466



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news





--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news





--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news



--
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

<Prev in Thread] Current Thread [Next in Thread>