fitGLM: Fit direct matching centrality using generalized linear model

Description Usage Arguments Details Value Author(s)

View source: R/fitGLM.R

Description

Fit direct matching centrality model using generalized linear model

Usage

1
fitGLM(data, formula, family = NULL, spRandom = FALSE, ...)

Arguments

data

an object of the class alienData

formula

A one-sided formula specifying how the different traits from both sets of species should be used to estimate species interactions.

family

The family of the response variable. See family, or the choices available.

spRandom

Logical. Whether species are used as a random effect. Default is FALSE.

...

Other parameters passed to glm.

Details

This function unfold the adjacency matrix and uses it as the response variable. As explanatory variables, the traits for each sets of species are repeated to match the length of the unfolded adjacency matrix but also the position.

If there are NAs in the adjacency matrix, the function will omit these values in the estimation of the model.

Although not specified by default formula is proposed here, in the ecological literature focusing on modeling species interactions, all variables are considered additively. In addition, quadratic relations are included for quantitative terms. Lastly, interactions between traits are considered across all traits within and across trophic levels. This is different than from the fourth corner approach where interactions is considered solely between traits of different trophic levels.

Value

An object with a class alienFit and a class fitGLM.

Author(s)

F. Guillaume Blanchet, Dominique Gravel, Steve Vissault


TheoreticalEcosystemEcology/alienR documentation built on Dec. 25, 2021, 5:59 p.m.