Displaying 2 results from an estimated 2 matches for "qrng_alloc".
2007 Oct 29
2
Changing size of lattice plot?
Hi
I am having a bit of difficulty with changing the canvas size on a
trellis/lattice plot. I am plotting two "cubes" of 3-dimensional random
numbers, as follows:
library(gsl)
library(lattice)
q <- qrng_alloc(type="sobol", 3)
npoints <- 200
rs <- qrng_get(q,npoints)
# Plot the normal variates in a 3-dim cube
p1 <- cloud(rnorm(npoints) ~ rnorm(npoints) + rnorm(npoints), xlab="x",
ylab="y",
zlab="z", pch=21, main=paste(npoints,"3-Dimensional ~N(0,1)&q...
2008 Apr 26
6
quasi-random sequences
...overlap, really) between the
points. I would like some random pattern, but with a minimum
exclusion distance. In looking up "Numerical recipes in C", I found
out about some Sobol quasi-random sequences, which one can call from
the gsl package,
> library(gsl)
>
> g <- qrng_alloc(type="sobol",dim=2)
> qrng_get(g,n= N) ->xy
>
> plot((xy),t="p",cex=0.5)
but this does not look very random: I clearly see some pattern
(diagonals, etc...), and even the non-overlapping condition is not
impressive.
One (painful) way I can foresee is to check th...