Learn R Programming

gamlss (version 4.2-4)

IC: Gives the GAIC for a GAMLSS Object

Description

IC is a function to calculate the Generalised Akaike information criterion (GAIC) for a given penalty k for a fitted GAMLSS object. The function AIC.gamlss is the method associated with a GAMLSS object of the generic function AIC. The function GAIC is a synonymous of the function AIC.gamlss. The function extractAIC is a the method associated a GAMLSS object of the generic function extractAIC and it is mainly used in the stepAIC function. The function Rsq compute a generalisation of the R-squared for not normal models.

Usage

IC(object, k = 2)
## S3 method for class 'gamlss':
AIC(object, ..., k = 2)
GAIC(object, ..., k = 2 )
## S3 method for class 'gamlss':
extractAIC(fit, scale, k = 2, ...)

Arguments

object
an gamlss fitted model
fit
an gamlss fitted model
...
allows several GAMLSS object to be compared using a GAIC
k
the penalty with default k=2.5
scale
this argument is not used in gamlss

Value

  • The function IC returns the GAIC for given penalty k of the GAMLSS object. The function AIC returns a matrix contains the df's and the GAIC's for given penalty k. The function GAIC returns identical results to AIC. The function extractAIC returns vector of length two with the degrees of freedom and the AIC criterion.

References

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554. Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.org/). Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.

See Also

gamlss

Examples

Run this code
data(abdom)
mod1<-gamlss(y~pb(x),sigma.fo=~pb(x),family=BCT, data=abdom)
IC(mod1)
mod2<-gamlss(y~pb(x),sigma.fo=~x,family=BCT, data=abdom)
AIC(mod1,mod2,k=3)
GAIC(mod1,mod2,k=3)
extractAIC(mod1,k=3)
rm(mod1,mod2)

Run the code above in your browser using DataLab