maglm: Model averaging for generalized linear models

Description Usage Arguments Value References See Also Examples

View source: R/maglm.R

Description

Model averaging for GLM based on information theory.

Usage

1
maglm(data, y, family, scale = TRUE, AIC.restricted = FALSE)

Arguments

data

Data frame, typically of environmental variables. Rows for sites and colmuns for environmental variables.

y

Vector of independent variables.

family

the 'family' object used.

scale

Whether to scale independent variables (default = TRUE)

AIC.restricted

Whether to use AICc (TRUE) or AIC (FALSE) (default = TRUE).

Value

A list of results

res.table

data frame with "AIC", AIC of the model, "log.L", log-likelihood of the model, "delta.aic", AIC difference to the best model, "wAIC", weighted AIC to the model, "n.vars", number of variables in the model, and each term.

importance

vector of relative importance value of each term, caluclated as as um of the weighted AIC over all of the model in whith the term aperars.

family

the 'family' object used.

scale

Whether to scale independent variables (default = TRUE

AIC.restricted

Whether to use AICc (TRUE) or AIC (FALSE) (default = TRUE).

References

Dobson, A. J. (1990) An Introduction to Generalized Linear Models. London: Chapman and Hall.

Burnham, K.P. & Anderson, D.R. (2002) Model selection and multi-model inference: a practical information-theoretic approach. Springer Verlag, New York.

Nakamura, A., C. J. Burwell, C. L. Lambkin, M. Katabuchi, A. McDougall, R. J. Raven, and V. J. Neldner. (2015) The role of human disturbance in island biogeography of arthropods and plants: an information theoretic approach. Journal of Biogeography 42:1406-1417.

See Also

mamglm, ses.maglm, ses.mamglm

Examples

1
2
3
4
5
6
7
#load species composition and environmental data
data(capcay)
adj.sr <- capcay$adj.sr
env_sp <- capcay$env_sp

#to fit a regression model:
maglm(data = env_sp, y = "adj.sr", family = "gaussian", AIC.restricted = TRUE)

mglmn documentation built on July 29, 2020, 5:06 p.m.