R/logit.loss.R

Defines functions logit.loss

logit.loss <-
function(X, r, theta) {
  n <- nrow(X)
  u <- X[,-r] %*% theta[r,-r]
  val = log(exp(u) + exp(-u)) - X[, r] * u
  
  return(mean(val))
}
jingmafdu/TestBMN documentation built on April 4, 2018, 6:08 p.m.