R/logL.R

Defines functions logL

Documented in logL

logL <-
function(B, b, X, Y) {
    eta = matrix(1, nrow(X), 1) %*% t(b) + X %*% B
    sum(Y*(eta - log(rowSums(exp(eta)))))
}

Try the npmr package in your browser

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

npmr documentation built on Nov. 12, 2023, 1:08 a.m.