Computes the log-likelihood for a model. Used by optim on occasion.

LogLikelihood(beta, X, Y)

Arguments

beta

A vector of coefficients in a logistic GLM.

X

The design matrix.

Y

The outcome.

Value

Numeric of the summed negative log-likelihood loss over observations.