R/inv.link.r

######## S-function: inv.link ########

# For computing the inverse link function
# for different families of distribution
# Currently supported families are :
#   Bernoulli           
#   Poisson   
#   Gaussian          

# Last changed: 07/15/98 

inv.link <- function(x,family)
{
   if ( family == "binomial") 
      return(1/(1+exp(-x)))

   if ( family == "poisson") 
      return(exp(x))

   if ( family == "gaussian")
      return(x)
}

########## End of inv.link ##########

Try the SemiPar package in your browser

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

SemiPar documentation built on May 2, 2019, 5:42 a.m.