Learn R Programming

spmodel (version 0.10.0)

deviance.spmodel: Fitted model deviance

Description

Returns the deviance of a fitted model object.

Usage

# S3 method for splm
deviance(object, ...)

# S3 method for spautor deviance(object, ...)

# S3 method for spglm deviance(object, ...)

# S3 method for spgautor deviance(object, ...)

Value

The deviance.

Arguments

object

A fitted model object from splm(), spautor(), spglm(), or spgautor(), where estmethod is "ml" or "reml".

...

Other arguments. Not used (needed for generic consistency).

Details

For objects estimated using "ml" or "reml", the deviance is twice the difference in log-likelihoods between the saturated (perfect-fit) model and the fitted model.

Examples

Run this code
spmod <- splm(z ~ water + tarp,
  data = caribou,
  spcov_type = "exponential", xcoord = x, ycoord = y
)
deviance(spmod)

Run the code above in your browser using DataLab