Skip to content
Prev 5849 / 398506 Next

Needed: Understading runif() output :-)

On Thu, 25 May 2000, Prof Brian D Ripley wrote:

            
Yes, indeed.
Aha, now I understand! 
Indeed, I use inversion. My (cumulative) distribution function is 
F(mu) = 1 - 0.25 * mu^-2, for mu >= 0.5 and 0 for mu < 0.
I have inverted it, to get the 1 / (2 * sqrt(1 - p) quantile function,
then I use runif(n) for the p.
Yes, it is a valuable lesson to learn. It is not that often the effects of
the approximation are that glaring. I'm thinking about if I can live with
this approximation in this case.

I guess I should have a more thorough look into it nevertheless. My lack
of training in statistics strikes again, I have based my analysis on a
brief discussion in Dudewicz & Mishra's "Modern Mathematical
Statistics". If someone can recommend a text that discuss this topic, I
would be very happy...
 
Best,

Kjetil