On 01/10/2007 3:50 AM, Daniel Polhamus wrote: > Hello R Gurus, > > This is a simple enough question, but I am curious as to whether there's an > answer... Can R generate a random variable uniformly distributed on -Inf to > Inf? Philosophically this doesn't seem possible, and if not, as I imagine > so, is there some sort of generally accepted factor I should be multiplying > by a Unif(-1,1) rv to sample from the real line?
There's no distribution that's uniform on the real line, but there are a lot of ways to sample non-uniformly from it. A common approximation (e.g. to simulate a non-informative prior in Bayesian work) is to use a normal distribution with a large variance. AFAIK there isn't any agreement on what "large" should be, because it depends so much on context. Duncan Murdoch > Thanks, > Dan Polhamus > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.