R/remq.R

remq <-
function (n, ncp = 0, s = 1) 
{
    if (s <= 0) 
        stop("scaling parameter must be strictly >0.")
    x = runif(n)
    (2 * x - 1)/sqrt(2 * x * (1 - x)) * s + ncp
}

Try the expectreg package in your browser

Any scripts or data that you put into this service are public.

expectreg documentation built on March 18, 2022, 5:57 p.m.