R/rllogistic.R

#' @name llogistic
#' @examples rllogistic(10, 0.5, 2)
#' @export
rllogistic <- function(n, m, phi) {
  tta = c(m, phi)
  Q = function(tta, u) {
    mu = tta[1]
    s = tta[2]
    (mu * u^(1/s))/((1 - u)^(1/s) * (1 - mu) + u^(1/s) * mu)
  }
  u = runif(n)
  y = Q(tta, u)
  return(y)
}

Try the llogistic package in your browser

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

llogistic documentation built on May 2, 2019, 6:52 a.m.