We described the study by Lemmens et al. (2015) who sampled various biotic communities in artificial ponds in Belgium that were classified into one of four management types in Box 15.2. In addition to the biotic sampling, they recorded 15 environmental variables (e.g. depth, salinity, pH etc.) for each pond and covers of submerged, floating, and emergent vegetation. They used RDA to comprehensively examine the patterns in the various biotic communities (ordination) constrained by either management variables, drainage strategy, environmental variables, or the fish community. We will focus on the macroinvertebrate community (abundances of families) and do two RDAs, one constrained by the four management categories and a second constrained by the continuous environmental variables; we did not include management type with the environmental variables in one analysis as some of the predictors varied with management type (i.e. collinearity). We will use a covariance matrix for the invertebrate data and a Hellinger transformation that converts raw abundances to proportional abundances. This provides a comparison to the CCA we will do as a second analysis below.
The paper is here and the pond subset for this example is lemminvert2.csv and we also use the environmental variables lemmenv.csv
Lemmens, P., Mergeay, J., Van Wichelen, J., De Meester, L. & Declerck, S. A. (2015). The impact of conservation management on the community composition of multiple organism groups in eutrophic interconnected man-made ponds. PLoS One, 10, e0139371.
Load required packages (vegan) plus tidyverse, etc
# packages: vegan, car
source("../R/libraries.R")
library(vegan)
Read in data files
lemminvert <- read_csv("../data/lemminvert2.csv")
Rows: 23 Columns: 32── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (2): site, manag
dbl (30): managsymb, ca, ba, ac, ly, pla, sp, vi, co, na, ne, no, ple, ga, as, ce, cha, chi, cu, cy, di, em, ep, li, ps, pt, sc, st, hi, le
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
lemmenv <- read_csv("../data/lemmenv.csv")
Rows: 23 Columns: 17── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (2): site, manag
dbl (15): depth, silt, ph, o2, temp, surface, trans, cond, chla, tn, tp, susps, subm, reed, emerg
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Set no management as reference Do Hellinger transformation
lemmenv$manag <- factor(lemmenv$manag,levels=c("nm","nf","yf","li"))
lemminvert1 <- lemminvert[,-(1:3)]
lemminvert1h <- decostand(lemminvert1, method = "hellinger")
lemmens1.rda <- rda(lemminvert1h~manag, scale=FALSE, data=lemmenv)
summary(lemmens1.rda)
Call:
rda(formula = lemminvert1h ~ manag, data = lemmenv, scale = FALSE)
Partitioning of variance:
Inertia Proportion
Total 0.29764520 1.000000
Constrained 0.07746038 0.260244
Unconstrained 0.22018483 0.739756
Eigenvalues, and their contribution to the variance
Importance of components:
RDA1 RDA2 RDA3 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC11
Eigenvalue 0.04834204 0.02378647 0.005331859 0.05773624 0.04007458 0.03044115 0.02399770 0.01555144 0.01303226 0.01008716 0.007047255 0.005960197 0.004974072 0.003539032
Proportion Explained 0.16241499 0.07991553 0.017913474 0.19397671 0.13463875 0.10227329 0.08062518 0.05224826 0.04378454 0.03388988 0.023676695 0.020024504 0.016711412 0.011890102
Cumulative Proportion 0.16241499 0.24233052 0.260243992 0.45422070 0.58885945 0.69113274 0.77175792 0.82400618 0.86779072 0.90168060 0.925357295 0.945381799 0.962093211 0.973983313
PC12 PC13 PC14 PC15 PC16 PC17 PC18 PC19
Eigenvalue 0.002560003 0.001901488 0.001002660 0.0009101283 0.0007461774 0.00030008 0.0001744904 0.0001487147
Proportion Explained 0.008600855 0.006388438 0.003368641 0.0030577625 0.0025069357 0.00100818 0.0005862362 0.0004996375
Cumulative Proportion 0.982584168 0.988972607 0.992341248 0.9953990102 0.9979059459 0.99891413 0.9995003625 1.0000000000
Accumulated constrained eigenvalues
Importance of components:
RDA1 RDA2 RDA3
Eigenvalue 0.04834204 0.02378647 0.005331859
Proportion Explained 0.62408736 0.30707926 0.068833380
Cumulative Proportion 0.62408736 0.93116662 1.000000000
Scaling 2 for species and site scores
* Species are scaled proportional to eigenvalues
* Sites are unscaled: weighted dispersion equal on all dimensions
* General scaling constant of scores: 1.599669968
Species scores
RDA1 RDA2 RDA3 PC1 PC2 PC3
ca -0.042218357 -0.1890614607 -0.0398889939 0.0862415827 0.0325433453 -0.1658836456
ba 0.219522194 0.0780414669 -0.0026948860 0.2551936765 0.3938227222 0.0583275846
ac 0.044068201 -0.0403467076 -0.0310340826 0.0159159791 0.0256296462 0.0492706284
ly 0.057171015 -0.1478403460 -0.0383678760 0.0802996508 -0.1524691708 -0.0071619950
pla 0.413273606 0.0409396109 0.0271636077 0.2593835843 -0.2469870278 -0.1065784537
sp 0.097035182 -0.0259434253 -0.0681748530 0.0798124725 0.0099884883 0.0550594322
vi -0.003656771 -0.0076237535 -0.0001655009 -0.0004877092 -0.0062480782 0.0062517860
co -0.015391879 -0.1662034732 0.0982581429 0.2194348759 -0.2472384352 0.2660197237
na -0.013983453 -0.0223674532 -0.0365957338 0.0346785095 0.0073221278 -0.0285092335
ne -0.052083258 -0.1085848350 -0.0023572235 -0.0407952131 0.0738328689 0.0019615951
no 0.011259294 -0.0454356097 -0.0167037770 0.0254825699 0.0389808495 -0.0312430934
ple 0.158249177 -0.0161217983 -0.0792788288 0.0529739559 0.0642378486 0.0434338566
ga -0.016678439 0.0833243347 -0.0318165128 -0.0032969214 -0.0628541572 0.0225721036
as -0.047043876 -0.0724023412 -0.0099527998 0.0319136645 0.0737653081 0.0001040127
ce -0.026123471 0.0221731301 -0.0413625573 -0.0822952855 0.0018435734 -0.0566215230
cha 0.023812266 0.2122946813 -0.0272200934 -0.2062083997 -0.0695490095 -0.0419204559
chi -0.232454053 0.1166326703 0.0701278929 -0.4677989007 -0.0041428316 0.1645004775
cu -0.013308429 0.1162800290 0.0196634540 -0.0343516134 -0.0329966609 -0.0411598635
cy -0.010287839 0.0125318357 -0.0100598206 0.0026431568 -0.0091337033 0.0064859760
di -0.224316909 0.0718084499 -0.0744772847 -0.0941734081 -0.1041659659 -0.2245377929
em 0.020108509 0.0063526519 0.0094245232 -0.0030970991 -0.0219489719 -0.0177964889
ep 0.002247576 0.0070495365 0.0180919468 -0.0043718852 -0.0137381960 0.0024695038
li -0.206998367 -0.0152979853 -0.0481134201 -0.0485032596 0.0467391245 -0.2178741282
ps 0.002247576 0.0070495365 0.0180919468 -0.0043718852 -0.0137381960 0.0024695038
pt 0.001454174 0.0045610264 0.0117054288 -0.0066768372 -0.0057140786 -0.0006091175
sc 0.007987652 -0.0003116563 -0.0038761897 0.0005701017 -0.0036719706 -0.0090632275
st -0.008091073 0.0116577153 0.0123344740 0.0586797393 -0.0226357349 -0.0259272450
hi 0.010802814 0.0413086950 -0.0307523950 0.0528279802 -0.0343488937 -0.0377547349
le 0.001202586 -0.0459728286 0.0057118340 0.0330743365 -0.0004902196 -0.0690871579
Site scores (weighted sums of species scores)
RDA1 RDA2 RDA3 PC1 PC2 PC3
row1 -0.073005947 -0.225203724 1.19628174 0.20803234 -0.06736007 0.44247209
row2 -0.171654789 0.328543961 0.74483648 -0.29642499 -0.25368234 -0.02704239
row3 -0.289448807 0.730824645 -0.18196659 -0.51541959 0.03115089 -0.33888480
row4 0.701340601 -0.078980185 0.13234592 0.66661422 -0.16926890 -0.28377722
row5 -0.041985234 0.079149329 0.85893568 -0.12557836 -0.39461698 0.07093421
row6 0.262111442 0.380614478 0.36761341 0.06277639 0.85377740 0.13629811
row7 0.581350931 -0.164052704 0.13276477 0.01864834 0.01490610 0.17753522
row8 0.994776214 -0.472956279 -0.41429736 0.48269052 -0.11306757 0.01310150
row9 -0.004775549 0.354159563 0.51344729 -0.60761833 -0.26123645 0.28996182
row10 0.637637153 0.174535513 -0.31672796 0.04061289 -0.26158379 -0.64564607
row11 0.636132497 -0.002694914 -1.29584647 0.06566657 0.62098171 0.16504754
row12 -0.328257699 -0.240563539 0.64377276 -0.21496139 0.64332190 0.33926538
row13 -0.351423022 -0.254896136 0.72878719 -0.18143495 -0.03741431 0.28576549
row14 -0.253919995 0.016044360 -0.23560052 -0.33335116 0.03384095 -0.03371128
row15 0.398594328 -0.700899273 0.29061107 0.57984181 -0.42581375 0.33188382
row16 -0.197100691 -0.921646288 -1.06491194 0.31695693 0.21403193 -0.63399523
row17 -0.591949479 -0.343047503 -1.10577537 -0.13796941 -0.05539735 -0.66199866
row18 -0.202301968 -0.737192460 0.67403571 -0.02908183 -0.37256937 0.37279047
row19 -0.290689701 0.344690234 0.02248161 0.08766745 -0.30294398 0.21512494
row20 -0.300368695 0.145430957 -0.67563289 0.35829647 0.40009972 -0.16713619
row21 -0.543024844 0.717447003 -0.57787021 -0.42432399 -0.03085061 -0.02800917
row22 -0.543686884 0.569492831 -0.87110246 -0.26221624 -0.03858976 -0.34253573
row23 -0.028349863 0.301200131 0.43381813 0.24057631 -0.02771537 0.32255615
Site constraints (linear combinations of constraining variables)
RDA1 RDA2 RDA3 PC1 PC2 PC3
row1 0.06455954 0.20249142 0.519674440 0.20803234 -0.06736007 0.44247209
row2 0.06455954 0.20249142 0.519674440 -0.29642499 -0.25368234 -0.02704239
row3 0.06455954 0.20249142 0.519674440 -0.51541959 0.03115089 -0.33888480
row4 0.06455954 0.20249142 0.519674440 0.66661422 -0.16926890 -0.28377722
row5 0.06455954 0.20249142 0.519674440 -0.12557836 -0.39461698 0.07093421
row6 0.06455954 0.20249142 0.519674440 0.06277639 0.85377740 0.13629811
row7 0.56902425 -0.02220176 -0.276131946 0.01864834 0.01490610 0.17753522
row8 0.56902425 -0.02220176 -0.276131946 0.48269052 -0.11306757 0.01310150
row9 0.56902425 -0.02220176 -0.276131946 -0.60761833 -0.26123645 0.28996182
row10 0.56902425 -0.02220176 -0.276131946 0.04061289 -0.26158379 -0.64564607
row11 0.56902425 -0.02220176 -0.276131946 0.06566657 0.62098171 0.16504754
row12 -0.21805122 -0.45460012 -0.009868727 -0.21496139 0.64332190 0.33926538
row13 -0.21805122 -0.45460012 -0.009868727 -0.18143495 -0.03741431 0.28576549
row14 -0.21805122 -0.45460012 -0.009868727 -0.33335116 0.03384095 -0.03371128
row15 -0.21805122 -0.45460012 -0.009868727 0.57984181 -0.42581375 0.33188382
row16 -0.21805122 -0.45460012 -0.009868727 0.31695693 0.21403193 -0.63399523
row17 -0.21805122 -0.45460012 -0.009868727 -0.13796941 -0.05539735 -0.66199866
row18 -0.21805122 -0.45460012 -0.009868727 -0.02908183 -0.37256937 0.37279047
row19 -0.34122400 0.41565223 -0.333661164 0.08766745 -0.30294398 0.21512494
row20 -0.34122400 0.41565223 -0.333661164 0.35829647 0.40009972 -0.16713619
row21 -0.34122400 0.41565223 -0.333661164 -0.42432399 -0.03085061 -0.02800917
row22 -0.34122400 0.41565223 -0.333661164 -0.26221624 -0.03858976 -0.34253573
row23 -0.34122400 0.41565223 -0.333661164 0.24057631 -0.02771537 0.32255615
Biplot scores for constraining variables
RDA1 RDA2 RDA3 PC1 PC2 PC3
manag1 0.03267726 -0.9562533 0.29070906 0 0 0
manag2 0.89970361 -0.4327817 0.05686278 0 0 0
manag3 0.39536799 -0.1630427 0.90393652 0 0 0
Centroids for factor constraints
RDA1 RDA2 RDA3 PC1 PC2 PC3
managnm -0.21805122 -0.45460012 -0.009868727 0 0 0
managnf 0.56902425 -0.02220176 -0.276131946 0 0 0
managyf 0.06455954 0.20249142 0.519674440 0 0 0
managli -0.34122400 0.41565223 -0.333661164 0 0 0
RsquareAdj(lemmens1.rda)
$r.squared
[1] 0.2602439924
$adj.r.squared
[1] 0.1434404122
coef(lemmens1.rda)
RDA1 RDA2 RDA3
manag1 -0.14792323866 -0.30627290057 0.009457027199
manag2 0.34410041797 -0.03596817252 -0.156991818312
manag3 0.02874492909 0.10449403919 0.340489788768
anova.cca(lemmens1.rda, permutations=1000)
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ manag, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
Model 3 0.077460376 2.22805 0.003996 **
Residual 19 0.220184826
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens1.rda, permutations=1000, by="margin")
Permutation test for rda under reduced model
Marginal effects of terms
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ manag, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
manag 3 0.077460376 2.22805 0.002997 **
Residual 19 0.220184826
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens1.rda, permutations=1000, by="axis")
Permutation test for rda under reduced model
Forward tests for axes
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ manag, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
RDA1 1 0.048342041 4.17149 0.004995 **
RDA2 1 0.023786475 2.05256 0.098901 .
RDA3 1 0.005331859 0.46009 0.957043
Residual 19 0.220184826
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Do triplot; category scaling type = 2 probably the best plots to display
ordiplot(lemmens1.rda,scaling=1,type="text")
ordiplot(lemmens1.rda,scaling=2,type="text")
Preliminary look at scatterplot; look for variables with unusual distributions and check for correlations
scatterplotMatrix(~depth+silt+ph+temp+surface+cond+chla+tn+tp+susps+subm+reed+emerg,data=lemmenv,diagonal=list(method='boxplot'))
cor(lemmenv[,c('depth','silt','ph','o2','temp','surface','trans','cond','chla','tn','tp','susps','subm','reed','emerg')])
depth silt ph o2 temp surface trans cond chla tn tp
depth 1.0000000000000 -0.017616760461 0.13430650028 -0.27121523185 -0.47112653499 0.44942137904 0.264253776867 0.436551706608 -0.347611541276 0.23362402503 0.106097653875
silt -0.0176167604607 1.000000000000 -0.17348171304 -0.17841277408 -0.25963499972 -0.04291205706 0.024811354455 -0.238480267142 0.250808793062 -0.47572668858 -0.314323812990
ph 0.1343065002808 -0.173481713042 1.00000000000 0.69636421850 0.34190093476 0.10830511855 -0.262039580615 0.170589213338 0.418416898246 0.03097470515 0.352357063644
o2 -0.2712152318545 -0.178412774082 0.69636421850 1.00000000000 0.59310269041 0.11258805864 -0.381857745485 -0.055885189668 0.532365462299 0.15752860554 0.118275090681
temp -0.4711265349923 -0.259634999717 0.34190093476 0.59310269041 1.00000000000 -0.10252025899 -0.512112034212 -0.026694034703 0.439457016299 0.06453460843 -0.053945908244
surface 0.4494213790397 -0.042912057064 0.10830511855 0.11258805864 -0.10252025899 1.00000000000 0.114288567110 0.450017240377 0.054155717085 0.34550249931 0.271624362448
trans 0.2642537768666 0.024811354455 -0.26203958062 -0.38185774548 -0.51211203421 0.11428856711 1.000000000000 0.005469303119 -0.588751746901 0.20399197572 0.061584252994
cond 0.4365517066083 -0.238480267142 0.17058921334 -0.05588518967 -0.02669403470 0.45001724038 0.005469303119 1.000000000000 -0.190481924873 0.13957964040 0.306847862735
chla -0.3476115412764 0.250808793062 0.41841689825 0.53236546230 0.43945701630 0.05415571708 -0.588751746901 -0.190481924873 1.000000000000 -0.27957165781 0.009360204518
tn 0.2336240250303 -0.475726688577 0.03097470515 0.15752860554 0.06453460843 0.34550249931 0.203991975724 0.139579640402 -0.279571657813 1.00000000000 0.500553919228
tp 0.1060976538753 -0.314323812990 0.35235706364 0.11827509068 -0.05394590824 0.27162436245 0.061584252994 0.306847862735 0.009360204518 0.50055391923 1.000000000000
susps -0.3862440505484 0.009748267036 0.48986299063 0.57466492943 0.67849360517 -0.05300543834 -0.751549429641 -0.048437804756 0.782024207885 -0.11079257481 0.140758517363
subm -0.0784175341518 -0.091227150419 -0.21175426468 -0.11745731349 -0.18746419839 -0.18724864572 0.191430935321 -0.394005804277 0.060139781123 0.15549644782 0.062217715215
reed 0.0006500370807 -0.277002133433 -0.14608695599 0.01560271693 -0.03402615003 0.11725585051 0.076445586444 -0.066476696670 0.066846774466 0.34219123738 0.114074475863
emerg -0.2424572860053 0.105829333082 -0.38656803058 -0.09980845727 0.09539126577 0.08875116750 -0.108264276403 -0.205514809634 0.173774308694 0.06346373809 -0.285908967371
susps subm reed emerg
depth -0.386244050548 -0.07841753415 0.0006500370807 -0.24245728601
silt 0.009748267036 -0.09122715042 -0.2770021334331 0.10582933308
ph 0.489862990629 -0.21175426468 -0.1460869559873 -0.38656803058
o2 0.574664929431 -0.11745731349 0.0156027169307 -0.09980845727
temp 0.678493605174 -0.18746419839 -0.0340261500303 0.09539126577
surface -0.053005438344 -0.18724864572 0.1172558505087 0.08875116750
trans -0.751549429641 0.19143093532 0.0764455864441 -0.10826427640
cond -0.048437804756 -0.39400580428 -0.0664766966696 -0.20551480963
chla 0.782024207885 0.06013978112 0.0668467744656 0.17377430869
tn -0.110792574812 0.15549644782 0.3421912373808 0.06346373809
tp 0.140758517363 0.06221771522 0.1140744758629 -0.28590896737
susps 1.000000000000 -0.28599187142 -0.1330961940857 0.07991696144
subm -0.285991871423 1.00000000000 0.7316333379287 0.20746707245
reed -0.133096194086 0.73163333793 1.0000000000000 0.27856872790
emerg 0.079916961444 0.20746707245 0.2785687278980 1.00000000000
# transform chla and susps
lemmenv$lchla <- log10(lemmenv$chla)
lemmenv$lsusps <- log10(lemmenv$susps)
scatterplotMatrix(~depth+silt+ph+o2+temp+surface+trans+cond+lchla+tn+tp+lsusps+subm+reed+emerg,data=lemmenv,diagonal=list(method='boxplot'))
cor(lemmenv[,c('depth','silt','ph','o2','temp','surface','trans','cond','lchla','tn','tp','lsusps','subm','reed','emerg')])
depth silt ph o2 temp surface trans cond lchla tn tp
depth 1.0000000000000 -0.01761676046 0.13430650028 -0.27121523185 -0.47112653499 0.44942137904 0.264253776867 0.436551706608 -0.250339753145 0.23362402503 0.10609765388
silt -0.0176167604607 1.00000000000 -0.17348171304 -0.17841277408 -0.25963499972 -0.04291205706 0.024811354455 -0.238480267142 -0.115500652408 -0.47572668858 -0.31432381299
ph 0.1343065002808 -0.17348171304 1.00000000000 0.69636421850 0.34190093476 0.10830511855 -0.262039580615 0.170589213338 0.429453499027 0.03097470515 0.35235706364
o2 -0.2712152318545 -0.17841277408 0.69636421850 1.00000000000 0.59310269041 0.11258805864 -0.381857745485 -0.055885189668 0.520567397541 0.15752860554 0.11827509068
temp -0.4711265349923 -0.25963499972 0.34190093476 0.59310269041 1.00000000000 -0.10252025899 -0.512112034212 -0.026694034703 0.571308038750 0.06453460843 -0.05394590824
surface 0.4494213790397 -0.04291205706 0.10830511855 0.11258805864 -0.10252025899 1.00000000000 0.114288567110 0.450017240377 -0.047841498152 0.34550249931 0.27162436245
trans 0.2642537768666 0.02481135446 -0.26203958062 -0.38185774548 -0.51211203421 0.11428856711 1.000000000000 0.005469303119 -0.782615681927 0.20399197572 0.06158425299
cond 0.4365517066083 -0.23848026714 0.17058921334 -0.05588518967 -0.02669403470 0.45001724038 0.005469303119 1.000000000000 -0.167905947561 0.13957964040 0.30684786274
lchla -0.2503397531454 -0.11550065241 0.42945349903 0.52056739754 0.57130803875 -0.04784149815 -0.782615681927 -0.167905947561 1.000000000000 -0.16572488776 0.06844173512
tn 0.2336240250303 -0.47572668858 0.03097470515 0.15752860554 0.06453460843 0.34550249931 0.203991975724 0.139579640402 -0.165724887761 1.00000000000 0.50055391923
tp 0.1060976538753 -0.31432381299 0.35235706364 0.11827509068 -0.05394590824 0.27162436245 0.061584252994 0.306847862735 0.068441735122 0.50055391923 1.00000000000
lsusps -0.3302692268658 0.01952331251 0.39782646577 0.52545125907 0.67369835084 -0.14207718016 -0.754240584318 -0.082873919777 0.879064890447 -0.09724699645 0.08021720445
subm -0.0784175341518 -0.09122715042 -0.21175426468 -0.11745731349 -0.18746419839 -0.18724864572 0.191430935321 -0.394005804277 -0.028987516710 0.15549644782 0.06221771522
reed 0.0006500370807 -0.27700213343 -0.14608695599 0.01560271693 -0.03402615003 0.11725585051 0.076445586444 -0.066476696670 0.007427848248 0.34219123738 0.11407447586
emerg -0.2424572860053 0.10582933308 -0.38656803058 -0.09980845727 0.09539126577 0.08875116750 -0.108264276403 -0.205514809634 0.078136797535 0.06346373809 -0.28590896737
lsusps subm reed emerg
depth -0.33026922687 -0.07841753415 0.0006500370807 -0.24245728601
silt 0.01952331251 -0.09122715042 -0.2770021334331 0.10582933308
ph 0.39782646577 -0.21175426468 -0.1460869559873 -0.38656803058
o2 0.52545125907 -0.11745731349 0.0156027169307 -0.09980845727
temp 0.67369835084 -0.18746419839 -0.0340261500303 0.09539126577
surface -0.14207718016 -0.18724864572 0.1172558505087 0.08875116750
trans -0.75424058432 0.19143093532 0.0764455864441 -0.10826427640
cond -0.08287391978 -0.39400580428 -0.0664766966696 -0.20551480963
lchla 0.87906489045 -0.02898751671 0.0074278482481 0.07813679754
tn -0.09724699645 0.15549644782 0.3421912373808 0.06346373809
tp 0.08021720445 0.06221771522 0.1140744758629 -0.28590896737
lsusps 1.00000000000 -0.25143199023 -0.1569631837490 0.08786419690
subm -0.25143199023 1.00000000000 0.7316333379287 0.20746707245
reed -0.15696318375 0.73163333793 1.0000000000000 0.27856872790
emerg 0.08786419690 0.20746707245 0.2785687278980 1.00000000000
# exclude o2, trans, susps and subm
# standardize remaining env variables
lemmenv$depth <- scale(lemmenv$depth)
lemmenv$silt <- scale(lemmenv$silt)
lemmenv$ph <- scale(lemmenv$ph)
lemmenv$temp <- scale(lemmenv$temp)
lemmenv$surface <- scale(lemmenv$surface)
lemmenv$cond <- scale(lemmenv$cond)
lemmenv$clhla <- scale(lemmenv$lchla)
lemmenv$tn <- scale(lemmenv$tn)
lemmenv$tp <- scale(lemmenv$tp)
lemmenv$reed <- scale(lemmenv$reed)
lemmenv$emerg <- scale(lemmenv$emerg)
lemmens2.rda <- rda(lemminvert1h~depth+silt+ph+temp+surface+cond+lchla+tn+tp+reed+emerg, scale=FALSE, data=lemmenv)
summary(lemmens2.rda)
Call:
rda(formula = lemminvert1h ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Partitioning of variance:
Inertia Proportion
Total 0.2976452 1.0000000
Constrained 0.1738784 0.5841801
Unconstrained 0.1237668 0.4158199
Eigenvalues, and their contribution to the variance
Importance of components:
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6 RDA7 RDA8 RDA9 RDA10 RDA11 PC1 PC2 PC3
Eigenvalue 0.07097527 0.02767266 0.02190875 0.01548858 0.01387985 0.008638895 0.007031864 0.00337650 0.002814733 0.001299755 0.0007915507 0.03586183 0.02942058 0.02094292
Proportion Explained 0.23845597 0.09297196 0.07360692 0.05203707 0.04663220 0.029024135 0.023624989 0.01134404 0.009456670 0.004366793 0.0026593768 0.12048515 0.09884445 0.07036202
Cumulative Proportion 0.23845597 0.33142793 0.40503485 0.45707192 0.50370412 0.532728252 0.556353241 0.56769729 0.577153955 0.581520749 0.5841801256 0.70466528 0.80350973 0.87387175
PC4 PC5 PC6 PC7 PC8 PC9 PC10 PC11
Eigenvalue 0.01212848 0.00888458 0.006672897 0.003610473 0.00317100 0.001995268 0.0007039954 0.0003747779
Proportion Explained 0.04074811 0.02984956 0.022418964 0.012130124 0.01065362 0.006703511 0.0023652167 0.0012591431
Cumulative Proportion 0.91461985 0.94446942 0.966888383 0.979018506 0.98967213 0.996375640 0.9987408569 1.0000000000
Accumulated constrained eigenvalues
Importance of components:
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6 RDA7 RDA8 RDA9 RDA10 RDA11
Eigenvalue 0.07097527 0.02767266 0.02190875 0.01548858 0.01387985 0.008638895 0.007031864 0.00337650 0.002814733 0.001299755 0.0007915507
Proportion Explained 0.40818911 0.15914948 0.12600039 0.08907710 0.07982503 0.049683537 0.040441274 0.01941874 0.016187936 0.007475080 0.0045523233
Cumulative Proportion 0.40818911 0.56733859 0.69333898 0.78241607 0.86224110 0.911924642 0.952365916 0.97178466 0.987972596 0.995447677 1.0000000000
Scaling 2 for species and site scores
* Species are scaled proportional to eigenvalues
* Sites are unscaled: weighted dispersion equal on all dimensions
* General scaling constant of scores: 1.599669968
Species scores
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6
ca -0.040314285 0.051180659 -0.002966078 -0.025106699 -0.163855189 0.0379378967
ba 0.304569884 -0.172043204 0.009111099 0.087341567 -0.129489733 -0.0916085265
ac 0.046335126 0.019282738 0.049488223 0.053424548 -0.055576611 0.0194450021
ly 0.086157869 0.142163652 -0.001328332 -0.114755253 -0.014758474 -0.0863685490
pla 0.431888737 -0.059812354 -0.164820024 -0.123075849 0.139799367 0.0242151935
sp 0.089456255 0.020244639 0.061366679 0.036051870 -0.040697588 0.0143647653
vi -0.006038184 0.008666235 0.008224939 -0.004236505 -0.005552347 0.0033697104
co 0.169752713 0.323860350 0.150226205 0.111363608 0.093513359 -0.0004568894
na 0.006748809 0.009378947 -0.001821789 0.013938375 -0.039779543 -0.0333568146
ne -0.058473027 0.082836960 -0.031545445 -0.095091598 -0.002573723 0.0794572663
no 0.016482507 -0.008252287 0.025142330 0.017104769 -0.055398099 0.0151618885
ple 0.129975906 -0.020101649 0.053429196 0.094914537 -0.037499051 0.0338677954
ga 0.032761063 0.011357433 -0.036279852 0.033113697 -0.056388041 0.1275417400
as -0.011826215 0.031018093 -0.017219683 -0.049797777 -0.089714372 0.0661891209
ce -0.078617142 -0.087509857 -0.006770293 -0.020214523 -0.008582845 -0.0632445269
cha -0.119332213 -0.138008979 -0.066765089 0.172875500 0.115457802 0.0919733572
chi -0.343445511 -0.130597078 0.196190373 -0.102269123 0.065911720 -0.0034231615
cu -0.011476516 0.023827552 -0.082105717 0.052849569 0.027895852 -0.0255806305
cy 0.002682547 0.007295335 -0.004338521 0.006008220 -0.012608084 0.0213730200
di -0.257741120 0.074039622 -0.175570148 0.110605317 0.022257342 -0.1061439600
em 0.022347987 -0.007514424 -0.014964847 -0.023253243 0.005592068 -0.0016356977
ep 0.009112157 0.002477673 0.001659743 -0.010479471 -0.004047856 -0.0039627367
li -0.230659392 0.130406203 -0.191372436 -0.021008202 -0.062416875 0.0136781060
ps 0.009112157 0.002477673 0.001659743 -0.010479471 -0.004047856 -0.0039627367
pt -0.003737024 -0.002877518 -0.001260698 0.006007860 0.015108679 -0.0029752249
sc 0.005919243 -0.004468602 -0.007434742 -0.005712605 0.004311105 0.0010406835
st 0.027458853 0.006659646 -0.037079919 -0.003595728 -0.015526115 0.0306059658
hi 0.034345677 -0.018529411 -0.083730692 0.008191925 -0.033024052 0.0157934977
le 0.014643639 -0.017170746 -0.016542716 -0.027015119 -0.020465767 0.0090111850
Site scores (weighted sums of species scores)
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6
row1 0.09503766 0.496511280 0.45844157 0.638929514 0.29831654 -0.18858787
row2 -0.19882431 -0.129901398 0.15958040 0.034678639 0.71339112 0.15481611
row3 -0.38427083 -0.480100873 -0.19599884 -0.001506960 0.42765391 0.18938180
row4 0.60512811 -0.005917503 -0.57391884 -0.102213116 0.15964212 0.40554824
row5 -0.03598877 0.168989735 0.12348049 -0.369663811 0.66348492 0.07588561
row6 0.17237120 -0.841005532 0.34721485 -0.129119098 -0.59944077 -0.52584025
row7 0.47101035 -0.159390123 0.10419618 -0.373881774 -0.01267008 -0.32466114
row8 0.83276847 0.059322875 -0.18543132 -0.176524970 -0.06220928 0.01013435
row9 -0.06357987 -0.136053337 0.28032364 0.272477867 0.69815507 0.24482857
row10 0.44335612 -0.315328646 -0.91323397 -0.454836794 0.30778799 0.07388969
row11 0.47428428 -0.425219981 0.20257289 0.777944363 -0.89414670 0.28101474
row12 -0.22019694 -0.030434229 0.40369574 -0.590480952 -0.55295651 0.63250130
row13 -0.22498681 0.195611494 0.57302412 0.123922164 0.03830853 -0.08087592
row14 -0.26705727 -0.195431601 0.24723515 -0.434871172 -0.10291715 -0.51940482
row15 0.46743392 0.764580275 0.10104454 0.007824261 0.28145156 -0.46716393
row16 -0.04608456 0.461446002 -0.28071434 -0.079851342 -1.30103272 -0.17061215
row17 -0.43487870 0.735151060 -0.68374471 0.177023921 -0.30886394 -0.13257751
row18 -0.07898715 0.630258510 0.57031297 -0.481955873 0.04767061 0.45850565
row19 -0.20965056 0.094917223 -0.04799517 0.272945855 0.10902242 0.75939477
row20 -0.18197345 0.008505755 -0.35531776 0.654436525 -0.67729777 -0.67259498
row21 -0.61901737 -0.490135669 -0.01772936 0.193184590 0.36702134 0.39628808
row22 -0.56430489 -0.298653660 -0.40537609 -0.121376464 0.11379040 -0.37682640
row23 -0.03158862 -0.107721656 0.08833785 0.162914628 0.28583838 -0.22304396
Site constraints (linear combinations of constraining variables)
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6
row1 0.13418726 0.33340224 0.46138505 0.436013153 0.7830594568 0.003094835
row2 -0.16590900 -0.12775035 -0.05596999 0.266725049 0.6707651944 -0.132088143
row3 -0.25123014 0.05335266 0.15503841 0.097501451 0.1589690766 0.119230411
row4 0.43954416 -0.17820651 -0.74971455 -0.039235717 -0.0116209246 0.312759669
row5 0.26173828 0.07116887 0.04767457 -0.301013111 -0.1162709211 -0.113825947
row6 0.06582670 -0.72623524 0.26026700 -0.359549708 -0.2093260540 -0.223428710
row7 0.31835426 0.10004162 0.08186461 -0.230254865 0.1146924395 -0.058067874
row8 0.38506110 0.03162611 0.18251340 -0.006624310 0.1273493505 0.054930840
row9 -0.01576109 -0.30810904 0.01438833 0.320194495 0.3504430031 0.299202370
row10 0.42167497 -0.31833419 -0.52963608 -0.406954448 0.3071144589 0.074136194
row11 0.53708508 -0.19234365 0.23292865 0.640191016 -0.4122745182 0.249975396
row12 -0.06251124 0.10682784 0.02987148 -0.595135713 -0.0956509036 0.404476229
row13 0.06367454 -0.15355532 0.40821160 -0.152147197 0.0007011634 -0.083714719
row14 -0.23862486 -0.09331711 0.27530712 -0.417332216 -0.0720027748 -0.386536013
row15 0.41792606 0.46692345 0.01240867 0.008829802 -0.0404046336 -0.628667404
row16 -0.17103605 0.02763111 0.05220553 -0.039565632 -0.5582286504 0.098306262
row17 -0.51989503 0.70352634 -0.59197303 -0.107001335 0.2284971433 0.249933181
row18 -0.36005350 0.51676271 0.49044846 -0.252620398 -0.3310833365 0.200933929
row19 0.08897394 0.24196954 -0.14389879 0.199278864 -0.4181812195 0.708894025
row20 -0.20652989 0.02312213 -0.47342721 0.718205892 -0.5620665961 -0.643684769
row21 -0.77630008 -0.68340279 0.08957131 0.261793558 0.0424140255 0.298594015
row22 -0.38197591 -0.12644811 -0.43349662 -0.223614363 0.1042753174 -0.552794870
row23 0.01578044 0.23134770 0.18403206 0.182315734 -0.0611700972 -0.251658905
Biplot scores for constraining variables
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6
depth -0.38025617 0.037500765 0.441328242 0.02926996 0.15246433 0.21574180
silt -0.12622235 0.327063833 -0.189388144 0.30304528 -0.27143151 -0.26900356
ph -0.36008456 -0.309720027 -0.224646159 -0.20593812 -0.07102849 -0.45858964
temp -0.07344996 0.184267055 0.045366573 -0.04358239 0.13140834 -0.53338199
surface -0.50181469 -0.001665733 -0.190505900 0.48865498 0.56396937 0.19297903
cond -0.17317746 0.092075713 -0.030146774 0.02935638 0.50772596 0.23615997
lchla -0.44160784 -0.135361778 -0.010691045 0.11047040 -0.33236806 -0.52758223
tn -0.07563294 -0.582023335 0.373986202 0.06007080 0.47971628 0.19132635
tp -0.18741753 -0.725037122 0.002917769 -0.10851592 0.53644848 -0.13367130
reed 0.49069072 -0.299802661 0.042627816 0.26388598 0.23672030 -0.22718306
emerg 0.32671747 0.012823475 0.176931640 0.85696276 -0.17285278 0.07862961
RsquareAdj(lemmens2.rda)
$r.squared
[1] 0.5841801256
$adj.r.squared
[1] 0.1683602513
coef(lemmens2.rda)
RDA1 RDA2 RDA3 RDA4 RDA5 RDA6 RDA7 RDA8 RDA9 RDA10 RDA11
depth -0.027827013960 0.097787772113 0.281776841418 0.001809248940 0.041750117699 -0.09783228343 0.06238417334 0.1275091139774 -0.109191233756 -0.035931245513 -0.02001413486
silt -0.041524684620 0.002443836661 -0.014896200153 0.061110545016 -0.003516765753 -0.12487992285 -0.19851367319 0.0002741853404 0.042173793165 0.015283593038 0.12489367926
ph 0.027784824497 -0.099819078919 -0.126115529822 0.019408181201 -0.099856889972 -0.03236490214 0.06625034925 -0.0296118847212 -0.049888738528 -0.184727843157 0.11715791787
temp 0.040159466862 0.182510222456 0.156464306608 -0.022332642996 0.190844935945 -0.20024836705 0.11878751921 0.0239344229513 0.025240454583 0.028688551523 0.04354011837
surface -0.106615297865 0.058287161409 -0.147576852598 0.072742800898 0.108027770955 0.04771445227 0.08158333216 0.0842996919252 0.069740524542 -0.029899758357 -0.06813214843
cond 0.007432000526 -0.009086445965 -0.057118967599 0.023625776294 -0.004346753854 0.06268509025 -0.17357130013 -0.2267534018730 -0.091851032794 -0.008026561415 0.02717284095
lchla -0.241782993060 -0.118248368166 0.008496115872 0.038842483023 -0.201350043099 0.01945458343 -0.18044651869 -0.1622892530912 0.037023640316 0.088684719506 -0.20660847510
tn -0.086852207478 -0.151468225314 0.021292558754 -0.004888437097 -0.066966106883 0.09508382346 -0.17111591842 -0.1451144331073 0.190145382693 -0.078015669299 0.09328951688
tp 0.034022811646 -0.059610394027 0.092183887666 0.011124810860 0.149760449615 -0.12024702246 0.09625926497 0.1248741184542 -0.128093530846 0.178299057469 0.01768816041
reed 0.115994815964 -0.010115642476 -0.034817128316 0.018071533005 0.049014623705 -0.11848380762 -0.09662756860 0.0215409951205 -0.004064957083 -0.088554826464 -0.10755779866
emerg 0.081302586926 -0.035022909372 0.079539514733 0.181049457796 -0.049261625592 0.01303034263 0.11961367593 -0.0167142896245 -0.090135200928 0.017557975666 0.07219658630
anova.cca(lemmens2.rda, permutations=1000)
Permutation test for rda under reduced model
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
Model 11 0.17387841 1.40489 0.067932 .
Residual 11 0.12376679
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens2.rda, permutations=1000, by="margin")
Permutation test for rda under reduced model
Marginal effects of terms
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
depth 1 0.016940265 1.50560 0.154845
silt 1 0.007852052 0.69787 0.703297
ph 1 0.009913454 0.88108 0.517483
temp 1 0.016429713 1.46022 0.158841
surface 1 0.021651029 1.92427 0.046953 *
cond 1 0.005374499 0.47767 0.913087
lchla 1 0.024329692 2.16235 0.039960 *
tn 1 0.011761439 1.04532 0.390609
tp 1 0.008175005 0.72657 0.677323
reed 1 0.020252613 1.79999 0.086913 .
emerg 1 0.016889424 1.50108 0.147852
Residual 11 0.123766790
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens2.rda, permutations=1000, by="axis")
Permutation test for rda under reduced model
Forward tests for axes
Permutation: free
Number of permutations: 1000
Model: rda(formula = lemminvert1h ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df Variance F Pr(>F)
RDA1 1 0.070975274 6.30806 0.050949 .
RDA2 1 0.027672659 2.45946 0.829171
RDA3 1 0.021908747 1.94718 0.934066
RDA4 1 0.015488584 1.37658 0.993007
RDA5 1 0.013879850 1.23360 0.998002
RDA6 1 0.008638895 0.76780 1.000000
RDA7 1 0.007031864 0.62497 1.000000
RDA8 1 0.003376500 0.30009 1.000000
RDA9 1 0.002814733 0.25016 1.000000
RDA10 1 0.001299755 0.11552 1.000000
RDA11 1 0.000791551 0.07035 1.000000
Residual 11 0.123766790
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# ideally would like ponds represented by symbols, a different one for each management category
ordiplot(lemmens2.rda,scaling=1,type="text")
ordiplot(lemmens2.rda,scaling=2,type="text")
lemmens1.cca <- cca(lemminvert1~manag, scale=FALSE, data=lemmenv)
summary(lemmens1.cca)
Call:
cca(formula = lemminvert1 ~ manag, data = lemmenv, scale = FALSE)
Partitioning of scaled Chi-square:
Inertia Proportion
Total 1.3064388 1.0000000
Constrained 0.3205724 0.2453788
Unconstrained 0.9858664 0.7546212
Eigenvalues, and their contribution to the scaled Chi-square
Importance of components:
CCA1 CCA2 CCA3 CA1 CA2 CA3 CA4 CA5 CA6 CA7 CA8 CA9 CA10 CA11
Eigenvalue 0.2126994 0.06529970 0.04257331 0.1979512 0.1421607 0.1361162 0.11519732 0.09440232 0.07995911 0.07312735 0.03626965 0.02754670 0.02111008 0.01986766
Proportion Explained 0.1628085 0.04998298 0.03258730 0.1515197 0.1088154 0.1041888 0.08817659 0.07225928 0.06120387 0.05597457 0.02776223 0.02108534 0.01615849 0.01520750
Cumulative Proportion 0.1628085 0.21279152 0.24537882 0.3968985 0.5057139 0.6099027 0.69807926 0.77033853 0.83154241 0.88751698 0.91527920 0.93636454 0.95252303 0.96773053
CA12 CA13 CA14 CA15 CA16 CA17 CA18 CA19
Eigenvalue 0.01527327 0.009234612 0.005370932 0.004777111 0.003991910 0.002447783 0.0007410925 0.0003213826
Proportion Explained 0.01169077 0.007068538 0.004111124 0.003656590 0.003055566 0.001873630 0.0005672616 0.0002459989
Cumulative Proportion 0.97942129 0.986489831 0.990600954 0.994257544 0.997313110 0.999186739 0.9997540011 1.0000000000
Accumulated constrained eigenvalues
Importance of components:
CCA1 CCA2 CCA3
Eigenvalue 0.2126994 0.0652997 0.04257331
Proportion Explained 0.6634988 0.2036972 0.13280404
Cumulative Proportion 0.6634988 0.8671960 1.00000000
Scaling 2 for species and site scores
* Species are scaled proportional to eigenvalues
* Sites are unscaled: weighted dispersion equal on all dimensions
Species scores
CCA1 CCA2 CCA3 CA1 CA2 CA3
ca 0.36061292 -1.131172976 0.51530227 0.60561239 0.60531036 0.58967975
ba -0.29444809 0.097678281 -0.18353776 0.18655528 0.40371880 -0.28918679
ac -0.35189406 -0.417577456 0.44862988 0.50056711 2.20502272 -1.70819407
ly -0.41935632 -0.184101414 0.35127980 -0.07674487 -0.15897892 -0.15247518
pla -0.56603433 0.108757404 0.11862698 0.52865240 -0.17350318 0.41313052
sp -0.64033742 0.073267037 0.33534329 0.74506751 0.27374342 -0.14511316
vi 1.11448522 -2.539608501 0.91990480 0.13849132 -0.50729699 -0.78836326
co 0.08955090 -0.266808851 -0.20872022 0.14006883 -0.54045238 -0.25128743
na 0.71860099 -0.522639152 0.74681247 0.54637686 0.99250004 0.44488645
ne 1.11448522 -2.539608501 0.91990480 -0.44169652 1.31264872 2.92211434
no -0.03171564 -0.880914984 0.55153099 0.82005821 1.97973785 -0.02798257
ple -0.75384641 0.164097000 0.31944770 0.90730915 0.99156118 -0.50654110
ga 1.75525705 1.473415584 0.85410002 0.71253066 -1.53550760 -1.35812866
as 0.93819110 -1.501166772 0.39395637 0.77293760 0.42849520 0.54809592
ce 0.33913382 -0.169715700 0.31536570 -0.30565985 0.17074947 0.21709417
cha 0.38215828 0.501829996 0.07508577 -0.94726503 0.02431582 0.22159008
chi 0.37418762 0.014266833 -0.03550198 -0.51343258 0.02778249 -0.03276771
cu 0.57373835 0.319623979 -0.24226403 -0.18301217 -0.08233613 0.11931858
cy 2.15679027 1.728352838 1.07144639 0.96812521 -1.83880700 -1.69866016
di 1.02533974 0.122870675 0.19579079 -0.34742972 0.06832481 0.70941226
em -0.54802312 0.135570695 -0.04885271 0.49966034 -0.46287948 2.01074210
ep 0.51744219 -0.059662105 -1.87867273 -0.56530595 -0.64499018 0.60119988
li 1.26775962 -0.011562350 0.37302247 -0.20708564 0.62960366 1.41076370
ps 0.51744219 -0.059662105 -1.87867273 -0.56530595 -0.64499018 0.60119988
pt 0.51744219 -0.059662105 -1.87867273 -1.04397832 -0.23376682 0.76580658
sc -0.76111618 0.174617255 0.31711129 0.71265360 -0.42645734 2.29265054
st 0.63126495 -0.004312599 -0.82692950 1.34243915 -0.35222234 1.01460750
hi 0.21551858 0.139341503 -0.13873365 0.69275661 -0.18530856 0.43888139
le 0.18090813 -0.946214951 0.22886109 0.96158900 0.42740536 1.81047224
Site scores (weighted averages of species scores)
CCA1 CCA2 CCA3 CA1 CA2 CA3
row1 0.6739276 -1.85132371 -3.389753328 0.34630785 -1.53722152 -0.76950577
row2 1.4129211 0.20959903 -0.661701757 -1.04397832 -0.23376682 0.76580658
row3 1.8983917 1.50828958 0.521829352 -1.74423862 0.62550005 1.39277240
row4 -0.7638958 0.22636048 -0.489040178 1.85906229 -0.43770415 1.38291752
row5 0.9216719 -0.07008165 -0.817942031 -0.56530595 -0.64499018 0.60119988
row6 -0.1203003 0.96204896 -2.697876731 0.05565024 1.83778793 -0.90832987
row7 -0.7137613 -0.09018015 0.027810546 -0.25162903 -0.09745583 -0.25764864
row8 -1.7282576 0.19404138 0.988692397 1.36242330 -0.13582180 0.40138403
row9 1.1115686 0.83618516 -0.590738089 -2.19877484 -0.63716799 0.04306628
row10 -0.9339007 0.79739348 1.609425183 0.71265360 -0.42645734 2.29265054
row11 -1.0504373 0.41063272 0.630734995 0.62625718 3.09450602 -1.98985795
row12 2.1150822 -6.50293123 2.551887001 -0.54103227 2.10235442 2.64742861
row13 1.3874975 -1.93215182 -0.860781540 -0.42494208 -0.44596122 -0.52511254
row14 1.2345608 -0.70268966 1.113270579 -1.01624613 0.39692465 -0.21762048
row15 -0.3996710 -2.12998244 -0.093457016 1.02112539 -1.49143268 -1.26803680
row16 1.7053754 -7.36876431 5.339172584 1.69910890 2.47464827 2.38699895
row17 3.2898105 -2.17537664 4.498095649 -0.58542459 1.52444443 4.29628307
row18 0.9874572 -3.12092713 -0.178531481 0.13849132 -0.50729699 -0.78836326
row19 2.6813384 3.54775186 2.403552370 0.96812521 -1.83880700 -1.69866016
row20 1.6661836 0.02487704 0.009678619 1.07348675 1.23933546 0.72282002
row21 2.2009439 1.95617556 0.914688319 -1.17191240 0.57688685 0.62313091
row22 2.6187095 0.65084727 1.910877231 -0.34800097 0.99608623 1.57792498
row23 1.0143593 0.39569456 -1.090919976 0.55455186 0.22917405 -0.46418202
Site constraints (linear combinations of constraining variables)
CCA1 CCA2 CCA3 CA1 CA2 CA3
row1 0.5174422 -0.0596621 -1.8786727 0.34630785 -1.53722152 -0.76950577
row2 0.5174422 -0.0596621 -1.8786727 -1.04397832 -0.23376682 0.76580658
row3 0.5174422 -0.0596621 -1.8786727 -1.74423862 0.62550005 1.39277240
row4 0.5174422 -0.0596621 -1.8786727 1.85906229 -0.43770415 1.38291752
row5 0.5174422 -0.0596621 -1.8786727 -0.56530595 -0.64499018 0.60119988
row6 0.5174422 -0.0596621 -1.8786727 0.05565024 1.83778793 -0.90832987
row7 -0.7611162 0.1746173 0.3171113 -0.25162903 -0.09745583 -0.25764864
row8 -0.7611162 0.1746173 0.3171113 1.36242330 -0.13582180 0.40138403
row9 -0.7611162 0.1746173 0.3171113 -2.19877484 -0.63716799 0.04306628
row10 -0.7611162 0.1746173 0.3171113 0.71265360 -0.42645734 2.29265054
row11 -0.7611162 0.1746173 0.3171113 0.62625718 3.09450602 -1.98985795
row12 1.1144852 -2.5396085 0.9199048 -0.54103227 2.10235442 2.64742861
row13 1.1144852 -2.5396085 0.9199048 -0.42494208 -0.44596122 -0.52511254
row14 1.1144852 -2.5396085 0.9199048 -1.01624613 0.39692465 -0.21762048
row15 1.1144852 -2.5396085 0.9199048 1.02112539 -1.49143268 -1.26803680
row16 1.1144852 -2.5396085 0.9199048 1.69910890 2.47464827 2.38699895
row17 1.1144852 -2.5396085 0.9199048 -0.58542459 1.52444443 4.29628307
row18 1.1144852 -2.5396085 0.9199048 0.13849132 -0.50729699 -0.78836326
row19 2.1567903 1.7283528 1.0714464 0.96812521 -1.83880700 -1.69866016
row20 2.1567903 1.7283528 1.0714464 1.07348675 1.23933546 0.72282002
row21 2.1567903 1.7283528 1.0714464 -1.17191240 0.57688685 0.62313091
row22 2.1567903 1.7283528 1.0714464 -0.34800097 0.99608623 1.57792498
row23 2.1567903 1.7283528 1.0714464 0.55455186 0.22917405 -0.46418202
Biplot scores for constraining variables
CCA1 CCA2 CCA3 CA1 CA2 CA3
manag1 -0.2275361 -0.9733484 -0.02863793 0 0 0
manag2 -0.9874600 -0.1105667 0.11268457 0 0 0
manag3 -0.2058289 -0.3455633 -0.91554379 0 0 0
Centroids for factor constraints
CCA1 CCA2 CCA3 CA1 CA2 CA3
managnm 1.1144852 -2.5396085 0.9199048 0 0 0
managnf -0.7611162 0.1746173 0.3171113 0 0 0
managyf 0.5174422 -0.0596621 -1.8786727 0 0 0
managli 2.1567903 1.7283528 1.0714464 0 0 0
RsquareAdj(lemmens1.cca)
$r.squared
[1] 0.245378816
$adj.r.squared
[1] 0.1321851352
coef(lemmens1.cca)
CCA1 CCA2 CCA3
manag1 0.3575848454 -2.3655333724 0.8124573618
manag2 -1.5180165584 0.3486923830 0.2096638546
manag3 -0.2394581823 0.1144130236 -1.9861201688
anova.cca(lemmens1.cca, permutations=1000)
Permutation test for cca under reduced model
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ manag, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
Model 3 0.32057241 2.0594 0.001998 **
Residual 19 0.98586641
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens1.cca, permutations=1000, by="margin")
Permutation test for cca under reduced model
Marginal effects of terms
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ manag, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
manag 3 0.32057241 2.0594 0.001998 **
Residual 19 0.98586641
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens1.cca, permutations=1000, by="axis")
Permutation test for cca under reduced model
Forward tests for axes
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ manag, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
CCA1 1 0.21269940 4.09923 0.001998 **
CCA2 1 0.06529970 1.25848 0.491508
CCA3 1 0.04257331 0.82049 0.635365
Residual 19 0.98586641
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
ordiplot(lemmens1.cca,scaling=1,type="text")
ordiplot(lemmens1.cca,scaling=2,type="text")
lemmens2.cca <- cca(lemminvert1~depth+silt+ph+temp+surface+cond+lchla+tn+tp+reed+emerg, scale=FALSE, data=lemmenv)
summary(lemmens2.cca)
Call:
cca(formula = lemminvert1 ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Partitioning of scaled Chi-square:
Inertia Proportion
Total 1.3064388 1.000000
Constrained 0.8476070 0.648792
Unconstrained 0.4588318 0.351208
Eigenvalues, and their contribution to the scaled Chi-square
Importance of components:
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6 CCA7 CCA8 CCA9 CCA10 CCA11 CA1 CA2 CA3
Eigenvalue 0.3089047 0.12250474 0.11334823 0.1025672 0.06607109 0.04594123 0.04188759 0.02394964 0.009575194 0.007580523 0.005276912 0.13042347 0.08363283 0.07065464
Proportion Explained 0.2364479 0.09376998 0.08676123 0.0785090 0.05057343 0.03516524 0.03206242 0.01833200 0.007329233 0.005802433 0.004039157 0.09983129 0.06401588 0.05408186
Cumulative Proportion 0.2364479 0.33021783 0.41697906 0.4954881 0.54606149 0.58122672 0.61328914 0.63162114 0.638950376 0.644752809 0.648791966 0.74862325 0.81263913 0.86672099
CA4 CA5 CA6 CA7 CA8 CA9 CA10 CA11
Eigenvalue 0.05466948 0.03496095 0.02269653 0.02121667 0.01874746 0.009480517 0.008061064 0.004288213
Proportion Explained 0.04184618 0.02676049 0.01737282 0.01624008 0.01435005 0.007256763 0.006170258 0.003282368
Cumulative Proportion 0.90856718 0.93532767 0.95270049 0.96894057 0.98329061 0.990547374 0.996717632 1.000000000
Accumulated constrained eigenvalues
Importance of components:
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6 CCA7 CCA8 CCA9 CCA10 CCA11
Eigenvalue 0.3089047 0.1225047 0.1133482 0.1025672 0.06607109 0.04594123 0.04188759 0.02394964 0.009575194 0.007580523 0.005276912
Proportion Explained 0.3644433 0.1445301 0.1337273 0.1210080 0.07795015 0.05420110 0.04941864 0.02825560 0.011296737 0.008943441 0.006225658
Cumulative Proportion 0.3644433 0.5089734 0.6427007 0.7637087 0.84165883 0.89585993 0.94527857 0.97353416 0.984830901 0.993774342 1.000000000
Scaling 2 for species and site scores
* Species are scaled proportional to eigenvalues
* Sites are unscaled: weighted dispersion equal on all dimensions
Species scores
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6
ca 0.30536887 0.140131065 -0.05655802 -0.396122011 0.58276019 0.607248294
ba -0.46323941 0.034351374 0.35484723 -0.002699521 0.21885460 -0.044486949
ac -0.46478426 2.139398779 1.38041260 -1.224250980 -0.31408540 1.640353187
ly -0.42224621 -0.284374489 -0.16832082 0.149183242 0.23432899 -0.066777681
pla -0.59732552 -0.380786317 -0.26402589 -0.138124326 -0.22746309 0.027925526
sp -0.70751325 0.339306458 0.11352049 -0.225038810 -0.21911305 0.054305922
vi 1.54398139 1.160037599 -0.62313079 0.266060119 2.10979691 1.465842994
co 0.02133455 0.519313352 -0.41627639 0.356202868 -0.06171025 -0.009446063
na 0.48723800 0.325841946 0.03494149 -0.593262534 0.60735711 0.575152311
ne 2.04342840 -0.981033966 -2.08329868 -0.291345064 0.53424493 1.548584380
no -0.21600787 1.049401412 0.79864734 -1.055406114 0.28837588 0.901265121
ple -0.84670718 0.977732306 0.61799329 -0.667897175 -0.60745314 0.419996765
ga 0.67742537 1.168177120 -1.53746155 -3.076714592 1.13128233 -1.415374095
as 0.78447384 0.370397512 -0.59701652 -0.818512339 1.17909551 1.138727946
ce 0.37643475 -0.492168337 0.07112537 0.127958540 0.22873199 0.125704265
cha 0.94546306 -0.007211273 0.33607359 -0.394863284 -0.75571116 -0.262801253
chi 0.49272637 -0.074898937 0.19738976 0.091936560 0.03567198 -0.078956214
cu 0.55011198 0.122535638 -0.19039246 -0.263623447 0.03543601 0.088330719
cy 0.78874621 1.446924660 -1.86273282 -3.605059633 1.48189685 -1.745399567
di 1.19597989 -0.234398663 -0.15909192 -0.081352997 -0.06474188 0.298618147
em -0.58778450 -1.582902552 -0.57409146 -0.278376784 -0.66834000 0.958616392
ep -0.48399306 -0.020444754 0.02310832 0.593263762 1.13422334 2.042819267
li 1.57628188 -0.559435010 -0.49911036 -0.265899164 0.41860022 0.655356534
ps -0.48399306 -0.020444754 0.02310832 0.593263762 1.13422334 2.042819267
pt 1.46878867 -0.229328422 0.30078788 1.405570817 -1.08887600 0.209528456
sc -0.60854279 -1.895394112 -0.69353141 -0.452704894 -1.02885267 0.741775817
st -0.12377014 -0.552652002 -1.13269911 -1.123844686 -0.14696411 1.242084839
hi -0.11438496 -0.392697739 -0.56032140 -0.825123290 0.02576215 0.389221833
le 0.03551845 -0.746632931 -0.44647784 -0.634539770 0.05253588 0.740623783
Site scores (weighted averages of species scores)
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6
row1 0.3932909 2.258381282 -1.44212639 2.0093162 -0.18964419 -0.2949236
row2 1.2922221 -0.099940029 0.24343924 0.5545972 -0.76156481 -0.4555646
row3 1.8349678 -0.839612821 0.94622372 -0.3577704 -0.84297053 -0.4572997
row4 -0.7211946 -0.748155386 -1.46662225 -0.8510378 -0.85468399 1.2088225
row5 0.7513139 -0.177353615 -0.37107536 0.6211245 0.16649683 0.1055762
row6 -0.2470611 -0.107096713 2.32044868 0.2641889 2.03317818 -1.1205342
row7 -0.5934259 -0.444753790 0.13579291 0.3806320 0.58289473 -0.5858243
row8 -1.4071122 -0.078715437 -0.61662530 -0.5471418 -1.35669416 0.7920725
row9 1.1523330 0.292305109 0.47275041 0.2007046 -1.58801173 -1.5041998
row10 -0.6768678 -2.034406688 -1.17538502 -1.0829384 -1.43951535 1.2929649
row11 -0.9365790 2.678793352 2.86269456 -2.0610943 -0.76259937 3.3343446
row12 1.9364194 -0.993898485 -1.93620540 -0.4828100 3.61924565 6.1727625
row13 1.0860714 0.829828707 -0.27825002 1.1866256 0.53159607 0.4271763
row14 1.0821797 -0.806529148 0.72957375 0.5603619 1.11102897 -0.0972739
row15 -0.4022496 1.132618007 -1.85007367 1.5555907 0.22454806 0.0692413
row16 1.1141784 0.406703817 -0.73891898 -1.8945890 4.30719453 7.8609566
row17 2.8530962 -1.636554849 -2.50065100 -0.7084079 2.02569028 6.7807133
row18 0.7440953 1.369298418 -0.84356155 0.9237357 0.81227525 1.6508396
row19 1.5395895 1.614185296 -2.15500564 -4.3617695 2.34249587 -4.5917226
row20 1.2320677 -0.345107329 0.07695665 -0.1590698 1.61904205 2.5561248
row21 2.2287066 -0.816295575 1.28949494 -0.5471118 -1.87754513 -0.9348233
row22 2.2533099 -1.430299691 0.20624178 -0.2869387 0.77199609 2.0316691
row23 0.8657568 0.002309459 0.44976518 0.3841643 0.04056593 -0.2473933
Site constraints (linear combinations of constraining variables)
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6
row1 0.3049201 2.12190489 -1.34158147 1.92290552 -0.46600179 -0.8285518
row2 1.4687887 -0.22932842 0.30078788 1.40557082 -1.08887600 0.2095285
row3 1.4615881 0.36826983 0.41938589 0.49303170 0.37536695 0.1867499
row4 -0.4343603 -1.01941219 -1.41988861 -1.80970151 -0.39593923 1.5509211
row5 -0.4839931 -0.02044475 0.02310832 0.59326376 1.13422334 2.0428193
row6 -0.2453773 -0.07030366 2.30149439 0.19132010 1.73189329 -0.7880139
row7 -0.6810217 -0.49007209 -0.15057929 0.23366923 0.30437742 -0.3067201
row8 -0.8483144 0.24379277 -0.12788972 -0.15697542 -0.48916101 -0.3202448
row9 0.8585732 0.20418767 0.26298449 -0.65284625 -2.01996813 -0.4376316
row10 -0.6085428 -1.89539411 -0.69353141 -0.45270489 -1.02885267 0.7417758
row11 -0.9797113 2.48184962 1.97465536 -1.67031872 -0.93660811 1.7690990
row12 0.2971268 -1.26671669 -1.55684954 -0.81064547 0.51560731 -0.4399112
row13 -0.3596254 -0.61779518 1.90266371 1.16677649 -0.76354021 1.2774709
row14 0.8898375 -0.69989367 0.36089230 0.92915745 0.24522046 0.7837185
row15 -0.3568226 0.81234252 -0.52225436 0.40591365 1.49242144 0.8482348
row16 1.0368071 0.56008279 -0.12832858 -1.50264797 2.01443194 0.6336689
row17 3.0830615 -1.55188313 -2.83324588 -0.21749659 0.01837974 2.5704126
row18 1.5439814 1.16003760 -0.62313079 0.26606012 2.10979691 1.4658430
row19 0.7887462 1.44692466 -1.86273282 -3.60505963 1.48189685 -1.7453996
row20 1.9425333 0.41617519 1.76497389 -0.62155278 1.10940302 4.3741430
row21 2.6928121 -0.85657970 1.67468846 -0.72034666 -0.86612781 -1.6736060
row22 2.0807354 -1.83524388 -0.69687498 0.05187699 1.43613977 -0.2542214
row23 0.2268672 0.27886320 -0.49941986 0.85333976 -0.31875829 3.0153384
Biplot scores for constraining variables
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6
depth 0.5847473 0.4528700006 0.16780852 0.244204814 0.021130518 0.11470024
silt 0.2743782 0.2345331295 -0.18236078 -0.015834857 -0.098934164 0.65632974
ph 0.5539206 -0.1731813544 0.28947608 0.006991876 0.135468755 0.14013068
temp -0.2076255 -0.1878390262 -0.23448591 0.341862845 0.162822339 -0.25863042
surface 0.7200449 0.2449314478 -0.08191369 0.157465584 -0.506655663 -0.03742950
cond 0.4488143 0.3592523114 -0.35557402 0.265889976 0.001756454 -0.30807371
lchla 0.1768793 -0.2691333677 0.36603291 0.063248397 0.594158324 -0.28948295
tn 0.1194490 -0.0007478341 0.33111470 0.336699819 -0.569024410 -0.38077220
tp 0.3366933 -0.2685092789 0.38631273 0.175936665 -0.337182484 -0.35070627
reed -0.5671781 -0.0345491230 0.21864744 0.342564356 0.009118245 -0.09680661
emerg -0.2022890 0.6652325154 0.01904904 -0.280165593 -0.432606120 -0.04791727
RsquareAdj(lemmens2.cca)
$r.squared
[1] 0.6487919661
$adj.r.squared
[1] 0.3221586836
coef(lemmens2.cca)
CCA1 CCA2 CCA3 CCA4 CCA5 CCA6 CCA7 CCA8 CCA9 CCA10 CCA11
depth -0.066539712236 0.96280842662 0.5406505133 1.28833478814 0.26666886924 0.1726202332 0.65796573889 -0.82802081822 0.10827547138 -0.4476052213 0.65212933505
silt 0.161762328239 -0.09135611086 0.1293435591 0.53354734063 0.01880639300 0.9098977223 -0.55971463694 0.70170696899 1.03840220411 0.4336179958 -0.84602093795
ph -0.006636006879 -0.13599469934 0.2518456285 -0.62046343044 0.01350561394 0.5663009265 -0.29253717887 0.61713638219 -0.71714846972 -0.7727238411 -0.60889193713
temp -0.237453825454 0.27614949100 -0.3238749038 1.65888130251 -0.23938301589 0.2137030431 1.02763770746 0.08488582728 0.17138584417 -1.0270382846 0.39028411390
surface 0.895432275786 -0.51280484309 -0.4397461854 -0.03188881466 -0.64903021311 0.3919411180 0.45754331613 0.44561621484 -0.60224107673 0.5666761109 0.87113888883
cond 0.035730783849 0.20816466461 -0.6466292115 -0.52081629247 0.50279967795 -0.7668486376 -1.00037817595 0.41863433290 0.10385365451 0.1532509210 -0.74056658365
lchla 1.081074937017 -0.11095517842 0.9026346352 -0.66509686361 1.17881979584 -0.6790256069 -0.13046692996 0.79359814527 0.53223356611 1.4607412409 -0.47059185592
tn 0.110531773475 -0.37589156172 0.4497828844 -0.35433812223 -0.29211684378 -0.3567024003 -0.47722491534 -0.50276715774 -0.04089715496 0.9182710536 -1.98736568881
tp -0.229639704436 0.08244039408 0.4463635874 0.87161108436 -0.42254809523 -0.4654969432 0.06120385482 0.18854091789 0.96367131608 -0.8642624381 0.97810142298
reed -0.534953402005 0.04291148566 0.3509904173 0.58057579084 0.02778363371 0.6203607959 -0.52329288974 0.86236588574 -0.46441902411 0.1737193114 0.40880133802
emerg -0.308348442016 1.12860404740 0.5194305421 -0.45281560189 -0.24060238981 -0.2116380072 0.21862037347 0.66281604122 0.14471449531 -0.6056461956 0.01218897821
anova.cca(lemmens2.cca, permutations=1000)
Permutation test for cca under reduced model
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
Model 11 0.84760701 1.84732 0.000999 ***
Residual 11 0.45883181
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens2.cca, permutations=1000, by="margin")
Permutation test for cca under reduced model
Marginal effects of terms
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
depth 1 0.07653476 1.83484 0.047952 *
silt 1 0.03003632 0.72009 0.635365
ph 1 0.03209059 0.76934 0.588412
temp 1 0.07052392 1.69074 0.043956 *
surface 1 0.09776895 2.34391 0.006993 **
cond 1 0.05217511 1.25084 0.191808
lchla 1 0.08569971 2.05456 0.029970 *
tn 1 0.01863280 0.44670 0.881119
tp 1 0.03916227 0.93887 0.419580
reed 1 0.07305856 1.75150 0.057942 .
emerg 1 0.09159059 2.19579 0.009990 **
Residual 11 0.45883181
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
anova.cca(lemmens2.cca, permutations=1000, by="axis")
Permutation test for cca under reduced model
Forward tests for axes
Permutation: free
Number of permutations: 1000
Model: cca(formula = lemminvert1 ~ depth + silt + ph + temp + surface + cond + lchla + tn + tp + reed + emerg, data = lemmenv, scale = FALSE)
Df ChiSquare F Pr(>F)
CCA1 1 0.30890465 7.40566 0.000999 ***
CCA2 1 0.12250474 2.93692 0.231768
CCA3 1 0.11334823 2.71740 0.444555
CCA4 1 0.10256720 2.45894 0.562438
CCA5 1 0.06607109 1.58398 0.926074
CCA6 1 0.04594123 1.10139 0.993007
CCA7 1 0.04188759 1.00421 0.989011
CCA8 1 0.02394964 0.57417 1.000000
CCA9 1 0.00957519 0.22955 1.000000
CCA10 1 0.00758052 0.18173 1.000000
CCA11 1 0.00527691 0.12651 1.000000
Residual 11 0.45883181
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
# ideally would like ponds represented by symbols, a different one for each management category
ordiplot(lemmens2.cca,scaling=1,type="text")
ordiplot(lemmens2.cca,scaling=2,type="text")
Plots used for QK use the ggplot classic theme, with some tweaks. Tweaks are consolidated into theme_QK; use this theme for figures and tweak the theme to avoid repetitive code changes.
source("../R/appearance.R")
library(ggvegan)
p1<-autoplot(lemmens1.rda)
p2<-autoplot(lemmens2.rda)
p3<-autoplot(lemmens1.cca)
p4<-autoplot(lemmens2.cca)
l1rt<-fortify(lemmens1.rda)
l1rt$Label <- l1rt$Label %>%
str_replace_all("managnm", "nm") %>%
str_replace_all("managli", "li") %>%
str_replace_all("managnf", "nf") %>%
str_replace_all("managyf", "yf")
l2rt<-fortify(lemmens2.rda)
l1ct<-fortify(lemmens1.cca)
l1ct$Label <- l1ct$Label %>%
str_replace_all("managnm", "nm") %>%
str_replace_all("managli", "li") %>%
str_replace_all("managnf", "nf") %>%
str_replace_all("managyf", "yf")
l2ct<-fortify(lemmens2.cca)
p5<-p1+p2+p3+p4
p5
library(ggrepel)
br=c("nm","li","nf","yf") #Set order of groups; define as object to avoid repeated code
la=c("None", "Light", "No fish", "Young fish") #Set legend text
p1a<-ggplot()+
geom_point(aes(x=RDA1,y=RDA2, shape=lemminvert$manag), color=sc, data=filter(l1rt, Score=="sites"),
alpha=0.7, size=1)+
scale_shape_manual(values=c(21,22,23,25),
name="Management",
breaks=br,
labels=la
)+
geom_text(aes(x=RDA1,y=RDA2, label=Label), size=2, data=filter(l1rt, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=RDA1,yend=RDA2), arrow=arrow(length=unit(0.2,"cm")),
data=filter(l1rt, Score=="centroids"))+
geom_text_repel(aes(x=RDA1,y=RDA2, label=Label), size=3, data=filter(l1rt, Score=="centroids"),
max.overlaps=Inf)+
coord_fixed()+
theme(legend.position="none")
p1a
p2a<-ggplot()+
geom_point(aes(x=RDA1,y=RDA2, ), data=filter(l2rt, Score=="sites"), alpha=0.7, color=sc, size=0.5)+
geom_text(aes(x=RDA1,y=RDA2, label=Label), size=2, data=filter(l2rt, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=RDA1,yend=RDA2), alpha=0.5, arrow=arrow(length=unit(0.2,"cm")),
data=filter(l2rt, Score=="biplot"))+
geom_text(aes(x=RDA1,y=RDA2, label=Label), nudge_y=-0.05,color=lc, size=3.5, data=filter(l2rt, Score=="biplot"),
)+
labs(y=NULL)+
coord_fixed()
p2a
p3a<-ggplot()+
geom_point(aes(x=CCA1,y=CCA2, shape=lemminvert$manag), color= sc, data=filter(l1ct, Score=="sites"), alpha=0.7, size=1)+
scale_shape_manual(values=c(21,22,23,25),
name="Management",
breaks=br,
labels=la
)+
geom_text(aes(x=CCA1,y=CCA2, label=Label), size=2, data=filter(l1ct, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=CCA1,yend=CCA2), arrow=arrow(length=unit(0.2,"cm")),
data=filter(l1ct, Score=="centroids"))+
geom_text_repel(aes(x=CCA1,y=CCA2, label=Label), size=3, data=filter(l1ct, Score=="centroids"),
max.overlaps=Inf)+
coord_fixed()+
theme(legend.position="none")
p3a
p4a<-ggplot()+
geom_point(aes(x=CCA1,y=CCA2, ), data=filter(l2ct, Score=="sites"), alpha=0.7, color=sc, size=0.5)+
geom_text(aes(x=CCA1,y=CCA2, label=Label), size=2, data=filter(l2ct, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=CCA1,yend=CCA2), alpha=0.5, arrow=arrow(length=unit(0.2,"cm")),
data=filter(l2ct, Score=="biplot"))+
geom_text(aes(x=CCA1,y=CCA2, label=Label), color=lc, size=3, data=filter(l2ct, Score=="biplot"),
)+
labs(y=NULL)+
coord_fixed()
p4a
Combine panels
p5<-p1a+p2a+p3a+p4a
p5<-p5&theme_qk()+theme(legend.position="none")
p5
#ggsave("../Illustrator/QK F15_05.pdf",plot = p5, height = phh,width = pww, units='cm')
Colour version of LH panels
p1b<-ggplot()+
geom_point(aes(x=RDA1,y=RDA2, color=lemminvert$manag), data=filter(l1rt, Score=="sites"),
alpha=0.7, size=1)+
scale_color_viridis_d(
name="Management",
breaks=br,
labels=la
)+
geom_text(aes(x=RDA1,y=RDA2, label=Label), size=2, data=filter(l1rt, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=RDA1,yend=RDA2), arrow=arrow(length=unit(0.2,"cm")),
data=filter(l1rt, Score=="centroids"))+
geom_text_repel(aes(x=RDA1,y=RDA2, label=Label), size=3, data=filter(l1rt, Score=="centroids"),
max.overlaps=Inf)+
coord_fixed()+
theme(legend.position="none")
p3b<-ggplot()+
geom_point(aes(x=CCA1,y=CCA2, color=lemminvert$manag), data=filter(l1ct, Score=="sites"), alpha=0.7, size=1)+
scale_color_viridis_d(
breaks=br,
labels=la
)+
geom_text(aes(x=CCA1,y=CCA2, label=Label), size=2, data=filter(l1ct, Score=="species"),
)+
geom_segment(aes(x=0,y=0,xend=CCA1,yend=CCA2), arrow=arrow(length=unit(0.2,"cm")),
data=filter(l1ct, Score=="centroids"))+
geom_text_repel(aes(x=CCA1,y=CCA2, label=Label), size=3, data=filter(l1ct, Score=="centroids"),
max.overlaps=Inf)+
coord_fixed()+
theme(legend.position="none")
p5a<-p1b+p2a+p3b+p4a
p5a
p5a<-p5a&theme_qk()+theme(legend.position="none")
#ggsave("QK F15_05c.pdf",plot = p5a, height = phh,width = pww, units='cm')