| spatialPartition | R Documentation |
Partition diversity variation into spatial and non-spatial components using forward selection of Moran's Eigenvector Maps.
spatialPartition(x, mem, metric = NULL, forward = TRUE, alpha = 0.05)
x |
A spacc result object (e.g., |
mem |
A |
metric |
Character. Which metric to extract from |
forward |
Logical. Use forward selection? Default |
alpha |
Numeric. Significance threshold for forward selection. Default 0.05. |
Forward selection of MEMs proceeds by adding the MEM that most improves the model AIC at each step, stopping when no MEM improves AIC by more than 2 units or when p > alpha.
An object of class spacc_mem_partition containing:
r_squared_spatial |
R-squared of the spatial model |
r_squared_total |
Total R-squared (same as spatial here) |
selected_mems |
Names of selected MEM vectors |
n_selected |
Number of selected MEMs |
anova_table |
ANOVA table from the final model |
coefficients |
Model coefficients |
spatialEigenvectors() for computing MEMs
coords <- data.frame(x = runif(30), y = runif(30))
species <- matrix(rpois(30 * 15, 2), nrow = 30)
mem <- spatialEigenvectors(coords)
alpha <- alphaDiversity(species, q = 0)
part <- spatialPartition(alpha$q0, mem)
print(part)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.