R/invglob.R

Defines functions invglob

invglob <- function(eta){

  b = length(eta)
  if(b == 1) p = c(1,exp(eta))/(1+exp(eta))
  else{
    pc = c(1/(1+exp(eta)),1)
    Di = cbind(rep(0,b),diag(b))-cbind(diag(b),rep(0,b))
    Di = rbind(c(1,rep(0,b)), Di)
    p = Di%*%pc
  }
}

Try the LMest package in your browser

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

LMest documentation built on Aug. 27, 2023, 5:06 p.m.