deviance.vlmc: Compute the Deviance of a Fitted VLMC Object

Description Usage Arguments Value Author(s) See Also Examples

Description

Compute the Deviance, i.e., - 2 log[likelihood(*)] of a fitted VLMC object. The log-likelihood is also known as “entropy”.

Usage

1
2
## S3 method for class 'vlmc'
deviance(object, ...)

Arguments

object

typically the result of vlmc(..).

...

possibly further arguments (none at the moment).

Value

A number, the deviance, i.e., - 2 log.likelihood(*). where the log.likelihood is really what we currently have as entropy().

Author(s)

Martin Maechler

See Also

entropy, vlmc,residuals.vlmc

Examples

1
2
3
4
5
6
7
8
9
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)


Search within the VLMC package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.