The function GAIC()
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()
. Note that GAIC()
is a synonymous of the function AIC.gamlss
.
The function IC()
is an old version of GAIC()
.
The function GAIC.table()
produces a table with different models as rows and different penalties, k
, as columns.
The function GAIC.scaled()
produces, [for a given set of different fitted models or for a table produced by chooseDist()
], the scaled Akaike values (see Burnham and Anderson (2002) section 2.9 for a similar concept the GAIC weights. The scaled Akaike should not be interpreted as posterior probabilities of models given the data but for model selection purpose they produce a scaled ranking of the model using their relative importance i.e. from the worst to the best model.
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.
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)),
text.to.show=NULL)
GAIC.scaled(object,..., k = 2, c = FALSE, plot = TRUE,
text.cex = 0.7, which = 1, diff.dev = 1000,
text.to.show = NULL, col = NULL, horiz = FALSE)
# S3 method for gamlss
extractAIC(fit, scale, k = 2, c = FALSE, ...)
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.
an gamlss fitted model(s) [or for GAIC.scaled()
a table
produced by chooseDist()
].
an gamlss fitted model
allows several GAMLSS object to be compared using a GAIC
the penalty with default k=2.5
whether the corrected AIC, i.e. AICc, should be used, note that it applies only when k=2
this argument is not used in gamlss
whether to plot the ranking in GAIC.scaled()
.
the size of the models/families in the text of the plot of GAIC.scaled()
.
this argument prevents models with a difference in deviance greater than diff.dev
from the `best' model to be considered (or plotted).
which column of GAIC scaled to plot in GAIC.scaled()
.
if NULL, GAIC.scaled()
shows the model names otherwise the character in this list
The colour of the bars in GAIC.scaled()
whether to plot the bars vertically (default) or horizontally
Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk
Burnham K. P. and Anderson D. R (2002). Model Selection and Multi model Inference A Practical Information-Theoretic Approach, Second Edition, Springer-Verlag New York, Inc.
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.
Rigby, R. A., Stasinopoulos, D. M., Heller, G. Z., and De Bastiani, F. (2019) Distributions for modeling location, scale, and shape: Using GAMLSS in R, Chapman and Hall/CRC. An older version can be found in https://www.gamlss.com/.
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, https://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 https://www.gamlss.com/).
gamlss
data(abdom)
m1 <- gamlss(y~x, family=NO, data=abdom)
IC(m1)
extractAIC(m1,k=2)
m2 <- gamlss(y~x, sigma.fo=~x, family=NO, data=abdom)
m3 <- gamlss(y~pb(x), sigma.fo=~x, family=NO, data=abdom)
m4 <- gamlss(y~pb(x), sigma.fo=~pb(x), family=NO, data=abdom)
AIC(m1,m2, m3, m4)
AIC(m1,m2, m3, m4, c=TRUE)
AIC(m1,m2, m3, m4, k=3)
GAIC.table(m1,m2, m3, m4)
GAIC.scaled(m1,m2, m3, m4)
if (FALSE) {
MT <- chooseDist(m3)
GAIC.scaled(MT)
GAIC.scaled(MT, which=2)}
Run the code above in your browser using DataLab