ecb_mod: ECB Linear Modelling Wizard

Description Usage Arguments Details Value Author(s) Examples

View source: R/ecb_mod.r

Description

Simple wrapper for running lm, glm, lmer, glmer and nb.glmer models on a full suite of variable combinations, outputing an AIC table and w+ variable importance table.

Usage

1
2
ecb_mod(data, term.names, resp, random.def, model.family = gaussian(),
model.type = "lm")

Arguments

data

Data frame containing the model input.

term.names

Vector containing a list of the variables to be included in the model.

resp

Character string containing the response variable of the model.

random.def

If running a mixed model, a character string containing the random effect part of the model formula, eg. "(1|Site)".

model.family

Model family function, see family.

model.type

String defining the model type, can be lm, glm, lmer, glmer or nb.glmer.

Details

Details

Value

Returns a list containing the AIC table and w+ table.

Author(s)

Grant Williamson (grant.williamson@utas.edu.au)

Examples

1
2
3
4
5
6
7
## Not run: 
data=read.csv("myfile.csv")

ecb_mod(data, term.names=c("MAP","Slope","Soil"), resp="Height",
random.def="(1|Site)", model.family = poisson(), model.type = "lmer")

## End(Not run)

ozjimbob/ecbtools documentation built on Jan. 18, 2021, 7:39 p.m.