The module constructs new covariates torepresent interactions (and possibly polynomial terms).

addInteraction(.data, which_covs = "pairs", exclude = NULL)

Arguments

.data
Internal parameter, do not use in the workflow function. .data is a list of a data frame and a raster object returned from occurrence modules and covariate modules respectively. .data is passed automatically in workflow from the occurrence and covariate modules to the process module(s) and should not be passed by the user.
which_covs
List with vector(s) of names of covariates to interact, e.g. list(c('A', 'C', 'D')), or 'pairs' for all pairwise interactions.
exclude
For option 'pairs', exclude the covariates named from interactions.

Details

Statistical interactions are (mathematically) the product of covariates. This module allows the user to pre-specify which interactions to add to the data. If a four-way interaction between A, B, C and D is desired, it automatically adds all possible two- and three-way interactions as well (obeying the marginality theorem). If the same variable name is provided several times in a vector (e.g. c(A, A, A)), this will lead to a cubic polynomial.

Data type

presence-only, presence/absence, abundance, proportion

Version

0

See also

Other process: AddRandomUniformPredictors, BackgroundAndCrossvalid, Background, Bootstrap, Clean, Crossvalidate, JitterOccurrence, MESSMask, NoProcess, OneHundredBackground, OneThousandBackground, PartitionDisc, StandardiseCov, TargetGroupBackground, Transform

Author

Alison Johnston & Carsten F. Dormann, alison.johnston@bto.org