[R] Random unit vectors in R^{n}
Ravi Varadhan
rvaradha at jhsph.edu
Wed Aug 28 04:54:43 CEST 2002
There is a note by George Marsaglia in Annals of mathematical statistics
(1972) (p. 645-646), which talks about faster ways of picking points
uniformly from the surface of a unit sphere. However, his algorithms are
limited to 3 and 4 dimensions. I am not sure if there are similar
algorithms for any general "n". For larger "n", it seems that the method
suggested by Tom Lumley, using "n" N(0,1) deviates, is the best approach.
Ravi.
-----Original Message-----
From: Richards, Tom <richards at upci.pitt.edu>
To: R-Help (E-mail) <r-help at stat.math.ethz.ch>
Date: Monday, August 26, 2002 8:31 PM
Subject: [R] Random unit vectors in R^{n}
>Hello:
>
> Can you tell me if there's a simple way to generate in R random
>vectors on the unit sphere in R^{n}? Additionally, are there references
for
>this question? Thanks in advance.
>
>Tom
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
.-.-
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list