-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
85 lines (72 loc) · 3.55 KB
/
README.Rmd
File metadata and controls
85 lines (72 loc) · 3.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
editor_options:
markdown:
wrap: 72
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# douconca
<!-- badges: start -->
[](https://www.r-pkg.org/pkg/douconca)
[](https://www.r-pkg.org/pkg/douconca)
[](https://github.com/Biometris/douconca/actions?workflow=R-CMD-check)
[](https://app.codecov.io/gh/Biometris/douconca)
[](https://doi.org/10.5281/zenodo.13970152)
<!-- badges: end -->
R library `douconca` analyzes multi-trait multi-environment ecological
data by double constrained correspondence analysis (ter Braak & van Rossum,
2025) using `vegan` and native R code. It has a `formula` interface for
the trait- (column-) and environment- (row-) models, which allows to
assess, for example, the importance of trait interactions in shaping
ecological communities. Throughout the two step algorithm of ter Braak
et al. (2018) is used. This algorithm combines and extends community-
(sample-) and species-level analyses, i.e. the usual community weighted
means (CWM)-based regression analysis and the species-level analysis of
species-niche centroids (SNC)-based regression analysis. The CWM
regressions are specified with an environmental formula and the SNC
regressions are specified with a trait formula. dcCA finds the
environmental and trait gradients that optimize these regressions. The
first step uses
[cca](https://vegandevs.github.io/vegan/reference/cca.html){.uri}
(Oksanen et al. 2022) to regress the transposed abundance data on to the
traits and (weighted) redundancy analysis to regress the
community-weighted means (CWMs) of the orthonormalized traits, obtained
from the first step, on to the environmental predictors. The sample
total of the abundance data are used as weights. The redundancy analysis
is carried out using
[rda](https://vegandevs.github.io/vegan/reference/rda.html){.uri} if
sites have equal weights (after division of the rows by their total) or,
in the general weighted case, using `wrda`. Division by the sample total
has the advantage that the multivariate analysis corresponds with an
unweighted (multi-trait) community-level analysis, instead of being
weighted, which may give a puzzling difference between common univariate
and this multivariate analysis.
References:
ter Braak, CJF, Šmilauer P, and Dray S. 2018. Algorithms and
biplots for double constrained correspondence analysis. Environmental
and Ecological Statistics, 25(2), 171-197.
<https://doi.org/10.1007/s10651-017-0395-x>
ter Braak, C.J.F. and van Rossum, B. (2025).
Linking Multivariate Trait Variation to the Environment:
Advantages of Double Constrained Correspondence Analysis
with the R Package Douconca. Ecological Informatics, 88.
<https://doi.org/10.1016/j.ecoinf.2025.103143>
## Installation
You can install the CRAN version of `douconca` by:
``` r
install.packages("douconca")
```
You can install the development version of `douconca` by:
``` r
install.packages("remotes")
remotes::install_github("Biometris/douconca", ref = "develop", dependencies = TRUE)
```