nll: Function to calculate negative log-likelihood (NLL)

Description Usage Arguments Value Author(s) Examples

Description

Calculates NLL value of a given set of predicted success probabilities and observed (binary) values

Usage

1
nll(fit, y)

Arguments

fit

a vector or matrix which includes the predicted success probabilities

y

a vector or matrix which includes the observed binary values

Value

Returns a numeric value of the NLL estimate

Author(s)

Ozgur Asar

Examples

1
2
3
fit<-runif(100)
y<-rbinom(100,1,0.5)
nll(fit,y)

Example output

[1] 109.5138

OOmisc documentation built on May 1, 2019, 10:17 p.m.

Related to nll in OOmisc...