You do not need the regions with the double densities near the center
(1/2,1/2), you can use just the parallel 45 degree borders in that
region also.
> x-x
> |/*\\\|
> |---/***\\|
> |--/*\|
> |-/**/
[OOPS! The example I gave before does not correspond to the stated
seed. At the end is a revised example where I have checked that
it does correspond. Sorry.
]
On 21-Feb-11 21:38:11, Ted Harding wrote:
> [See at end]
>
> On 21-Feb-11 17:13:03, Larry Hotchkiss wrote:
>> Hi list:
>> Here is one
[See at end]
On 21-Feb-11 17:13:03, Larry Hotchkiss wrote:
> Hi list:
> Here is one approach that will generate two uniformly distributed
> variables with a correlation of 0.5 --
> [snip]
>> > -Urspr?ngliche Nachricht-
>> > Von:r-help-boun...@r-project.org
>> > [mailto:r-help-boun..
On Feb 21, 2011, at 9:53 AM, Erich Neuwirth wrote:
We want to generate a distribution on the unit square with the
following
properties
* It is concentrated on a "reasonable" subset of the square,
and the restricted distribution is uniform on this subset.
* Both marginal distributions are uni
, 2011 at 7:30 PM, Mike Marchywka wrote:
>
>
>
>
>
>
>
>> Date: Mon, 21 Feb 2011 15:53:26 +0100
>> From: erich.neuwi...@univie.ac.at
>> To: marchy...@hotmail.com
>> CC: soren.fau...@biology.au.dk; r-help@r-project
> Date: Mon, 21 Feb 2011 15:53:26 +0100
> From: erich.neuwi...@univie.ac.at
> To: marchy...@hotmail.com
> CC: soren.fau...@biology.au.dk; r-help@r-project.org
> Subject: Re: [R] Generating uniformly distributed correlated data.
>
>
We want to generate a distribution on the unit square with the following
properties
* It is concentrated on a "reasonable" subset of the square,
and the restricted distribution is uniform on this subset.
* Both marginal distributions are uniform on the unit interval.
* All horizontal and all vert
> Date: Mon, 21 Feb 2011 13:03:53 +0100
> From: erich.neuwi...@univie.ac.at
> To: soren.fau...@biology.au.dk; r-help@r-project.org
> Subject: Re: [R] Generating uniformly distributed correlated data.
>
> hw<-function(r)
hw<-function(r){
(3-sqrt(1+8*r))/4
}
x<-runif(1000)
y<-(x+runif(1000,-hw(0.5),hw(0.5))) %% 1
x and y will have correlation 0.5 and will be uniformly distributed
on the unit interval.
Replacing 0.5 by any nonnegative number r between 0 and 1 will
create correlated uniformly distributed r
Thanks to everybody for helpfull answers.
In case other people want to generate similar data at one time
The one function I have found without any apparant bias ( such as
extreme clustering of the datapoints along one or both diagonals in
plot(x,y) or a slight bias in the generated correlatio
On Sun, Feb 20, 2011 at 12:18 AM, Peter Langfelder
wrote:
> On Sat, Feb 19, 2011 at 6:17 PM, Søren Faurby
> wrote:
>> I wish to generate a vector of uniformly distributed data with a defined
>> correlation to another vector
>>
>> The only function I have been able to find doing something similar
maybe this helps
http://comisef.wikidot.com/tutorial:correlateduniformvariates
regards
enrico
> -Ursprüngliche Nachricht-
> Von: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] Im Auftrag von Søren Faurby
> Gesendet: Sonntag, 20. Februar 2011 03:18
> An: r-help@r-
You may also be interested in the "psych" package or possibly
"mvtBinaryEP". I found these using "sos":
library(sos)
tc <- findFn('tetrachoric correlation') # 26 matches
tcs <- findFn('tetrachoric correlations')#27 matches
tc. <- tc|tcs
summary(tc.) # 35 links in 5 pkgs
tc.
All
Hi Soren,
Take a look at http://tolstoy.newcastle.edu.au/R/help/05/07/7741.html
HTH,
Jorge
On Sat, Feb 19, 2011 at 9:17 PM, Søren Faurby <> wrote:
> I wish to generate a vector of uniformly distributed data with a defined
> correlation to another vector
>
> The only function I have been able
On Sat, Feb 19, 2011 at 6:17 PM, Søren Faurby
wrote:
> I wish to generate a vector of uniformly distributed data with a defined
> correlation to another vector
>
> The only function I have been able to find doing something similar is corgen
> from the library ecodist.
>
> The following code gener
On Feb 19, 2011, at 9:17 PM, Søren Faurby wrote:
I wish to generate a vector of uniformly distributed data with a
defined correlation to another vector
The only function I have been able to find doing something similar
is corgen from the library ecodist.
The following code generates dat
16 matches
Mail list logo