Description Usage Arguments Details Value Author(s) References See Also Examples

Analyses to relate an environmental gradient to the phylogenetic assembly of species across a metacommunity by means of phylogenetic fuzzy weighting.

1 2 3 4 5 6 7 8 | ```
matrix.p.sig(comm, phylodist, envir, analysis = c("adonis", "mantel"),
method = "bray", squareroot = TRUE, method.envir = "euclidean",
runs = 999, parallel = NULL, newClusters = TRUE, CL = NULL)
pcps.sig(comm, phylodist, envir, analysis = c("glm", "rda"),
method = "bray", squareroot = TRUE, formula, family = stats::gaussian,
AsFactors = NULL, pcps.choices = c(1, 2, 3, 4), runs = 999,
parallel = NULL, newClusters = TRUE, CL = NULL)
``` |

`comm` |
Community data, with species as columns and sampling units as rows. This matrix can contain either presence/absence or abundance data. |

`phylodist` |
Matrix containing phylogenetic distances between species. |

`envir` |
Environmental variables for each community, with variables as columns and sampling units as rows. |

`analysis` |
Type of analysis. For the function pcps.sig |

`method` |
Dissimilarity index, as accepted by |

`squareroot` |
Logical argument (TRUE or FALSE) to specify if use square root of dissimilarity index (Default squareroot = TRUE). |

`method.envir` |
Resemblance index between communities based on environmental variables, as accepted by vegdist used in Mantel analysis (Default method.envir = "euclidean") |

`runs` |
Number of permutations for assessing significance. |

`parallel` |
Number of parallel processes. Tip: use detectCores() (Default parallel = NULL). |

`newClusters` |
Logical argument (TRUE or FALSE) to specify if make new parallel processes or use predefined socket cluster. Only if parallel is different of NULL (Default newClusters = TRUE). |

`CL` |
A predefined socket cluster done with parallel package. |

`formula` |
An object of class |

`family` |
A description of the error distribution to be used in used in GLM analysis.
See |

`AsFactors` |
Encode an environmental variable as factor used in GLM analysis. The sequence is the same that in the environmental data matrix. See Details. |

`pcps.choices` |
PCPS used in RDA analysis (Default pcps.choices = c(1, 2, 3, 4)). |

Each metacommunity is submitted to phylogenetic fuzzy weighting, generating a matrix
that describing the phylogeny-weighted species composition of the communities
(`matrix.p`

). The function matrix.p.sig test directly the association
this matrix with the environmental predictors. The pairwise dissimilarities are
submitted to Mantel test (`mantel`

) or ADONIS test (`adonis`

)
to evaluate the influence of an environmental gradient on species dispersion across
the communities. The function pcps.sig generates principal coordinates of phylogenetic
structure (`pcps`

) and use a single axis for run a generalized linear
model (GLM, `glm`

) or use set of axis for run a distance-based redundancy
analysis (db-RDA, `rda`

).

The significance is obtained via two null models, one that shuffles sites across the
environmental gradient and another that shuffles terminal tips (taxa) across the phylogenetic
tree. The first null model (site shuffle) shuffles the site position across the environmental
gradient and rerun the same model, generating a null F value (or r value in Mantel test). The
second null model (taxa shuffle), shuffles terminal tips across the phylogenetic tree and
generates a null matrix containing phylogeny-weighted species composition and rerun the same
model, generating another null F value. In the pcps.sig function are generate set of null PCPS
and each null PCPS (or set of PCPS in RDA) is submitted to a procrustean adjustment
(see `procrustes`

), and the fitted values between observed PCPS and null PCPS is
obtained. The adjusted null PCPS is used to rerun the model, generating another null F value.
The observed F value (or r value) is compared independently with both null sets of F values
(or r value) to generate a probability value of the original F value being generated merely by
chance according to each null model.

The item formula is an expression of the form pcps.1 ~ model. The response term must be the pcps name, for example pcps.1, pcps.2, pcps.12.

The item AsFactors changes a environmental variable for the class `factor`

. The
sequence is the same that in the environmental data matrix, not the order in the formula.
Use `c`

to combine more that one variable.

`model` |
The model, an object of class glm, rda, adonis or mantel. |

`envir_class` |
The class of each variable in environmental data in glm. |

`formula` |
The formula used in glm. |

`statistic.obs` |
Observed F value or r value. |

`p.site.shuffle` |
The p value for the site shuffle null model. |

`p.taxa.shuffle` |
The p value for the taxa shuffle null model. |

Vanderlei Julio Debastiani <[email protected]>

Duarte, L.S. (2011). Phylogenetic habitat filtering influences forest nucleation in grasslands. Oikos, 120, 208:215.

`matrix.p`

, `pcps`

, `procrustes`

,
`glm`

, `rda`

, `adonis`

, `mantel`

1 2 3 4 5 | ```
data(flona)
pcps.sig(flona$community, flona$phylo, flona$environment, analysis = "glm",
formula = "pcps.1~alt", runs = 99)
matrix.p.sig(flona$community,flona$phylo,flona$environment[, 2, drop = FALSE],
analysis = "adonis", runs = 99)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.