R/logLik.logit.R

Defines functions logLik.logit

logLik.logit <- function(beta, attr, choice, chid, avi){

  exp_v <- exp(attr %*% beta) * avi
  p <- rowsum(exp_v * choice, chid) / rowsum(exp_v, chid)

  log(p)
}
xf-pan/dicmo documentation built on Jan. 25, 2021, 3:04 p.m.