Revision b58cc9cd586b6c8ac55b26c2da679f538ec801cc authored by Mark Clements on 17 October 2022, 13:50:02 UTC, committed by cran-robot on 17 October 2022, 13:50:02 UTC
1 parent dbf475c
random.R
## Drop-in replacement functions (not exported)
rgompertz = function(n, shape, rate) {
u <- 1-runif(n)
i <- shape >= 0 | u>=exp(rate/shape)
y <- rep(Inf, n)
if (any(i))
y[i] <- log(1 - shape*log(u[i])/rate) / shape
y
}
rllogis = function(n, shape, scale) {
u <- runif(n)
scale*(u/(1-u))^(1/shape)
}
Computing file changes ...