fit_models {AICcPermanova} | R Documentation |
This function fits PERMANOVA models for all combinations of variables in a given dataset, and arranges the models by Akaike Information Criterion (AICc) score. The function also calculates the maximum variance inflation factor (max_vif) for each model.
fit_models(
all_forms,
veg_data,
env_data,
method = "bray",
ncores = 2,
log = TRUE,
logfile = "log.txt",
multiple = 100,
strata = NULL,
verbose = FALSE
)
all_forms |
A data frame generated by |
veg_data |
A dataset with vegetation presence absense or abundance data |
env_data |
A dataset with the variables described in all_froms |
method |
method for distance from |
ncores |
An integer specifying the number of cores to use for parallel processing |
log |
logical if true, a log file will be generated |
logfile |
the text file that will be generated as a log |
multiple |
after how many loops to write a log file |
strata |
a block variable similar to the use in |
verbose |
logical, defaults TRUE, sends messages about processing times |
A data.frame with fitted models arranged by AICc, including the formula used, the number of explanatory variables, R2, adjusted R2, and the AICc and max VIF.
Anderson, M. J. (2001). A new method for non-parametric multivariate analysis of variance. Austral Ecology, 26(1), 32-46. https://doi.org/10.1111/j.1442-9993.2001.01070.pp.x
library(vegan)
data(dune)
data(dune.env)
AllModels <- make_models(vars = c("A1", "Moisture", "Manure"))
fit_models(all_forms = AllModels,
veg_data = dune,
env_data = dune.env)