deviance.vlmc {VLMC} | R Documentation |
Compute the Deviance, i.e., - 2 log[likelihood(*)] of a fitted VLMC object. The log-likelihood is also known as “entropy”.
## S3 method for class 'vlmc' deviance(object, ...)
object |
typically the result of |
... |
possibly further arguments (none at the moment). |
A number, the deviance, i.e., - 2 log.likelihood(*).
where the log.likelihood is really what we currently have
as entropy()
.
Martin Maechler
example(vlmc) deviance(vlmc.pres) devianceR <- function(object) { dn <- dimnames(pr <- predict(object)) -2 * sum(log(pr[cbind(2:nrow(pr), match(dn[[1]][-1], dn[[2]]))])) } all.equal(deviance(vlmc.pres), devianceR(vlmc.pres), tol = 1e-14)