s-news
[Top] [All Lists]

Re: [S) sampling from an uniform with a minimum distance between

To: melina cappelli <carcappe@unina.it>
Subject: Re: [S) sampling from an uniform with a minimum distance between
From: "Henrik Aalborg Nielsen" <immhan@student.dtu.dk>
Date: Fri, 19 Nov 2004 11:44:57 +0100 (MET)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <009701c4cd5e$1e327660$8b7de18f@ibma4zpk0s5hpe>
References: <009701c4cd5e$1e327660$8b7de18f@ibma4zpk0s5hpe>
If your sample is x then something like 'range(diff(sort(x)))' should give
you the answer.

Regards,
Henrik

--------------------------------------------------------------------------
   Henrik Aalborg Nielsen
   Informatics and Mathematical Modelling
   E-mail: han at imm.dtu.dk
--------------------------------------------------------------------------

On Thu, 18 Nov 2004, melina cappelli wrote:

> Hi,
> I need want to sample from an uniform in such away that
> the values I get differ at least of some constant c;
> I have generated a sequence of integers and now I'm using the sample command; 
> does anybody know if there's
>  a way to check the distance between the sampled values?
> thanks,
> melina
>
> Carmela Cappelli Department of Statistics
> School of Political Science University of Naples Federico II
> Via Rodinò n. 22 80138 Naples, Italy
> tel: +39-081-2537553 fax:+39-081-2537466
>

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