rdacca.hp {rdacca.hp} | R Documentation |
Hierarchical and Variation Partitioning for Canonical Analysis Without Limiting the Number of Predictors (Matrices)
Description
Hierarchical and Variation Partitioning for Canonical Analysis Without Limiting the Number of Predictors (Matrices)
Usage
rdacca.hp(
dv,
iv,
method = c("RDA", "dbRDA", "CCA"),
type = c("adjR2", "R2"),
scale = FALSE,
add = FALSE,
sqrt.dist = FALSE,
n.perm = 1000,
var.part = FALSE
)
Arguments
dv |
Response variable, either a numeric vector, matrix or data frame. If method="dbRDA", dv should be of class "dist". |
iv |
Predictorsrepresented in either a data frame or a list of data frames. If it is a data frame, the relative importance of each column of the data frame will be evaluated; if it is a list, the relative importance of each element (matrix) will be evaluated. |
method |
Type of canonical analysis to be performed, should be a character string, either "RDA", "dbRDA" or "CCA", the default is "RDA". If the response variable (dv) is a numerical vector and method="RDA", the hierarchical and variation partitioning for the classical multiple regression is implemented.If response variable (dv) is of class "dist", "dbRDA" will be chosen automatically. |
type |
The type of total explained variation, either "R2" or "adjR2", in which "R2" is unadjusted R-square and "adjR2" is adjusted R-square, the default is "adjR2". The adjusted R-square is calculated using Ezekiel's formula (Ezekiel 1930) for RDA and dbRDA, while permutation procedure is used for CCA (Peres-Neto et al. 2006). |
scale |
Logical; If the columns of dv should be standardized to unit variance when method="RDA" is applied. |
add |
Logical; Specifies whether a constant should be added to the non-diagonal values to euclidify dissimilarities (see dbrda function in vegan for details). Choice "lingoes" (or TRUE) uses the recommended method of Legendre & Anderson (1999: "method 1") and "cailliez" uses their "method 2". The argument has an effect only when method="dbRDA". |
sqrt.dist |
Logical, Specifies whether the square root of dissimilarities should be taken. This often euclidifies dissimilarities. The argument has an effect only when method="dbRDA"(see dbrda function in vegan for details). |
n.perm |
Integer; Number of permutations for computing the adjusted R-square for CCA. The argument has an effect only when method="CCA". |
var.part |
Logical; If TRUE, the result of variation partitioning (2^N-1 fractions for N predictors or matrices) is shown, the default is FALSE. |
Details
This function conducts variation partitioning and hierarchical partitioning to calculate the unique, average shared (referred as to "common") and individual contributions of each predictor (or matrix) towards explained variation (R-square) on canonical analysis (RDA,CCA and dbRDA). Variation partitioning should be conducted before hierarchical partitioning. The former emphasizes unique and common variation among predictors, the latter emphasizes the overall importance of each predictor (or group of predictors). This function simultaneously implements variation and hierarchical partitioning for single- and multiple-response models without limiting in the number of predictors / matrices of predictors.
Value
a list containing
Method_Type |
The type of canonical analysis and whether the raw or adjusted R2 waswere used in the analysis. |
Total_explained_variation |
The explained variation for the full model (raw or adjusted R2). |
Var.part |
If var.part=TRUE, a matrix containing the value and percentage of all commonality (2^N-1 for N predictors or matrices). |
Hier.part |
A matrix containing unique, average shared, individual effects and percentage of individual effects towards total explained variation for each predictor or matrix. |
Author(s)
Jiangshan Lai lai@ibcas.ac.cn
Pedro Peres-Neto pedro.peres-neto@concordia.ca
Kim Nimon kim.nimon@gmail.com
References
Lai J.,Zou Y., Zhang J.,Peres-Neto P.(2022) Generalizing hierarchical and variation partitioning in multiple regression and canonical analyses using the rdacca.hp R package.Methods in Ecology and Evolution,13,782-788<DOI:10.1111/2041-210X.13800>
Chevan, A. & Sutherland, M. (1991). Hierarchical partitioning. American Statistician, 45, 90-96. doi:10.1080/00031305.1991.10475776
Nimon, K., Oswald, F.L. & Roberts, J.K. (2013). Yhat: Interpreting regression effects. R package version 2.0.0.
Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy analysis: testing multispecies responses in multifactorial ecological experiments. Ecological Monographs, 69, 1–24.<DOI:10.1890/0012-9615(1999)069[0001:dbratm]2.0.co;2>
Walsh, C.J. & Mac Nally, R. (2013) hier.part: Hierarchical Partitioning. R package version 1.0-4.
Peres-Neto, P.R., Legendre, P., Dray, S. & Borcard, D. (2006) Variation partitioning of species data matrices: Estimation and comparison of fractions. Ecology, 87, 2614-2625.<DOI: doi.org/10.1890/0012-9658(2006)87[2614:VPOSDM]2.0.CO;2>
Ezekiel, M. (1930) Methods of Correlational Analysis. Wiley, New York
Examples
library(vegan)
data(mite)
data(mite.env)
data(mite.xy)
data(mite.pcnm)
#Hellinger-transform the species dataset for RDA
mite.hel <- decostand(mite, "hellinger")
rdacca.hp(mite.hel,mite.env,method="RDA",type="adjR2")
rdacca.hp(vegdist(mite),mite.env,method="dbRDA",type="adjR2")
rdacca.hp(mite,mite.env,method="CCA",type="adjR2")
iv <- list(env=mite.env,xy=mite.xy,pcnm=mite.pcnm)
rdacca.hp(mite.hel,iv,method="RDA",var.part = TRUE)
rdacca.hp(vegdist(mite),iv,method="dbRDA",var.part = TRUE)
rdacca.hp(mite,iv,method="CCA",var.part = TRUE)