Learn R Programming

gamlss (version 5.1-4)

IC: Gives the GAIC for a GAMLSS Object

Description

The function IC() calculates 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 GAIC.table() produces a table for different models and different penalties, k.

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 gamlss
AIC(object, ..., k = 2, c = FALSE)
GAIC(object, ..., k = 2, c = FALSE )
GAIC.table(object, ..., k = c(2, 3.84, round(log(length(object$y)), 2)))
# S3 method for gamlss
extractAIC(fit, scale, k = 2, c = FALSE, ...)

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

c

whether the corrected AIC, i.e. AICc, should be used, note that it applies only when k=2

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 GAIC.table() returns a table which its rows showing different models and its columns different k's. 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. (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.

Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.

(see also http://www.gamlss.org/).

See Also

gamlss

Examples

Run this code
# NOT RUN {
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)
GAIC.table(mod1,mod2)
extractAIC(mod1,k=3)
rm(mod1,mod2)
# }

Run the code above in your browser using DataLab