← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-ecological-genomics-community-ecology / references / usage-guide.md

Community Ecology Usage Guide

Overview

Analyzes how environmental gradients structure species communities using constrained ordination (CCA for unimodal responses, RDA on Hellinger-transformed data for linear responses, db-RDA for arbitrary distances), variance partitioning with adjusted R-squared (Peres-Neto 2006), indicator species analysis with the group-size-equalized IndVal.g form (De Caceres & Legendre 2009), PERMANOVA paired MANDATORILY with PERMDISP dispersion testing since the two confound each other (Anderson & Walsh 2013), Joint Species Distribution Models (HMSC, sjSDM, gjam) with explicit acknowledgement that residual covariance is NOT pure biotic interaction, phylogenetic community ecology with explicit null-model justification (Webb 2002), trait-environment via RLQ + fourth-corner with the corrected modeltype=6 permutation (Dray 2014), bipartite network metrics with Strona 2014 curveball null randomization, and Mantel test replacements (db-RDA conditioned on spatial PCNM eigenvectors, GDM) per Legendre & Fortin 2010.

Prerequisites

Quick Start

Tell your AI agent what you want to do:

Example Prompts

Constrained Ordination

"I have a species-by-site abundance matrix and environmental variables. Check DCA axis-1 gradient length first; if > 3 SD use CCA, if < 3 SD use Hellinger-RDA. Apply forward selection, check VIF, and produce a triplot."

PERMANOVA with Dispersion Companion

"Test community composition differences across my four habitat types with PERMANOVA (adonis2). MANDATORY: also run betadisper to test dispersion heterogeneity. If betadisper is significant, the PERMANOVA conclusion must be qualified (Anderson & Walsh 2013)."

Mantel Replacement

"I have community distances and environmental distances. Don't run Mantel; replace with dbRDA using spatial PCNM eigenvectors as Condition() (Legendre & Fortin 2010). Test marginal environmental effect after partialling out space."

Joint Species Distribution Models

"Fit HMSC for my 200-species community with environmental predictors, traits, phylogeny, and spatial random effect. Report variance partitioning into fixed effects, random effects, traits, and phylogeny. Explicitly disclaim that residual covariance is not pure biotic interaction (Pollock 2014; Poggiato 2021)."

"I have a 2000-ASV community matrix from metabarcoding. HMSC is too slow at this S; use sjSDM with elastic-net regularization (Pichler & Hartig 2021)."

Indicator Species

"Find indicator species for each of my four habitat types using multipatt with func='IndVal.g' (NOT 'IndVal' which is biased by group size). Use 999 permutations and report results sorted by p-value."

Phylogenetic Community Structure

"Compute SES_MPD and SES_MNTD across my communities with the taxa.labels null model. Then test whether traits track phylogeny with Blomberg's K and Pagel's lambda before interpreting clustering as environmental filtering; cite Mayfield & Levine 2010."

Trait-Environment

"Test how species traits respond to environmental gradients using RLQ ordination followed by the fourth-corner permutation test with modeltype=6 (Dray 2014). Default modeltype=2/4 gives inflated Type I error."

What the Agent Will Do

  1. Inspect species-environment data and assess gradient length with DCA before choosing CCA or RDA; apply Hellinger transformation before RDA on abundance data
  2. Run PERMANOVA via adonis2 (NOT the deprecated adonis) with by='margin' for unbalanced designs
  3. ALWAYS run betadisper + permutest alongside PERMANOVA; explicitly report when the location conclusion is confounded by dispersion heterogeneity
  4. Replace Mantel/partial Mantel for landscape data with db-RDA conditioned on spatial PCNM eigenvectors or GDM
  5. Choose JSDM by problem scale: HMSC for S < 500 with rich priors; sjSDM for S > 500; gjam for cross-data-type
  6. Explicitly disclaim "residual covariance equals biotic interaction" in any JSDM report
  7. Use func='IndVal.g' (group-size-corrected) for indicator species; never the basic 'IndVal'
  8. Compute SES_MPD/SES_MNTD with an EXPLICITLY documented null model (taxa.labels, independentswap, richness); test trait conservatism before inferring filtering vs competition (Mayfield & Levine 2010)
  9. Run RLQ + fourth-corner with modeltype=6 for trait-environment hypotheses
  10. Apply Strona 2014 curveball null for bipartite network nestedness/modularity testing
  11. Report VIF for collinearity, adjusted R-squared (not raw R-squared) for variance explained, and bootstrap CIs (>= 999 permutations)

Tips