R/inv_logistic_fun.R

Defines functions inv_logistic_fun

Documented in inv_logistic_fun

#' Inverse logistic  function
#'
#' Inverse logistic function
#' @param q Vector of probabilities.
#' @param p Vector of parameters \eqn{p = c(\alpha, \beta)}.
#' @return \code{x} at each probability.
#' @seealso \code{\link{logistic_fun}}
#' @examples
#' yseq <- seq(0, 1, .01)
#' xseq <- inv_logistic_fun(yseq, c(2, 4))
#' curve <- data.frame(x = xseq, y = yseq)
#' ggplot(curve, aes(x = x, y = y)) + geom_line()

#' @export
inv_logistic_fun <- function(q, p) p[1] + 1 / p[2] * log(q / (1 - q))

Try the quickpsy package in your browser

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

quickpsy documentation built on Oct. 2, 2019, 5:03 p.m.