AIC.slmfit: Extract the AIC from a 'slmfit' object for comparing models.

View source: R/AIC.slmfit.R

AIC.slmfitR Documentation

Extract the AIC from a slmfit object for comparing models.

Description

Extract the AIC from a slmfit object for comparing models.

Usage

## S3 method for class 'slmfit'
AIC(object, ...)

Arguments

object

a slmfit object

...

further arguments passed to or from other methods.

Value

The AIC value of the slmfit object. Here, AIC is computed as 2 times the negative log-likelihood plus 2 times the number of model parameters for Maximum Likelihood (ML) and 2 times the negative log-likelihood for REML. For REML, AIC should only be used to compare two models with the same covariates but different spatial covariance structures.

Examples

data(exampledataset) ## load a toy data set
slmobj <- slmfit(formula = counts ~ pred1 + pred2, data = exampledataset,
xcoordcol = 'xcoords', ycoordcol = 'ycoords', areacol = 'areavar')
AIC(slmobj)

sptotal documentation built on Dec. 12, 2022, 1:06 a.m.