R/wild.R

Defines functions wild

wild <-
function(n)
{
  p <- (sqrt(5)+1)/(2*sqrt(5))
  zmat <- rep(1,n)*(-(sqrt(5)-1)/2);
  u <- runif(n,0,1)
  zmat[u > p] <- (sqrt(5)+1)/2
  return(zmat)
}

Try the OptSig package in your browser

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

OptSig documentation built on July 3, 2022, 5:05 p.m.