R/inv_logit_gen.R

Defines functions inv_logit_gen

Documented in inv_logit_gen

#' Inverse generalized logit link
#'
#' This function computes the inverse (or reciprocal) of the generalized logit link function.
#' @param petitv vector of values to be transformed
#' @return ev vector of transformed values
#' @author Olivier Gimenez <olivier.gimenez@cefe.cnrs.fr>, Roger Pradel, RĂ©mi Choquet
#' @keywords package
#' @export

inv_logit_gen <- function(petitv){
bound = rep(10,length(petitv))
petitv = pmin(petitv, bound)
petitv = pmax(petitv,-bound)
ev = exp(petitv)
dead = 1 / (1 + apply(ev,1,sum))
dead = as.matrix(dead)
ev = ev * diag(dead)
ev
}

Try the R2ucare package in your browser

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

R2ucare documentation built on July 11, 2022, 9:06 a.m.