search for: myrnorm

Displaying 3 results from an estimated 3 matches for "myrnorm".

Did you mean: mvrnorm
2011 Feb 03
1
random sequences for rnorm and runif
...e seed. Is this intended behavior or do you think it should be fixed? The strange thing is that the 1st/3rd/5th etc number of rnorm corresponds to the 1st/2nd/3rd in runif. If two seeds are necessary, I would have expected the following correspondence, 2-1, 4-2, 6-3, etc. Temporary fix: > myrnorm = function(n, mean=0, sd=1) + { + qnorm(runif(n), mean, sd) + } # myrnorm > > set.seed(123) > pnorm(myrnorm(4)) [1] 0.2875775 0.7883051 0.4089769 0.8830174 Best wishes, Matthias Gondan -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de...
2002 Jun 13
3
Bug in rnorm. (PR#1664)
...hat.n versus n. This ***should*** give a result close to a horizontal straight line, at height 0.05 --- but it didn't. For the larger values of n, the values of s.hat.n were displaced significantly below 0.05. After some discussion with colleagues, I replaced the calls to rnorm() by calls to myrnorm() defined by myrnorm <- function(n,mu=0,sigma=1){ mu + sigma*cos(2*pi*runif(n))*sqrt(-2*log(runif(n))) } which uses the ``(r,theta)'' method of generating random normals. When I did so, the resulting values were indeed all ``close to'' 0.05, as they should be. I also trie...
2002 Mar 25
2
Extreme value distributions (Long.)
...mplementation of F^{-1}() does not give quite as much weight as it ought for the tails. This would result in getting extreme values less often than we should, and hence getting low values of alpha-hat. BUT I tried the simulations using a ``roll your own'' normal random number generator (``myrnorm()''; see below) --- which does NOT depend on approximating F^{-1} for the normal distribution --- and got the same phenomenon. Another colleague suggested that perhaps 10000 simply isn't large enough --- that at 10000, the asymptotics haven't really kicked in yet, and perhaps we ne...