From 1ef527c7bbc0162a0cfe2449b4956541e7b52913 Mon Sep 17 00:00:00 2001 From: jarioksa Date: Fri, 22 Mar 2024 12:58:38 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20vegandev?= =?UTF-8?q?s/vegan@7f2ffb48e3e8bc6ca4d68c5f5a359af3b2b01ff8=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/pkgdown.yml | 2 +- docs/reference/prc.html | 2 +- docs/search.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index e0e0c6d90..515a59388 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: FAQ-vegan: FAQ-vegan.html -last_built: 2024-03-22T12:46Z +last_built: 2024-03-22T12:56Z urls: reference: https://vegandevs.github.io/vegan/reference article: https://vegandevs.github.io/vegan/articles diff --git a/docs/reference/prc.html b/docs/reference/prc.html index 894ca183d..1f8d3eaa1 100644 --- a/docs/reference/prc.html +++ b/docs/reference/prc.html @@ -77,7 +77,7 @@

Usage

prc(response, treatment, time, ...)
 # S3 method for prc
-summary(object, axis = 1, scaling = "symmetric", const,
+summary(object, axis = 1, scaling = "sites", const,
         digits = 4, correlation = FALSE, ...)
 # S3 method for prc
 plot(x, species = TRUE, select, scaling = "symmetric",
diff --git a/docs/search.json b/docs/search.json
index cb2781fef..eab3196e2 100644
--- a/docs/search.json
+++ b/docs/search.json
@@ -1 +1 @@
-[{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"vegan-faq","dir":"Articles","previous_headings":"","what":"vegan FAQ","title":"","text":"document contains answers frequently asked questions R package vegan. work licensed Creative Commons Attribution 3.0 License. view copy license, visit https://creativecommons.org/licenses//3.0/ send letter Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. Copyright © 2008-2016 vegan development team","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-is-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What is vegan?","title":"","text":"Vegan R package community ecologists. contains popular methods multivariate analysis needed analysing ecological communities, tools diversity analysis, potentially useful functions. Vegan self-contained must run R statistical environment, also depends many R packages. Vegan free software distributed GPL2 license.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-is-r","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What is R?","title":"","text":"R system statistical computation graphics. consists language plus run-time environment graphics, debugger, access certain system functions, ability run programs stored script files. R home page https://www.R-project.org/. free software distributed GNU-style copyleft, official part GNU project (“GNU S”).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-obtain-vegan-and-r","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to obtain vegan and R?","title":"","text":"R latest release version vegan can obtained CRAN. Unstable development version vegan can obtained GitHub. Formerly vegan developed R-Forge, moving GitHub R-Forge repository date.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-r-packages-vegan-depends-on","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What R packages vegan depends on?","title":"","text":"Vegan depends permute package provide advanced flexible permutation routines vegan. permute package developed together vegan GitHub. individual vegan functions depend packages MASS, mgcv, parallel, cluster, lattice tcltk. base recommended R packages available every R installation. Vegan declares suggested imported packages, can install vegan use functions without packages. Vegan accompanied supporting package vegan3d three-dimensional dynamic plotting. vegan3d package needs non-standard packages rgl scatterplot3d.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-other-packages-are-available-for-ecologists","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What other packages are available for ecologists?","title":"","text":"CRAN Task Views include entries like Environmetrics, Multivariate Spatial describe several useful packages functions. install R package ctv, can inspect Task Views R session, automatically install sets important packages.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-other-documentation-is-available-for-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What other documentation is available for vegan?","title":"","text":"Vegan fully documented R package standard help pages. authoritative sources documentation (last resource can use force read source, vegan open source). Vegan package ships documents can read browseVignettes(\"vegan\") command. documents included vegan package Vegan NEWS document (FAQ-vegan). Short introduction basic ordination methods vegan (intro-vegan). Introduction diversity methods vegan (diversity-vegan). Discussion design decisions vegan (decision-vegan). Description variance partition procedures function varpart (partitioning). Web documents outside package include: https://github.com/vegandevs/vegan: vegan homepage.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-there-a-graphical-user-interface-gui-for-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Is there a Graphical User Interface (GUI) for vegan?","title":"","text":"Roeland Kindt made package BiodiversityR provides GUI vegan. package available CRAN. mere GUI vegan, adds new functions complements vegan functions order provide workbench biodiversity analysis. can install BiodiversityR using install.packages(\"BiodiversityR\") graphical package management menu R. GUI works Windows, MacOS X Linux.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-cite-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to cite vegan?","title":"","text":"Use command citation(\"vegan\") R see recommended citation used publications.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-build-vegan-from-sources","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to build vegan from sources?","title":"","text":"general, need build vegan sources, binary builds release versions available CRAN Windows MacOS X. use operating systems, may use source packages. Vegan standard R package, can built like instructed R documentation. Vegan contains source files C FORTRAN, need appropriate compilers (may need work Windows MacOS X).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"are-there-binaries-for-devel-versions","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Are there binaries for devel versions?","title":"","text":"currently. need tools build C Fortran programs install vegan. , can use devtools::install_github(\"vegan\") install recent devel version.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-report-a-bug-in-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to report a bug in vegan?","title":"","text":"think found bug vegan, report vegan maintainers developers. preferred forum report bugs GitHub. bug report detailed bug can replicated corrected. Preferably, send example causes bug. needs data set available R, send minimal data set well. also paste output error message message. also specify version vegan used. Bug reports welcome: way make vegan non-buggy. Please note shall send bug reports R mailing lists, since vegan standard R package.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-it-a-bug-or-a-feature","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Is it a bug or a feature?","title":"","text":"necessarily bug function gives different results expect: may deliberate design decision. may useful check documentation function see intended behaviour. may also happen function argument switch behaviour match expectation. instance, function vegdist always calculates quantitative indices (possible). expect calculate binary index, use argument binary = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-contribute-to-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Can I contribute to vegan?","title":"","text":"Vegan dependent user contribution. feedback welcome. problems vegan, may simple incomplete documentation, shall best improve documents. Feature requests also welcome, necessarily fulfilled. new feature added easy looks useful, submit code. can write code , best forum contribute vegan GitHub.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-have-only-numeric-and-positive-data-but-vegan-still-complains","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I have only numeric and positive data but vegan still complains","title":"","text":"wrong! Computers painfully pedantic, find non-numeric negative data entries, really . Check data. common reasons non-numeric data row names read non-numeric variable instead used row names (check argument row.names reading data), column names interpreted data (check argument header = TRUE reading data). Another common reason empty cells input data, interpreted missing values.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-analyse-binary-or-cover-class-data","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I analyse binary or cover class data?","title":"","text":"Yes. vegan methods can handle binary data cover abundance data. statistical tests based permutation, make distributional assumptions. methods (mainly diversity analysis) need count data. methods check input data integers, may fooled cover class data.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-dissimilarities-in-vegan-differ-from-other-sources","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Why dissimilarities in vegan differ from other sources?","title":"","text":"commonly reason software use presence–absence data whereas vegan used quantitative data. Usually vegan indices quantitative, can use argument binary = TRUE make presence–absence. However, index name cases, although different names usually occur literature. instance, Jaccard index actually refers binary index, vegan uses name \"jaccard\" quantitative index, . Another reason may indices indeed defined differently, people use names different indices.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-nmds-stress-is-sometimes-0-1-and-sometimes-10","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Why NMDS stress is sometimes 0.1 and sometimes 10?","title":"","text":"Stress proportional measure badness fit. proportions can expressed either parts one percents. Function isoMDS (MASS package) uses percents, function monoMDS (vegan package) uses proportions, therefore stress 100 times higher isoMDS. results goodness function also depend definition stress, goodness 100 times higher isoMDS monoMDS. conventions equally correct.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-get-zero-stress-but-no-repeated-solutions-in-metamds","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I get zero stress but no repeated solutions in metaMDS","title":"","text":"first (try 0) run metaMDS starts metric scaling solution usually good, sofware return solution. However, metaMDS tries see standard solution can repeated, improved improved solution still repeated. cases, return best solution found, burning need anything get message tha solution repeated. keen know solution really global optimum, may follow instructions metaMDS help section “Results Repeated” try . common reason observations NMDS. n observations (points) k dimensions need estimate n*k parameters (ordination scores) using n*(n-1)/2 dissimilarities. k dimensions must n > 2*k + 1, two dimensions least six points. degenerate situations may need even larger number points. lower number points, can find undefined number perfect (stress zero) different solutions. Conventional wisdom due Kruskal n > 4*k + 1 points k dimensions. typical symptom insufficient data (nearly) zero stress two convergent solutions. cases reduce number dimensions (k) small data sets use NMDS, rely metric methods. seems local hybrid scaling monoMDS similar lower limits practice (although theoretically differ). However, higher number dimensions can used metric scaling, monoMDS principal coordinates analysis (cmdscale stats, wcmdscale vegan).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"zero-dissimilarities-in-isomds","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Zero dissimilarities in isoMDS","title":"","text":"Function metaMDS uses function monoMDS default method NMDS, function can handle zero dissimilarities. Alternative function isoMDS handle zero dissimilarities. want use isoMDS, can use argument zerodist = \"add\" metaMDS handle zero dissimilarities. argument, zero dissimilarities replaced small positive value, can handled isoMDS. kluge, people like . principal solution remove duplicate sites using R command unique. However, standardizations dissimilarity indices, originally non-unique sites can zero dissimilarity, resort kluge (work harder data). Usually better use monoMDS.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-have-heard-that-you-cannot-fit-environmental-vectors-or-surfaces-to-nmds-results-which-only-have-rank-order-scores","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores","title":"","text":"Claims like indeed large Internet, based grave misunderstanding plainly wrong. NMDS ordination results strictly metric, vegan metaMDS monoMDS even strictly Euclidean. method called “non-metric” Euclidean distances ordination space non-metric rank-order relationship community dissimilarities. can inspect non-linear step curve using function stressplot vegan. ordination scores strictly Euclidean, correct use vegan functions envfit ordisurf NMDS results.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"where-can-i-find-numerical-scores-of-ordination-axes","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Where can I find numerical scores of ordination axes?","title":"","text":"Normally can use function scores extract ordination scores ordination method. scores function can also find ordination scores many non-vegan functions prcomp princomp ade4 functions. cases ordination result object stores raw scores, axes also scaled appropriate access scores. instance, cca rda ordination object -called normalized scores, scaled ordination plots use accessed scores.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-the-rda-results-are-scaled","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How the RDA results are scaled?","title":"","text":"scaling RDA results indeed differ software packages. scaling RDA complicated issue explained FAQ, explained separate pdf document “Design decision implementation details vegan” can read command browseVignettes(\"vegan\").","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"variance-explained-by-ordination-axes-","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Variance explained by ordination axes.","title":"","text":"general, vegan directly give statistics “variance explained” ordination axes constrained axes. design decision: think information normally useless often misleading. community ordination, goal typically explain variance, find “gradients” main trends data. “total variation” often meaningless, proportions meaningless values also meaningless. Often better solution explains smaller part “total variation”. instance, unstandardized principal components analysis variance generated small number abundant species, easy “explain” data really multivariate. standardize data, species equally important. first axes explains much less “total variation”, now explain species equally, results typically much useful whole community. Correspondence analysis uses another measure variation (variance), typically explains “smaller proportion” principal components better result. Detrended correspondence analysis nonmetric multidimensional scaling even try “explain” variation, use criteria. methods incommensurable, impossible compare methods using “explanation variation”. still want get “explanation variation” (deranged editor requests ), possible get information methods: Eigenvector methods: Functions rda, cca capscale give variation conditional (partialled), constrained (canonical) residual components, must calculate proportions hand. Function eigenvals extracts eigenvalues, summary(eigenvals(ord)) reports proportions explained result object ord. Function RsquareAdj gives R-squared adjusted R-squared (available) constrained components. Function goodness gives statistics individual species sites (species unavailable capscale). addition, special function varpart unbiased partitioning variance four separate components redundancy analysis. Detrended correspondence analysis (function decorana). total amount variation undefined detrended correspondence analysis, therefore proportions total unknown undefined. DCA method decomposition variation, therefore proportions make sense either. Nonmetric multidimensional scaling. NMDS method nonlinear mapping, concept variation explained make sense. However, 1 - stress^2 transforms nonlinear stress quantity analogous squared correlation coefficient. Function stressplot displays nonlinear fit gives statistic.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-have-random-effects-in-constrained-ordination-or-in-adonis","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I have random effects in constrained ordination or in adonis?","title":"","text":". Strictly speaking, impossible. However, can define models respond similar goals random effects models, although strictly speaking use fixed effects. Constrained ordination functions cca, rda capscale can Condition() terms formula. Condition() define partial terms fitted constraints can used remove effects background variables, contribution decomposing inertia (variance) reported separately. partial terms often regarded similar random effects, still fitted way terms strictly speaking fixed terms. Function adonis2 can evaluate terms sequentially. model right-hand-side ~ + B effects evaluated first, effects B removing effects . Sequential tests also available anova function constrained ordination results setting argument = \"term\". way, first terms can serve similar role random effects, although fitted way terms, strictly speaking fixed terms. permutation tests vegan based permute package allows constructing various restricted permutation schemes. instance, can set levels plots blocks factor regarded random term. major reason real random effects models impossible vegan functions tests based permutation data. data given, fixed, therefore permutation tests basically tests fixed terms fixed data. Random effect terms require permutations data random component instead given, fixed data, tests available vegan.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-it-possible-to-have-passive-points-in-ordination","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Is it possible to have passive points in ordination?","title":"","text":"Vegan concept passive points, point little influence ordination results. However, can add points eigenvector methods using predict functions newdata. can first perform ordination without species sites, can find scores points using complete data newdata. predict functions available basic eigenvector methods vegan (cca, rda, decorana, --date list, use command methods(\"predict\")). also can simulate passive points R using low weights row columns (method used software passive points). instance, following command makes row 3 “passive”: dune[3,] <- 0.001*dune[3,].","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"class-variables-and-dummies","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Class variables and dummies","title":"","text":"define class variable R factor, vegan automatically handle formula interface. also can define constrained ordination without formula interface, must code class variables hand. R (vegan) knows unordered ordered factors. Unordered factors internally coded dummy variables, one redundant level removed aliased. default contrasts, removed level first one. Ordered factors expressed polynomial contrasts. contrasts explained standard R documentation.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-are-environmental-arrows-scaled","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How are environmental arrows scaled?","title":"","text":"printed output envfit gives direction cosines coordinates unit length arrows. plotting, scaled correlation (square roots column r2). can see scaled lengths envfit arrows using command scores. scaled environmental vectors envfit arrows continuous environmental variables constrained ordination (cca, rda, capscale) adjusted fill current graph. lengths arrows fixed meaning respect points (species, sites), can compared , therefore relative lengths important. want change scaling arrows, can use text (plotting arrows text) points (plotting arrows) functions constrained ordination. functions argument arrow.mul sets multiplier. plot function envfit also arrow.mul argument set arrow multiplier. save invisible result constrained ordination plot command, can see value currently used arrow.mul saved attribute biplot scores. Function ordiArrowMul used find scaling current plot. can use function see arrows scaled:","code":"sol <- cca(varespec) ef <- envfit(sol ~ ., varechem) plot(sol) ordiArrowMul(scores(ef, display=\"vectors\"))"},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-want-to-use-helmert-or-sum-contrasts","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I want to use Helmert or sum contrasts","title":"","text":"vegan uses standard R utilities defining contrasts. default standard installations use treatment contrasts, can change behaviour globally setting options locally using keyword contrasts. Please check R help pages user manuals details.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-are-aliased-variables-and-how-to-see-them","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"What are aliased variables and how to see them?","title":"","text":"Aliased variable information can expressed help variables. variables automatically removed constrained ordination vegan. aliased variables can redundant levels factors whole variables. Vegan function alias gives defining equations aliased variables. want see names aliased variables levels solution sol, use alias(sol, names.=TRUE).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"plotting-aliased-variables","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Plotting aliased variables","title":"","text":"can fit vectors class centroids aliased variables using envfit function. envfit function uses weighted fitting, fitted vectors identical vectors correspondence analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"restricted-permutations-in-vegan","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Restricted permutations in vegan","title":"","text":"Vegan uses permute package permutation tests. permute package allow restricted permutation designs time series, line transects, spatial grids blocking factors. construction restricted permutation schemes explained manual page permutations vegan documentation permute package.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-use-different-plotting-symbols-in-ordination-graphics","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How to use different plotting symbols in ordination graphics?","title":"","text":"default ordination plot function intended fast plotting configurable. use different plotting symbols, first create empty ordination plot plot(..., type=\"n\"), add points text created empty frame (... means arguments want give plot command). points text commands fully configurable, allow different plotting symbols characters.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-avoid-cluttered-ordination-graphs","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How to avoid cluttered ordination graphs?","title":"","text":"really high number species sites, graphs often congested many labels overwritten. may impossible complete readable graphics data sets. give brief overview tricks can use. Gavin Simpson’s blog bottom heap series articles “decluttering ordination plots” detailed discussion examples. Use points, possibly different types need see labels. may need first create empty plot using plot(..., type=\"n\"), satisfied default graph. (... means arguments want give plot command.) Use points add labels desired points using interactive identify command need see labels. Add labels using function ordilabel uses non-transparent background text. labels still shadow , uppermost labels readable. Argument priority help displaying interesting labels (see Decluttering blog, part 1). Use orditorp function uses labels can added graph without overwriting labels, points otherwise, need see labels. must first create empty plot using plot(..., type=\"n\"), add labels points orditorp (see Decluttering blog). Use ordipointlabel uses points text labels points, tries optimize location text minimize overlap (see Decluttering blog). Ordination text points functions argument select can used full control selecting items plotted text points. Use interactive orditkplot function lets drag labels points better positions need see labels. one set points can used (see Decluttering blog). plot functions allow zoom part graph using xlim ylim arguments reduce clutter congested areas.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-flip-an-axis-in-ordination-diagram","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I flip an axis in ordination diagram?","title":"","text":"Use xlim ylim flipped limits. model mod <- cca(dune) can flip first axis plot(mod, xlim = c(3, -2)).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-zoom-into-an-ordination-plot","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I zoom into an ordination plot?","title":"","text":"can use xlim ylim arguments plot ordiplot zoom ordination diagrams. Normally must set xlim ylim ordination plots keep equal aspect ratio axes, fill graph longer axis fit. Dynamic zooming can done function orditkplot CRAN package vegan3d. can directly save edited orditkplot graph various graphic formats, can export graph object back R session use plot display results.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-there-twinspan","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"Is there TWINSPAN?","title":"","text":". may possible port TWINSPAN vegan, among vegan top priorities. anybody wants try porting, happy help. TWINSPAN permissive license, completely legal port function R.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-restricted-permutation-does-not-influence-adonis-results","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"Why restricted permutation does not influence adonis results?","title":"","text":"permutation scheme influences permutation distribution statistics probably significance levels, influence calculation statistics.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-is-deviance-calculated","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"How is deviance calculated?","title":"","text":"vegan functions, radfit use base R facility family maximum likelihood estimation. allows use several alternative error distributions, among \"poisson\" \"gaussian\". R family also defines deviance. can see equations deviance commands like poisson()$dev gaussian()$dev. general, deviance 2 times log.likelihood shifted models exact fit zero deviance.","code":""},{"path":"https://vegandevs.github.io/vegan/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jari Oksanen. Author, maintainer. Gavin L. Simpson. Author. F. Guillaume Blanchet. Author. Roeland Kindt. Author. Pierre Legendre. Author. Peter R. Minchin. Author. R.B. O'Hara. Author. Peter Solymos. Author. M. Henry H. Stevens. Author. Eduard Szoecs. Author. Helene Wagner. Author. Matt Barbour. Author. Michael Bedward. Author. Ben Bolker. Author. Daniel Borcard. Author. Gustavo Carvalho. Author. Michael Chirico. Author. Miquel De Caceres. Author. Sebastien Durand. Author. Heloisa Beatriz Antoniazi Evangelista. Author. Rich FitzJohn. Author. Michael Friendly. Author. Brendan Furneaux. Author. Geoffrey Hannigan. Author. Mark O. Hill. Author. Leo Lahti. Author. Dan McGlinn. Author. Marie-Helene Ouellette. Author. Eduardo Ribeiro Cunha. Author. Tyler Smith. Author. Adrian Stier. Author. Cajo J.F. Ter Braak. Author. James Weedon. Author.","code":""},{"path":"https://vegandevs.github.io/vegan/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Oksanen J, Simpson G, Blanchet F, Kindt R, Legendre P, Minchin P, O'Hara R, Solymos P, Stevens M, Szoecs E, Wagner H, Barbour M, Bedward M, Bolker B, Borcard D, Carvalho G, Chirico M, De Caceres M, Durand S, Evangelista H, FitzJohn R, Friendly M, Furneaux B, Hannigan G, Hill M, Lahti L, McGlinn D, Ouellette M, Ribeiro Cunha E, Smith T, Stier , Ter Braak C, Weedon J (2024). vegan: Community Ecology Package. R package version 2.6-5, https://github.com/vegandevs/vegan.","code":"@Manual{,   title = {vegan: Community Ecology Package},   author = {Jari Oksanen and Gavin L. Simpson and F. Guillaume Blanchet and Roeland Kindt and Pierre Legendre and Peter R. Minchin and R.B. O'Hara and Peter Solymos and M. Henry H. Stevens and Eduard Szoecs and Helene Wagner and Matt Barbour and Michael Bedward and Ben Bolker and Daniel Borcard and Gustavo Carvalho and Michael Chirico and Miquel {De Caceres} and Sebastien Durand and Heloisa Beatriz Antoniazi Evangelista and Rich FitzJohn and Michael Friendly and Brendan Furneaux and Geoffrey Hannigan and Mark O. Hill and Leo Lahti and Dan McGlinn and Marie-Helene Ouellette and Eduardo {Ribeiro Cunha} and Tyler Smith and Adrian Stier and Cajo J.F. {Ter Braak} and James Weedon},   year = {2024},   note = {R package version 2.6-5},   url = {https://github.com/vegandevs/vegan}, }"},{"path":"https://vegandevs.github.io/vegan/index.html","id":"vegan-an-r-package-for-community-ecologists","dir":"","previous_headings":"","what":"vegan: an R package for community ecologists","title":"vegan: an R package for community ecologists","text":"Ordination methods, diversity analysis functions community vegetation ecologists. Website development version vegan package.","code":""},{"path":"https://vegandevs.github.io/vegan/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"vegan: an R package for community ecologists","text":"install development version vegan can use usual git R CMD build -> R CMD INSTALL dance cloned repo (downloaded sources). ’ll need able install packages source work; don’t relevant developer tools, won’t able install vegan way.","code":""},{"path":"https://vegandevs.github.io/vegan/index.html","id":"using-remotes","dir":"","previous_headings":"","what":"Using remotes","title":"vegan: an R package for community ecologists","text":"developer tools installed don’t want hassle keeping local source code tree --date, use remotes package:","code":"install.packages(\"remotes\") remotes::install_github(\"vegandevs/vegan\")"},{"path":"https://vegandevs.github.io/vegan/index.html","id":"installing-binaries-from-r-universe","dir":"","previous_headings":"","what":"Installing binaries from R Universe","title":"vegan: an R package for community ecologists","text":"just want install binary version packages, just CRAN, can install R Universe repository. Run following R session: make permanent, ’ll need include options() part person R settings file, typically .Rprofile profile home drive. See ?Startup.","code":"# Enable repository from vegandevs options(repos = c(   vegandevs = 'https://vegandevs.r-universe.dev',   CRAN = 'https://cloud.r-project.org')) # Download and install vegan in R install.packages('vegan')"},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":null,"dir":"Reference","previous_headings":"","what":"Barro Colorado Island Tree Counts — BCI","title":"Barro Colorado Island Tree Counts — BCI","text":"Tree counts 1-hectare plots Barro Colorado Island   associated site information.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Barro Colorado Island Tree Counts — BCI","text":"","code":"data(BCI) data(BCI.env)"},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Barro Colorado Island Tree Counts — BCI","text":"data frame 50 plots (rows) 1 hectare counts trees   plot total 225 species (columns). Full Latin names   used tree species. names updated   http://www.theplantlist.org Kress et al. (2009) allows   matching 207 species doi:10.5061/dryad.63q27  (Zanne et   al., 2014). original species names available attribute   original.names BCI. See Examples changed names. BCI.env, data frame 50 plots (rows) nine site   variables derived Pyke et al. (2001) Harms et al. (2001):  UTM.EW: UTM coordinates (zone 17N) East-West. UTM.NS: UTM coordinates (zone 17N) North-South. Precipitation: Precipitation mm per year. Elevation: Elevation m sea level. Age.cat: Forest age category. Geology: Underlying geological formation. Habitat: Dominant habitat type based map     habitat types 25 grid cells plot (Harms et al. 2001,     excluding streamside habitat). habitat types Young     forests (ca. 100 years), old forests > 7 degree slopes     (OldSlope), old forests 152 m elevation     (OldLow) higher elevation (OldHigh)     Swamp forests. River: \"Yes\" streamside habitat     plot. EnvHet: Environmental Heterogeneity assessed     Simpson diversity frequencies Habitat types 25     grid cells plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Barro Colorado Island Tree Counts — BCI","text":"Data give numbers trees least 10 cm diameter breast   height (DBH) one hectare quadrat 1982 BCI   plot. Within plot, individuals tallied   recorded table. full survey included smaller trees   DBH 1 cm larger, BCI dataset subset larger   trees compiled Condit et al. (2002). full data   thinner trees densities 4000 stems per hectare,   ten times stems data. dataset BCI   provided (2003) illustrate analysis methods   vegan. scientific research ecological issues   strongly recommend access complete modern data (Condit   et al. 2019) updated taxonomy (Condit et al. 2020). data frame contains Barro Colorado Island subset   full data table Condit et al. (2002). quadrats located regular grid. See BCI.env   coordinates. full description site information BCI.env   given Pyke et al. (2001) Harms et al. (2001). N.B.   Pyke et al. (2001) Harms et al. (2001) give conflicting   information forest age categories elevation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Barro Colorado Island Tree Counts — BCI","text":"https://www.science.org/doi/10.1126/science.1066854   community data References environmental data. updated   complete data (incl. thinner trees 1 cm), see Condit et   al. (2019).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Barro Colorado Island Tree Counts — BCI","text":"Condit, R, Pitman, N, Leigh, E.G., Chave, J., Terborgh, J., Foster,   R.B., Nuñez, P., Aguilar, S., Valencia, R., Villa, G.,   Muller-Landau, H.C., Losos, E. & Hubbell, S.P. (2002).   Beta-diversity tropical forest trees. Science 295,   666--669. Condit R., Pérez, R., Aguilar, S., Lao, S., Foster, R. & Hubbell,   S. (2019). Complete data Barro Colorado 50-ha plot: 423617   trees, 35 years [Dataset].  Dryad.   doi:10.15146/5xcp-0d46 Condit, R., Aguilar, S., Lao, S., Foster, R., Hubbell,   S. (2020). BCI 50-ha Plot Taxonomy [Dataset].  Dryad.   doi:10.15146/R3FH61 Harms K.E., Condit R., Hubbell S.P. & Foster R.B. (2001) Habitat   associations trees shrubs 50-ha neotropical forest   plot. J. Ecol. 89, 947--959. Kress W.J., Erickson D.L, Jones F.., Swenson N.G, Perez R., Sanjur   O. & Bermingham E. (2009) Plant DNA barcodes community   phylogeny tropical forest dynamics plot Panama. PNAS   106, 18621--18626. Pyke, C. R., Condit, R., Aguilar, S., & Lao, S. (2001). Floristic   composition across climatic gradient neotropical lowland   forest. Journal Vegetation Science 12, 553--566.   doi:10.2307/3237007 Zanne .E., Tank D.C., Cornwell, W.K., Eastman J.M., Smith, S..,   FitzJohn, R.G., McGlinn, D.J., O’Meara, B.C., Moles, .T., Reich,   P.B., Royer, D.L., Soltis, D.E., Stevens, P.F., Westoby, M., Wright,   .J., Aarssen, L., Bertin, R.., Calaminus, ., Govaerts, R.,   Hemmings, F., Leishman, M.R., Oleksyn, J., Soltis, P.S., Swenson,   N.G., Warman, L. & Beaulieu, J.M. (2014) Three keys radiation   angiosperms freezing environments. Nature 506,   89--92.  doi:10.1038/nature12872  (published online Dec 22, 2013).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Barro Colorado Island Tree Counts — BCI","text":"","code":"data(BCI, BCI.env) head(BCI.env) #>   UTM.EW  UTM.NS Precipitation Elevation Age.cat Geology  Habitat Stream EnvHet #> 1 625754 1011569          2530       120      c3      Tb OldSlope    Yes 0.6272 #> 2 625754 1011669          2530       120      c3      Tb   OldLow    Yes 0.3936 #> 3 625754 1011769          2530       120      c3      Tb   OldLow     No 0.0000 #> 4 625754 1011869          2530       120      c3      Tb   OldLow     No 0.0000 #> 5 625754 1011969          2530       120      c3      Tb OldSlope     No 0.4608 #> 6 625854 1011569          2530       120      c3      Tb   OldLow     No 0.0768 ## see changed species names oldnames <- attr(BCI, \"original.names\") taxa <- cbind(\"Old Names\" = oldnames, \"Current Names\" = names(BCI)) noquote(taxa[taxa[,1] != taxa[,2], ]) #>       Old Names                     Current Names                  #>  [1,] Abarema.macradenium           Abarema.macradenia             #>  [2,] Acacia.melanoceras            Vachellia.melanoceras          #>  [3,] Apeiba.aspera                 Apeiba.glabra                  #>  [4,] Aspidosperma.cruenta          Aspidosperma.desmanthum        #>  [5,] Cassipourea.elliptica         Cassipourea.guianensis         #>  [6,] Cespedezia.macrophylla        Cespedesia.spathulata          #>  [7,] Chlorophora.tinctoria         Maclura.tinctoria              #>  [8,] Coccoloba.manzanillensis      Coccoloba.manzinellensis       #>  [9,] Coussarea.curvigemmia         Coussarea.curvigemma           #> [10,] Cupania.sylvatica             Cupania.seemannii              #> [11,] Dipteryx.panamensis           Dipteryx.oleifera              #> [12,] Eugenia.coloradensis          Eugenia.florida                #> [13,] Eugenia.oerstedeana           Eugenia.oerstediana            #> [14,] Guapira.standleyana           Guapira.myrtiflora             #> [15,] Hyeronima.alchorneoides       Hieronyma.alchorneoides        #> [16,] Inga.marginata                Inga.semialata                 #> [17,] Lonchocarpus.latifolius       Lonchocarpus.heptaphyllus      #> [18,] Maquira.costaricana           Maquira.guianensis.costaricana #> [19,] Phoebe.cinnamomifolia         Cinnamomum.triplinerve         #> [20,] Swartzia.simplex.var.ochnacea Swartzia.simplex.continentalis #> [21,] Tabebuia.guayacan             Handroanthus.guayacan"},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical Correlation Analysis — CCorA","title":"Canonical Correlation Analysis — CCorA","text":"Canonical correlation analysis, following Brian McArdle's unpublished graduate course notes, plus improvements allow calculations case sparse collinear matrices,  permutation test Pillai's trace statistic.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical Correlation Analysis — CCorA","text":"","code":"CCorA(Y, X, stand.Y=FALSE, stand.X=FALSE, permutations = 0, ...)  # S3 method for CCorA biplot(x, plot.type=\"ov\", xlabs, plot.axes = 1:2, int=0.5,     col.Y=\"red\", col.X=\"blue\", cex=c(0.7,0.9), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical Correlation Analysis — CCorA","text":"Y Left matrix (object class: matrix data.frame). X Right matrix (object class: matrix data.frame). stand.Y Logical; Y standardized? stand.X Logical; X standardized? permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. x CCoaR result object. plot.type character string indicating following      plots produced: \"objects\", \"variables\", \"ov\"      (separate graphs objects variables), \"biplots\".      unambiguous subset containing first letters names can used      instead full names. xlabs Row labels. default use row names, NULL     uses row numbers instead, NA suppresses plotting row names     completely. plot.axes vector 2 values containing order numbers      canonical axes plotted. Default: first two axes. int Radius inner circles plotted visual references      plots variables. Default: int=0.5. int=0,      inner circle plotted. col.Y Color used objects variables first data      table (Y) plots. biplots, objects black. col.X Color used objects variables second data      table (X) plots. cex vector 2 values containing size reduction factors      object variable names, respectively, plots.      Default values: cex=c(0.7,0.9). ... arguments passed functions. function      biplot.CCorA passes graphical arguments biplot      biplot.default. CCorA currently ignores extra      arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Canonical Correlation Analysis — CCorA","text":"Canonical correlation analysis (Hotelling 1936) seeks linear   combinations variables Y maximally   correlated linear combinations variables X.   analysis estimates relationships displays graphs.   Pillai's trace statistic computed tested parametrically (F-test);   permutation test also available. Algorithmic note --    blunt approach read two matrices, compute   covariance matrices, matrix   S12 %*% inv(S22) %*% t(S12) %*% inv(S11).   trace Pillai's trace statistic.    approach may fail, however, heavy multicollinearity   sparse data matrices. safe approach replace data   matrices PCA object scores. function can produce different types plots depending option  chosen:  \"objects\" produces two plots objects, one space  Y, second space X;  \"variables\" produces two plots variables, one variables  Y space Y, second variables X space X;  \"ov\" produces four plots, two objects two variables;  \"biplots\" produces two biplots, one first matrix (Y)  one second matrix (X) solutions. biplots, function passes arguments  biplot.default; consult help page configuring biplots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canonical Correlation Analysis — CCorA","text":"Function CCorA returns list containing following elements: Pillai Pillai's trace statistic = sum canonical     eigenvalues. Eigenvalues Canonical eigenvalues. squares     canonical correlations. CanCorr Canonical correlations. Mat.ranks Ranks matrices Y X. RDA.Rsquares Bimultivariate redundancy coefficients     (R-squares) RDAs Y|X X|Y. RDA.adj.Rsq RDA.Rsquares adjusted n number      explanatory variables. nperm Number permutations. p.Pillai Parametric probability value associated Pillai's trace. p.perm Permutational probability associated Pillai's trace. Cy Object scores Y biplot. Cx Object scores X biplot. corr.Y.Cy Scores Y variables Y biplot, computed cor(Y,Cy). corr.X.Cx Scores X variables X biplot, computed cor(X,Cx). corr.Y.Cx cor(Y,Cy) available plotting variables Y space X manually. corr.X.Cy cor(X,Cx) available plotting variables X space Y manually. control list control values permutations     returned function . call Call CCorA function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Canonical Correlation Analysis — CCorA","text":"Hotelling, H. 1936. Relations two sets   variates. Biometrika 28: 321-377. Legendre, P. 2005. Species associations: Kendall coefficient    concordance revisited. Journal Agricultural, Biological,    Environmental Statistics 10: 226-245.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Canonical Correlation Analysis — CCorA","text":"Pierre Legendre, Departement de Sciences Biologiques,   Universite de Montreal. Implemented vegan help   Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canonical Correlation Analysis — CCorA","text":"","code":"# Example using two mite groups. The mite data are available in vegan data(mite) # Two mite species associations (Legendre 2005, Fig. 4) group.1 <- c(1,2,4:8,10:15,17,19:22,24,26:30) group.2 <- c(3,9,16,18,23,25,31:35) # Separate Hellinger transformations of the two groups of species  mite.hel.1 <- decostand(mite[,group.1], \"hel\") mite.hel.2 <- decostand(mite[,group.2], \"hel\") rownames(mite.hel.1) = paste(\"S\",1:nrow(mite),sep=\"\") rownames(mite.hel.2) = paste(\"S\",1:nrow(mite),sep=\"\") out <- CCorA(mite.hel.1, mite.hel.2) out #>  #> Canonical Correlation Analysis #>  #> Call: #> CCorA(Y = mite.hel.1, X = mite.hel.2)  #>  #>               Y  X #> Matrix Ranks 24 11 #>  #> Pillai's trace:  4.573009  #>  #> Significance of Pillai's trace: #> from F-distribution:   0.0032737  #>                        CanAxis1 CanAxis2 CanAxis3 CanAxis4 CanAxis5 CanAxis6 #> Canonical Correlations  0.92810  0.82431  0.81209  0.74981  0.70795  0.65950 #>                        CanAxis7 CanAxis8 CanAxis9 CanAxis10 CanAxis11 #> Canonical Correlations  0.50189  0.48179  0.41089   0.37823      0.28 #>  #>                      Y | X  X | Y #> RDA R squares      0.33224 0.5376 #> adj. RDA R squares 0.20560 0.2910 #>  biplot(out, \"ob\")                 # Two plots of objects  biplot(out, \"v\", cex=c(0.7,0.6))  # Two plots of variables  biplot(out, \"ov\", cex=c(0.7,0.6)) # Four plots (2 for objects, 2 for variables)  biplot(out, \"b\", cex=c(0.7,0.6))  # Two biplots  biplot(out, xlabs = NA, plot.axes = c(3,5))    # Plot axes 3, 5. No object names  biplot(out, plot.type=\"biplots\", xlabs = NULL) # Replace object names by numbers   # Example using random numbers. No significant relationship is expected mat1 <- matrix(rnorm(60),20,3) mat2 <- matrix(rnorm(100),20,5) out2 = CCorA(mat1, mat2, permutations=99) out2 #>  #> Canonical Correlation Analysis #>  #> Call: #> CCorA(Y = mat1, X = mat2, permutations = 99)  #>  #>              Y X #> Matrix Ranks 3 5 #>  #> Pillai's trace:  0.480458  #>  #> Significance of Pillai's trace: #> from F-distribution:   0.90606  #> based on permutations: 0.94  #> Permutation: free #> Number of permutations: 99 #>   #>                        CanAxis1 CanAxis2 CanAxis3 #> Canonical Correlations  0.64421  0.23458   0.1021 #>  #>                        Y | X   X | Y #> RDA R squares       0.214302  0.0839 #> adj. RDA R squares -0.066305 -0.0879 #>  biplot(out2, \"b\")"},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Function rotates multidimensional scaling result   first dimension parallel external (environmental   variable). function can handle results   metaMDS monoMDS functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"","code":"MDSrotate(object, vec, na.rm = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"object result object metaMDS     monoMDS. vec environmental variable matrix     variables. number variables must lower number     dimensions, solution rotated variables     order appear matrix. Alternatively vec can     factor, solution rotated optimal separation     factor levels using lda. na.rm Remove missing values continuous variable     vec. ... arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"orientation rotation undefined multidimensional   scaling.  Functions metaMDS metaMDS   can rotate solutions principal components   dispersion points highest first dimension. Sometimes   different rotation intuitive, MDSrotate allows   rotation result first axis parallel given   external variable two first variables completely   two-dimensional plane etc. several external variables supplied,   applied order matrix. First axis   rotated first supplied variable, second axis   second variable. variables usually correlated, second   variable usually aligned second axis,   uncorrelated later dimensions. must least one free   dimension: number external variables must lower   number dimensions, used environmental variables   uncorrelated free dimension. Alternatively method can rotate discriminate levels   factor using linear discriminant analysis   (lda). hardly meaningful   two-dimensional solutions, since rotations two dimensions   separation cluster levels. However, function   can useful finding two-dimensional projection clusters   two dimensions. last dimension always show   residual variation, \\(k\\) dimensions, \\(k-1\\)   discrimination vectors used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Function returns original ordination result,   rotated scores (site species available),  pc attribute scores set FALSE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Rotation factor variable experimental feature may   removed. discriminant analysis weights dimensions   discriminating power, MDSrotate performs rigid   rotation. Therefore solution may optimal.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"","code":"data(varespec) data(varechem) mod <- monoMDS(vegdist(varespec)) mod <- with(varechem, MDSrotate(mod, pH)) plot(mod) ef <- envfit(mod ~ pH, varechem, permutations = 0) plot(ef) ordisurf(mod ~ pH, varechem, knots = 1, add = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ poly(x1, 1) + poly(x2, 1) #> Total model degrees of freedom 3  #>  #> REML score: -2.736051"},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":null,"dir":"Reference","previous_headings":"","what":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Mitchell-Olds & Shaw test concerns location highest (hump)   lowest (pit) value quadratic curve given points. Typically,   used study whether quadratic hump pit located   within studied interval. current test generalized   applies generalized linear models (glm) link   function instead simple quadratic curve.  test popularized   ecology analysis humped species richness patterns   (Mittelbach et al. 2001), general. logarithmic   link function, quadratic response defines Gaussian response   model ecological gradients (ter Braak & Looman 1986), test   can used inspecting location Gaussian optimum within   given range gradient. can also used replace Tokeshi's   test “bimodal” species frequency distribution.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"","code":"MOStest(x, y, interval, ...) # S3 method for MOStest plot(x, which = c(1,2,3,6), ...) fieller.MOStest(object, level = 0.95) # S3 method for MOStest profile(fitted, alpha = 0.01, maxsteps = 10, del = zmax/5, ...) # S3 method for MOStest confint(object, parm = 1, level = 0.95, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"x independent variable plotting object plot. y dependent variable. interval two points test statistic     evaluated. missing, extremes x used. Subset plots produced. Values =1     2 define plots specific MOStest (see Details),     larger values select graphs plot.lm (minus 2). object, fitted result object MOStest. level confidence level required. alpha Maximum significance level allowed. maxsteps Maximum number steps profile. del step length parameter profile (see code). parm Ignored. ... variables passed functions. Function     MOStest passes glm     can include family. functions pass     underlying graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"function fits quadratic curve \\(\\mu = b_0 + b_1 x + b_2   x^2\\) given family link function.  \\(b_2   < 0\\), defines unimodal curve highest point \\(u =   -b_1/(2 b_2)\\) (ter Braak & Looman 1986). \\(b_2 > 0\\),   parabola minimum \\(u\\) response sometimes   called “bimodal”.  null hypothesis extreme   point \\(u\\) located within interval given points   \\(p_1\\) \\(p_2\\). extreme point \\(u\\) exactly   \\(p_1\\), \\(b_1 = 0\\) shifted axis \\(x - p_1\\).    test, origin x shifted values \\(p_1\\)   \\(p_2\\), test statistic based differences   deviances original model model origin   forced given location using standard   anova.glm function (Oksanen et al. 2001).   Mitchell-Olds & Shaw (1987) used first degree coefficient   significance estimated summary.glm   function.  give identical results Normal error,   error distributions preferable use test based   differences deviances fitted models. test often presented general test location   hump, really dependent quadratic fitted curve.   hump different form quadratic, test may   insignificant. strong assumptions test, use support   functions inspect fit. Function plot(..., =1)   displays data points, fitted quadratic model, approximate   95% confidence intervals (2 times SE). Function plot   = 2 displays approximate confidence interval   polynomial coefficients, together two lines indicating   combinations coefficients produce evaluated points   x. Moreover, cross-hair shows approximate confidence   intervals polynomial coefficients ignoring   correlations. Higher values produce corresponding   graphs plot.lm. , must add 2   value plot.lm. Function fieller.MOStest approximates confidence limits   location extreme point (hump pit) using Fieller's   theorem following ter Braak & Looman (1986). test based   quasideviance except family poisson   binomial. Function profile evaluates profile   deviance fitted model, confint finds profile   based confidence limits following Oksanen et al. (2001). test typically used assessing significance diversity   hump productivity gradient (Mittelbach et al. 2001). also   can used location pit (deepest points) instead   Tokeshi test. , can used test location   Gaussian optimum ecological gradient analysis (ter Braak &   Looman 1986, Oksanen et al. 2001).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"function based glm, returns result   object glm amended result test. new   items MOStest : isHump TRUE response     hump. isBracketed TRUE hump pit bracketed     evaluated points. hump Sorted vector location hump pit     points test evaluated. coefficients Table test statistics significances.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Mitchell-Olds, T. & Shaw, R.G. 1987. Regression analysis natural selection: statistical inference biological interpretation. Evolution 41, 1149--1161. Mittelbach, G.C. Steiner, C.F., Scheiner, S.M., Gross, K.L., Reynolds, H.L., Waide, R.B., Willig, R.M., Dodson, S.. & Gough, L. 2001. observed relationship species richness productivity? Ecology 82, 2381--2396. Oksanen, J., Läärä, E., Tolonen, K. & Warner, B.G. 2001. Confidence intervals optimum Gaussian response function. Ecology 82, 1191--1197. ter Braak, C.J.F & Looman, C.W.N 1986. Weighted averaging, logistic regression Gaussian response model. Vegetatio 65, 3--11.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Function fieller.MOStest based package optgrad Ecological Archives (https://figshare.com/articles/dataset/Full_Archive/3521975) accompanying Oksanen et al. (2001). Ecological Archive package optgrad also contains profile deviance method location hump pit, current implementation profile confint rather follow example profile.glm confint.glm MASS package.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"","code":"## The Al-Mufti data analysed in humpfit(): mass <- c(140,230,310,310,400,510,610,670,860,900,1050,1160,1900,2480) spno <- c(1,  4,  3,  9, 18, 30, 20, 14,  3,  2,  3,  2,  5,  2) mod <- MOStest(mass, spno) ## Insignificant mod #>  #> Mitchell-Olds and Shaw test #> Null: hump of a quadratic linear predictor is at min or max #>  #> Family: gaussian  #> Link function: identity  #>  #>       hump        min        max  #>   46.89749  140.00000 2480.00000  #> ***** Caution: hump/pit not bracketed by the data ****** #>  #>             min/max      F Pr(>F) #> hump at min     140 0.0006 0.9816 #> hump at max    2480 0.3161 0.5852 #> Combined                   0.9924 ## ... but inadequate shape of the curve op <- par(mfrow=c(2,2), mar=c(4,4,1,1)+.1) plot(mod)  ## Looks rather like log-link with Poisson error and logarithmic biomass mod <- MOStest(log(mass), spno, family=quasipoisson) mod #>  #> Mitchell-Olds and Shaw test #> Null: hump of a quadratic linear predictor is at min or max #>  #> Family: quasipoisson  #> Link function: log  #>  #>      min     hump      max  #> 4.941642 6.243371 7.816014  #>  #>             min/max      F  Pr(>F)   #> hump at min  4.9416 7.1367 0.02174 * #> hump at max  7.8160 9.0487 0.01191 * #> Combined                   0.03338 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod)  par(op) ## Confidence Limits fieller.MOStest(mod) #>    2.5 %   97.5 %  #> 5.255827 6.782979  confint(mod) #>    2.5 %   97.5 %  #> 5.816021 6.574378  plot(profile(mod))"},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjusted R-square — RsquareAdj","title":"Adjusted R-square — RsquareAdj","text":"functions finds adjusted R-square.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjusted R-square — RsquareAdj","text":"","code":"# S3 method for default RsquareAdj(x, n, m, ...) # S3 method for rda RsquareAdj(x, ...) # S3 method for cca RsquareAdj(x, permutations = 1000, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjusted R-square — RsquareAdj","text":"x Unadjusted R-squared object terms   evaluation adjusted R-squared can found. n, m Number observations number degrees freedom   fitted model. permutations Number permutations use computing adjusted    R-squared cca. permutations can calculated parallel   specifying number cores passed permutest ... arguments (ignored) except case cca    arguments passed permutest.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjusted R-square — RsquareAdj","text":"default method finds adjusted \\(R^2\\)   unadjusted \\(R^2\\), number observations,   number degrees freedom fitted model. specific methods   find information fitted result object.   specific methods rda, cca,   lm glm. Adjusted, even unadjusted,   \\(R^2\\) may available cases,   functions return NA. adjusted   \\(R^2\\) partial ordination, \\(R^2\\)   values available gaussian models   glm. adjusted, \\(R^2\\) cca computed using   permutation approach developed Peres-Neto et al. (2006).   default 1000 permutations used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjusted R-square — RsquareAdj","text":"functions return list items r.squared adj.r.squared.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Adjusted R-square — RsquareAdj","text":"Legendre, P., Oksanen, J. ter Braak, C.J.F. (2011). Testing   significance canonical axes redundancy analysis.    Methods Ecology Evolution 2, 269--277. Peres-Neto, P., P. Legendre, S. Dray D. Borcard. 2006. Variation   partitioning species data matrices: estimation comparison   fractions. Ecology 87, 2614--2625.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjusted R-square — RsquareAdj","text":"","code":"data(mite) data(mite.env) ## rda m <- rda(decostand(mite, \"hell\") ~  ., mite.env) RsquareAdj(m) #> $r.squared #> [1] 0.5265047 #>  #> $adj.r.squared #> [1] 0.4367038 #>  ## cca m <- cca(decostand(mite, \"hell\") ~  ., mite.env) RsquareAdj(m) #> $r.squared #> [1] 0.4471676 #>  #> $adj.r.squared #> [1] 0.3448054 #>  ## default method RsquareAdj(0.8, 20, 5) #> [1] 0.7285714"},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":null,"dir":"Reference","previous_headings":"","what":"Self-Starting nls Species-Area Models — SSarrhenius","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"functions provide self-starting species-area models   non-linear regression (nls). can also used   fitting species accumulation models   fitspecaccum. models (many ) reviewed   Dengler (2009).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"","code":"SSarrhenius(area, k, z) SSgleason(area, k, slope) SSgitay(area, k, slope) SSlomolino(area, Asym, xmid, slope)"},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"area Area size sample: independent variable. k, z, slope, Asym, xmid Estimated model parameters: see Details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"functions assumed used species richness   (number species) independent variable, area sample   size independent variable. Basically, define least   squares models untransformed data, differ models   transformed species richness models non-Gaussian error. Arrhenius model (SSarrhenius) expression   k*area^z. classical model can found   textbook ecology (also Dengler 2009). Parameter z   steepness species-area curve, k   expected number species unit area. Gleason model (SSgleason) linear expression    k + slope*log(area) (Dengler 200). linear model,     starting values give final estimates; provided    ease comparison models. Gitay model (SSgitay) quadratic logarithmic expression   (k + slope*log(area))^2 (Gitay et al. 1991, Dengler   2009). Parameter slope steepness species-area   curve, k square root expected richness unit   area. Lomolino model (SSlomolino)   Asym/(1 + slope^log(xmid/area)) (Lomolino 2000, Dengler 2009).   Parameter Asym asymptotic maximum number species,   slope maximum slope increase richness,   xmid  area half maximum richness   achieved. addition models, several models studied Dengler   (2009) available standard R self-starting models:   Michaelis-Menten (SSmicmen), Gompertz   (SSgompertz), logistic (SSlogis), Weibull   (SSweibull), others may useful.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Numeric vector length area. value   expression model. arguments names objects   gradient matrix respect names attached   attribute named gradient.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Dengler, J. (2009) function describes species-area   relationship best? review empirical evaluation. Journal     Biogeography 36, 728--744. Gitay, H., Roxburgh, S.H. & Wilson, J.B. (1991) Species-area   relationship New Zealand tussock grassland, implications   nature reserve design community structure. Journal   Vegetation Science 2, 113--118. Lomolino, M. V. (2000) Ecology's general, yet protean pattern:   species-area relationship. Journal Biogeography 27,   17--26.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"","code":"## Get species area data: sipoo.map gives the areas of islands data(sipoo, sipoo.map) S <- specnumber(sipoo) plot(S ~ area, sipoo.map,  xlab = \"Island Area (ha)\",   ylab = \"Number of Species\", ylim = c(1, max(S))) ## The Arrhenius model marr <- nls(S ~ SSarrhenius(area, k, z), data=sipoo.map) marr #> Nonlinear regression model #>   model: S ~ SSarrhenius(area, k, z) #>    data: sipoo.map #>      k      z  #> 3.4062 0.4364  #>  residual sum-of-squares: 78.1 #>  #> Number of iterations to convergence: 5  #> Achieved convergence tolerance: 1.056e-06 ## confidence limits from profile likelihood confint(marr) #> Waiting for profiling to be done... #>        2.5%     97.5% #> k 2.6220312 4.3033906 #> z 0.3813576 0.4944693 ## draw a line xtmp <- with(sipoo.map, seq(min(area), max(area), len=51)) lines(xtmp, predict(marr, newdata=data.frame(area = xtmp)), lwd=2) ## The normal way is to use linear regression on log-log data, ## but this will be different from the previous: mloglog <- lm(log(S) ~ log(area), data=sipoo.map) mloglog #>  #> Call: #> lm(formula = log(S) ~ log(area), data = sipoo.map) #>  #> Coefficients: #> (Intercept)    log(area)   #>      1.0111       0.4925   #>  lines(xtmp, exp(predict(mloglog, newdata=data.frame(area=xtmp))),    lty=2) ## Gleason: log-linear mgle <- nls(S ~ SSgleason(area, k, slope), sipoo.map) lines(xtmp, predict(mgle, newdata=data.frame(area=xtmp)),   lwd=2, col=2) ## Gitay: quadratic of log-linear mgit <- nls(S ~ SSgitay(area, k, slope), sipoo.map) lines(xtmp, predict(mgit, newdata=data.frame(area=xtmp)),   lwd=2, col = 3) ## Lomolino: using original names of the parameters (Lomolino 2000): mlom <- nls(S ~ SSlomolino(area, Smax, A50, Hill), sipoo.map) mlom #> Nonlinear regression model #>   model: S ~ SSlomolino(area, Smax, A50, Hill) #>    data: sipoo.map #>   Smax    A50   Hill  #> 53.493 94.697  2.018  #>  residual sum-of-squares: 55.37 #>  #> Number of iterations to convergence: 6  #> Achieved convergence tolerance: 9.715e-07 lines(xtmp, predict(mlom, newdata=data.frame(area=xtmp)),   lwd=2, col = 4) ## One canned model of standard R: mmic <- nls(S ~ SSmicmen(area, Asym, slope), sipoo.map) lines(xtmp, predict(mmic, newdata = data.frame(area=xtmp)),   lwd =2, col = 5) legend(\"bottomright\", c(\"Arrhenius\", \"log-log linear\", \"Gleason\", \"Gitay\",    \"Lomolino\", \"Michaelis-Menten\"), col=c(1,1,2,3,4,5), lwd=c(2,1,2,2,2,2),     lty=c(1,2,1,1,1,1))  ## compare models (AIC) allmods <- list(Arrhenius = marr, Gleason = mgle, Gitay = mgit,     Lomolino = mlom, MicMen= mmic) sapply(allmods, AIC) #> Arrhenius   Gleason     Gitay  Lomolino    MicMen  #>  83.49847  96.94018  80.54984  79.30718  83.02003"},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Compute single terms can added dropped constrained ordination model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"","code":"# S3 method for cca add1(object, scope, test = c(\"none\", \"permutation\"),     permutations = how(nperm=199), ...) # S3 method for cca drop1(object, scope, test = c(\"none\", \"permutation\"),      permutations = how(nperm=199), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"object constrained ordination object   cca, rda capscale. scope formula giving terms considered adding   dropping; see add1 details. test permutation test added using anova.cca. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. ... arguments passed add1.default,   drop1.default, anova.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"argument test = \"none\" functions call   add1.default drop1.default.   argument test = \"permutation\" functions add test   results anova.cca. Function drop1.cca   call anova.cca argument = \"margin\".   Function add1.cca implement test single term   additions directly available anova.cca. Functions used implicitly step,   ordiR2step ordistep.   deviance.cca deviance.rda used   step firm basis, setting argument test   = \"permutation\" may help getting useful insight validity   model building. Function ordistep calls alternately   drop1.cca add1.cca argument    test = \"permutation\" selects variables permutation   \\(P\\)-values.  Meticulous use add1.cca   drop1.cca allow judicious model building. default number permutations set low value,   permutation tests can take long time. sufficient   give impression significances terms, higher   values permutations used \\(P\\) values really   important.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Returns similar object add1 drop1.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"","code":"data(dune) data(dune.env) ## Automatic model building based on AIC but with permutation tests step(cca(dune ~  1, dune.env), reformulate(names(dune.env)), test=\"perm\") #> Start:  AIC=87.66 #> dune ~ 1 #>  #>              Df    AIC      F Pr(>F)    #> + Moisture    3 86.608 2.2536  0.005 ** #> + Management  3 86.935 2.1307  0.005 ** #> + A1          1 87.411 2.1400  0.040 *  #>           87.657                  #> + Manure      4 88.832 1.5251  0.040 *  #> + Use         2 89.134 1.1431  0.205    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step:  AIC=86.61 #> dune ~ Moisture #>  #>              Df    AIC      F Pr(>F)    #>           86.608                  #> + Management  3 86.813 1.4565  0.055 .  #> + A1          1 86.992 1.2624  0.175    #> + Use         2 87.259 1.2760  0.075 .  #> + Manure      4 87.342 1.3143  0.050 *  #> - Moisture    3 87.657 2.2536  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Call: cca(formula = dune ~ Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    0.6283     0.2970    3 #> Unconstrained  1.4870     0.7030   16 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3  #> 0.4187 0.1330 0.0766  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11  #> 0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419  #>   CA12   CA13   CA14   CA15   CA16  #> 0.0201 0.0143 0.0099 0.0085 0.0080  #>  ## see ?ordistep to do the same, but based on permutation P-values if (FALSE) { ordistep(cca(dune ~  1, dune.env), reformulate(names(dune.env))) } ## Manual model building ## -- define the maximal model for scope mbig <- rda(dune ~  ., dune.env) ## -- define an empty model to start with m0 <- rda(dune ~ 1, dune.env) ## -- manual selection and updating add1(m0, scope=formula(mbig), test=\"perm\") #>            Df    AIC      F Pr(>F)    #>         89.620                  #> A1          1 89.591 1.9217  0.020 *  #> Moisture    3 87.707 2.5883  0.005 ** #> Management  3 87.082 2.8400  0.005 ** #> Use         2 91.032 1.1741  0.215    #> Manure      4 89.232 1.9539  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 m0 <- update(m0, . ~ . + Management) add1(m0, scope=formula(mbig), test=\"perm\") #>          Df    AIC      F Pr(>F)   #>       87.082                 #> A1        1 87.424 1.2965  0.180   #> Moisture  3 85.567 1.9764  0.015 * #> Use       2 88.284 1.0510  0.400   #> Manure    3 87.517 1.3902  0.100 . #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 m0 <- update(m0, . ~ . + Moisture) ## -- included variables still significant? drop1(m0, test=\"perm\") #>            Df    AIC      F Pr(>F)    #>         85.567                  #> Management  3 87.707 2.1769   0.01 ** #> Moisture    3 87.082 1.9764   0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 add1(m0, scope=formula(mbig), test=\"perm\") #>        Df    AIC      F Pr(>F) #>     85.567               #> A1      1 86.220 0.8359  0.635 #> Use     2 86.842 0.8027  0.790 #> Manure  3 85.762 1.1225  0.375"},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":null,"dir":"Reference","previous_headings":"","what":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"additive diversity partitioning, mean values alpha diversity lower levels sampling hierarchy compared total diversity entire data set (gamma diversity). hierarchical null model testing, statistic returned function evaluated according nested hierarchical sampling design (hiersimu).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"","code":"adipart(...) # S3 method for default adipart(y, x, index=c(\"richness\", \"shannon\", \"simpson\"),     weights=c(\"unif\", \"prop\"), relative = FALSE, nsimul=99,     method = \"r2dtable\", ...) # S3 method for formula adipart(formula, data, index=c(\"richness\", \"shannon\", \"simpson\"),     weights=c(\"unif\", \"prop\"), relative = FALSE, nsimul=99,     method = \"r2dtable\", ...)  hiersimu(...) # S3 method for default hiersimu(y, x, FUN, location = c(\"mean\", \"median\"),     relative = FALSE, drop.highest = FALSE, nsimul=99,     method = \"r2dtable\", ...) # S3 method for formula hiersimu(formula, data, FUN, location = c(\"mean\", \"median\"),     relative = FALSE, drop.highest = FALSE, nsimul=99,     method = \"r2dtable\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"y community matrix. x matrix number rows y, columns     coding levels sampling hierarchy. number groups within     hierarchy must decrease left right. x missing,     function performs overall decomposition alpha, beta     gamma diversities. formula two sided model formula form y ~ x,     y community data matrix samples rows     species column. Right hand side (x) must grouping variables     referring levels sampling hierarchy, terms right left     treated nested (first column lowest, last     highest level). formula add unique indentifier rows     constant rows always produce estimates row-level alpha     overall gamma diversities. must use non-formula     interface avoid behaviour. Interaction terms     allowed. data data frame look variables defined     right hand side formula. missing, variables looked     global environment. index Character, diversity index calculated (see Details). weights Character, \"unif\" uniform weights,     \"prop\" weighting proportional sample abundances use     weighted averaging individual alpha values within strata     given level sampling hierarchy. relative Logical, TRUE alpha beta diversity     values given relative value gamma function     adipart. nsimul Number permutations use.  nsimul = 0,     FUN argument evaluated.     thus possible reuse statistic values     without null model. method Null model method: either name (character string)     method defined make.commsim     commsim function.     default \"r2dtable\" keeps row sums column sums fixed.     See oecosimu Details Examples. FUN function used hiersimu. must     fully specified, currently arguments passed     function via .... location Character, identifies function (mean median)     used calculate location samples. drop.highest Logical, drop highest level .     FUN evaluates arrays least 2 dimensions, highest     level dropped, selected . ... arguments passed functions, e.g. base     logarithm Shannon diversity, method, thin     burnin arguments oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Additive diversity partitioning means mean alpha beta   diversities add gamma diversity, thus beta diversity measured   dimensions alpha gamma (Lande 1996). additive   procedure extended across multiple scales hierarchical   sampling design \\(= 1, 2, 3, \\ldots, m\\) levels sampling   (Crist et al. 2003). Samples lower hierarchical levels nested   within higher level units, thus \\(=1\\) \\(=m\\) grain size   increasing constant survey extent. level \\(\\),   \\(\\alpha_i\\) denotes average diversity found within samples. highest sampling level, diversity components calculated   $$\\beta_m  = \\gamma -  \\alpha_m$$    lower   sampling  level    $$\\beta_i  =   \\alpha_{+1}  -   \\alpha_i$$ ,  additive partition   diversity $$\\gamma  = \\alpha_1 + \\sum_{=1}^m \\beta_i$$ Average alpha components can weighted uniformly   (weight=\"unif\") calculate simple average,   proportionally sample abundances (weight=\"prop\")   calculate weighted average follows $$\\alpha_i =   \\sum_{j=1}^{n_i} D_{ij} w_{ij}$$   \\(D_{ij}\\) diversity index \\(w_{ij}\\) weight   calculated \\(j\\)th sample \\(\\)th sampling level. implementation additive diversity partitioning   adipart follows Crist et al. 2003. based species   richness (\\(S\\), \\(S-1\\)), Shannon's Simpson's diversity   indices stated index argument. expected diversity components calculated nsimul times   individual based randomisation community data matrix.   done \"r2dtable\" method oecosimu   default. hiersimu works almost way adipart,   without comparing actual statistic values returned FUN   highest possible value (cf. gamma diversity).  ,   cases, difficult ensure additive   properties mean statistic values along hierarchy.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"object class \"adipart\" \"hiersimu\"   structure oecosimu objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Crist,   T.O.,   Veech,    J..,   Gering,   J.C.     Summerville,   K.S.  (2003).  Partitioning species  diversity  across landscapes    regions:  hierarchical  analysis  \\(\\alpha\\),  \\(\\beta\\),   \\(\\gamma\\)-diversity.  . Nat., 162, 734--743. Lande, R.  (1996). Statistics partitioning species diversity,   similarity among multiple communities.  Oikos, 76,   5--13.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"","code":"## NOTE: 'nsimul' argument usually needs to be >= 99 ## here much lower value is used for demonstration  data(mite) data(mite.xy) data(mite.env) ## Function to get equal area partitions of the mite data cutter <- function (x, cut = seq(0, 10, by = 2.5)) {     out <- rep(1, length(x))     for (i in 2:(length(cut) - 1))         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i     return(out)} ## The hierarchy of sample aggregation levsm <- with(mite.xy, data.frame(     l1=1:nrow(mite),     l2=cutter(y, cut = seq(0, 10, by = 2.5)),     l3=cutter(y, cut = seq(0, 10, by = 5)),     l4=rep(1, nrow(mite)))) ## Let's see in a map par(mfrow=c(1,3)) plot(mite.xy, main=\"l1\", col=as.numeric(levsm$l1)+1, asp = 1) plot(mite.xy, main=\"l2\", col=as.numeric(levsm$l2)+1, asp = 1) plot(mite.xy, main=\"l3\", col=as.numeric(levsm$l3)+1, asp = 1)  par(mfrow=c(1,1)) ## Additive diversity partitioning adipart(mite, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(y = mite, index = \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.377 22.374 22.088 22.343 22.834     0.05 * #> gamma      35.000   0.000 35.000 35.000 35.000 35.000     1.00   #> beta.1     19.886  36.377 12.626 12.166 12.657 12.912     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## the next two define identical models adipart(mite, levsm, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(y = mite, x = levsm, index = \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES     mean     2.5%      50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.4611 22.34060 22.03214 22.35714 22.639     0.05 * #> alpha.2    29.750 -24.5197 34.84211 34.50000 35.00000 35.000     0.05 * #> alpha.3    33.000   0.0000 35.00000 35.00000 35.00000 35.000     0.05 * #> gamma      35.000   0.0000 35.00000 35.00000 35.00000 35.000     1.00   #> beta.1     14.636   6.9804 12.50150 11.95571 12.50714 12.942     0.05 * #> beta.2      3.250  14.8892  0.15789  0.00000  0.00000  0.500     0.05 * #> beta.3      2.000   0.0000  0.00000  0.00000  0.00000  0.000     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 adipart(mite ~ l2 + l3, levsm, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(formula = mite ~ l2 + l3, data = levsm, index = #> \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES      mean      2.5%       50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.257 22.410526 22.140000 22.371429 22.826     0.05 * #> alpha.2    29.750 -41.630 34.907895 34.750000 35.000000 35.000     0.05 * #> alpha.3    33.000   0.000 35.000000 35.000000 35.000000 35.000     0.05 * #> gamma      35.000   0.000 35.000000 35.000000 35.000000 35.000     1.00   #> beta.1     14.636  10.117 12.497368 12.059643 12.578571 12.744     0.05 * #> beta.2      3.250  25.488  0.092105  0.000000  0.000000  0.250     0.05 * #> beta.3      2.000   0.000  0.000000  0.000000  0.000000  0.000     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Hierarchical null model testing ## diversity analysis (similar to adipart) hiersimu(mite, FUN=diversity, relative=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(y = mite, FUN = diversity, relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES    mean    2.5%     50%  97.5% Pr(sim.)   #> level_1   0.76064 -70.226 0.93931 0.93495 0.93987 0.9438     0.05 * #> leve_2    1.00000   0.000 1.00000 1.00000 1.00000 1.0000     1.00   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 hiersimu(mite ~ l2 + l3, levsm, FUN=diversity, relative=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(formula = mite ~ l2 + l3, data = levsm, FUN = diversity, #> relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>      statistic      SES    mean    2.5%     50%  97.5% Pr(sim.)   #> unit   0.76064  -50.582 0.93874 0.93298 0.93896 0.9448     0.05 * #> l2     0.89736 -141.137 0.99789 0.99686 0.99782 0.9994     0.05 * #> l3     0.92791 -554.665 0.99941 0.99918 0.99944 0.9996     0.05 * #> all    1.00000    0.000 1.00000 1.00000 1.00000 1.0000     1.00   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Hierarchical testing with the Morisita index morfun <- function(x) dispindmorisita(x)$imst hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(formula = mite ~ ., data = levsm, FUN = morfun, #> drop.highest = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>    statistic     SES      mean      2.5%       50%   97.5% Pr(sim.)   #> l1   0.52070  6.2932  0.365366  0.318366  0.375193  0.4017     0.05 * #> l2   0.60234 11.1528  0.147892  0.093067  0.144796  0.2192     0.05 * #> l3   0.67509 16.5827 -0.195434 -0.272390 -0.210802 -0.0911     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Analysis variance using distance matrices ---   partitioning distance matrices among sources variation fitting   linear models (e.g., factors, polynomial regression) distance    matrices; uses permutation test pseudo-\\(F\\) ratios.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"","code":"adonis2(formula, data, permutations = 999, method = \"bray\",     sqrt.dist = FALSE, add = FALSE, by = \"terms\",     parallel = getOption(\"mc.cores\"), na.action = na.fail,     strata = NULL, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"formula Model formula. left-hand side (LHS) formula     must either community data matrix dissimilarity matrix,     e.g., vegdist dist.  LHS     data matrix, function vegdist used     find dissimilarities. right-hand side (RHS) formula     defines independent variables. can continuous variables     factors, can transformed within formula, can     interactions typical formula. data data frame independent variables, rows     order community data matrix dissimilarity     matrix named LHS formula. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. method name method used vegdist     calculate pairwise distances left hand side     formula data frame matrix. sqrt.dist Take square root dissimilarities. often     euclidifies dissimilarities. add Add constant non-diagonal dissimilarities     eigenvalues non-negative underlying Principal     Co-ordinates Analysis (see wcmdscale     details). Choice \"lingoes\" (TRUE) use     recommended method Legendre & Anderson (1999: “method     1”) \"cailliez\" uses “method 2”. = \"terms\" assess significance term     (sequentially first last), setting = \"margin\"     assess marginal effects terms (marginal term     analysed model variables), = \"onedf\"     analyse one-degree--freedom contrasts sequentially, =     NULL assess overall significance terms     together. arguments passed anova.cca. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. na.action Handling missing values right-hand-side     formula (see na.fail explanation     alternatives). Missing values allowed     left-hand-side. NB, argument subset implemented. strata Groups within constrain permutations.     traditional non-movable strata set Blocks     permute package, flexible alternatives may     appropriate. ... arguments passed vegdist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"adonis2 function analysis partitioning sums squares using dissimilarities. function based principles McArdle & Anderson (2001) can perform sequential, marginal overall tests. function also allows using additive constants squareroot dissimilarities avoid negative eigenvalues, can also handle semimetric indices (Bray-Curtis) produce negative eigenvalues. adonis2 tests identical anova.cca dbrda. Euclidean distances, tests also identical anova.cca rda. function partitions sums squares multivariate data set, directly analogous MANOVA (multivariate analysis variance). McArdle Anderson (2001) Anderson (2001) refer method “permutational MANOVA” (formerly “nonparametric MANOVA”). , inputs linear predictors, response matrix arbitrary number columns, robust alternative parametric MANOVA ordination methods describing variation attributed different experimental treatments uncontrolled covariates. method also analogous distance-based redundancy analysis functions dbrda capscale (Legendre Anderson 1999), provides alternative AMOVA (nested analysis molecular variance, Excoffier, Smouse, Quattro, 1992; amova ade4 package) crossed nested factors.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"function returns anova.cca result object   new column partial \\(R^2\\): proportion   sum squares total, marginal models   (= \"margin\") \\(R^2\\) terms add   1.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Anderson (2001, Fig. 4) warns method may confound   location dispersion effects: significant differences may caused   different within-group variation (dispersion) instead different   mean values groups (see Warton et al. 2012 general   analysis). However, seems adonis2 less sensitive   dispersion effects alternatives (anosim,   mrpp). Function betadisper sister   function adonis2 study differences dispersion   within geometric framework.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Anderson, M.J. 2001. new method non-parametric multivariate analysis variance. Austral Ecology, 26: 32--46. Excoffier, L., P.E. Smouse, J.M. Quattro. 1992. Analysis molecular variance inferred metric distances among DNA haplotypes: Application human mitochondrial DNA restriction data. Genetics, 131:479--491. Legendre, P. M.J. Anderson. 1999. Distance-based redundancy analysis: Testing multispecies responses multifactorial ecological experiments. Ecological Monographs, 69:1--24. McArdle, B.H.  M.J. Anderson. 2001. Fitting multivariate models community data: comment distance-based redundancy analysis. Ecology, 82: 290--297. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate analyses confound location dispersion effects. Methods Ecology Evolution, 3, 89--101.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Martin Henry H. Stevens Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"","code":"data(dune) data(dune.env) ## default test by terms adonis2(dune ~ Management*A1, data = dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management * A1, data = dune.env) #>               Df SumOfSqs      R2      F Pr(>F)    #> Management     3   1.4686 0.34161 3.2629  0.002 ** #> A1             1   0.4409 0.10256 2.9387  0.010 ** #> Management:A1  3   0.5892 0.13705 1.3090  0.215    #> Residual      12   1.8004 0.41878                  #> Total         19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## overall tests adonis2(dune ~ Management*A1, data = dune.env, by = NULL) #> Permutation test for adonis under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management * A1, data = dune.env, by = NULL) #>          Df SumOfSqs      R2      F Pr(>F)    #> Model     7   2.4987 0.58122 2.3792  0.004 ** #> Residual 12   1.8004 0.41878                  #> Total    19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ### Example of use with strata, for nested (e.g., block) designs. dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) ) dat #>    rep NO3 field #> 1    1   0     1 #> 2    2   0     1 #> 3    1  10     1 #> 4    2  10     1 #> 5    1   0     2 #> 6    2   0     2 #> 7    1  10     2 #> 8    2  10     2 #> 9    1   0     3 #> 10   2   0     3 #> 11   1  10     3 #> 12   2  10     3 Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2 Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2 total <- Agropyron + Schizachyrium dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,         type=c('p','a'), xlab=\"NO3\", auto.key=list(columns=3, lines=TRUE) )   Y <- data.frame(Agropyron, Schizachyrium) mod <- metaMDS(Y, trace = FALSE) plot(mod) ### Ellipsoid hulls show treatment with(dat, ordiellipse(mod, NO3, kind = \"ehull\", label = TRUE)) ### Spider shows fields with(dat, ordispider(mod, field, lty=3, col=\"red\", label = TRUE))   ### Incorrect (no strata) adonis2(Y ~ NO3, data = dat, permutations = 199) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 199 #>  #> adonis2(formula = Y ~ NO3, data = dat, permutations = 199) #>          Df SumOfSqs      R2      F Pr(>F) #> NO3       1  0.02681 0.13438 1.5524   0.23 #> Residual 10  0.17270 0.86562               #> Total    11  0.19951 1.00000               ## Correct with strata with(dat, adonis2(Y ~ NO3, data = dat, permutations = 199, strata = field)) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Blocks:  strata  #> Permutation: free #> Number of permutations: 199 #>  #> adonis2(formula = Y ~ NO3, data = dat, permutations = 199, strata = field) #>          Df SumOfSqs      R2      F Pr(>F)   #> NO3       1  0.02681 0.13438 1.5524   0.03 * #> Residual 10  0.17270 0.86562                 #> Total    11  0.19951 1.00000                 #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":null,"dir":"Reference","previous_headings":"","what":"Analysis of Similarities — anosim","title":"Analysis of Similarities — anosim","text":"Analysis similarities (ANOSIM) provides way test statistically   whether significant difference two groups   sampling units.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analysis of Similarities — anosim","text":"","code":"anosim(x, grouping, permutations = 999, distance = \"bray\", strata = NULL,     parallel = getOption(\"mc.cores\"))"},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analysis of Similarities — anosim","text":"x Data matrix data frame rows samples     columns response variable(s), dissimilarity object     symmetric square matrix dissimilarities. grouping Factor grouping observations. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. distance Choice distance metric measures     dissimilarity two observations. See vegdist     options.  used x dissimilarity     structure symmetric square matrix. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Analysis of Similarities — anosim","text":"Analysis similarities (ANOSIM) provides way test statistically   whether significant difference two groups   sampling units.  Function anosim operates directly   dissimilarity matrix.  suitable dissimilarity matrix produced   functions dist vegdist.    method philosophically allied NMDS ordination   (monoMDS), uses rank order   dissimilarity values. two groups sampling units really different species   composition, compositional dissimilarities groups   greater within groups.  anosim   statistic \\(R\\) based difference mean ranks   groups (\\(r_B\\)) within groups (\\(r_W\\)): $$R = (r_B - r_W)/(N (N-1) / 4)$$ divisor chosen \\(R\\) interval   \\(-1 \\dots +1\\), value \\(0\\) indicating completely random   grouping. statistical significance observed \\(R\\) assessed   permuting grouping vector obtain empirical distribution   \\(R\\) null-model.  See permutations   additional details permutation tests Vegan. distribution   simulated values can inspected permustats   function. function summary plot methods.    show valuable information assess validity method:    function assumes ranked dissimilarities within groups    equal median range.  plot method uses   boxplot options notch=TRUE   varwidth=TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analysis of Similarities — anosim","text":"function returns list class \"anosim\" following   items: call Function call. statistic value ANOSIM statistic \\(R\\) signif Significance permutation. perm Permutation values \\(R\\). distribution     permutation values can inspected function permustats. class.vec Factor value dissimilarities     classes class name corresponding dissimilarity     within class. dis.rank Rank dissimilarity entry. dissimilarity name dissimilarity index:     \"method\" entry dist object. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Analysis of Similarities — anosim","text":"Clarke, K. R. (1993). Non-parametric multivariate analysis changes   community structure. Australian Journal Ecology 18,   117--143. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate   analyses confound location dispersion effects. Methods   Ecology Evolution, 3, 89--101","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analysis of Similarities — anosim","text":"Jari Oksanen, help Peter R. Minchin.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Analysis of Similarities — anosim","text":"anosim function can confound differences groups   dispersion within groups results can difficult   interpret (cf. Warton et al. 2012).  function returns lot   information ease studying performance. anosim   models analysed adonis2 seems   robust alternative.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Analysis of Similarities — anosim","text":"","code":"data(dune) data(dune.env) dune.dist <- vegdist(dune) dune.ano <- with(dune.env, anosim(dune.dist, Management)) summary(dune.ano) #>  #> Call: #> anosim(x = dune.dist, grouping = Management)  #> Dissimilarity: bray  #>  #> ANOSIM statistic R: 0.2579  #>       Significance: 0.008  #>  #> Permutation: free #> Number of permutations: 999 #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.122 0.170 0.209 0.245  #>  #> Dissimilarity ranks between and within classes: #>         0%   25%    50%     75%  100%   N #> Between  4 58.50 104.00 145.500 188.0 147 #> BF       5 15.25  25.50  41.250  57.0   3 #> HF       1  7.25  46.25  68.125  89.5  10 #> NM       6 64.75 124.50 156.250 181.0  15 #> SF       3 32.75  53.50  99.250 184.0  15 #>  plot(dune.ano) #> Warning: some notches went outside hinges ('box'): maybe set notch=FALSE"},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"function performs ANOVA like permutation test Constrained   Correspondence Analysis (cca), Redundancy Analysis   (rda) distance-based Redundancy Analysis (dbRDA,   capscale) assess significance constraints.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"","code":"# S3 method for cca anova(object, ..., permutations = how(nperm=999),      by = NULL, model = c(\"reduced\", \"direct\", \"full\"),      parallel = getOption(\"mc.cores\"), strata = NULL,      cutoff = 1, scope = NULL) # S3 method for cca permutest(x, permutations = how(nperm = 99),      model = c(\"reduced\", \"direct\", \"full\"), by = NULL, first = FALSE,      strata = NULL, parallel = getOption(\"mc.cores\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"object One several result objects cca,     rda, dbrda capscale.     several result objects, compared     order supplied. single object, test     specified overall test given. x single ordination result object. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. Setting = \"axis\" assess significance     constrained axis, setting = \"terms\" assess     significance term (sequentially first last),     setting = \"margin\" assess marginal effects     terms (marginal term analysed model     variables), = \"onedf\" assess sequentially     one-degree--freedom contrasts split factors. model Permutation model: model=\"direct\" permutes     community data, model=\"reduced\" permutes residuals     community data Conditions (partial model),     model = \"full\" permutes residuals Conditions     Constraints. parallel Use parallel processing given number     cores. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. error use     permutations matrix,     defines blocks. legacy argument     deprecated future: use     permutations = (..., blocks) instead. cutoff effective =\"axis\" stops     permutations axis equals exceeds cutoff     \\(p\\)-value. scope effective =\"margin\" can     used select marginal terms testing. default     test marginal terms drop.scope. first Analyse significance first axis. ... Parameters passed functions.  anova.cca     passes arguments permutest.cca. anova     = \"axis\" can use argument cutoff (defaults     1) stops permutations exceeding given     level.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Functions anova.cca permutest.cca implement ANOVA   like permutation tests joint effect constraints   cca, rda, dbrda   capscale. Function anova intended   user-friendly alternative permutest (real   workhorse). Function anova can analyse sequence constrained   ordination models. analysis based differences   residual deviance permutations nested models. default test sum constrained eigenvalues.   Setting first = TRUE perform test first   constrained eigenvalue.  Argument first can set either   anova.cca permutest.cca.  also possible   perform significance tests axis term   (constraining variable) using argument anova.cca.   Setting = \"axis\" perform separate significance tests   constrained axis.  previous constrained axes used   conditions (“partialled ”) test first   constrained eigenvalues performed (Legendre et al. 2011).  can   stop permutation tests exceeding given significance level   argument cutoff speed calculations large   models. Setting = \"terms\" perform separate significance   test term (constraining variable). terms assessed   sequentially first last, order terms   influence significances. Setting = \"onedf\"   perform similar sequential test one-degree--freedom effects,   multi-level factors split contrasts. Setting   = \"margin\" perform separate significance test   marginal term model terms. marginal test also   accepts scope argument drop.scope   can character vector term labels analysed,   fitted model lower scope.  marginal effects also known   “Type III” effects, current function evaluates   marginal terms. , instance, ignore main effects   included interaction terms. calculating pseudo-\\(F\\),   terms compared residual full model. Community data permuted choice model=\"direct\",   residuals partial CCA/ RDA/ dbRDA choice   model=\"reduced\" (default).  partial CCA/ RDA/   dbRDA stage, model=\"reduced\" simply permutes data   equivalent model=\"direct\".  test statistic   “pseudo-\\(F\\)”, ratio constrained   unconstrained total Inertia (Chi-squares, variances something   similar), divided respective degrees freedom.    conditions (“partial” terms), sum   eigenvalues remains constant, pseudo-\\(F\\) eigenvalues   give equal results.  partial CCA/ RDA/ dbRDA, effect   conditioning variables (“covariables”) removed   permutation, total Chi-square fixed, test based   pseudo-\\(F\\) differ test based plain   eigenvalues.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"function anova.cca calls permutest.cca fills  anova table. Additional attributes  Random.seed (random seeds used),  control (permutation design, see )  F.perm (permuted test statistics).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Legendre, P. Legendre, L. (2012). Numerical Ecology. 3rd   English ed. Elsevier. Legendre, P., Oksanen, J. ter Braak, C.J.F. (2011). Testing   significance canonical axes redundancy analysis.   Methods Ecology Evolution 2, 269--277.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"","code":"data(dune, dune.env) mod <- cca(dune ~ Moisture + Management, dune.env) ## overall test anova(mod) #> Permutation test for cca under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>          Df ChiSquare      F Pr(>F)    #> Model     6    1.0024 1.9515  0.003 ** #> Residual 13    1.1129                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## tests for individual terms anova(mod, by=\"term\") #> Permutation test for cca under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>            Df ChiSquare      F Pr(>F)     #> Moisture    3   0.62831 2.4465  0.001 *** #> Management  3   0.37407 1.4565  0.051 .   #> Residual   13   1.11289                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 anova(mod, by=\"margin\") #> Permutation test for cca under reduced model #> Marginal effects of terms #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>            Df ChiSquare      F Pr(>F)   #> Moisture    3   0.39854 1.5518  0.036 * #> Management  3   0.37407 1.4565  0.052 . #> Residual   13   1.11289                 #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## sequential test for contrasts anova(mod, by = \"onedf\") #> Permutation test for cca under reduced model #> Sequential test for contrasts #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>              Df ChiSquare      F Pr(>F)     #> Moisture.L    1   0.41081 4.7988  0.001 *** #> Moisture.Q    1   0.11261 1.3154  0.163     #> Moisture.C    1   0.10489 1.2253  0.224     #> ManagementHF  1   0.08849 1.0337  0.353     #> ManagementNM  1   0.20326 2.3744  0.011 *   #> ManagementSF  1   0.08231 0.9615  0.457     #> Residual     13   1.11289                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## test for adding all environmental variables anova(mod, cca(dune ~ ., dune.env)) #> Permutation tests for cca under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model 1: dune ~ Moisture + Management #> Model 2: dune ~ A1 + Moisture + Management + Use + Manure #>   ResDf ResChiSquare Df ChiSquare      F Pr(>F) #> 1    13       1.1129                            #> 2     7       0.6121  6   0.50079 0.9545  0.534"},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Averaged Subsampled Dissimilarity Matrices — avgdist","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"function computes dissimilarity matrix dataset multiple   times using vegdist randomly subsampling   dataset time. subsampled iterations averaged   (mean) provide distance matrix represents average   multiple subsampling iterations. emulates behavior   distance matrix calculator within Mothur microbial ecology toolkit.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"","code":"avgdist(x, sample, distfun = vegdist, meanfun = mean,     transf = NULL, iterations = 100, dmethod = \"bray\",     diag = TRUE, upper = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"x Community data matrix. sample subsampling depth used iteration. Samples   meet threshold removed analysis,   identity returned user stdout. distfun dissimilarity matrix function used. Default   vegan vegdist meanfun calculation use average (mean median). transf Option transforming count data calculating   distance matrix. base transformation option can used (e.g.   sqrt) iterations number random iterations perform averaging.   Default 100 iterations. dmethod Dissimilarity index used specified dissimilarity     matrix function. Default Bray-Curtis diag, upper Return dissimilarities diagonal upper     triangle. NB. default differs vegdist     returns symmetric \"dist\" structure instead lower     diagonal. However, object accessed matrix     indices unless cast matrix .matrix. ... additional arguments add distance function   mean/median function specified.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"Geoffrey Hannigan, minor tweaks Gavin L. Simpson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"function builds function rrarefy   additional distance matrix function (e.g. vegdist)   add meaningful representations distances among randomly   subsampled datasets presenting average multiple random   iterations. function runs using vegdist.   functionality utilized Mothur standalone microbial   ecology toolkit .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"","code":"# Import an example count dataset data(BCI) # Test the base functionality mean.avg.dist <- avgdist(BCI, sample = 50, iterations = 10) # Test the transformation function mean.avg.dist.t <- avgdist(BCI, sample = 50, iterations = 10, transf = sqrt) # Test the median functionality median.avg.dist <- avgdist(BCI, sample = 50, iterations = 10, meanfun = median) # Print the resulting tables head(as.matrix(mean.avg.dist)) #>       1     2     3     4     5     6     7     8     9    10    11    12    13 #> 1 0.000 0.560 0.590 0.606 0.634 0.576 0.588 0.554 0.620 0.596 0.622 0.636 0.704 #> 2 0.560 0.000 0.546 0.596 0.604 0.576 0.584 0.546 0.622 0.570 0.584 0.584 0.712 #> 3 0.590 0.546 0.000 0.572 0.606 0.586 0.572 0.578 0.612 0.580 0.570 0.602 0.696 #> 4 0.606 0.596 0.572 0.000 0.636 0.612 0.620 0.582 0.620 0.616 0.618 0.620 0.656 #> 5 0.634 0.604 0.606 0.636 0.000 0.574 0.656 0.598 0.642 0.646 0.658 0.696 0.768 #> 6 0.576 0.576 0.586 0.612 0.574 0.000 0.554 0.578 0.592 0.622 0.570 0.550 0.730 #>      14    15    16    17    18    19    20    21    22    23    24    25    26 #> 1 0.578 0.590 0.582 0.648 0.694 0.636 0.616 0.584 0.630 0.670 0.614 0.602 0.622 #> 2 0.576 0.610 0.604 0.622 0.686 0.596 0.616 0.610 0.608 0.650 0.618 0.622 0.614 #> 3 0.592 0.602 0.590 0.606 0.714 0.624 0.594 0.628 0.618 0.658 0.600 0.622 0.674 #> 4 0.552 0.620 0.614 0.614 0.672 0.618 0.608 0.696 0.632 0.658 0.606 0.628 0.674 #> 5 0.624 0.648 0.632 0.726 0.764 0.692 0.630 0.656 0.718 0.668 0.672 0.700 0.656 #> 6 0.606 0.654 0.596 0.606 0.704 0.600 0.648 0.650 0.612 0.658 0.588 0.672 0.650 #>      27    28    29    30    31    32    33    34    35    36    37    38    39 #> 1 0.604 0.622 0.634 0.650 0.656 0.666 0.634 0.688 0.732 0.620 0.670 0.656 0.684 #> 2 0.622 0.598 0.600 0.622 0.630 0.632 0.608 0.652 0.740 0.632 0.624 0.650 0.656 #> 3 0.606 0.606 0.580 0.636 0.640 0.632 0.640 0.712 0.786 0.622 0.626 0.644 0.658 #> 4 0.654 0.634 0.632 0.620 0.678 0.636 0.664 0.666 0.750 0.664 0.626 0.604 0.650 #> 5 0.692 0.692 0.712 0.680 0.642 0.688 0.702 0.756 0.808 0.674 0.692 0.770 0.742 #> 6 0.634 0.648 0.604 0.654 0.642 0.656 0.646 0.704 0.788 0.652 0.678 0.666 0.686 #>      40    41    42    43    44    45    46    47    48    49    50 #> 1 0.698 0.642 0.590 0.660 0.644 0.678 0.676 0.636 0.666 0.674 0.630 #> 2 0.684 0.682 0.594 0.618 0.636 0.660 0.690 0.662 0.646 0.670 0.636 #> 3 0.696 0.672 0.586 0.662 0.656 0.658 0.724 0.684 0.700 0.702 0.684 #> 4 0.700 0.680 0.608 0.702 0.690 0.694 0.708 0.664 0.680 0.720 0.694 #> 5 0.756 0.704 0.630 0.648 0.686 0.646 0.768 0.712 0.704 0.708 0.680 #> 6 0.724 0.694 0.632 0.634 0.642 0.694 0.736 0.690 0.680 0.752 0.706 head(as.matrix(mean.avg.dist.t)) #>           1         2         3         4         5         6         7 #> 1 0.0000000 0.5268968 0.5620440 0.5696610 0.5820783 0.5444163 0.5553357 #> 2 0.5268968 0.0000000 0.5231558 0.5661217 0.5895083 0.5429080 0.5426203 #> 3 0.5620440 0.5231558 0.0000000 0.5765061 0.5632985 0.5521514 0.5433304 #> 4 0.5696610 0.5661217 0.5765061 0.0000000 0.5784547 0.6162528 0.5972188 #> 5 0.5820783 0.5895083 0.5632985 0.5784547 0.0000000 0.5890160 0.5951278 #> 6 0.5444163 0.5429080 0.5521514 0.6162528 0.5890160 0.0000000 0.5363121 #>           8         9        10        11        12        13        14 #> 1 0.5481342 0.5763266 0.5565242 0.5208834 0.5792824 0.7233669 0.5783466 #> 2 0.5492997 0.5919429 0.5660376 0.5565312 0.5914100 0.7081848 0.5240721 #> 3 0.5519472 0.5981912 0.5435356 0.5392289 0.6171389 0.7414530 0.5774538 #> 4 0.5864288 0.6078229 0.5934628 0.5793152 0.6164131 0.6862465 0.5665645 #> 5 0.5894296 0.6214780 0.5581239 0.5880497 0.6364689 0.7340127 0.5810336 #> 6 0.5572307 0.5971669 0.5743313 0.5415518 0.5562000 0.6873159 0.5863322 #>          15        16        17        18        19        20        21 #> 1 0.5824582 0.5234016 0.6012084 0.7112125 0.6081972 0.5911810 0.5748855 #> 2 0.5566883 0.5683752 0.6022449 0.6550937 0.6157338 0.5764770 0.6063296 #> 3 0.5286757 0.5847647 0.6480015 0.7194586 0.6660791 0.5832531 0.5984046 #> 4 0.6039668 0.5858720 0.6263681 0.7134266 0.6495067 0.6000595 0.6374900 #> 5 0.5668771 0.5778012 0.7044070 0.7332902 0.6922094 0.5900939 0.6086957 #> 6 0.6189022 0.5648166 0.5901326 0.7026368 0.6265100 0.6231745 0.6118081 #>          22        23        24        25        26        27        28 #> 1 0.5893717 0.6570786 0.5945312 0.5800553 0.5732476 0.6215276 0.5698842 #> 2 0.5726973 0.6318162 0.5639718 0.5684514 0.6193121 0.6188404 0.6153326 #> 3 0.5901773 0.6883715 0.5775550 0.6075926 0.6092110 0.6468993 0.6017035 #> 4 0.6331275 0.6635780 0.6246361 0.6109623 0.6606577 0.6335330 0.6522391 #> 5 0.6811363 0.6760639 0.6272387 0.6117049 0.6288427 0.6496847 0.6482938 #> 6 0.5811463 0.6736980 0.5518961 0.6255046 0.6187408 0.5980509 0.5991158 #>          29        30        31        32        33        34        35 #> 1 0.5519379 0.6331717 0.6006298 0.6252171 0.5878636 0.6478391 0.7054672 #> 2 0.5769426 0.6229656 0.6119081 0.6301772 0.5946151 0.6555905 0.7142283 #> 3 0.6160943 0.6478473 0.6243928 0.6691710 0.6095707 0.6873894 0.7402791 #> 4 0.6052120 0.6428681 0.6556406 0.6185793 0.5890710 0.6736501 0.7336138 #> 5 0.6575286 0.6478300 0.6382081 0.6792574 0.6399911 0.7148628 0.7624773 #> 6 0.5726824 0.6344051 0.6396196 0.6532725 0.5916023 0.6757439 0.7200817 #>          36        37        38        39        40        41        42 #> 1 0.6141493 0.5995374 0.6405334 0.6408850 0.6730988 0.5886016 0.5890594 #> 2 0.6263918 0.5781594 0.5806176 0.6458974 0.6582624 0.6195075 0.5961146 #> 3 0.6501176 0.6165860 0.6331925 0.6552591 0.6967709 0.6343656 0.5886630 #> 4 0.6394976 0.6012571 0.6004420 0.6105758 0.6690110 0.6368002 0.5856839 #> 5 0.6317201 0.6219215 0.6746107 0.7038395 0.7655108 0.6472494 0.6274799 #> 6 0.6581813 0.6476376 0.6245934 0.6663549 0.6848553 0.6554716 0.6298667 #>          43        44        45        46        47        48        49 #> 1 0.6013101 0.5657035 0.5873284 0.6604213 0.6153730 0.6231741 0.6063657 #> 2 0.5839441 0.5837217 0.6133105 0.6618699 0.6309012 0.6394069 0.6465829 #> 3 0.6244589 0.6024821 0.5897860 0.6894637 0.6737664 0.6588514 0.6521608 #> 4 0.6373528 0.6408041 0.6295238 0.6488169 0.6412288 0.6391066 0.6492971 #> 5 0.6333439 0.6022037 0.6287792 0.7514575 0.7009842 0.6600222 0.6664620 #> 6 0.6101755 0.6404842 0.6278262 0.6936596 0.6778087 0.6801127 0.6850128 #>          50 #> 1 0.5938890 #> 2 0.5970938 #> 3 0.6283012 #> 4 0.6412174 #> 5 0.6438284 #> 6 0.6537170 head(as.matrix(median.avg.dist)) #>      1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 #> 1 0.00 0.56 0.60 0.61 0.64 0.56 0.58 0.61 0.59 0.62 0.62 0.62 0.71 0.62 0.63 #> 2 0.56 0.00 0.55 0.58 0.64 0.58 0.52 0.54 0.55 0.60 0.55 0.57 0.67 0.57 0.59 #> 3 0.60 0.55 0.00 0.59 0.58 0.55 0.56 0.54 0.55 0.58 0.59 0.62 0.68 0.62 0.60 #> 4 0.61 0.58 0.59 0.00 0.64 0.60 0.59 0.59 0.58 0.60 0.61 0.63 0.66 0.60 0.61 #> 5 0.64 0.64 0.58 0.64 0.00 0.62 0.61 0.65 0.66 0.63 0.73 0.67 0.75 0.68 0.60 #> 6 0.56 0.58 0.55 0.60 0.62 0.00 0.54 0.60 0.61 0.64 0.56 0.54 0.69 0.60 0.67 #>     16   17   18   19   20   21   22   23   24   25   26   27   28   29   30 #> 1 0.61 0.66 0.71 0.66 0.64 0.64 0.67 0.70 0.65 0.57 0.62 0.71 0.64 0.66 0.63 #> 2 0.58 0.63 0.66 0.61 0.60 0.64 0.60 0.66 0.61 0.58 0.64 0.62 0.62 0.56 0.63 #> 3 0.59 0.64 0.73 0.62 0.64 0.64 0.65 0.69 0.68 0.64 0.67 0.66 0.65 0.63 0.66 #> 4 0.62 0.66 0.68 0.64 0.60 0.65 0.63 0.64 0.61 0.62 0.68 0.65 0.64 0.60 0.66 #> 5 0.68 0.75 0.77 0.71 0.66 0.69 0.76 0.73 0.67 0.70 0.69 0.70 0.72 0.69 0.71 #> 6 0.61 0.58 0.67 0.64 0.63 0.65 0.65 0.67 0.61 0.64 0.61 0.62 0.67 0.63 0.71 #>     31   32   33   34   35   36   37   38   39   40   41   42   43   44   45 #> 1 0.65 0.69 0.66 0.70 0.80 0.66 0.69 0.66 0.68 0.74 0.66 0.58 0.67 0.65 0.69 #> 2 0.62 0.64 0.63 0.66 0.73 0.62 0.61 0.58 0.66 0.68 0.65 0.59 0.63 0.59 0.68 #> 3 0.69 0.67 0.68 0.69 0.79 0.64 0.68 0.62 0.70 0.71 0.67 0.65 0.66 0.66 0.70 #> 4 0.65 0.64 0.65 0.68 0.78 0.64 0.63 0.59 0.66 0.73 0.65 0.65 0.64 0.63 0.67 #> 5 0.66 0.72 0.70 0.75 0.84 0.66 0.74 0.72 0.77 0.79 0.68 0.66 0.68 0.67 0.68 #> 6 0.67 0.68 0.67 0.71 0.82 0.68 0.70 0.65 0.71 0.75 0.75 0.67 0.68 0.66 0.72 #>     46   47   48   49   50 #> 1 0.68 0.65 0.66 0.67 0.64 #> 2 0.66 0.65 0.67 0.66 0.65 #> 3 0.75 0.72 0.73 0.70 0.71 #> 4 0.68 0.68 0.68 0.70 0.64 #> 5 0.76 0.76 0.70 0.74 0.71 #> 6 0.65 0.70 0.68 0.70 0.67 # Run example to illustrate low variance of mean, median, and stdev results # Mean and median std dev are around 0.05 sdd <- avgdist(BCI, sample = 50, iterations = 100, meanfun = sd) summary(mean.avg.dist) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.4820  0.6120  0.6500  0.6515  0.6880  0.8380  summary(median.avg.dist) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.4400  0.6200  0.6500  0.6519  0.6900  0.8700  summary(sdd) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #> 0.04484 0.05631 0.05939 0.05939 0.06231 0.07700  # Test for when subsampling depth excludes some samples # Return samples that are removed for not meeting depth filter depth.avg.dist <- avgdist(BCI, sample = 450, iterations = 10) #> Warning: The following sampling units were removed because they were below sampling depth: 1, 2, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 # Print the result depth.avg.dist #>            3         4         5        10        15        30        32 #> 3  0.0000000 0.3313333 0.3653333 0.2968889 0.3586667 0.4568889 0.4764444 #> 4  0.3313333 0.0000000 0.3806667 0.3262222 0.3535556 0.3902222 0.4357778 #> 5  0.3653333 0.3806667 0.0000000 0.3904444 0.3973333 0.4964444 0.5213333 #> 10 0.2968889 0.3262222 0.3904444 0.0000000 0.3137778 0.4306667 0.4215556 #> 15 0.3586667 0.3535556 0.3973333 0.3137778 0.0000000 0.4566667 0.4675556 #> 30 0.4568889 0.3902222 0.4964444 0.4306667 0.4566667 0.0000000 0.3846667 #> 32 0.4764444 0.4357778 0.5213333 0.4215556 0.4675556 0.3846667 0.0000000 #> 35 0.6628889 0.6346667 0.6980000 0.6851111 0.6588889 0.5262222 0.5957778 #> 40 0.5635556 0.5286667 0.6360000 0.5231111 0.5600000 0.4537778 0.4033333 #>           35        40 #> 3  0.6628889 0.5635556 #> 4  0.6346667 0.5286667 #> 5  0.6980000 0.6360000 #> 10 0.6851111 0.5231111 #> 15 0.6588889 0.5600000 #> 30 0.5262222 0.4537778 #> 32 0.5957778 0.4033333 #> 35 0.0000000 0.4260000 #> 40 0.4260000 0.0000000"},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":null,"dir":"Reference","previous_headings":"","what":"Beals Smoothing and Degree of Absence — beals","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals smoothing replaces entry community data   probability target species occurring particular site, based   joint occurrences target species species   actually occur site. Swan's (1970) degree absence applies   Beals smoothing zero items long zeros replaced   smoothed values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beals Smoothing and Degree of Absence — beals","text":"","code":"beals(x, species = NA, reference = x, type = 0, include = TRUE) swan(x, maxit = Inf, type = 0)"},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beals Smoothing and Degree of Absence — beals","text":"x Community data frame matrix. species Column index used compute Beals function single species.    default (NA) indicates function computed species. reference Community data frame matrix used compute   joint occurrences. default, x used reference   compute joint occurrences. type Numeric. Specifies abundance values    used function beals. See details explanation. include logical flag indicates whether target species   included computing mean conditioned probabilities.   original Beals (1984) definition equivalent include=TRUE,   formulation Münzbergová Herben   equal include=FALSE. maxit Maximum number iterations. default Inf     means iterations continued zeros     number zeros change. Probably      maxit = 1 makes sense addition default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals smoothing estimated probability \\(p_{ij}\\)   species \\(j\\) occurs site \\(\\). defined \\(p_{ij}   = \\frac{1}{S_i} \\sum_k \\frac{N_{jk} I_{ik}}{N_k}\\), \\(S_i\\) number   species site \\(\\), \\(N_{jk}\\) number joint   occurrences species \\(j\\) \\(k\\), \\(N_k\\)   number occurrences species \\(k\\), \\(\\) incidence   (0 1) species (last term usually omitted   equation, necessary). \\(N_{jk}\\) can   interpreted mean conditional probability, beals   function can interpreted mean conditioned probabilities (De   Cáceres & Legendre 2008). present function   generalized abundance values (De Cáceres & Legendre   2008). type argument specifies abundance values   used. type = 0 presence/absence mode. type = 1   abundances reference (x) used compute   conditioned probabilities. type = 2 abundances x   used compute weighted averages conditioned   probabilities. type = 3 abundances used compute   conditioned probabilities weighted averages. Beals smoothing originally suggested method data   transformation remove excessive zeros (Beals 1984, McCune 1994).   However, suitable method purpose since   maintain information species presences: species may   higher probability occurrence site occur   sites occurs. Moreover, regularizes data   strongly. method may useful identifying species belong   species pool (Ewald 2002) identify suitable unoccupied   patches metapopulation analysis (Münzbergová &   Herben 2004). case, function called   include=FALSE cross-validation smoothing species;   argument species can used one species studied. Swan (1970) suggested replacing zero values degrees absence   species community data matrix. Swan expressed method   terms similarity matrix, equivalent applying Beals   smoothing zero values, step shifting smallest initially   non-zero item value one, repeating many times   zeros left data. actually similar   extended dissimilarities (implemented function   stepacross), rarely used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Beals Smoothing and Degree of Absence — beals","text":"function returns transformed data matrix vector Beals smoothing    requested single species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals, E.W. 1984. Bray-Curtis ordination: effective strategy analysis multivariate ecological data. Pp. 1--55 : MacFadyen, . & E.D. Ford [eds.] Advances Ecological Research, 14. Academic Press, London. De Cáceres, M. & Legendre, P. 2008. Beals smoothing revisited. Oecologia 156: 657--669. Ewald, J. 2002. probabilistic approach estimating species pools large compositional matrices. J. Veg. Sci. 13: 191--198. McCune, B. 1994. Improving community ordination Beals smoothing function. Ecoscience 1: 82--86. Münzbergová, Z. & Herben, T. 2004. Identification suitable unoccupied  habitats metapopulation studies using co-occurrence species. Oikos 105: 408--414. Swan, J.M.. 1970. examination ordination problems use simulated vegetational data. Ecology 51: 89--102.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Beals Smoothing and Degree of Absence — beals","text":"Miquel De Cáceres Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Beals Smoothing and Degree of Absence — beals","text":"","code":"data(dune) ## Default x <- beals(dune) ## Remove target species x <- beals(dune, include = FALSE) ## Smoothed values against presence or absence of species pa <- decostand(dune, \"pa\") boxplot(as.vector(x) ~ unlist(pa), xlab=\"Presence\", ylab=\"Beals\")  ## Remove the bias of tarbet species: Yields lower values. beals(dune, type =3, include = FALSE) #>      Achimill   Agrostol   Airaprae  Alopgeni   Anthodor  Bellpere   Bromhord #> 1  0.49590853 0.38333415 0.01157407 0.4923280 0.30827883 0.4935662 0.43263047 #> 2  0.47083676 0.39501120 0.03361524 0.4718807 0.34723984 0.4917791 0.42000984 #> 3  0.34063019 0.52738394 0.01520046 0.5309152 0.21609954 0.4033301 0.33010938 #> 4  0.30816435 0.51198853 0.02876960 0.5971801 0.21542662 0.4398775 0.35732610 #> 5  0.59949785 0.27622698 0.06632771 0.3349203 0.48876285 0.4322142 0.44309579 #> 6  0.58819821 0.26299306 0.05967771 0.2700508 0.53154426 0.3696613 0.39760652 #> 7  0.56496165 0.29412293 0.05329633 0.3403047 0.48010987 0.4051777 0.40471531 #> 8  0.21230502 0.66906674 0.02588333 0.5187956 0.16247716 0.2720122 0.21219877 #> 9  0.30323659 0.59744543 0.02213662 0.5792855 0.21896113 0.3292320 0.28613526 #> 10 0.54083871 0.26902092 0.07349127 0.3372958 0.42671693 0.4705094 0.42934344 #> 11 0.40509331 0.31656550 0.10259239 0.3185489 0.38766111 0.3713794 0.31413659 #> 12 0.21008725 0.66278454 0.03625297 0.5753377 0.20078932 0.2802946 0.22974415 #> 13 0.21850759 0.68239707 0.02191119 0.6404427 0.16737280 0.2939740 0.24942466 #> 14 0.13570397 0.76284476 0.02298398 0.4107645 0.12128973 0.1682755 0.13757552 #> 15 0.09168815 0.79412733 0.02538032 0.4505613 0.10117099 0.1420251 0.09794548 #> 16 0.06335463 0.87877202 0.00742115 0.5232448 0.05538377 0.1516354 0.09458531 #> 17 0.55254140 0.07330247 0.29233391 0.1013889 0.69331132 0.3129358 0.34982363 #> 18 0.37751017 0.34451209 0.08535723 0.2838834 0.36918166 0.3676424 0.30478244 #> 19 0.29826049 0.25952255 0.35137675 0.1934048 0.51929869 0.2237843 0.18074796 #> 20 0.05429986 0.76675441 0.06144615 0.4063662 0.10738280 0.1450721 0.06706410 #>       Chenalbu   Cirsarve    Comapalu   Eleopalu  Elymrepe   Empenigr #> 1  0.025132275 0.09504980 0.000000000 0.05592045 0.4667439 0.00000000 #> 2  0.043866562 0.08570299 0.026548839 0.08656209 0.4407282 0.01829337 #> 3  0.065338638 0.08967477 0.031898812 0.16099072 0.4137888 0.01074444 #> 4  0.057970906 0.12920228 0.039859621 0.16112450 0.4399661 0.02527165 #> 5  0.026434737 0.05520104 0.015892090 0.05419613 0.3575948 0.03029752 #> 6  0.021256367 0.03223112 0.030347896 0.08784329 0.3138879 0.03093489 #> 7  0.038467708 0.04706743 0.017083997 0.06694311 0.3586644 0.02304603 #> 8  0.063278453 0.06688407 0.100703044 0.29777644 0.3046956 0.02102222 #> 9  0.069879277 0.07647268 0.045830682 0.19018562 0.3523460 0.01838883 #> 10 0.025686639 0.06037513 0.029746617 0.07787078 0.3736128 0.03425596 #> 11 0.021234732 0.05778318 0.035740922 0.11146095 0.2884798 0.07310076 #> 12 0.103543341 0.07799259 0.045375827 0.19518888 0.3354080 0.03413656 #> 13 0.122547745 0.07905124 0.056084315 0.22437598 0.3511708 0.01840390 #> 14 0.042990591 0.03618335 0.241811837 0.55982776 0.1428372 0.01989756 #> 15 0.035609053 0.04022968 0.198176675 0.53973883 0.1462975 0.02215971 #> 16 0.056246994 0.05184498 0.201352298 0.51523810 0.1832397 0.00742115 #> 17 0.007716049 0.01049383 0.009876543 0.02777778 0.1929470 0.21968254 #> 18 0.014640428 0.04454602 0.042890320 0.17341352 0.2651538 0.06763669 #> 19 0.019591245 0.03668466 0.031845637 0.12592768 0.1422725 0.26011417 #> 20 0.037623741 0.03453783 0.185726965 0.58476297 0.1168700 0.05905666 #>      Hyporadi   Juncarti  Juncbufo  Lolipere   Planlanc   Poaprat   Poatriv #> 1  0.07702746 0.14794933 0.1987270 0.9226190 0.40103107 0.9863946 0.8826329 #> 2  0.07454127 0.13017869 0.2070478 0.8272395 0.40700777 0.8972046 0.8288385 #> 3  0.05562332 0.22291082 0.2544828 0.7205525 0.27933493 0.8083020 0.8383185 #> 4  0.06985986 0.21320122 0.2318440 0.7197924 0.25797285 0.7940926 0.8197302 #> 5  0.10245961 0.10406655 0.2164230 0.8380779 0.52628928 0.9035899 0.8094632 #> 6  0.11463153 0.11631772 0.2166255 0.8000021 0.58765018 0.8666677 0.7782619 #> 7  0.10837376 0.11293676 0.2110045 0.8053380 0.51905808 0.8925059 0.8018775 #> 8  0.06550319 0.33219882 0.2323566 0.5403355 0.20596764 0.6160461 0.7101299 #> 9  0.05343787 0.23134366 0.2675624 0.6874068 0.25274756 0.7523318 0.8247374 #> 10 0.13692492 0.09080902 0.1678040 0.8102783 0.52588347 0.8915882 0.7543592 #> 11 0.18108995 0.13478872 0.1656396 0.7180948 0.47012501 0.8062720 0.6404351 #> 12 0.06777311 0.27306206 0.3231724 0.5875943 0.22110550 0.6932541 0.8199960 #> 13 0.04250245 0.28204736 0.3339728 0.5714581 0.18153869 0.7063028 0.7993754 #> 14 0.04665747 0.46685537 0.1206518 0.3356311 0.14342002 0.3817081 0.5090703 #> 15 0.05040404 0.51561767 0.1370235 0.3689922 0.13523214 0.4078219 0.5263520 #> 16 0.01731602 0.54304667 0.1776781 0.3561752 0.07269979 0.4124222 0.6071083 #> 17 0.36492870 0.03333333 0.1038156 0.5858415 0.59641331 0.7434618 0.5036834 #> 18 0.17491099 0.18956922 0.1376386 0.7124388 0.45087176 0.7368632 0.5859071 #> 19 0.39145281 0.13543701 0.1127832 0.4289185 0.40784415 0.5548077 0.3605827 #> 20 0.07795311 0.53056145 0.1192488 0.3262685 0.13059496 0.3662817 0.4523029 #>      Ranuflam  Rumeacet  Sagiproc   Salirepe  Scorautu   Trifprat  Trifrepe #> 1  0.08105273 0.3160963 0.3371121 0.02729885 0.8898317 0.21701279 0.8782576 #> 2  0.13042865 0.3031318 0.3302063 0.05983781 0.9349640 0.20673650 0.9125666 #> 3  0.22632936 0.2909068 0.4204104 0.06065155 0.9036443 0.14654749 0.8817430 #> 4  0.21909541 0.2610006 0.4191908 0.07579199 0.9204237 0.12896524 0.8943213 #> 5  0.08063087 0.3979230 0.2612828 0.07589611 0.9576838 0.34808957 0.9142360 #> 6  0.10909966 0.4330705 0.2539380 0.08921540 0.9590466 0.35423465 0.9110822 #> 7  0.10541081 0.4113622 0.2954682 0.07094548 0.9550487 0.32489503 0.9171688 #> 8  0.40134447 0.2331043 0.4009544 0.11569906 0.8755515 0.09897600 0.8002526 #> 9  0.26006489 0.3464870 0.4531178 0.07351827 0.9145996 0.16269563 0.8714833 #> 10 0.10355742 0.3226025 0.2732735 0.09037489 0.9568824 0.26807372 0.9003730 #> 11 0.13269569 0.2753878 0.3673397 0.16465286 0.9442707 0.19982976 0.8979262 #> 12 0.29873222 0.3507140 0.5122033 0.08041977 0.9377963 0.13849854 0.9079979 #> 13 0.33309468 0.3107471 0.5131337 0.06572594 0.9255312 0.11199114 0.8841739 #> 14 0.64674225 0.1241545 0.2528665 0.15917563 0.8477706 0.06176123 0.6485949 #> 15 0.64449081 0.1459458 0.3151199 0.17750323 0.8430677 0.05831084 0.7170446 #> 16 0.66893881 0.1508409 0.3480368 0.15783292 0.8131968 0.03916718 0.6776273 #> 17 0.03549383 0.2913631 0.3292030 0.25651777 0.9839744 0.27593101 0.8141660 #> 18 0.18805395 0.2668100 0.3154533 0.17191937 0.9554011 0.20461193 0.8600701 #> 19 0.14551892 0.1831168 0.4798245 0.36429493 0.9902041 0.11966159 0.8147968 #> 20 0.62796060 0.1098600 0.3105433 0.21674174 0.8457313 0.03708580 0.6350394 #>      Vicilath  Bracruta    Callcusp #> 1  0.17244420 0.7476589 0.003527337 #> 2  0.18494940 0.7415172 0.034597921 #> 3  0.12833142 0.7666969 0.075789630 #> 4  0.12550967 0.7919786 0.081110164 #> 5  0.16693075 0.8079786 0.023129027 #> 6  0.18035860 0.8387650 0.040981168 #> 7  0.19027523 0.8089116 0.024070054 #> 8  0.10213052 0.8109194 0.201958942 #> 9  0.08630413 0.7972178 0.092982775 #> 10 0.23383453 0.7660374 0.033527777 #> 11 0.24317802 0.8182692 0.043950322 #> 12 0.08049055 0.8061715 0.100954127 #> 13 0.06604026 0.7465509 0.122856392 #> 14 0.07857237 0.7238162 0.347514804 #> 15 0.07370069 0.7997141 0.381379395 #> 16 0.03353260 0.8029953 0.364128496 #> 17 0.20728700 0.7635487 0.009876543 #> 18 0.26222869 0.8397471 0.109959916 #> 19 0.18188455 0.8161275 0.082361157 #> 20 0.09111967 0.8397124 0.397924041 ## Uses abundance information. ## Vector with beals smoothing values corresponding to the first species ## in dune. beals(dune, species=1, include=TRUE)  #>         1         2         3         4         5         6         7         8  #> 0.5923077 0.5032372 0.3499038 0.3306953 0.5944041 0.5928780 0.5824352 0.2082532  #>         9        10        11        12        13        14        15        16  #> 0.2960799 0.5462492 0.3659392 0.2610043 0.1982372 0.0922619 0.1140625 0.1066506  #>        17        18        19        20  #> 0.6020408 0.3844577 0.2865741 0.0750000"},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate homogeneity of groups dispersions (variances) — betadisper","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Implements Marti Anderson's PERMDISP2 procedure analysis   multivariate homogeneity group dispersions (variances).   betadisper multivariate analogue Levene's test   homogeneity variances. Non-euclidean distances objects   group centres (centroids medians) handled reducing   original distances principal coordinates. procedure   latterly used means assessing beta diversity.   anova, scores, plot boxplot methods. TukeyHSD.betadisper creates set confidence intervals   differences mean distance--centroid levels   grouping factor specified family-wise probability   coverage.  intervals based Studentized range statistic,   Tukey's 'Honest Significant Difference' method.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"","code":"betadisper(d, group, type = c(\"median\",\"centroid\"), bias.adjust = FALSE,        sqrt.dist = FALSE, add = FALSE)  # S3 method for betadisper anova(object, ...)  # S3 method for betadisper scores(x, display = c(\"sites\", \"centroids\"),        choices = c(1,2), ...)  # S3 method for betadisper eigenvals(x, ...)  # S3 method for betadisper plot(x, axes = c(1,2), cex = 0.7,      pch = seq_len(ng), col = NULL, lty = \"solid\", lwd = 1, hull = TRUE,      ellipse = FALSE, conf,      segments = TRUE, seg.col = \"grey\", seg.lty = lty, seg.lwd = lwd,      label = TRUE, label.cex = 1,      ylab, xlab, main, sub, ...)  # S3 method for betadisper boxplot(x, ylab = \"Distance to centroid\", ...)  # S3 method for betadisper TukeyHSD(x, which = \"group\", ordered = FALSE,          conf.level = 0.95, ...)  # S3 method for betadisper print(x, digits = max(3, getOption(\"digits\") - 3),                            neigen = 8, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"d distance structure returned      dist, betadiver     vegdist. group vector describing group structure, usually factor     object can coerced factor using     .factor. Can consist factor single     level (.e., one group). type type analysis perform. Use spatial median     group centroid? spatial median now default. bias.adjust logical: adjust small sample bias beta     diversity estimates? sqrt.dist Take square root dissimilarities. often     euclidifies dissimilarities. add Add constant non-diagonal dissimilarities     eigenvalues non-negative underlying Principal     Co-ordinates Analysis (see wcmdscale     details). Choice \"lingoes\" (TRUE) use     recommended method Legendre & Anderson (1999: “method     1”) \"cailliez\" uses “method 2”. display character; partial match access scores     \"sites\" \"species\". object, x object class \"betadisper\", result     call betadisper. choices, axes principal coordinate axes wanted. hull logical; convex hull group plotted? ellipse logical; standard deviation data ellipse     group plotted? conf Expected fractions data coverage data ellipses,     e.g. 0.95. default draw 1 standard deviation data     ellipse, supplied, conf multiplied     corresponding value found Chi-squared distribution 2df     provide requested coverage (probability contour). pch plot symbols groups, vector length equal     number groups. col colors plot symbols centroid labels groups,     vector length equal number groups. lty, lwd linetype, linewidth convex hulls confidence     ellipses. segments logical; segments joining points     centroid drawn? seg.col colour draw segments points     centroid. Can vector, case one colour per group. seg.lty, seg.lwd linetype line width segments. label logical; centroids labelled     respective factor label? label.cex numeric; character expansion centroid labels. cex, ylab, xlab, main, sub graphical parameters. details,     see plot.default. character vector listing terms fitted model     intervals calculated. Defaults grouping     factor. ordered logical; see TukeyHSD. conf.level numeric value zero one giving     family-wise confidence level use. digits, neigen numeric; print method, sets   number digits use (per print.default)   maximum number axes display eigenvalues , repsectively. ... arguments, including graphical parameters (    plot.betadisper boxplot.betadisper), passed     methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"One measure multivariate dispersion (variance) group   samples calculate average distance group members   group centroid spatial median (referred 'centroid'   now unless stated otherwise) multivariate space. test   dispersions (variances) one groups different,   distances group members group centroid subject   ANOVA. multivariate analogue Levene's test   homogeneity variances distances group members   group centroids Euclidean distance. However, better measures distance Euclidean distance   available ecological data. can accommodated reducing   distances produced using dissimilarity coefficient   principal coordinates, embeds within Euclidean space.   analysis proceeds calculating Euclidean distances   group members group centroid basis principal   coordinate axes rather original distances. Non-metric dissimilarity coefficients can produce principal coordinate   axes negative Eigenvalues. correspond   imaginary, non-metric part distance objects.   negative Eigenvalues produced, must correct imaginary   distances. distance centroid point $$z_{ij}^c =   \\sqrt{\\Delta^2(u_{ij}^+, c_i^+) - \\Delta^2(u_{ij}^-, c_i^-)},$$   \\(\\Delta^2\\) squared Euclidean distance   \\(u_{ij}\\), principal coordinate \\(j\\)th   point \\(\\)th group, \\(c_i\\),   coordinate centroid \\(\\)th group.   super-scripted ‘\\(+\\)’ ‘\\(-\\)’ indicate   real imaginary parts respectively. equation (3)   Anderson (2006). imaginary part greater magnitude   real part, taking square root negative   value, resulting NaN, cases changed zero distances   (warning). line behaviour Marti Anderson's   PERMDISP2 programme. test one groups variable others, ANOVA   distances group centroids can performed parametric   theory used interpret significance \\(F\\). alternative   use permutation test. permutest.betadisper permutes model   residuals generate permutation distribution \\(F\\) Null   hypothesis difference dispersion groups. Pairwise comparisons group mean dispersions can also performed   using permutest.betadisper. alternative classical   comparison group dispersions, calculate Tukey's Honest   Significant Differences groups, via   TukeyHSD.betadisper. simple wrapper   TukeyHSD. user directed read help file   TukeyHSD using function. particular,   note statement using function    unbalanced designs. results analysis can visualised using plot   boxplot methods. One additional use functions assessing beta diversity   (Anderson et al 2006). Function betadiver   provides popular dissimilarity measures purpose. noted passing Anderson (2006) related   context O'Neill (2000), estimates dispersion around   central location (median centroid) calculated data   biased downward. bias matters comparing diversity   among treatments small, unequal numbers samples.  Setting   bias.adjust=TRUE using betadisper imposes    \\(\\sqrt{n/(n-1)}\\) correction (Stier et al. 2013).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"anova method returns object class \"anova\" inheriting class \"data.frame\". scores method returns list one   components \"sites\" \"centroids\". plot function invisibly returns object class  \"ordiplot\", plotting structure can used  identify.ordiplot (identify points)   functions ordiplot family. boxplot function invisibly returns list whose components   documented boxplot.  eigenvals.betadisper returns named vector eigenvalues.  TukeyHSD.betadisper returns list. See TukeyHSD details.  betadisper returns list class \"betadisper\"   following components: eig numeric; eigenvalues principal coordinates     analysis. vectors matrix; eigenvectors principal coordinates     analysis. distances numeric; Euclidean distances principal     coordinate space samples respective group     centroid median. group factor; vector describing group structure centroids matrix; locations group centroids     medians principal coordinates. group.distances numeric; mean distance group     centroid median. call matched function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"group consists single level group,   anova permutest methods appropriate   used data stop error. Missing values either d group removed   prior performing analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Stewart Schultz noticed permutation test   type=\"centroid\" wrong type error   anti-conservative. , default type   changed \"median\", uses spatial median group   centroid. Tests suggests permutation test type   analysis gives correct error rates.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Anderson, M.J. (2006) Distance-based tests homogeneity   multivariate dispersions. Biometrics 62, 245--253. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters   9, 683--693. O'Neill, M.E. (2000) Weighted Least Squares Approach Levene's    Test Homogeneity Variance. Australian & New Zealand Journal    Statistics 42, 81-–100. Stier, .C., Geange, S.W., Hanson, K.M., & Bolker, B.M. (2013) Predator    density timing arrival affect reef fish community   assembly. Ecology 94, 1057--1068.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Gavin L. Simpson; bias correction Adrian Stier Ben Bolker.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"","code":"data(varespec)  ## Bray-Curtis distances between samples dis <- vegdist(varespec)  ## First 16 sites grazed, remaining 8 sites ungrazed groups <- factor(c(rep(1,16), rep(2,8)), labels = c(\"grazed\",\"ungrazed\"))  ## Calculate multivariate dispersions mod <- betadisper(dis, groups) mod #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3926   0.2706  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## Perform test anova(mod) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07931 0.079306  4.6156 0.04295 * #> Residuals 22 0.37801 0.017182                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Permutation test for F permutest(mod, pairwise = TRUE, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq      F N.Perm Pr(>F)   #> Groups     1 0.07931 0.079306 4.6156     99   0.06 . #> Residuals 22 0.37801 0.017182                        #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Pairwise comparisons: #> (Observed p-value below diagonal, permuted p-value above diagonal) #>           grazed ungrazed #> grazed               0.08 #> ungrazed 0.04295           ## Tukey's Honest Significant Differences (mod.HSD <- TukeyHSD(mod)) #>   Tukey multiple comparisons of means #>     95% family-wise confidence level #>  #> Fit: aov(formula = distances ~ group, data = df) #>  #> $group #>                       diff        lwr          upr     p adj #> ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502 #>  plot(mod.HSD)   ## Plot the groups and distances to centroids on the ## first two PCoA axes plot(mod)   ## with data ellipses instead of hulls plot(mod, ellipse = TRUE, hull = FALSE) # 1 sd data ellipse  plot(mod, ellipse = TRUE, hull = FALSE, conf = 0.90) # 90% data ellipse   # plot with manual colour specification my_cols <- c(\"#1b9e77\", \"#7570b3\") plot(mod, col = my_cols, pch = c(16,17), cex = 1.1)   ## can also specify which axes to plot, ordering respected plot(mod, axes = c(3,1), seg.col = \"forestgreen\", seg.lty = \"dashed\")   ## Draw a boxplot of the distances to centroid for each group boxplot(mod)   ## `scores` and `eigenvals` also work scrs <- scores(mod) str(scrs) #> List of 2 #>  $ sites    : num [1:24, 1:2] 0.0946 -0.3125 -0.3511 -0.3291 -0.1926 ... #>   ..- attr(*, \"dimnames\")=List of 2 #>   .. ..$ : chr [1:24] \"18\" \"15\" \"24\" \"27\" ... #>   .. ..$ : chr [1:2] \"PCoA1\" \"PCoA2\" #>  $ centroids: num [1:2, 1:2] -0.1455 0.2786 0.0758 -0.2111 #>   ..- attr(*, \"dimnames\")=List of 2 #>   .. ..$ : chr [1:2] \"grazed\" \"ungrazed\" #>   .. ..$ : chr [1:2] \"PCoA1\" \"PCoA2\" head(scores(mod, 1:4, display = \"sites\")) #>          PCoA1       PCoA2        PCoA3        PCoA4 #> 18  0.09459373  0.15914576  0.074400844 -0.202466025 #> 15 -0.31248809  0.10032751 -0.062243360  0.110844864 #> 24 -0.35106507 -0.05954096 -0.038079447  0.095060928 #> 27 -0.32914546 -0.17019348  0.231623720  0.019110623 #> 23 -0.19259443 -0.01459250 -0.005679372 -0.209718312 #> 19 -0.06794575 -0.14501690 -0.085645653  0.002431355 # group centroids/medians  scores(mod, 1:4, display = \"centroids\") #>               PCoA1       PCoA2       PCoA3      PCoA4 #> grazed   -0.1455200  0.07584572 -0.01366220 -0.0178990 #> ungrazed  0.2786095 -0.21114993 -0.03475586  0.0220129 # eigenvalues from the underlying principal coordinates analysis eigenvals(mod)  #>      PCoA1      PCoA2      PCoA3      PCoA4      PCoA5      PCoA6      PCoA7  #>  1.7552165  1.1334455  0.4429018  0.3698054  0.2453532  0.1960921  0.1751131  #>      PCoA8      PCoA9     PCoA10     PCoA11     PCoA12     PCoA13     PCoA14  #>  0.1284467  0.0971594  0.0759601  0.0637178  0.0583225  0.0394934  0.0172699  #>     PCoA15     PCoA16     PCoA17     PCoA18     PCoA19     PCoA20     PCoA21  #>  0.0051011 -0.0004131 -0.0064654 -0.0133147 -0.0253944 -0.0375105 -0.0480069  #>     PCoA22     PCoA23  #> -0.0537146 -0.0741390   ## try out bias correction; compare with mod3 (mod3B <- betadisper(dis, groups, type = \"median\", bias.adjust=TRUE)) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups, type = \"median\", bias.adjust #> = TRUE) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.4055   0.2893  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284  anova(mod3B) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07193 0.071927  3.7826 0.06468 . #> Residuals 22 0.41834 0.019015                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 permutest(mod3B, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq      F N.Perm Pr(>F)   #> Groups     1 0.07193 0.071927 3.7826     99   0.05 * #> Residuals 22 0.41834 0.019015                        #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## should always work for a single group group <- factor(rep(\"grazed\", NROW(varespec))) (tmp <- betadisper(dis, group, type = \"median\")) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = group, type = \"median\") #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #> grazed  #> 0.4255  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284  (tmp <- betadisper(dis, group, type = \"centroid\")) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = group, type = \"centroid\") #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to centroid: #> grazed  #> 0.4261  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## simulate missing values in 'd' and 'group' ## using spatial medians groups[c(2,20)] <- NA dis[c(2, 20)] <- NA mod2 <- betadisper(dis, groups) ## messages #> missing observations due to 'group' removed #> missing observations due to 'd' removed mod2 #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 14 #> No. of Negative Eigenvalues: 5 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3984   0.3008  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 19 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060  permutest(mod2, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq      F N.Perm Pr(>F) #> Groups     1 0.039979 0.039979 2.4237     99   0.15 #> Residuals 18 0.296910 0.016495                      anova(mod2) #> Analysis of Variance Table #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq F value Pr(>F) #> Groups     1 0.039979 0.039979  2.4237 0.1369 #> Residuals 18 0.296910 0.016495                plot(mod2)  boxplot(mod2)  plot(TukeyHSD(mod2))   ## Using group centroids mod3 <- betadisper(dis, groups, type = \"centroid\") #> missing observations due to 'group' removed #> missing observations due to 'd' removed mod3 #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups, type = \"centroid\") #>  #> No. of Positive Eigenvalues: 14 #> No. of Negative Eigenvalues: 5 #>  #> Average distance to centroid: #>   grazed ungrazed  #>   0.4001   0.3108  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 19 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060  permutest(mod3, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq      F N.Perm Pr(>F) #> Groups     1 0.033468 0.033468 3.1749     99   0.12 #> Residuals 18 0.189749 0.010542                      anova(mod3) #> Analysis of Variance Table #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.033468 0.033468  3.1749 0.09166 . #> Residuals 18 0.189749 0.010542                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod3)  boxplot(mod3)  plot(TukeyHSD(mod3))"},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":null,"dir":"Reference","previous_headings":"","what":"Indices of beta Diversity — betadiver","title":"Indices of beta Diversity — betadiver","text":"function estimates 24 indices beta diversity   reviewed Koleff et al. (2003). Alternatively, finds   co-occurrence frequencies triangular plots (Koleff et   al. 2003).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indices of beta Diversity — betadiver","text":"","code":"betadiver(x, method = NA, order = FALSE, help = FALSE, ...) # S3 method for betadiver plot(x, ...) # S3 method for betadiver scores(x, triangular = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indices of beta Diversity — betadiver","text":"x Community data matrix, betadiver result   plot scores functions. method index beta diversity defined Koleff et al.   (2003), Table 1. can use either subscript \\(\\beta\\)   number index. See argument help . order Order sites increasing number species.   influence configuration triangular plot non-symmetric   indices. help Show numbers, subscript names defining     equations indices exit. triangular Return scores suitable triangular plotting   proportions. FALSE, returns 3-column matrix raw counts. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indices of beta Diversity — betadiver","text":"commonly used index beta diversity   \\(\\beta_w = S/\\alpha - 1\\), \\(S\\) total number   species, \\(\\alpha\\) average number species per site   (Whittaker 1960). drawback model \\(S\\) increases   sample size, expectation \\(\\alpha\\) remains   constant, beta diversity increases sample size.   solution problem study beta diversity pairs   sites (Marion et al. 2017). denote number species   shared two sites \\(\\) numbers unique   species (shared) \\(b\\) \\(c\\), \\(S = + b +   c\\) \\(\\alpha = (2 + b + c)/2\\) \\(\\beta_w =   (b+c)/(2 + b + c)\\). Sørensen   dissimilarity defined vegan function   vegdist argument binary = TRUE. Many   indices dissimilarity indices well. Function betadiver finds indices reviewed Koleff et   al. (2003). indices found function   designdist, current function provides   conventional shortcut. function finds indices. proper   analysis must done functions betadisper,   adonis2 mantel. indices directly taken Table 1 Koleff et al. (2003),   can selected either index number subscript   name used Koleff et al. numbers, names defining equations   can seen using betadiver(help = TRUE). cases   two alternative forms, one term \\(-1\\)   used. several duplicate indices, number distinct   alternatives much lower 24 formally provided. formulations   used functions differ occasionally Koleff et   al. (2003), still mathematically equivalent.   method = NA, index calculated, instead object   class betadiver returned. list elements   , b c. Function plot can used   display proportions elements triangular plot   suggested Koleff et al. (2003), scores extracts   triangular coordinates raw scores. Function plot returns   invisibly triangular coordinates \"ordiplot\"   object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indices of beta Diversity — betadiver","text":"method = NA, function returns object class  \"betadisper\" elements , b, c.  method specified, function returns \"dist\" object can used function analysing   dissimilarities. beta diversity, particularly useful functions  betadisper study betadiversity groups,  adonis2 model, mantel   compare beta diversities dissimilarities distances   (including geographical distances). Although betadiver returns   \"dist\" object, indices similarities   used place dissimilarities, user   error. Functions 10 (\"j\"), 11 (\"sor\") 21   (\"rlb\") similarity indices. Function sets argument  \"maxdist\" similarly vegdist, using NA fixed upper limit, 0 similarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indices of beta Diversity — betadiver","text":"Baselga, . (2010) Partitioning turnover nestedness   components beta diversity. Global Ecology Biogeography   19, 134--143. Koleff, P., Gaston, K.J. Lennon, J.J. (2003) Measuring beta   diversity presence-absence data. Journal Animal   Ecology 72, 367--382. Marion, Z.H., Fordyce, J.. Fitzpatrick, B.M. (2017) Pairwise   beta diversity resolves underappreciated source confusion   calculating species turnover. Ecology 98, 933--939. Whittaker, R.H. (1960) Vegetation Siskiyou mountains, Oregon   California. Ecological Monographs 30, 279--338.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indices of beta Diversity — betadiver","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Indices of beta Diversity — betadiver","text":"indices return similarities instead dissimilarities.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indices of beta Diversity — betadiver","text":"","code":"## Raw data and plotting data(sipoo) m <- betadiver(sipoo) plot(m)  ## The indices betadiver(help=TRUE) #> 1 \"w\" = (b+c)/(2*a+b+c) #> 2 \"-1\" = (b+c)/(2*a+b+c) #> 3 \"c\" = (b+c)/2 #> 4 \"wb\" = b+c #> 5 \"r\" = 2*b*c/((a+b+c)^2-2*b*c) #> 6 \"I\" = log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) + #> (a+c)*log(a+c)) / (2*a+b+c) #> 7 \"e\" = exp(log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) + #> (a+c)*log(a+c)) / (2*a+b+c))-1 #> 8 \"t\" = (b+c)/(2*a+b+c) #> 9 \"me\" = (b+c)/(2*a+b+c) #> 10 \"j\" = a/(a+b+c) #> 11 \"sor\" = 2*a/(2*a+b+c) #> 12 \"m\" = (2*a+b+c)*(b+c)/(a+b+c) #> 13 \"-2\" = pmin.int(b,c)/(pmax.int(b,c)+a) #> 14 \"co\" = (a*c+a*b+2*b*c)/(2*(a+b)*(a+c)) #> 15 \"cc\" = (b+c)/(a+b+c) #> 16 \"g\" = (b+c)/(a+b+c) #> 17 \"-3\" = pmin.int(b,c)/(a+b+c) #> 18 \"l\" = (b+c)/2 #> 19 \"19\" = 2*(b*c+1)/(a+b+c)/(a+b+c-1) #> 20 \"hk\" = (b+c)/(2*a+b+c) #> 21 \"rlb\" = a/(a+c) #> 22 \"sim\" = pmin.int(b,c)/(pmin.int(b,c)+a) #> 23 \"gl\" = 2*abs(b-c)/(2*a+b+c) #> 24 \"z\" = (log(2)-log(2*a+b+c)+log(a+b+c))/log(2) ## The basic Whittaker index d <- betadiver(sipoo, \"w\") ## This should be equal to Sorensen index (binary Bray-Curtis in ## vegan) range(d - vegdist(sipoo, binary=TRUE)) #> [1] 0 0"},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":null,"dir":"Reference","previous_headings":"","what":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"function computes coefficients dispersal direction geographically connected areas, defined Legendre Legendre (1984), also described Legendre Legendre (2012, section 13.3.4).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"","code":"bgdispersal(mat, PAonly = FALSE, abc = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"mat Data frame matrix containing community composition     data table (species presence-absence abundance data). PAonly FALSE four types coefficients, DD1     DD4, requested; TRUE DD1 DD2     sought (see Details). abc TRUE, return tables , b c     used DD1 DD2.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"signs DD coefficients indicate  direction dispersal, provided  asymmetry significant. positive sign  indicates dispersal first (row DD  tables) second region (column); negative  sign indicates opposite. McNemar test  asymmetry computed presence-absence  data test hypothesis significant  asymmetry two areas comparison. input data table, rows sites  areas, columns taxa. often, taxa  species, coefficients can computed  genera families well. DD1 DD2  computed presence-absence data. four  types coefficients computed  quantitative data, converted  presence-absence computation DD1  DD2. PAonly = FALSE indicates four types  coefficients requested. PAonly = TRUE DD1  DD2 sought.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Function bgdispersal returns list containing following matrices: DD1 \\(DD1_{j,k} = ((b - c))/((+ b + c)^2)\\) DD2 \\(DD2_{j,k} = (2 (b - c))/((2a + b + c)  (+ b +     c))\\)   \\(\\), \\(b\\), \\(c\\)  meaning computation binary  similarity coefficients. DD3 \\(DD3_{j,k} = {W(-B) / (+B-W)^2} \\) DD4 \\(DD4_{j,k} = 2W(-B) / ((+B)(+B-W))\\) W = sum(pmin(vector1, vector2)), = sum(vector1), B = sum(vector2) McNemar McNemar chi-square statistic asymmetry (Sokal   Rohlf 1995):   \\(2(b \\log(b) + c \\log(c) - (b+c) \\log((b+c)/2)) / q\\),   \\(q = 1 + 1/(2(b+c))\\)   (Williams correction continuity) prob.McNemar probabilities associated  McNemar statistics, chi-square test. H0:  asymmetry \\((b-c)\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Legendre, P. V. Legendre. 1984. Postglacial dispersal   freshwater fishes Québec   peninsula. Can. J. Fish. Aquat. Sci. 41: 1781-1802. Legendre, P. L. Legendre. 2012. Numerical ecology, 3rd   English edition. Elsevier Science BV, Amsterdam. Sokal, R. R. F. J. Rohlf. 1995. Biometry. principles   practice statistics biological research. 3rd   edn. W. H. Freeman, New York.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Pierre Legendre, Departement de Sciences Biologiques,   Universite de Montreal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"function uses powerful alternative McNemar test   classical formula. classical formula constructed   spirit Pearson's Chi-square, formula function   constructed spirit Wilks Chi-square \\(G\\)   statistic. Function mcnemar.test uses classical   formula. new formula introduced vegan version   1.10-11, older implementations bgdispersal used   classical formula.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"","code":"mat <- matrix(c(32,15,14,10,70,30,100,4,10,30,25,0,18,0,40,   0,0,20,0,0,0,0,4,0,30,20,0,0,0,0,25,74,42,1,45,89,5,16,16,20),   4, 10, byrow=TRUE) bgdispersal(mat) #> $DD1 #>       [,1]  [,2] [,3]  [,4] #> [1,]  0.00  0.24 0.21  0.00 #> [2,] -0.24  0.00 0.08 -0.24 #> [3,] -0.21 -0.08 0.00 -0.21 #> [4,]  0.00  0.24 0.21  0.00 #>  #> $DD2 #>            [,1]       [,2]      [,3]       [,4] #> [1,]  0.0000000  0.3428571 0.3230769  0.0000000 #> [2,] -0.3428571  0.0000000 0.1142857 -0.3428571 #> [3,] -0.3230769 -0.1142857 0.0000000 -0.3230769 #> [4,]  0.0000000  0.3428571 0.3230769  0.0000000 #>  #> $DD3 #>             [,1]       [,2]      [,3]        [,4] #> [1,]  0.00000000  0.1567922 0.1420408 -0.01325831 #> [2,] -0.15679216  0.0000000 0.1101196 -0.20049485 #> [3,] -0.14204082 -0.1101196 0.0000000 -0.13586560 #> [4,]  0.01325831  0.2004949 0.1358656  0.00000000 #>  #> $DD4 #>             [,1]       [,2]      [,3]        [,4] #> [1,]  0.00000000  0.2513176 0.2425087 -0.01960102 #> [2,] -0.25131757  0.0000000 0.1725441 -0.30993929 #> [3,] -0.24250871 -0.1725441 0.0000000 -0.23381521 #> [4,]  0.01960102  0.3099393 0.2338152  0.00000000 #>  #> $McNemar #>      [,1]     [,2]      [,3]     [,4] #> [1,]   NA 7.677938 9.0571232 0.000000 #> [2,]   NA       NA 0.2912555 7.677938 #> [3,]   NA       NA        NA 9.057123 #> [4,]   NA       NA        NA       NA #>  #> $prob.McNemar #>      [,1]        [,2]        [,3]        [,4] #> [1,]   NA 0.005590001 0.002616734 1.000000000 #> [2,]   NA          NA 0.589417103 0.005590001 #> [3,]   NA          NA          NA 0.002616734 #> [4,]   NA          NA          NA          NA #>"},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":null,"dir":"Reference","previous_headings":"","what":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Function finds best subset environmental variables,   Euclidean distances scaled environmental variables   maximum (rank) correlation community dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"","code":"# S3 method for default bioenv(comm, env, method = \"spearman\", index = \"bray\",        upto = ncol(env), trace = FALSE, partial = NULL,         metric = c(\"euclidean\", \"mahalanobis\", \"manhattan\", \"gower\"),        parallel = getOption(\"mc.cores\"), ...) # S3 method for formula bioenv(formula, data, ...) bioenvdist(x, which = \"best\")"},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"comm Community data frame dissimilarity object square     matrix can interpreted dissimilarities. env Data frame continuous environmental variables. method correlation method used cor. index dissimilarity index used community data (comm)      vegdist. ignored comm dissimilarities. upto Maximum number parameters studied subsets. formula, data Model formula data. trace Trace calculations partial Dissimilarities partialled inspecting     variables env. metric Metric used distances environmental distances. See      Details. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. x bioenv result object. number model environmental     distances evaluated, \"best\" model. ... arguments passed vegdist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"function calculates community dissimilarity matrix using   vegdist.  selects possible subsets   environmental variables, scales variables,   calculates Euclidean distances subset using   dist.  function finds correlation   community dissimilarities environmental distances,   size subsets, saves best result.  \\(2^p-1\\)   subsets \\(p\\) variables, exhaustive search may take   , , long time (parameter upto offers partial   relief). argument metric defines distances given set   environmental variables.  metric = \"euclidean\",   variables scaled unit variance Euclidean distances   calculated. metric = \"mahalanobis\", Mahalanobis   distances calculated: addition scaling unit variance,   matrix current set environmental variables also   made orthogonal (uncorrelated). metric = \"manhattan\",   variables scaled unit range Manhattan distances   calculated, distances sums differences   environmental variables.  metric = \"gower\", Gower   distances calculated using function   daisy. allows also using factor   variables, continuous variables results equal   metric = \"manhattan\". function can called model formula   LHS data matrix RHS lists environmental variables.   formula interface practical selecting transforming   environmental variables. argument partial can perform “partial”   analysis. partializing item must dissimilarity object   class dist.   partial item can used correlation method,   strictly correct Pearson. Function bioenvdist recalculates environmental distances   used within function. default calculate distances   best model, number model can given. Clarke & Ainsworth (1993) suggested method used   selecting best subset environmental variables interpreting   results nonmetric multidimensional scaling (NMDS). recommended   parallel display NMDS community dissimilarities NMDS   Euclidean distances best subset scaled environmental   variables.  warned use Procrustes analysis,   looks like good way comparing two ordinations. Clarke & Ainsworth wrote computer program BIO-ENV giving name   current function. Presumably BIO-ENV   later incorporated Clarke's PRIMER software (available   Windows).  addition, Clarke & Ainsworth suggested novel method   rank correlation available current function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"function returns object class bioenv  summary method.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Clarke, K. R & Ainsworth, M. 1993. method linking multivariate   community structure environmental variables. Marine Ecology     Progress Series, 92, 205--219.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"want study ‘significance’ bioenv   results, can use function mantel   mantel.partial use definition   correlation.  However, bioenv standardizes environmental   variables depending used metric, must   mantel comparable results (standardized data   returned item x result object). safest use   bioenvdist extract environmental distances really   used within bioenv. NB., bioenv selects variables   maximize Mantel correlation, significance tests based   priori selection variables biased.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"","code":"# The method is very slow for large number of possible subsets. # Therefore only 6 variables in this example. data(varespec) data(varechem) sol <- bioenv(wisconsin(varespec) ~ log(N) + P + K + Ca + pH + Al, varechem) sol #>  #> Call: #> bioenv(formula = wisconsin(varespec) ~ log(N) + P + K + Ca +      pH + Al, data = varechem)  #>  #> Subset of environmental variables with best correlation to community data. #>  #> Correlations:    spearman  #> Dissimilarities: bray  #> Metric:          euclidean  #>  #> Best model has 3 parameters (max. 6 allowed): #> P Ca Al #> with correlation  0.4004806  #>  ## IGNORE_RDIFF_BEGIN summary(sol) #>                     size correlation #> P                      1      0.2513 #> P Al                   2      0.4004 #> P Ca Al                3      0.4005 #> P Ca pH Al             4      0.3619 #> log(N) P Ca pH Al      5      0.3216 #> log(N) P K Ca pH Al    6      0.2822 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":null,"dir":"Reference","previous_headings":"","what":"PCA biplot — biplot.rda","title":"PCA biplot — biplot.rda","text":"Draws PCA biplot species scores indicated biplot arrows","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"PCA biplot — biplot.rda","text":"","code":"# S3 method for rda biplot(x, choices = c(1, 2), scaling = \"species\",        display = c(\"sites\", \"species\"), type, xlim, ylim, col = c(1,2),         const, correlation = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"PCA biplot — biplot.rda","text":"x rda result object. choices Axes show. scaling Scaling species site scores. Either species     (2) site (1) scores scaled eigenvalues,     set scores left unscaled, 3     scaled symmetrically square root eigenvalues. negative     scaling values rda, species scores divided standard     deviation species multiplied equalizing     constant. Unscaled raw scores stored result can accessed     scaling = 0. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Argument correlation can used combination     character descriptions get corresponding negative     value. correlation logical; scaling character     description scaling type, correlation can used     select correlation-like scores PCA. See argument scaling     details. display Scores shown.  must alternatives     \"species\" species scores, /\"sites\" site     scores. type Type plot: partial match text     text labels, points points, none     setting frames . omitted, text selected     smaller data sets, points larger. Can length 2     (e.g. type = c(\"text\", \"points\")), case first     element describes species scores handled, second     site scores drawn. xlim, ylim x y limits (min, max) plot. col Colours used sites species (order).     one colour given, used . const General scaling constant scores.rda. ... parameters plotting functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"PCA biplot — biplot.rda","text":"Produces plot biplot results call   rda. common \"species\" scores PCA   drawn biplot arrows point direction increasing   values variable. biplot.rda function provides   wrapper plot.cca allow easy production   plot. biplot.rda suitable unconstrained models.   used ordination object constraints, error issued. species scores drawn using \"text\", arrows drawn   origin 0.85 * species score, whilst labels   drawn species score. type used \"points\",   labels drawn therefore arrows drawn origin   actual species score.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"PCA biplot — biplot.rda","text":"plot function returns invisibly plotting structure   can used identify.ordiplot identify   points functions ordiplot family.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"PCA biplot — biplot.rda","text":"Gavin Simpson, based plot.cca Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"PCA biplot — biplot.rda","text":"","code":"data(dune) mod <- rda(dune, scale = TRUE) biplot(mod, scaling = \"symmetric\")   ## different type for species and site scores biplot(mod, scaling = \"symmetric\", type = c(\"text\", \"points\"))   ## We can use ordiplot pipes in R 4.1 to build similar plots with ## flexible control if (FALSE) { if (getRversion() >= \"4.1\") { plot(mod, scaling = \"symmetric\", type=\"n\") |>    text(\"sites\", cex=0.8) |>    text(\"species\", arrows=TRUE, length=0.02, col=\"red\", cex=0.6) } }"},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":null,"dir":"Reference","previous_headings":"","what":"[Partial] Distance-based Redundancy Analysis — capscale","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Distance-based redundancy analysis (dbRDA) ordination method   similar Redundancy Analysis (rda), allows   non-Euclidean dissimilarity indices, Manhattan   Bray--Curtis distance. Despite non-Euclidean feature, analysis   strictly linear metric. called Euclidean distance,   results identical rda, dbRDA   less efficient. Functions capscale dbrda   constrained versions metric scaling, .k.. principal coordinates   analysis, based Euclidean distance can used,   useful, dissimilarity measures. functions   can also perform unconstrained principal coordinates analysis,   optionally using extended dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"","code":"capscale(formula, data, distance = \"euclidean\", sqrt.dist = FALSE,     comm = NULL, add = FALSE,  dfun = vegdist, metaMDSdist = FALSE,     na.action = na.fail, subset = NULL, ...) dbrda(formula, data, distance = \"euclidean\", sqrt.dist = FALSE,     add = FALSE, dfun = vegdist, metaMDSdist = FALSE,     na.action = na.fail, subset = NULL, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"formula Model formula. function can called     formula interface. usual features formula hold,     especially defined cca rda.     LHS must either community data matrix dissimilarity matrix,     e.g.,     vegdist dist.     LHS data matrix, function vegdist     function given dfun     used find dissimilarities. RHS defines     constraints. constraints can continuous variables factors,     can transformed within formula, can     interactions typical formula. RHS can     special term Condition defines variables     “partialled ” constraints, just like rda     cca. allows use partial dbRDA. data Data frame containing variables right hand side     model formula. distance name dissimilarity (distance) index     LHS formula data frame instead     dissimilarity matrix. sqrt.dist Take square roots dissimilarities. See section     Details . comm Community data frame used finding     species scores LHS formula     dissimilarity matrix. used LHS data     frame. supplied, “species scores”     unavailable dissimilarities supplied. N.B.,     available capscale: dbrda return     species scores. Function sppscores can used add     species scores missing. add Add constant non-diagonal dissimilarities      eigenvalues non-negative underlying Principal      Co-ordinates Analysis (see wcmdscale      details). \"lingoes\" (TRUE) uses      recommended method Legendre & Anderson (1999: “method      1”) \"cailliez\" uses “method 2”.      latter one cmdscale. dfun Distance dissimilarity function used. function      returning standard \"dist\" taking index name      first argument can used. metaMDSdist Use metaMDSdist similarly      metaMDS. means automatic data transformation      using extended flexible shortest path dissimilarities (function      stepacross) many dissimilarities based      shared species. na.action Handling missing values constraints      conditions. default (na.fail) stop      missing values. Choices na.omit      na.exclude delete rows missing values,      differ representation results. na.omit      non-missing site scores shown, na.exclude gives      NA scores missing observations. Unlike      rda, WA scores available missing      constraints conditions. subset Subset data rows. can logical vector      TRUE kept observations, logical      expression can contain variables working      environment, data species names community data      (given formula comm argument). ... parameters passed underlying functions (e.g.,      metaMDSdist).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Functions capscale dbrda provide two alternative   implementations dbRDA. Function capscale based   Legendre & Anderson (1999): dissimilarity data first   ordinated using metric scaling, ordination results   analysed rda. Function dbrda based   McArdle & Anderson (2001) directly decomposes   dissimilarities. use rda parallel   implementation adapted analysing dissimilarities returns   subset rda items. Euclidean distances   results identical rda.  dissimilarities   may give negative eigenvalues associated imaginary   axes. Negative eigenvalues handled differently: capscale   ignores imaginary axes analyses real axes positive   eigenvalues, dbrda directly analyses dissimilarities   can give negative eigenvalues component. user supplied community data frame instead   dissimilarities, functions find dissimilarities using   vegdist distance function given dfun   specified distance. functions accept distance   objects vegdist, dist,   method producing compatible objects. constraining variables can   continuous factors , can interaction terms,   can transformed call. Moreover, can   special term Condition just like rda   cca “partial” analysis can performed. Function dbrda return species scores, can   also missing capscale, can added   analysis using function sppscores. Non-Euclidean dissimilarities can produce negative eigenvalues   (Legendre & Anderson 1999, McArdle & Anderson 2001).    negative eigenvalues, printed output capscale add   column sums positive eigenvalues item sum   negative eigenvalues, dbrda add column giving   number real dimensions positive eigenvalues.  negative   eigenvalues disturbing, functions let distort   dissimilarities non-negative eigenvalues   produced argument add = TRUE. Alternatively,   sqrt.dist = TRUE, square roots dissimilarities   used may help avoiding negative eigenvalues (Legendre &   Anderson 1999). functions can also used perform ordinary metric scaling   .k.. principal coordinates analysis using formula   constant left hand side, comm ~ 1.   metaMDSdist = TRUE, function can automatic data   standardization use extended dissimilarities using function   stepacross similarly non-metric multidimensional   scaling metaMDS.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"functions return object class capscale  dbrda inherits rda. See  cca.object description result object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Anderson, M.J. & Willis, T.J. (2003). Canonical analysis principal   coordinates: useful method constrained ordination   ecology. Ecology 84, 511--525. Gower, J.C. (1985). Properties Euclidean non-Euclidean   distance matrices. Linear Algebra Applications 67, 81--97. Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy   analysis: testing multispecies responses multifactorial ecological   experiments. Ecological Monographs 69, 1--24. Legendre, P. & Legendre, L. (2012).  Numerical Ecology. 3rd English   Edition. Elsevier. McArdle, B.H. & Anderson, M.J. (2001). Fitting multivariate models   community data: comment distance-based redundancy   analysis. Ecology 82, 290--297.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"function capscale originally developed   variant constrained analysis proximities (Anderson & Willis   2003), developments made similar dbRDA. However,   discards imaginary dimensions negative eigenvalues   ordination significance tests area based real dimensions   positive eigenvalues. inertia named dissimilarity index defined   dissimilarity data, unknown distance   information missing. largest original dissimilarity   larger 4, capscale handles input similarly rda   bases analysis variance instead sum   squares. Keyword mean added inertia cases,   e.g. Euclidean Manhattan distances.  Inertia based   squared index, keyword squared added name   distance, unless data square root transformed (argument   sqrt.dist=TRUE). additive constant used   argument add, Lingoes Cailliez adjusted   added name inertia, value constant   printed.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"","code":"data(varespec) data(varechem) ## Basic Analysis vare.cap <- capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\") vare.cap #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\") #>  #>                 Inertia Proportion Rank #> Total          4.792609   1.000000      #> Conditional    0.977190   0.203895    1 #> Constrained    0.997170   0.208064    3 #> Unconstrained  2.829038   0.590292   15 #> Imaginary     -0.010790  -0.002251    8 #> Inertia is squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.5413 0.3265 0.1293  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11  #> 0.9065 0.5127 0.3379 0.2626 0.2032 0.1618 0.1242 0.0856 0.0689 0.0583 0.0501  #>  MDS12  MDS13  MDS14  MDS15  #> 0.0277 0.0208 0.0073 0.0013  #>  plot(vare.cap)  anova(vare.cap) #> Permutation test for capscale under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: capscale(formula = varespec ~ N + P + K + Condition(Al), data = varechem, distance = \"bray\") #>          Df SumOfSqs      F Pr(>F)    #> Model     3  0.99717 2.2324  0.004 ** #> Residual 19  2.82904                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Avoid negative eigenvalues with additive constant capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\", add =TRUE) #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\", add = TRUE) #>  #>               Inertia Proportion Rank #> Total          6.2496     1.0000      #> Conditional    1.0468     0.1675    1 #> Constrained    1.1956     0.1913    3 #> Unconstrained  4.0073     0.6412   19 #> Inertia is Lingoes adjusted squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.6103 0.3940 0.1913  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9796 0.5811 0.4077 0.3322 0.2769 0.2346 0.1962 0.1566  #> (Showing 8 of 19 unconstrained eigenvalues) #>  #> Constant added to distances: 0.07413903  #>  ## Avoid negative eigenvalues by taking square roots of dissimilarities capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist = \"bray\", sqrt.dist= TRUE) #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\", sqrt.dist = TRUE) #>  #>               Inertia Proportion Rank #> Total          6.9500     1.0000      #> Conditional    0.9535     0.1372    1 #> Constrained    1.2267     0.1765    3 #> Unconstrained  4.7698     0.6863   19 #> Inertia is Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.5817 0.4086 0.2365  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9680 0.6100 0.4469 0.3837 0.3371 0.3012 0.2558 0.2010  #> (Showing 8 of 19 unconstrained eigenvalues) #>  ## Principal coordinates analysis with extended dissimilarities capscale(varespec ~ 1, dist=\"bray\", metaMDS = TRUE) #> Square root transformation #> Wisconsin double standardization #> Call: capscale(formula = varespec ~ 1, distance = \"bray\", metaMDSdist = #> TRUE) #>  #>                 Inertia Rank #> Total          2.593021      #> Unconstrained  2.594999   19 #> Imaginary     -0.001978    4 #> Inertia is squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.6075 0.3820 0.3335 0.2046 0.1731 0.1684 0.1505 0.1163  #> (Showing 8 of 19 unconstrained eigenvalues) #>  #> metaMDSdist transformed data: wisconsin(sqrt(varespec))  #>  ## dbrda dbrda(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\") #> Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\") #>  #>               Inertia Proportion Rank RealDims #> Total          4.5444     1.0000               #> Conditional    0.9726     0.2140    1          #> Constrained    0.9731     0.2141    3        3 #> Unconstrained  2.5987     0.5718   19       13 #> Inertia is squared Bray distance  #>  #> Eigenvalues for constrained axes: #> dbRDA1 dbRDA2 dbRDA3  #> 0.5362 0.3198 0.1171  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9054 0.5070 0.3336 0.2581 0.2027 0.1605 0.1221 0.0825  #> (Showing 8 of 19 unconstrained eigenvalues) #>  ## avoid negative eigenvalues also with Jaccard distances dbrda(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"jaccard\") #> Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"jaccard\") #>  #>               Inertia Proportion Rank #> Total          6.5044     1.0000      #> Conditional    1.0330     0.1588    1 #> Constrained    1.2068     0.1855    3 #> Unconstrained  4.2646     0.6557   19 #> Inertia is squared Jaccard distance  #>  #> Eigenvalues for constrained axes: #> dbRDA1 dbRDA2 dbRDA3  #> 0.5992 0.3994 0.2082  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 1.0388 0.6441 0.4518 0.3759 0.3239 0.2785 0.2279 0.1644  #> (Showing 8 of 19 unconstrained eigenvalues) #>"},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":null,"dir":"Reference","previous_headings":"","what":"K-means partitioning using a range of values of K — cascadeKM","title":"K-means partitioning using a range of values of K — cascadeKM","text":"function wrapper kmeans function. creates  several partitions forming cascade small large number  groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-means partitioning using a range of values of K — cascadeKM","text":"","code":"cascadeKM(data, inf.gr, sup.gr, iter = 100, criterion = \"calinski\",   parallel = getOption(\"mc.cores\"))  cIndexKM(y, x, index = \"all\")  # S3 method for cascadeKM plot(x, min.g, max.g, grpmts.plot = TRUE,       sortg = FALSE, gridcol = NA, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-means partitioning using a range of values of K — cascadeKM","text":"data data matrix. objects (samples) rows. inf.gr number groups partition      smallest number groups cascade (min). sup.gr number groups partition largest \t     number groups cascade (max). iter number random starting configurations value     \\(K\\). criterion criterion used select best     partition. default value \"calinski\", refers     Calinski-Harabasz (1974) criterion. simple structure index     (\"ssi\") also available. indices available     package cclust.     experience, two indices work best likely     return maximum value near optimal number     clusters \"calinski\" \"ssi\". y Object class \"kmeans\" returned clustering algorithm     kmeans x Data matrix columns correspond variables rows     observations, plotting object plot index available indices : \"calinski\" \"ssi\".      Type \"\" obtain indices.      Abbreviations names also accepted. min.g, max.g minimum maximum numbers groups     displayed. grpmts.plot Show plot (TRUE FALSE). sortg Sort objects function group membership     produce easily interpretable graph. See Details.     original object names kept; used labels     output table x, although graph.      row names, sequential row numbers used keep track     original order objects. gridcol colour grid lines plots. NA,     default value, removes grid lines. ... parameters functions (ignored). parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"K-means partitioning using a range of values of K — cascadeKM","text":"function creates several partitions forming cascade small   large number groups formed kmeans.    work performed function cIndex based   clustIndex package cclust).    criteria removed version computation    errors generated one object found group. default value \"calinski\", refers well-known   Calinski-Harabasz (1974) criterion. available index   simple structure index \"ssi\" (Dolnicar et al. 1999).   case groups equal   sizes, \"calinski\" generally good criterion indicate   correct number groups. Users take indications   literally groups equal size. Type \"\"   obtain  indices. indices defined : calinski: \\((SSB/(K-1))/(SSW/(n-K))\\), \\(n\\)     number data points \\(K\\) number clusters.     \\(SSW\\) sum squares within clusters     \\(SSB\\) sum squares among clusters. index     simply \\(F\\) (ANOVA) statistic. ssi: “Simple Structure Index” multiplicatively combines     several elements influence interpretability     partitioning solution. best partition indicated     highest SSI value. simulation study, Milligan Cooper (1985) found   Calinski-Harabasz criterion recovered correct number   groups often. recommend criterion ,   groups equal sizes, maximum value \"calinski\"   usually indicates correct number groups. Another available   index simple structure index \"ssi\". Users   take indications indices literally groups   equal size explore groups corresponding values   \\(K\\). Function cascadeKM plot method.  Two plots   produced. graph left objects    abscissa number groups ordinate. groups   represented colours. graph right shows values   criterion (\"calinski\" \"ssi\") determining best   partition. highest value criterion marked red. Points   marked orange, , indicate partitions producing increase   criterion value number groups increases; may   represent interesting partitions. sortg=TRUE, objects reordered following   procedure: (1) simple matching distance matrix computed among   objects, based table K-means assignments groups,   \\(K\\) = min.g \\(K\\) = max.g. (2) principal   coordinate analysis (PCoA, Gower 1966) computed centred   distance matrix. (3) first principal coordinate used new   order objects graph. simplified algorithm used   compute first principal coordinate , using iterative   algorithm described Legendre & Legendre (2012).   full distance matrix among objects never computed; avoids   problem storing number objects   large. Distance values computed needed   algorithm.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Function cascadeKM returns object class  cascadeKM items: partition Table partitions found different numbers      groups \\(K\\), \\(K\\) = inf.gr \\(K\\) =     sup.gr. results Values criterion select best     partition. criterion name criterion used. size number objects found group,      partitions (columns). Function cIndex returns vector index values.   maximum value indices supposed indicate best   partition. indices work best groups equal sizes.   groups equal sizes, one put much faith   maximum indices, also explore groups   corresponding values \\(K\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Calinski, T. J. Harabasz. 1974. dendrite method cluster   analysis. Commun. Stat. 3: 1--27. Dolnicar, S., K. Grabler J. . Mazanec. 1999.  tale three   cities: perceptual charting analyzing destination images. Pp.   39-62 : Woodside, . et al. [eds.] Consumer psychology   tourism, hospitality leisure. CAB International, New York. Gower, J. C. 1966. distance properties latent root vector   methods used multivariate analysis. Biometrika 53:   325--338. Legendre, P. & L. Legendre. 2012. Numerical ecology, 3rd   English edition. Elsevier Science BV, Amsterdam. Milligan, G. W. & M. C. Cooper. 1985. examination procedures   determining number clusters data set. Psychometrika   50: 159--179. Weingessel, ., Dimitriadou, . Dolnicar, S. 2002. examination   indexes determining number clusters binary data   sets. Psychometrika 67: 137--160.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Marie-Helene Ouellette   Marie-Helene.Ouellette@UMontreal.ca, Sebastien Durand   Sebastien.Durand@UMontreal.ca Pierre Legendre   Pierre.Legendre@UMontreal.ca. Parallel processing Virgilio   Gómez-Rubio.  Edited vegan Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"K-means partitioning using a range of values of K — cascadeKM","text":"","code":"# Partitioning a (10 x 10) data matrix of random numbers  mat <- matrix(runif(100),10,10)  res <- cascadeKM(mat, 2, 5, iter = 25, criterion = 'calinski')   toto <- plot(res)     # Partitioning an autocorrelated time series  vec <- sort(matrix(runif(30),30,1))  res <- cascadeKM(vec, 2, 5, iter = 25, criterion = 'calinski')  toto <- plot(res)     # Partitioning a large autocorrelated time series  # Note that we remove the grid lines  vec <- sort(matrix(runif(1000),1000,1))  res <- cascadeKM(vec, 2, 7, iter = 10, criterion = 'calinski')  toto <- plot(res, gridcol=NA)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":null,"dir":"Reference","previous_headings":"","what":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Function cca performs correspondence analysis, optionally   constrained correspondence analysis (.k.. canonical correspondence   analysis), optionally partial constrained correspondence   analysis. Function rda performs redundancy analysis,   optionally principal components analysis.   popular ordination techniques community ecology.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"","code":"# S3 method for formula cca(formula, data, na.action = na.fail, subset = NULL,   ...) # S3 method for formula rda(formula, data, scale=FALSE, na.action = na.fail,   subset = NULL, ...) # S3 method for default cca(X, Y, Z, ...) # S3 method for default rda(X, Y, Z, scale=FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"formula Model formula, left hand side gives     community data matrix, right hand side gives constraining variables,     conditioning variables can given within special function     Condition. data Data frame containing variables right hand side     model formula. X Community data matrix. Y Constraining matrix, typically environmental variables.     Can missing. data.frame,     expanded model.matrix factors     expanded contrasts (“dummy variables”). better     use formula instead argument,     analyses work formula used. Z Conditioning matrix, effect removed     (“partialled ”) next step. Can missing.     data.frame, expanded similarly constraining     matrix. scale Scale species unit variance (like correlations). na.action Handling missing values constraints     conditions. default (na.fail) stop     missing value. Choice na.omit removes rows     missing values. Choice na.exclude keeps     observations gives NA results     calculated. WA scores rows may found also missing     values constraints. Missing values never allowed     dependent community data. subset Subset data rows. can logical vector     TRUE kept observations, logical expression     can contain variables working environment, data     species names community data. ... arguments print plot functions     (ignored functions).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Since introduction (ter Braak 1986), constrained, canonical,   correspondence analysis spin-, redundancy analysis,   popular ordination methods community ecology.   Functions cca rda  similar popular   proprietary software Canoco, although implementation   completely different.  functions based Legendre &   Legendre's (2012) algorithm: cca   Chi-square transformed data matrix subjected weighted linear   regression constraining variables, fitted values   submitted correspondence analysis performed via singular value   decomposition (svd). Function rda similar, uses   ordinary, unweighted linear regression unweighted SVD. Legendre &   Legendre (2012), Table 11.5 (p. 650) give skeleton RDA   algorithm vegan. algorithm CCA similar,   involves standardization row column weights. functions can called either matrix-like entries   community data constraints, formula interface.    general, formula interface preferred, allows   better control model allows factor constraints.   analyses ordination results possible model fitted   formula (e.g., cases anova.cca, automatic   model building). following sections, X, Y Z, although   referred matrices, commonly data frames. matrix interface,   community data matrix X must given, data   matrices may omitted, corresponding stage analysis   skipped.  matrix Z supplied, effects removed   community matrix, residual matrix submitted next   stage.  called partial correspondence redundancy   analysis.  matrix   Y supplied, used constrain ordination,   resulting constrained canonical correspondence analysis,   redundancy analysis.   Finally, residual submitted ordinary correspondence   analysis (principal components analysis).  matrices   Z Y missing,   data matrix analysed ordinary correspondence analysis (  principal components analysis). Instead separate matrices, model can defined using model   formula.  left hand side must   community data matrix (X).  right hand side defines   constraining model.   constraints can contain ordered unordered factors,   interactions among variables functions variables.  defined   contrasts honoured factor   variables.  constraints can also matrices (data   frames).   formula can include special term Condition   conditioning variables (“covariables”) partialled   analysis.  following commands equivalent:   cca(X, Y, Z),  cca(X ~ Y + Condition(Z)), Y   Z refer constraints conditions matrices respectively. Constrained correspondence analysis indeed constrained method:   CCA try display variation   data, part can explained used constraints.   Consequently, results strongly dependent set   constraints transformations interactions among   constraints.  shotgun method use environmental variables   constraints.  However, exploratory problems better   analysed   unconstrained methods correspondence analysis   (decorana, corresp) non-metric   multidimensional scaling (metaMDS)   environmental interpretation analysis   (envfit, ordisurf).   CCA good choice user   clear strong priori hypotheses constraints   interested major structure data set. CCA able correct curve artefact commonly found   correspondence analysis forcing configuration linear   constraints.  However, curve artefact can avoided   low number constraints curvilinear relation   .  curve can reappear even two badly chosen   constraints single factor.  Although formula interface makes   easy include polynomial interaction terms, terms often   produce curved artefacts (difficult interpret),   probably avoided. According folklore, rda used ``short   gradients'' rather cca. However, based   research finds methods based Euclidean metric uniformly   weaker based Chi-squared metric.  However, standardized   Euclidean distance may appropriate measures (see Hellinger   standardization decostand particular). Partial CCA (pCCA; alternatively partial RDA) can used remove   effect   conditioning background random variables   covariables CCA proper.  fact, pCCA compares models   cca(X ~ Z) cca(X ~ Y + Z) attributes   difference effect Y cleansed effect   Z.  people used method extracting   “components variance” CCA.  However, effect   variables together stronger sum separately, can   increase total Chi-square partialling   variation, give negative “components variance”.  general,   components “variance” trusted due   interactions two sets variables. functions summary plot methods   documented separately (see plot.cca, summary.cca).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Function cca returns huge object class cca,   described separately cca.object. Function rda returns object class rda   inherits class cca described cca.object.   scaling used rda scores described separate   vignette package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"original method ter Braak, current   implementation follows Legendre Legendre. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier. McCune, B. (1997) Influence noisy environmental data canonical   correspondence analysis. Ecology 78, 2617-2623. Palmer, M. W. (1993) Putting things even better order:   advantages canonical correspondence analysis.  Ecology   74,2215-2230. Ter Braak, C. J. F. (1986) Canonical Correspondence Analysis: new   eigenvector technique multivariate direct gradient   analysis. Ecology 67, 1167-1179.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"responsible author Jari Oksanen, code borrows heavily   Dave Roberts (Montana State University, USA).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"","code":"data(varespec) data(varechem) ## Common but bad way: use all variables you happen to have in your ## environmental data matrix vare.cca <- cca(varespec, varechem) vare.cca #> Call: cca(X = varespec, Y = varechem) #>  #>               Inertia Proportion Rank #> Total          2.0832     1.0000      #> Constrained    1.4415     0.6920   14 #> Unconstrained  0.6417     0.3080    9 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11  #> 0.4389 0.2918 0.1628 0.1421 0.1180 0.0890 0.0703 0.0584 0.0311 0.0133 0.0084  #>  CCA12  CCA13  CCA14  #> 0.0065 0.0062 0.0047  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9  #> 0.19776 0.14193 0.10117 0.07079 0.05330 0.03330 0.01887 0.01510 0.00949  #>  plot(vare.cca)  ## Formula interface and a better model vare.cca <- cca(varespec ~ Al + P*(K + Baresoil), data=varechem) vare.cca #> Call: cca(formula = varespec ~ Al + P * (K + Baresoil), data = #> varechem) #>  #>               Inertia Proportion Rank #> Total           2.083      1.000      #> Constrained     1.046      0.502    6 #> Unconstrained   1.038      0.498   17 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6  #> 0.3756 0.2342 0.1407 0.1323 0.1068 0.0561  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8  #> 0.27577 0.15411 0.13536 0.11803 0.08887 0.05511 0.04919 0.03781  #> (Showing 8 of 17 unconstrained eigenvalues) #>  plot(vare.cca)  ## Partialling out and negative components of variance cca(varespec ~ Ca, varechem) #> Call: cca(formula = varespec ~ Ca, data = varechem) #>  #>               Inertia Proportion Rank #> Total         2.08320    1.00000      #> Constrained   0.15722    0.07547    1 #> Unconstrained 1.92598    0.92453   22 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1  #> 0.15722  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.4745 0.2939 0.2140 0.1954 0.1748 0.1171 0.1121 0.0880  #> (Showing 8 of 22 unconstrained eigenvalues) #>  cca(varespec ~ Ca + Condition(pH), varechem) #> Call: cca(formula = varespec ~ Ca + Condition(pH), data = varechem) #>  #>               Inertia Proportion Rank #> Total          2.0832     1.0000      #> Conditional    0.1458     0.0700    1 #> Constrained    0.1827     0.0877    1 #> Unconstrained  1.7547     0.8423   21 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1  #> 0.18269  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.3834 0.2749 0.2123 0.1760 0.1701 0.1161 0.1089 0.0880  #> (Showing 8 of 21 unconstrained eigenvalues) #>  ## RDA data(dune) data(dune.env) dune.Manure <- rda(dune ~ Manure, dune.env) plot(dune.Manure)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Object from Constrained Ordination — cca.object","title":"Result Object from Constrained Ordination — cca.object","text":"Ordination methods cca, rda,   dbrda capscale return similar result   objects. methods use internal function   ordConstrained. differ (1) initial   transformation data defining inertia, (2) weighting,   (3) use rectangular rows \\(\\times\\) columns data   symmetric rows \\(\\times\\) rows dissimilarities:   rda initializes data give variance correlations   inertia, cca based double-standardized data   give Chi-square inertia uses row column weights,   capscale maps real part dissimilarities   rectangular data performs RDA, dbrda performs   RDA-like analysis directly symmetric dissimilarities. Function ordConstrained returns result components   methods, calling function may add   components final result. However, access   result components directly (using $): internal structure   regarded stable application interface (API), can   change release. access results components   directly, take risk breakage vegan release.   vegan provides wide set accessor functions   components, functions updated result object   changes. documentation gives overview accessor functions   cca result object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Object from Constrained Ordination — cca.object","text":"","code":"ordiYbar(x, model = c(\"CCA\", \"CA\", \"pCCA\", \"partial\", \"initial\")) # S3 method for cca model.frame(formula, ...) # S3 method for cca model.matrix(object, ...) # S3 method for cca weights(object, display = \"sites\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Object from Constrained Ordination — cca.object","text":"object, x, formula result object cca,     rda, dbrda,     capscale. model Show constrained (\"CCA\"), unconstrained     (\"CA\") conditioned “partial” (\"pCCA\")     results. ordiYbar value can also \"initial\"     internal working input data, \"partial\"     internal working input data removing partial effects. display Display either \"sites\" \"species\". ... arguments passed function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Result Object from Constrained Ordination — cca.object","text":"internal (“working”) form dependent (community)   data can accessed function ordiYbar. form depends   ordination method: instance, cca   data weighted Chi-square transformed,   dbrda Gower-centred dissimilarities.   input data original (“response”) form can accessed   fitted.cca residuals.cca.   Function predict.cca can return either working   response data, also lower-rank approximations. model matrix independent data (“Constraints”   “Conditions”) can extracted model.matrix.   partial analysis, function returns list design matrices   called Conditions Constraints. either component   missing, single matrix returned. redundant (aliased)   terms appear model matrix. terms can found   alias.cca. Function model.frame tries   reconstruct data frame model matrices   derived. possible original model fitted   formula data arguments, still fails   data unavailable. number observations can accessed   nobs.cca, residual degrees freedom   df.residual.cca. information observations   missing values can accessed na.action.    terms formula fitted model can accessed   formula terms. weights used cca can accessed   weights. unweighted methods (rda)   weights equal. ordination results saved separate components partial   terms, constraints residual unconstrained ordination.   guarantee components internal names   currently, cautious developing scripts   functions directly access components. constrained ordination algorithm based QR decomposition   constraints conditions (environmental data), QR   component saved separately partial constrained   components.  QR decomposition constraints can accessed   qr.cca. also include residual   effects partial terms (Conditions), used   together ordiYbar(x, \"partial\"). environmental data   first centred rda weighted centred   cca.  QR decomposition used many functions   access cca results, can used find many items   directly stored object.  examples, see   coef.cca, coef.rda,   vif.cca, permutest.cca,   predict.cca, predict.rda,   calibrate.cca. See qr possible   uses component. instance, rank constraints   can found QR decomposition. eigenvalues solution can accessed   eigenvals.cca. Eigenvalues evaluated   partial component, available constrained   residual components. ordination scores internally stored (weighted)   orthonormal scores matrices. results can accessed   scores.cca scores.rda functions.   ordination scores scaled accessed scores   functions, internal (weighted) orthonormal scores can   accessed setting scaling = FALSE. Unconstrained residual   component species site scores, constrained component   also fitted site scores linear combination scores sites   biplot scores centroids constraint variables. biplot   scores correspond model.matrix, centroids   calculated factor variables used. scores   can selected defining axes, direct way   accessing scores certain component. number dimensions   can assessed eigenvals. addition,   types can derived results although saved   results. instance, regression scores model coefficients   can accessed scores coef   functions. Partial component scores. Distance-based methods (dbrda, capscale)   can negative eigenvalues associated imaginary axis   scores. way accessing imaginary scores.    addition, species scores initially missing   dbrda accessory found analysis   capscale (may misleading). Function   sppscores can used add species scores replace   meaningful ones.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Result Object from Constrained Ordination — cca.object","text":"Saving “working” dependent (community) data changed   vegan version 2.5-0, use ordiYbar   function instead direct access, scripts functions   fail (ordiYbar available since vegan   version 2.4-3, works old current result   objects). model.matrix returns unweighted model matrix also   cca. Prior vegan version 2.5-0 returned   weighted model matrix","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Result Object from Constrained Ordination — cca.object","text":"Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Result Object from Constrained Ordination — cca.object","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial Species Classification Method (CLAM) — clamtest","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"CLAM statistical approach classifying generalists specialists two distinct habitats described Chazdon et al. (2011).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"","code":"clamtest(comm, groups, coverage.limit = 10, specialization = 2/3,     npoints = 20, alpha = 0.05/20) # S3 method for clamtest summary(object, ...) # S3 method for clamtest plot(x, xlab, ylab, main,  pch = 21:24, col.points = 1:4,     col.lines = 2:4, lty = 1:3, position = \"bottomright\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"comm Community matrix, consisting counts. groups vector identifying two habitats. Must exactly two unique values levels. Habitat IDs grouping vector must match corresponding rows community matrix comm. coverage.limit Integer, sample coverage based correction  applied rare species counts limit.  Sample coverage calculated separately  two habitats. Sample relative abundances used species  higher equal coverage.limit total counts per habitat. specialization Numeric, specialization threshold value 0 1. value \\(2/3\\) represents ‘supermajority’ rule, value \\(1/2\\) represents ‘simple majority’ rule assign shared species habitat specialists. npoints Integer, number points used determine boundary lines plots. alpha Numeric, nominal significance level individual   tests.  default value reduces conventional limit   \\(0.05\\) account overdispersion multiple testing   several species simultaneously. However, firm reason   exactly limit. x, object Fitted model object class \"clamtest\". xlab, ylab Labels plot axes. main Main title plot. pch, col.points Symbols colors used plotting species groups. lty, col.lines Line types colors boundary lines plot separate species groups. position Position figure legend, see legend specification details. Legend shown position = NULL. ... Additional arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"method uses multinomial model based estimated   species relative abundance two habitats (, B). minimizes bias   due differences sampling intensities two habitat types   well bias due insufficient sampling within   habitat. method permits robust statistical classification   habitat specialists generalists, without excluding rare species   priori (Chazdon et al. 2011).  Based user-defined   specialization threshold, model classifies species   one four groups: (1) generalists; (2) habitat specialists; (3)   habitat B specialists; (4) rare classify confidence.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"data frame (class attribute \"clamtest\"),   columns:  Species: species name (column names comm), Total_**: total count habitat , Total_*B*: total count habitat B, Classes: species classification, factor        levels Generalist, Specialist_**,        Specialist_*B*, Too_rare.  ** *B* placeholders habitat names/labels found   data. summary method returns descriptive statistics results. plot method returns values invisibly produces bivariate scatterplot species total abundances two habitats. Symbols boundary lines shown species groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"Chazdon, R. L., Chao, ., Colwell, R. K., Lin, S.-Y., Norden, N.,  Letcher, S. G., Clark, D. B., Finegan, B. Arroyo J. P.(2011).  novel statistical method classifying habitat generalists specialists. Ecology 92, 1332--1343.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"Peter Solymos solymos@ualberta.ca","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"code tested standalone CLAM software provided website Anne Chao (http://chao.stat.nthu.edu.tw/wordpress); minor inconsistencies found, especially finding threshold 'rare' species. inconsistencies probably due numerical differences two implementation. current R implementation uses  root finding iso-lines instead iterative search. original method (Chazdon et al. 2011) two major problems: assumes error distribution multinomial.     justified choice individuals freely distributed,     -dispersion clustering individuals.     ecological data, variance much higher multinomial     assumption, therefore test statistic optimistic. original authors suggest multiple testing adjustment     multiple testing based number points     (npoints) used draw critical lines plot,     whereas adjustment based number tests (.e.,     tested species). function uses numerical values     original paper, automatic connection     npoints alpha arguments, must work     adjustment .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"","code":"data(mite) data(mite.env) sol <- with(mite.env, clamtest(mite, Shrub==\"None\", alpha=0.005)) summary(sol) #> Two Groups Species Classification Method (CLAM) #>  #> Specialization threshold = 0.6666667 #> Alpha level = 0.005 #>  #> Estimated sample coverage: #>  FALSE   TRUE  #> 1.0000 0.9996  #>  #> Minimum abundance for classification: #> FALSE  TRUE  #>    27     9  #>  #>                  Species Proportion #> Generalist            10      0.286 #> Specialist_FALSE      14      0.400 #> Specialist_TRUE        4      0.114 #> Too_rare               7      0.200 head(sol) #>   Species Total_FALSE Total_TRUE          Classes #> 1  Brachy         534         77       Generalist #> 2    PHTH          89          0 Specialist_FALSE #> 3    HPAV         389        207       Generalist #> 4    RARD          85          0 Specialist_FALSE #> 5    SSTR          22          0         Too_rare #> 6 Protopl          26          0         Too_rare plot(sol)"},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Object for Null Model Algorithms — commsim","title":"Create an Object for Null Model Algorithms — commsim","text":"commsim function can used feed Null Model algorithms nullmodel analysis. make.commsim function returns various predefined algorithm types (see Details). functions represent low level interface community null model infrastructure vegan intent extensibility, less emphasis direct use users.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Object for Null Model Algorithms — commsim","text":"","code":"commsim(method, fun, binary, isSeq, mode) make.commsim(method) # S3 method for commsim print(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Object for Null Model Algorithms — commsim","text":"method Character, name algorithm. fun function. possible formal arguments function see Details. binary Logical, algorithm applies presence-absence count matrices. isSeq Logical, algorithm sequential (needs burnin thinning) . mode Character, storage mode community matrix, either \"integer\" \"double\". x object class commsim. ... Additional arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an Object for Null Model Algorithms — commsim","text":"function fun must return array dim(nr, nc, n), must take following arguments: x: input matrix, n: number permuted matrices output, nr: number rows, nc: number columns, rs: vector row sums, cs: vector column sums, rf: vector row frequencies (non-zero cells), cf: vector column frequencies (non-zero cells), s: total sum x, fill: matrix fill (non-zero cells), thin: thinning value sequential algorithms, ...: additional arguments. can define null model,   several null model algorithm pre-defined can called   name. predefined algorithms described detail   following chapters. binary null models produce matrices zeros   (absences) ones (presences) also input matrix   quantitative. two types quantitative data: Counts   integers natural unit individuals can shuffled,   abundances can real (floating point) values   natural subunit shuffling. quantitative models can handle   counts, able handle real values. null   models sequential next matrix derived   current one. makes models dependent previous models, usually   must thin matrices study sequences stability:   see oecosimu details instructions. See Examples structural constraints imposed algorithm   defining null model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"binary-null-models","dir":"Reference","previous_headings":"","what":"Binary null models","title":"Create an Object for Null Model Algorithms — commsim","text":"binary null models preserve fill: number presences   conversely number absences. classic models may also   preserve column (species) frequencies (c0) row frequencies   species richness site (r0) take account   commonness rarity species (r1, r2).  Algorithms   swap, tswap, curveball, quasiswap   backtracking preserve row column frequencies. Three   first ones sequential two latter non-sequential   produce independent matrices. Basic algorithms reviewed   Wright et al. (1998). \"r00\": non-sequential algorithm binary matrices      preserves number presences (fill). \"r0\": non-sequential algorithm binary     matrices preserves site (row) frequencies. \"r1\": non-sequential algorithm binary matrices     preserves site (row) frequencies, uses column marginal     frequencies probabilities selecting species. \"r2\": non-sequential algorithm binary matrices     preserves site (row) frequencies, uses squared column     marginal frequencies probabilities selecting species. \"c0\": non-sequential algorithm binary matrices     preserves species frequencies (Jonsson 2001). \"swap\": sequential algorithm binary matrices     changes matrix structure, influence marginal sums     (Gotelli & Entsminger 2003).  inspects \\(2 \\times 2\\) submatrices long swap can done. \"tswap\": sequential algorithm binary matrices.     \"swap\" algorithm, tries fixed     number times performs zero many swaps one step     (according thin argument call).     approach suggested Miklós & Podani (2004)     found ordinary swap may lead biased     sequences, since columns rows easily swapped. \"curveball\": sequential method binary matrices     implements ‘Curveball’ algorithm Strona et     al. (2014). algorithm selects two random rows finds set     unique species occur one rows.     algorithm distributes set unique species rows preserving     original row frequencies.  Zero several species swapped     one step, usually matrix perturbed strongly     sequential methods. \"quasiswap\": non-sequential algorithm binary     matrices implements method matrix first filled     honouring row column totals, integers may     larger one.  method inspects random     \\(2 \\times 2\\) matrices performs quasiswap     . addition ordinary swaps, quasiswap can reduce numbers     one ones preserving marginal totals (Miklós &     Podani 2004). method non-sequential, accepts     thin argument: convergence checked every     thin steps. allows performing several ordinary swaps     addition fill changing swaps helps reducing removing     bias. \"greedyqswap\": greedy variant quasiswap.     greedy step, one element \\(2 \\times 2\\) matrix     taken \\(> 1\\) elements. greedy steps biased,     method can thinned, first thin     steps greedy. Even modest thinning (say thin = 20)     removes reduces bias, thin = 100 (1% greedy     steps) looks completely safe still speeds simulation.     code experimental provided scrutiny,     tested bias use. \"backtracking\": non-sequential algorithm binary     matrices implements filling method constraints     row column frequencies (Gotelli & Entsminger 2001).  matrix     first filled randomly, typically row column sums     reached incidences filled . begins     \"backtracking\", incidences removed,     filling started , backtracking done many     times incidences filled matrix.  results     may biased inspected carefully use.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-models-for-counts-with-fixed-marginal-sums","dir":"Reference","previous_headings":"","what":"Quantitative Models for Counts with Fixed Marginal Sums","title":"Create an Object for Null Model Algorithms — commsim","text":"models shuffle individuals counts keep marginal sums   fixed, marginal frequencies preserved. Algorithm   r2dtable uses standard R function r2dtable also   used simulated \\(P\\)-values chisq.test.   Algorithm quasiswap_count uses , preserves   original fill. Typically means increasing numbers zero cells   result zero-inflated respect r2dtable. \"r2dtable\": non-sequential algorithm count     matrices.  algorithm keeps matrix sum row/column sums     constant. Based r2dtable. \"quasiswap_count\": non-sequential algorithm count     matrices.  algorithm similar Carsten Dormann's     swap.web function package     bipartite. First, random matrix generated     r2dtable function preserving row column sums.      original matrix fill reconstructed sequential steps     increase decrease matrix fill random matrix. steps     based swapping \\(2 \\times 2\\) submatrices (see     \"swap_count\" algorithm details) maintain row     column totals.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-swap-models","dir":"Reference","previous_headings":"","what":"Quantitative Swap Models","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative swap models similar binary swap,   swap largest permissible value. models section   maintain fill perform quantitative swap can   done without changing fill. Single step swap often changes   matrix little. particular, cell counts variable,   high values change slowly. Checking chain stability   independence even crucial binary swap,   strong thinning often needed. models never   used without inspecting properties current data.   null models can also defined using permatswap   function.  \"swap_count\": sequential algorithm count matrices.     algorithm find \\(2 \\times 2\\) submatrices can     swapped leaving column row totals fill unchanged.     algorithm finds largest value submatrix can     swapped (\\(d\\)). Swap means values diagonal     antidiagonal positions decreased \\(d\\), remaining     cells increased \\(d\\). swap made fill     change. \"abuswap_r\": sequential algorithm count     nonnegative real valued matrices fixed row frequencies (see     also permatswap).  algorithm similar     swap_count, uses different swap value row     \\(2 \\times 2\\) submatrix. step changes     corresponding column sums, honours matrix fill, row sums,     row/column frequencies (Hardy 2008; randomization scheme 2x). \"abuswap_c\": sequential algorithm count     nonnegative real valued matrices fixed column frequencies     (see also permatswap).  algorithm similar     previous one, operates columns.  step changes     corresponding row sums, honours matrix fill, column sums,     row/column frequencies (Hardy 2008; randomization scheme 3x).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-swap-and-shuffle-models","dir":"Reference","previous_headings":"","what":"Quantitative Swap and Shuffle Models","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative Swap Shuffle methods (swsh methods) preserve   fill column row frequencies, also either row column   sums. methods first perform binary quasiswap   shuffle original quantitative data non-zero cells.   samp methods shuffle original non-zero cell values can   used also non-integer data. methods   redistribute individuals randomly among non-zero cells can   used integer data. shuffling either free   whole matrix, within rows (r methods) within columns   (c methods). Shuffling within row preserves row sums,   shuffling within column preserves column sums. models can   also defined permatswap. \"swsh_samp\": non-sequential algorithm     quantitative data (either integer counts non-integer values).     Original non-zero values values shuffled. \"swsh_both\": non-sequential algorithm count data.     Individuals shuffled freely non-zero cells. \"swsh_samp_r\": non-sequential algorithm     quantitative data.  Non-zero values (samples) shuffled     separately row. \"swsh_samp_c\": non-sequential algorithm     quantitative data.  Non-zero values (samples) shuffled     separately column. \"swsh_both_r\": non-sequential algorithm count matrices.     Individuals shuffled freely non-zero values within row. \"swsh_both_c\": non-sequential algorithm count matrices.     Individuals shuffled freely non-zero values column.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-shuffle-methods","dir":"Reference","previous_headings":"","what":"Quantitative Shuffle Methods","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative shuffle methods generalizations binary models   r00, r0 c0.  _ind methods   shuffle individuals grand sum, row sum column sums   preserved.  methods similar r2dtable   still slacker constraints marginal sums. _samp   _both methods first apply corresponding binary model   similar restriction marginal frequencies distribute   quantitative values non-zero cells. _samp models   shuffle original cell values can therefore handle also non-count   real values. _both models shuffle individuals among   non-zero values. shuffling whole matrix   r00_, within row r0_ within column   c0_ cases. \"r00_ind\": non-sequential algorithm count matrices.     algorithm preserves grand sum     individuals shuffled among cells matrix. \"r0_ind\": non-sequential algorithm count matrices.     algorithm preserves row sums     individuals shuffled among cells row matrix. \"c0_ind\": non-sequential algorithm count matrices.     algorithm preserves column sums     individuals shuffled among cells column matrix. \"r00_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves grand sum     cells matrix shuffled. \"r0_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves row sums     cells within row shuffled. \"c0_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves column sums constant     cells within column shuffled. \"r00_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells matrix shuffled. \"r0_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells row shuffled. \"c0_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells column shuffled.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Object for Null Model Algorithms — commsim","text":"object class commsim elements corresponding arguments (method, binary, isSeq, mode, fun). input make.comsimm commsim object, returned without evaluation. case, character method argument matched predefined algorithm names. error message issued none found. method argument missing, function returns names currently available null model algorithms character vector.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create an Object for Null Model Algorithms — commsim","text":"Gotelli, N.J. & Entsminger, N.J. (2001). Swap fill algorithms   null model analysis: rethinking knight's tour. Oecologia   129, 281--291. Gotelli, N.J. & Entsminger, N.J. (2003). Swap algorithms null model   analysis. Ecology 84, 532--535. Hardy, O. J. (2008) Testing spatial phylogenetic structure   local communities: statistical performances different null models   test statistics locally neutral community.  Journal   Ecology 96, 914--926. Jonsson, B.G. (2001) null model randomization tests   nestedness species assemblages. Oecologia 127, 309--313. Miklós, . & Podani, J. (2004). Randomization   presence-absence matrices: comments new algorithms. Ecology   85, 86--92. Patefield, W. M. (1981) Algorithm AS159.  efficient method   generating r x c tables given row column totals.   Applied Statistics 30, 91--97. Strona, G., Nappo, D., Boccacci, F., Fattorini, S. &   San-Miguel-Ayanz, J. (2014). fast unbiased procedure   randomize ecological binary matrices fixed row column   totals. Nature Communications 5:4114   doi:10.1038/ncomms5114 . Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create an Object for Null Model Algorithms — commsim","text":"Jari Oksanen Peter Solymos","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an Object for Null Model Algorithms — commsim","text":"","code":"## write the r00 algorithm f <- function(x, n, ...)     array(replicate(n, sample(x)), c(dim(x), n)) (cs <- commsim(\"r00\", fun=f, binary=TRUE,     isSeq=FALSE, mode=\"integer\")) #> An object of class “commsim”  #> ‘r00’ method (binary, non-sequential, integer mode) #>   ## retrieving the sequential swap algorithm (cs <- make.commsim(\"swap\")) #> An object of class “commsim”  #> ‘swap’ method (binary, sequential, integer mode) #>   ## feeding a commsim object as argument make.commsim(cs) #> An object of class “commsim”  #> ‘swap’ method (binary, sequential, integer mode) #>   ## making the missing c1 model using r1 as a template ##   non-sequential algorithm for binary matrices ##   that preserves the species (column) frequencies, ##   but uses row marginal frequencies ##   as probabilities of selecting sites f <- function (x, n, nr, nc, rs, cs, ...) {     out <- array(0L, c(nr, nc, n))     J <- seq_len(nc)     storage.mode(rs) <- \"double\"     for (k in seq_len(n))         for (j in J)             out[sample.int(nr, cs[j], prob = rs), j, k] <- 1L     out } cs <- make.commsim(\"r1\") cs$method <- \"c1\" cs$fun <- f  ## structural constraints diagfun <- function(x, y) {     c(sum = sum(y) == sum(x),         fill = sum(y > 0) == sum(x > 0),         rowSums = all(rowSums(y) == rowSums(x)),         colSums = all(colSums(y) == colSums(x)),         rowFreq = all(rowSums(y > 0) == rowSums(x > 0)),         colFreq = all(colSums(y > 0) == colSums(x > 0))) } evalfun <- function(meth, x, n) {     m <- nullmodel(x, meth)     y <- simulate(m, nsim=n)     out <- rowMeans(sapply(1:dim(y)[3],         function(i) diagfun(attr(y, \"data\"), y[,,i])))     z <- as.numeric(c(attr(y, \"binary\"), attr(y, \"isSeq\"),         attr(y, \"mode\") == \"double\"))     names(z) <- c(\"binary\", \"isSeq\", \"double\")     c(z, out) } x <- matrix(rbinom(10*12, 1, 0.5)*rpois(10*12, 3), 12, 10) algos <- make.commsim() a <- t(sapply(algos, evalfun, x=x, n=10)) print(as.table(ifelse(a==1,1,0)), zero.print = \".\") #>                 binary isSeq double sum fill rowSums colSums rowFreq colFreq #> r00                  1     .      .   1    1       .       .       .       . #> c0                   1     .      .   1    1       .       1       .       1 #> r0                   1     .      .   1    1       1       .       1       . #> r1                   1     .      .   1    1       1       .       1       . #> r2                   1     .      .   1    1       1       .       1       . #> quasiswap            1     .      .   1    1       1       1       1       1 #> greedyqswap          1     .      .   1    1       1       1       1       1 #> swap                 1     1      .   1    1       1       1       1       1 #> tswap                1     1      .   1    1       1       1       1       1 #> curveball            1     1      .   1    1       1       1       1       1 #> backtrack            1     .      .   1    1       1       1       1       1 #> r2dtable             .     .      .   1    .       1       1       .       . #> swap_count           .     1      .   1    1       1       1       .       . #> quasiswap_count      .     .      .   1    1       1       1       .       . #> swsh_samp            .     .      1   1    1       .       .       1       1 #> swsh_both            .     .      .   1    1       .       .       1       1 #> swsh_samp_r          .     .      1   1    1       1       .       1       1 #> swsh_samp_c          .     .      1   1    1       .       1       1       1 #> swsh_both_r          .     .      .   1    1       1       .       1       1 #> swsh_both_c          .     .      .   1    1       .       1       1       1 #> abuswap_r            .     1      1   1    1       1       .       1       1 #> abuswap_c            .     1      1   1    1       .       1       1       1 #> r00_samp             .     .      1   1    1       .       .       .       . #> c0_samp              .     .      1   1    1       .       1       .       1 #> r0_samp              .     .      1   1    1       1       .       1       . #> r00_ind              .     .      .   1    .       .       .       .       . #> c0_ind               .     .      .   1    .       .       1       .       . #> r0_ind               .     .      .   1    .       1       .       .       . #> r00_both             .     .      .   1    1       .       .       .       . #> c0_both              .     .      .   1    1       .       1       .       1 #> r0_both              .     .      .   1    1       1       .       1       ."},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Contribution Diversity Approach — contribdiv","title":"Contribution Diversity Approach — contribdiv","text":"contribution diversity approach based differentiation within-unit among-unit diversity using additive diversity partitioning unit distinctiveness.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contribution Diversity Approach — contribdiv","text":"","code":"contribdiv(comm, index = c(\"richness\", \"simpson\"),      relative = FALSE, scaled = TRUE, drop.zero = FALSE) # S3 method for contribdiv plot(x, sub, xlab, ylab, ylim, col, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contribution Diversity Approach — contribdiv","text":"comm community data matrix samples rows species column. index Character, diversity index calculated. relative Logical, TRUE contribution diversity     values expressed signed deviation mean. See details. scaled Logical, TRUE relative contribution diversity     values scaled sum gamma values (index = \"richness\")     sum gamma values times number rows comm     (index = \"simpson\"). See details. drop.zero Logical, empty rows dropped result?     empty rows dropped, corresponding results NAs. x object class \"contribdiv\". sub, xlab, ylab, ylim, col Graphical arguments passed plot. ... arguments passed plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Contribution Diversity Approach — contribdiv","text":"approach proposed Lu et al. (2007). Additive diversity partitioning (see adipart references) deals relation mean alpha total (gamma) diversity. Although alpha diversity values often vary considerably. Thus, contributions sites total diversity uneven. site specific contribution measured contribution diversity components. unit e.g. many unique species contribute higher level (gamma) diversity another unit number species, common. Distinctiveness species \\(j\\) can defined number sites occurs (\\(n_j\\)), sum relative frequencies (\\(p_j\\)). Relative frequencies computed sitewise \\(sum_j{p_ij}\\)s site \\(\\) sum \\(1\\). contribution site \\(\\) total diversity given \\(alpha_i = sum_j(1 / n_ij)\\) dealing richness \\(alpha_i = sum(p_{ij} * (1 - p_{ij}))\\) Simpson index. unit distinctiveness site \\(\\) average species distinctiveness, averaging species occur site \\(\\). species richness: \\(alpha_i = mean(n_i)\\) (paper, second equation contains typo, \\(n\\) without index). Simpson index: \\(alpha_i = mean(n_i)\\). Lu et al. (2007) gives -depth description different indices.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Contribution Diversity Approach — contribdiv","text":"object class \"contribdiv\" inheriting data frame. Returned values alpha, beta gamma components sites (rows) community matrix. \"diff.coef\" attribute gives differentiation coefficient (see Examples).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Contribution Diversity Approach — contribdiv","text":"Lu, H. P., Wagner, H. H. Chen, X. Y. 2007. contribution diversity approach evaluate species diversity. Basic Applied Ecology, 8, 1--12.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Contribution Diversity Approach — contribdiv","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Contribution Diversity Approach — contribdiv","text":"","code":"## Artificial example given in ## Table 2 in Lu et al. 2007 x <- matrix(c( 1/3,1/3,1/3,0,0,0, 0,0,1/3,1/3,1/3,0, 0,0,0,1/3,1/3,1/3), 3, 6, byrow = TRUE, dimnames = list(LETTERS[1:3],letters[1:6])) x #>           a         b         c         d         e         f #> A 0.3333333 0.3333333 0.3333333 0.0000000 0.0000000 0.0000000 #> B 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 0.0000000 #> C 0.0000000 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 ## Compare results with Table 2 contribdiv(x, \"richness\") #>   alpha beta gamma #> A     1  1.5   2.5 #> B     1  0.5   1.5 #> C     1  1.0   2.0 contribdiv(x, \"simpson\") #>       alpha      beta     gamma #> A 0.6666667 0.1851852 0.8518519 #> B 0.6666667 0.1111111 0.7777778 #> C 0.6666667 0.1481481 0.8148148 ## Relative contribution (C values), compare with Table 2 (cd1 <- contribdiv(x, \"richness\", relative = TRUE, scaled = FALSE)) #>   alpha beta gamma #> A     0  0.5   0.5 #> B     0 -0.5  -0.5 #> C     0  0.0   0.0 (cd2 <- contribdiv(x, \"simpson\", relative = TRUE, scaled = FALSE)) #>   alpha        beta       gamma #> A     0  0.03703704  0.03703704 #> B     0 -0.03703704 -0.03703704 #> C     0  0.00000000  0.00000000 ## Differentiation coefficients attr(cd1, \"diff.coef\") # D_ST #> [1] 0.5 attr(cd2, \"diff.coef\") # D_DT #> [1] 0.1818182 ## BCI data set data(BCI) opar <- par(mfrow=c(2,2)) plot(contribdiv(BCI, \"richness\"), main = \"Absolute\") plot(contribdiv(BCI, \"richness\", relative = TRUE), main = \"Relative\") plot(contribdiv(BCI, \"simpson\")) plot(contribdiv(BCI, \"simpson\", relative = TRUE))  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":null,"dir":"Reference","previous_headings":"","what":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Performs detrended correspondence analysis basic reciprocal   averaging orthogonal correspondence analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"","code":"decorana(veg, iweigh=0, iresc=4, ira=0, mk=26, short=0,          before=NULL, after=NULL)  # S3 method for decorana plot(x, choices=c(1,2), origin=TRUE,      display=c(\"both\",\"sites\",\"species\",\"none\"),      cex = 0.8, cols = c(1,2), type, xlim, ylim, ...)  # S3 method for decorana text(x, display = c(\"sites\", \"species\"), labels,      choices = 1:2, origin = TRUE, select,  ...)  # S3 method for decorana points(x, display = c(\"sites\", \"species\"),        choices=1:2, origin = TRUE, select, ...)  # S3 method for decorana summary(object, digits=3, origin=TRUE,         display=c(\"both\", \"species\",\"sites\",\"none\"), ...)  # S3 method for summary.decorana print(x, head = NA, tail = head, ...)  downweight(veg, fraction = 5)  # S3 method for decorana scores(x, display=\"sites\", choices=1:4,        origin=TRUE, tidy=FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"veg Community data, matrix-like object. iweigh Downweighting rare species (0: ). iresc Number rescaling cycles (0: rescaling). ira Type analysis (0: detrended, 1: basic reciprocal averaging). mk Number segments rescaling. short Shortest gradient rescaled. Hill's piecewise transformation: values transformation. Hill's piecewise transformation: values   transformation -- must correspond values . x, object decorana result object. choices Axes shown. origin Use true origin even detrended correspondence analysis. display Display sites, species, neither. cex Plot character size. cols Colours used sites species. type Type plots, partial match \"text\",     \"points\" \"none\". labels Optional text used instead row names. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. xlim, ylim x y limits (min,max) plot. digits Number digits summary output. head, tail Number rows printed head tail     species site scores. Default NA prints . fraction Abundance fraction downweighting begins. tidy Return scores compatible ggplot2:     scores single data.frame, score type     identified factor variable score (\"sites\",     \"species\"), names variable label. scores     incompatible conventional plot functions, can     used ggplot2. ... arguments plot function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"late 1970s, correspondence analysis became method choice   ordination vegetation science, since seemed better able cope    non-linear species responses principal components   analysis. However, even correspondence analysis can produce arc-shaped   configuration single gradient. Mark Hill developed detrended   correspondence analysis correct two assumed ‘faults’    correspondence analysis: curvature straight gradients packing   sites ends gradient. curvature removed replacing orthogonalization axes   detrending.  orthogonalization successive axes made   non-correlated, detrending remove systematic dependence   axes.  Detrending performed using smoothing window   mk segments.  packing sites ends gradient   undone rescaling axes extraction.  rescaling,   axis supposed scaled ‘SD’ units,   average width Gaussian species responses supposed one   whole axis. innovations piecewise linear transformation   species abundances downweighting rare species   regarded unduly high influence ordination axes. seems detrending actually works twisting ordination   space, results look non-curved two-dimensional   projections (‘lolly paper effect’).  result, points   usually easily recognized triangular diamond shaped   pattern, obviously artefact detrending.  Rescaling works   differently commonly presented, . decorana   use, even evaluate, widths species responses.  Instead,   tries equalize weighted standard deviation species scores   axis segments (parameter mk effect, since   decorana finds segments internally). Function   tolerance returns internal criterion can   used assess success rescaling. summary method prints ordination scores,   possible prior weights used downweighting, marginal totals   applying weights. plot method plots   species site scores.  Classical decorana scaled axes   smallest site score 0 (smallest species score   negative), summary, plot   scores use true origin, unless origin = FALSE. addition proper eigenvalues, function reports   ‘decorana values’ detrended analysis. ‘decorana   values’ values legacy code decorana returns   eigenvalues. estimated iteration, describe   joint effects axes detrending. ‘decorana values’   estimated rescaling show effect   eigenvalues. proper eigenvalues estimated extraction   axes ratio weighted sum squares site   species scores even detrended rescaled solutions.   eigenvalues estimated axis separately,   additive, higher decorana axes can show effects already   explained prior axes. ‘Additive eigenvalues’ cleansed   effects prior axes, can assumed add   total inertia (scaled Chi-square). proportions cumulative   proportions explained can use eigenvals.decorana.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"decorana returns object class \"decorana\",   print, summary, scores, plot,  points text methods, support functions  eigenvals, bstick, screeplot,  predict tolerance. downweight   independent function can also used methods  decorana.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Hill, M.O. Gauch, H.G. (1980). Detrended correspondence analysis:   improved ordination technique. Vegetatio 42,   47--58. Oksanen, J. Minchin, P.R. (1997). Instability ordination   results changes input data order: explanations   remedies. Journal Vegetation Science 8, 447--454.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Mark O. Hill wrote original Fortran code, R port   Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"decorana uses central numerical engine   original Fortran code (public domain), 1/3   original program.  tried implement original   behaviour, although great part preparatory steps written   R language, may differ somewhat original code. However,   well-known bugs corrected strict criteria used (Oksanen &   Minchin 1997). Please note really need piecewise transformation   even downweighting within decorana, since   powerful extensive alternatives R, options   included compliance original software.  different   fraction abundance needed downweighting, function   downweight must applied decorana.  Function   downweight indeed can applied prior correspondence   analysis, can used together cca, . Github package natto R implementation   decorana allows easier inspection   algorithm also easier development function.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"","code":"data(varespec) vare.dca <- decorana(varespec) vare.dca #>  #> Call: #> decorana(veg = varespec)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.0832  #>  #>                        DCA1   DCA2    DCA3    DCA4 #> Eigenvalues          0.5235 0.3253 0.20010 0.19176 #> Additive Eigenvalues 0.5235 0.3217 0.17919 0.11922 #> Decorana values      0.5249 0.1572 0.09669 0.06075 #> Axis lengths         2.8161 2.2054 1.54650 1.64864 #>  summary(vare.dca) #>  #> Call: #> decorana(veg = varespec)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.0832  #>  #>                        DCA1   DCA2    DCA3    DCA4 #> Eigenvalues          0.5235 0.3253 0.20010 0.19176 #> Additive Eigenvalues 0.5235 0.3217 0.17919 0.11922 #> Decorana values      0.5249 0.1572 0.09669 0.06075 #> Axis lengths         2.8161 2.2054 1.54650 1.64864 #>  #> Species scores: #>  #>              DCA1     DCA2     DCA3     DCA4 Totals #> Callvulg  0.04119 -1.53268 -2.55101  1.32277  45.07 #> Empenigr  0.09019  0.82274  0.20569  0.30631 151.99 #> Rhodtome  1.34533  2.47141 -0.34970 -1.13823   8.39 #> Vaccmyrt  1.86298  1.71424 -0.60535 -0.40205  50.71 #> Vaccviti  0.16641  0.71095  0.00313 -0.55801 275.03 #> Pinusylv -0.73490  1.62050 -1.60275 -2.10199   4.11 #> Descflex  1.97061  1.81651  1.74896 -0.91463   5.60 #> Betupube  0.79745  3.36374 -0.94546 -1.01741   0.29 #> Vacculig -0.08912 -1.17478  2.86624  0.87025  15.22 #> Diphcomp -0.82669 -0.44195  2.58579 -0.38459   3.24 #> Dicrsp    2.37743 -0.27373 -0.47099 -1.89036  40.50 #> Dicrfusc  1.58267 -1.33770 -1.33563  1.47417 113.52 #> Dicrpoly  0.86689  2.39519 -0.82064 -3.41534   6.06 #> Hylosple  2.66242  1.19669  1.48288 -0.69978  18.04 #> Pleuschr  1.64098  0.15607  0.30044 -0.26717 377.97 #> Polypili -0.56213  0.14009  0.25198  0.49177   0.61 #> Polyjuni  1.22244 -0.89173  0.61287  3.60066  13.85 #> Polycomm  1.01545  2.08388  0.06402  0.84199   0.71 #> Pohlnuta -0.00712  1.09704 -0.82126 -1.59862   2.62 #> Ptilcili  0.48093  2.86420 -0.71801 -1.02698  14.01 #> Barbhatc  0.58303  3.71792 -0.84212 -1.88837   3.19 #> Cladarbu -0.18554 -1.18973  0.68113  0.55399 255.05 #> Cladrang -0.83427 -0.78085  0.90603  0.70057 388.71 #> Cladstel -1.67768  0.98907 -0.83789 -0.60206 486.71 #> Cladunci  0.97686 -1.70859 -1.68281 -2.26756  56.28 #> Cladcocc -0.27221 -0.76713 -0.63836  0.66927   2.79 #> Cladcorn  0.29068 -0.97039  0.50414  0.95738   6.22 #> Cladgrac  0.21778 -0.41879  0.06530 -0.31472   5.14 #> Cladfimb  0.00889 -0.23922 -0.26505  0.33123   3.96 #> Cladcris  0.37774 -1.09161 -0.55627  0.23868   7.47 #> Cladchlo -0.91983  1.54955 -0.58109 -1.48643   1.16 #> Cladbotr  0.66438  2.19584 -0.90331 -0.91391   0.47 #> Cladamau -0.96418 -0.98992  2.71458  0.52352   0.14 #> Cladsp   -1.12318 -0.15330 -0.69833  0.44040   0.52 #> Cetreric  0.27163 -1.28867 -0.81682 -1.93935   3.60 #> Cetrisla -0.50158  2.22098 -1.16461 -1.89349   2.03 #> Flavniva -1.67937 -3.67985  4.15644  3.18919  11.85 #> Nepharct  2.18561 -0.82837  0.71958  5.81930   5.26 #> Stersp   -0.78699 -2.01214  2.31212  2.03946  17.52 #> Peltapht  0.45763 -0.34395  0.09916  1.34695   0.76 #> Icmaeric  0.04950 -1.97605  1.41509  2.10154   0.22 #> Cladcerv -1.21585 -2.30519  2.55186  3.41532   0.10 #> Claddefo  0.60517 -1.19771 -0.33388  0.22585  10.23 #> Cladphyl -1.53959  1.48574 -1.43209 -1.52387   0.80 #>  #> Site scores: #>  #>       DCA1    DCA2    DCA3    DCA4 Totals #> 18 -0.1729 -0.2841  0.4775  0.2521   89.2 #> 15  0.8539 -0.3360  0.0708  0.0924   89.8 #> 24  1.2467 -0.1183 -0.1211 -0.8718   94.2 #> 27  1.0675  0.4169  0.2897 -0.1758  125.6 #> 23  0.4234  0.0112  0.2179  0.1265   90.5 #> 19  0.0252  0.3600 -0.0263 -0.1168   81.3 #> 22  1.0695 -0.3707 -0.4285  0.4145  109.8 #> 16  0.7724 -0.5325 -0.2856  0.5269   88.5 #> 28  1.6189  0.5482  0.2342 -0.3333  110.7 #> 13 -0.2642 -0.6851 -0.3777  0.5003  101.9 #> 14  0.6431 -0.9604 -0.6000 -0.2885   81.7 #> 20  0.4504 -0.1666  0.1850 -0.1291   64.1 #> 25  1.2501 -0.2248  0.0244  0.3741   94.1 #> 7  -0.3910 -0.7618  0.8640  0.5557  103.4 #> 5  -0.6407 -0.9427  0.9465  0.7769   94.8 #> 6  -0.4523 -0.5529  0.3988  0.2781  110.9 #> 3  -1.1043  0.2106 -0.0653 -0.0539  106.7 #> 4  -0.9454 -0.5974  0.4639  0.4889   84.8 #> 2  -1.1971  0.5691 -0.3246 -0.2522  119.1 #> 9  -1.0983  0.7850 -0.5274 -0.4848  122.6 #> 12 -0.8673  0.5621 -0.3254 -0.3217  119.8 #> 10 -1.1842  0.7442 -0.4995 -0.3917  122.4 #> 11 -0.4134  0.0260  0.0107 -0.0682  112.8 #> 21  0.3210  1.2450 -0.2541 -0.5253   99.2 #>  plot(vare.dca)   ### the detrending rationale: gaussresp <- function(x,u) exp(-(x-u)^2/2) x <- seq(0,6,length=15) ## The gradient u <- seq(-2,8,len=23)   ## The optima pack <- outer(x,u,gaussresp) matplot(x, pack, type=\"l\", main=\"Species packing\")  opar <- par(mfrow=c(2,2)) plot(scores(prcomp(pack)), asp=1, type=\"b\", main=\"PCA\") plot(scores(decorana(pack, ira=1)), asp=1, type=\"b\", main=\"CA\") plot(scores(decorana(pack)), asp=1, type=\"b\", main=\"DCA\") plot(scores(cca(pack ~ x), dis=\"sites\"), asp=1, type=\"b\", main=\"CCA\")   ### Let's add some noise: noisy <- (0.5 + runif(length(pack)))*pack par(mfrow=c(2,1)) matplot(x, pack, type=\"l\", main=\"Ideal model\") matplot(x, noisy, type=\"l\", main=\"Noisy model\")  par(mfrow=c(2,2)) plot(scores(prcomp(noisy)), type=\"b\", main=\"PCA\", asp=1) plot(scores(decorana(noisy, ira=1)), type=\"b\", main=\"CA\", asp=1) plot(scores(decorana(noisy)), type=\"b\", main=\"DCA\", asp=1) plot(scores(cca(noisy ~ x), dis=\"sites\"), asp=1, type=\"b\", main=\"CCA\")  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardization Methods for Community Ecology — decostand","title":"Standardization Methods for Community Ecology — decostand","text":"function provides popular (effective) standardization methods community ecologists.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardization Methods for Community Ecology — decostand","text":"","code":"decostand(x, method, MARGIN, range.global, logbase = 2, na.rm=FALSE, ...) wisconsin(x) decobackstand(x, zap = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardization Methods for Community Ecology — decostand","text":"x Community data, matrix-like object.     decobackstand standardized data. method Standardization method. See Details available options. MARGIN Margin, default acceptable. 1 = rows,     2 = columns x. range.global Matrix range found     method = \"range\".  allows using ranges across     subsets data.  dimensions MARGIN must match     x. logbase logarithm base used method = \"log\". na.rm Ignore missing values row column standardizations. zap Make near-zero values exact zeros avoid negative     values exaggerated estimates species richness. ... arguments function (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardization Methods for Community Ecology — decostand","text":"function offers following standardization methods community   data: total: divide margin total (default MARGIN = 1). max: divide margin maximum (default MARGIN = 2). frequency: divide margin total multiply     number non-zero items, average non-zero entries     one (Oksanen 1983; default MARGIN = 2). normalize: make margin sum squares equal one (default     MARGIN = 1). range: standardize values range 0 ... 1 (default     MARGIN = 2).  values constant,     transformed 0. rank, rrank: rank replaces abundance values     increasing ranks leaving zeros unchanged, rrank     similar uses relative ranks maximum 1 (default     MARGIN = 1). Average ranks used tied values. standardize: scale x zero mean unit variance     (default MARGIN = 2). pa: scale x presence/absence scale (0/1). chi.square: divide row sums square root     column sums, adjust square root matrix total     (Legendre & Gallagher 2001). used Euclidean     distance, distances similar     Chi-square distance used correspondence analysis. However,     results cmdscale still differ, since     CA weighted ordination method (default MARGIN = 1). hellinger: square root method = \"total\"     (Legendre & Gallagher 2001). log: logarithmic transformation suggested      Anderson et al. (2006): \\(\\log_b (x) + 1\\)      \\(x > 0\\), \\(b\\) base logarithm; zeros      left zeros. Higher bases give less weight quantities      presences, logbase = Inf gives presence/absence      scaling. Please note \\(\\log(x+1)\\).      Anderson et al. (2006) suggested (strongly) modified      Gower distance (implemented method = \"altGower\"       vegdist), standardization can used       independently distance indices. alr: Additive log ratio (\"alr\") transformation      (Aitchison 1986) reduces data skewness compositionality      bias. transformation assumes positive values, pseudocounts can      added argument pseudocount. One      rows/columns reference can given reference      (name index). first row/column used default      (reference = 1).  Note transformation drops one      row column transformed output data. alr      transformation defined formally follows:      $$alr = [log\\frac{x_1}{x_D}, ..., log\\frac{x_{D-1}}{x_D}]$$      denominator sample \\(x_D\\) can chosen      arbitrarily. transformation often used pH      chemistry measurenments. also commonly used multinomial      logistic regression. Default MARGIN = 1 uses row      reference. clr: centered log ratio (\"clr\") transformation proposed      Aitchison (1986) used reduce data skewness compositionality bias.      transformation frequent applications microbial ecology      (see e.g. Gloor et al., 2017). clr transformation defined :      $$clr = log\\frac{x}{g(x)} = log x - log g(x)$$           \\(x\\) single value, g(x) geometric mean      \\(x\\).      method can operate positive data;      common way deal zeroes add pseudocount      (e.g. smallest positive value data), either      adding manually input data, using argument      pseudocount      decostand(x, method = \"clr\", pseudocount = 1). Adding      pseudocount inevitably introduce bias; see      rclr method one available solution. rclr: robust clr (\"rclr\") similar regular clr      (see ) allows data contains zeroes. method      use pseudocounts, unlike standard clr.      robust clr (rclr) divides values geometric mean      observed features; zero values kept zeroes,      taken account. high dimensional data,      geometric mean rclr approximates true      geometric mean; see e.g. Martino et al. (2019)      rclr transformation defined formally follows:      $$rclr = log\\frac{x}{g(x > 0)}$$      \\(x\\) single value, \\(g(x > 0)\\) geometric       mean sample-wide values \\(x\\) positive (> 0). Standardization, contrasted transformation, means   entries transformed relative entries. methods default margin. MARGIN=1 means rows (sites   normal data set) MARGIN=2 means columns (species   normal data set). Command wisconsin shortcut common Wisconsin double   standardization species (MARGIN=2) first standardized   maxima (max) sites (MARGIN=1)   site totals (tot). standardization methods give nonsense results   negative data entries normally occur community   data. empty sites species (constant   method =  \"range\"), many standardization change   NaN. Function decobackstand can used transform standardized   data back original. possible standardization   may implemented cases   possible. round-errors back-transformation   exact, wise overwrite original data.   zap=TRUE original zeros exact.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardization Methods for Community Ecology — decostand","text":"Returns standardized data frame, adds attribute  \"decostand\" giving name applied standardization  \"method\" attribute \"parameters\" appropriate   transformation parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Standardization Methods for Community Ecology — decostand","text":"Jari Oksanen, Etienne Laliberté   (method = \"log\"), Leo Lahti (alr,    \"clr\" \"rclr\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Standardization Methods for Community Ecology — decostand","text":"Common transformations can made standard R functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Standardization Methods for Community Ecology — decostand","text":"Aitchison, J. Statistical Analysis Compositional Data (1986).   London, UK: Chapman & Hall. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters    9, 683--693. Egozcue, J.J., Pawlowsky-Glahn, V., Mateu-Figueras, G.,   Barcel'o-Vidal, C. (2003) Isometric logratio transformations   compositional data analysis. Mathematical Geology   35, 279--300. Gloor, G.B., Macklaim, J.M., Pawlowsky-Glahn, V. & Egozcue, J.J. (2017)   Microbiome Datasets Compositional: Optional.   Frontiers Microbiology 8, 2224. Legendre, P. & Gallagher, E.D. (2001) Ecologically meaningful   transformations ordination species data. Oecologia   129, 271--280. Martino, C., Morton, J.T., Marotz, C.., Thompson, L.R., Tripathi, .,   Knight, R. & Zengler, K. (2019) novel sparse compositional technique   reveals microbial perturbations.   mSystems 4, 1. Oksanen, J. (1983) Ordination boreal heath-like vegetation   principal component analysis, correspondence analysis   multidimensional scaling. Vegetatio 52, 181--189.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardization Methods for Community Ecology — decostand","text":"","code":"data(varespec) sptrans <- decostand(varespec, \"max\") apply(sptrans, 2, max) #> Callvulg Empenigr Rhodtome Vaccmyrt Vaccviti Pinusylv Descflex Betupube  #>        1        1        1        1        1        1        1        1  #> Vacculig Diphcomp   Dicrsp Dicrfusc Dicrpoly Hylosple Pleuschr Polypili  #>        1        1        1        1        1        1        1        1  #> Polyjuni Polycomm Pohlnuta Ptilcili Barbhatc Cladarbu Cladrang Cladstel  #>        1        1        1        1        1        1        1        1  #> Cladunci Cladcocc Cladcorn Cladgrac Cladfimb Cladcris Cladchlo Cladbotr  #>        1        1        1        1        1        1        1        1  #> Cladamau   Cladsp Cetreric Cetrisla Flavniva Nepharct   Stersp Peltapht  #>        1        1        1        1        1        1        1        1  #> Icmaeric Cladcerv Claddefo Cladphyl  #>        1        1        1        1  sptrans <- wisconsin(varespec)  # CLR transformation for rows, with pseudocount varespec.clr <- decostand(varespec, \"clr\", pseudocount=1)  # ALR transformation for rows, with pseudocount and reference sample varespec.alr <- decostand(varespec, \"alr\", pseudocount=1, reference=1)  ## Chi-square: PCA similar but not identical to CA. ## Use wcmdscale for weighted analysis and identical results. sptrans <- decostand(varespec, \"chi.square\") plot(procrustes(rda(sptrans), cca(varespec)))"},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Design your own Dissimilarities — designdist","title":"Design your own Dissimilarities — designdist","text":"Function designdist lets define dissimilarities   using terms shared total quantities, number rows number   columns. shared total quantities can binary, quadratic   minimum terms. binary terms, shared component number   shared species, totals numbers species sites.   quadratic terms cross-products sums squares, minimum   terms sums parallel minima row totals. Function   chaodist lets define dissimilarities using terms   supposed take account “unseen species”   (see Chao et al., 2005 Details vegdist).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Design your own Dissimilarities — designdist","text":"","code":"designdist(x, method = \"(A+B-2*J)/(A+B)\",            terms = c(\"binary\", \"quadratic\", \"minimum\"),             abcd = FALSE, alphagamma = FALSE, name, maxdist) chaodist(x, method = \"1 - 2*U*V/(U+V)\", name)"},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Design your own Dissimilarities — designdist","text":"x Input data. method Equation dissimilarities. can use terms     J shared quantity, B totals,     N number rows (sites) P     number columns (species) chaodist can use terms     U V. equation can also contain R     functions accepts vector arguments returns vectors     length. terms shared total components found. vectors     x y  \"quadratic\" terms J = sum(x*y),     = sum(x^2), B = sum(y^2), \"minimum\" terms     J = sum(pmin(x,y)), = sum(x) B = sum(y),      \"binary\" terms either transforming     data binary form (shared number species, number     species row). abcd Use 2x2 contingency table notation binary data:     \\(\\) number shared species, \\(b\\) \\(c\\)     numbers species occurring one sites ,     \\(d\\) number species occur neither sites. alphagamma Use beta diversity notation terms     alpha average alpha diversity compared sites,     gamma diversity pooled sites, delta     absolute value difference average alpha alpha     diversities compared sites. Terms     B refer alpha diversities compared sites. name name want use index. default     combine method equation terms argument. maxdist Theoretical maximum dissimilarity, NA     index open absolute maximum. necessary     argument, used vegan functions,     certain maximum, better supply value.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Design your own Dissimilarities — designdist","text":"popular dissimilarity measures ecology can expressed   help terms J, B, also involve   matrix dimensions N P. examples can define   designdist : function designdist can implement dissimilarity   indices vegdist elsewhere, can also   used implement many indices, amongst ,   described Legendre & Legendre (2012). can also used   implement indices beta diversity described Koleff et   al. (2003), also specific function   betadiver purpose. want implement binary dissimilarities based 2x2   contingency table notation, can set abcd = TRUE.   notation = J, b = -J, c = B-J, d = P--B+J.    notation often used instead   tangible default notation reasons opaque . alphagamma = TRUE possible use beta diversity   notation terms alpha average alpha diversity   gamma gamma diversity two compared sites. terms   calculated alpha = (+B)/2, gamma = +B-J   delta = abs(-B)/2.  Terms B also   available give alpha diversities individual compared   sites.  beta diversity terms may make sense binary   terms (diversities expressed numbers species),   calculated quadratic minimum terms well (  warning). Function chaodist similar designgist, uses   terms U V Chao et al. (2005). terms   supposed take account effects unseen species.   U V scaled range \\(0 \\dots 1\\). take   place B product U*V used   place J designdist.  Function   chaodist can implement commonly used Chao et al. (2005)   style dissimilarity: Function vegdist implements Jaccard-type Chao distance,   documentation contains complete discussion   calculation terms.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Design your own Dissimilarities — designdist","text":"designdist returns object class dist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Design your own Dissimilarities — designdist","text":"Chao, ., Chazdon, R. L., Colwell, R. K. Shen, T. (2005) new   statistical approach assessing similarity species composition   incidence abundance data. Ecology Letters 8,   148--159. Koleff, P., Gaston, K.J. Lennon, J.J. (2003) Measuring beta   diversity presence--absence data. J. Animal Ecol.   72, 367--382. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd   English ed. Elsevier","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Design your own Dissimilarities — designdist","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Design your own Dissimilarities — designdist","text":"designdist use compiled code, based   vectorized R code. designdist function can much   faster vegdist, although latter uses compiled   code. However, designdist skip missing values uses   much memory calculations. use sum terms can numerically unstable. particularly,   terms large, precision may lost. risk   large number columns high, particularly large   quadratic terms. precise calculations better use   functions like dist vegdist   robust numerical problems.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Design your own Dissimilarities — designdist","text":"","code":"data(BCI) ## Four ways of calculating the same Sørensen dissimilarity d0 <- vegdist(BCI, \"bray\", binary = TRUE) d1 <- designdist(BCI, \"(A+B-2*J)/(A+B)\") d2 <- designdist(BCI, \"(b+c)/(2*a+b+c)\", abcd = TRUE) d3 <- designdist(BCI, \"gamma/alpha - 1\", alphagamma = TRUE) ## Arrhenius dissimilarity: the value of z in the species-area model ## S = c*A^z when combining two sites of equal areas, where S is the ## number of species, A is the area, and c and z are model parameters. ## The A below is not the area (which cancels out), but number of ## species in one of the sites, as defined in designdist(). dis <- designdist(BCI, \"(log(A+B-J)-log(A+B)+log(2))/log(2)\") ## This can be used in clustering or ordination... ordiplot(cmdscale(dis)) #> species scores not available  ## ... or in analysing beta diversity (without gradients) summary(dis) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2733  0.3895  0.4192  0.4213  0.4537  0.5906"},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions extract statistics resemble deviance AIC   result constrained correspondence analysis cca   redundancy analysis rda.  functions rarely   needed directly, called step   automatic model building.  Actually, cca   rda AIC functions   certainly wrong.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"","code":"# S3 method for cca deviance(object, ...)  # S3 method for cca extractAIC(fit, scale = 0, k = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"object result constrained ordination     (cca rda). fit fitted model constrained ordination. scale optional numeric specifying scale parameter model,     see scale step. k numeric specifying \"weight\" equivalent degrees     freedom (=:edf) part AIC formula. ... arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions find statistics   resemble deviance AIC constrained   ordination.  Actually, constrained ordination methods   log-Likelihood, means AIC deviance.   Therefore use functions, use ,   trust .  use functions, remains   responsibility check adequacy result. deviance cca equal Chi-square   residual data matrix fitting constraints.  deviance    rda defined residual sum squares.   deviance function rda also used   capscale. Function extractAIC mimics   extractAIC.lm translating deviance AIC. little need call functions directly.  However,   called implicitly step function used automatic   selection constraining variables.  check resulting   model criteria, statistics used   unfounded. particular, penalty k properly   defined, default k = 2 justified   theoretically. continuous covariates, step   function base model building magnitude eigenvalues,   value k influences stopping point (  variables highest eigenvalues necessarily   significant permutation tests anova.cca).   also multi-class factors, value k   capricious effect model building. step function   pass arguments add1.cca   drop1.cca, setting test = \"permutation\"   provide permutation tests deletion addition   can help judging validity model building.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"deviance functions return “deviance”,  extractAIC returns effective degrees freedom “AIC”.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"Godínez-Domínguez, E. & Freire, J. (2003)   Information-theoretic approach selection spatial temporal   models community organization. Marine Ecology Progress     Series 253, 17--24.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"Jari  Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions unfounded untested used   directly implicitly.  Moreover, usual caveats using    step valid.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"","code":"# The deviance of correspondence analysis equals Chi-square data(dune) data(dune.env) chisq.test(dune) #> Warning: Chi-squared approximation may be incorrect #>  #> \tPearson's Chi-squared test #>  #> data:  dune #> X-squared = 1449, df = 551, p-value < 2.2e-16 #>  deviance(cca(dune)) #> [1] 1448.956 # Stepwise selection (forward from an empty model \"dune ~ 1\") ord <- cca(dune ~ ., dune.env) step(cca(dune ~ 1, dune.env), scope = formula(ord)) #> Start:  AIC=87.66 #> dune ~ 1 #>  #>              Df    AIC #> + Moisture    3 86.608 #> + Management  3 86.935 #> + A1          1 87.411 #>           87.657 #> + Manure      4 88.832 #> + Use         2 89.134 #>  #> Step:  AIC=86.61 #> dune ~ Moisture #>  #>              Df    AIC #>           86.608 #> + Management  3 86.813 #> + A1          1 86.992 #> + Use         2 87.259 #> + Manure      4 87.342 #> - Moisture    3 87.657 #> Call: cca(formula = dune ~ Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    0.6283     0.2970    3 #> Unconstrained  1.4870     0.7030   16 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3  #> 0.4187 0.1330 0.0766  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11  #> 0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419  #>   CA12   CA13   CA14   CA15   CA16  #> 0.0201 0.0143 0.0099 0.0085 0.0080  #>"},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":null,"dir":"Reference","previous_headings":"","what":"Morisita index of intraspecific aggregation — dispindmorisita","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Calculates Morisita index dispersion, standardized index values, called clumpedness uniform indices.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"","code":"dispindmorisita(x, unique.rm = FALSE, crit = 0.05, na.rm = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"x community data matrix, sites (samples) rows     species columns. unique.rm logical, TRUE, unique species (occurring     one sample) removed result. crit two-sided p-value used calculate critical     Chi-squared values. na.rm logical.     missing values (including NaN) omitted     calculations?","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Morisita index dispersion defined (Morisita 1959, 1962): Imor = n * (sum(xi^2) - sum(xi)) / (sum(xi)^2 - sum(xi)) \\(xi\\) count individuals sample \\(\\), \\(n\\) number samples (\\(= 1, 2, \\ldots, n\\)). \\(Imor\\) values 0 \\(n\\). uniform (hyperdispersed) patterns value falls 0 1, clumped patterns falls 1 \\(n\\). increasing sample sizes (.e. joining neighbouring quadrats), \\(Imor\\) goes \\(n\\) quadrat size approaches clump size. random patterns, \\(Imor = 1\\) counts samples follow Poisson frequency distribution. deviation random expectation (null hypothesis) can tested using critical values Chi-squared distribution \\(n-1\\) degrees freedom. Confidence intervals around 1 can calculated clumped \\(Mclu\\) uniform \\(Muni\\) indices (Hairston et al. 1971, Krebs 1999) (Chi2Lower Chi2Upper refers e.g. 0.025 0.975 quantile values Chi-squared distribution \\(n-1\\) degrees freedom, respectively, crit = 0.05): Mclu = (Chi2Lower - n + sum(xi)) / (sum(xi) - 1) Muni = (Chi2Upper - n + sum(xi)) / (sum(xi) - 1) Smith-Gill (1975) proposed scaling Morisita index [0, n] interval [-1, 1], setting -0.5 0.5 values confidence limits around random distribution rescaled value 0. rescale Morisita index, one following four equations apply calculate standardized index \\(Imst\\): () Imor >= Mclu > 1: Imst = 0.5 + 0.5 (Imor - Mclu) / (n - Mclu), (b) Mclu > Imor >= 1: Imst = 0.5 (Imor - 1) / (Mclu - 1), (c) 1 > Imor > Muni: Imst = -0.5 (Imor - 1) / (Muni - 1), (d) 1 > Muni > Imor: Imst = -0.5 + 0.5 (Imor - Muni) / Muni.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Returns data frame many rows number columns input data, four columns. Columns : imor unstandardized Morisita index, mclu clumpedness index, muni uniform index, imst standardized Morisita index, pchisq Chi-squared based probability null hypothesis random expectation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Morisita, M. 1959. Measuring dispersion individuals analysis distributional patterns.  Mem. Fac. Sci. Kyushu Univ. Ser. E 2, 215--235. Morisita, M. 1962. Id-index, measure dispersion individuals. Res. Popul. Ecol. 4, 1--7. Smith-Gill, S. J. 1975. Cytophysiological basis disruptive pigmentary patterns leopard frog, Rana pipiens. II.  Wild type mutant cell specific patterns. J. Morphol. 146, 35--54. Hairston, N. G., Hill, R. Ritte, U. 1971. interpretation aggregation patterns. : Patil, G. P., Pileou, E. C. Waters, W. E. eds. Statistical Ecology 1: Spatial Patterns Statistical Distributions. Penn. State Univ. Press, University Park. Krebs, C. J. 1999. Ecological Methodology. 2nd ed. Benjamin Cummings Publishers.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"common error found several papers standardizing case (b), denominator given Muni - 1. results hiatus [0, 0.5] interval standardized index. root typo book Krebs (1999), see Errata book (Page 217, https://www.zoology.ubc.ca/~krebs/downloads/errors_2nd_printing.pdf).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"","code":"data(dune) x <- dispindmorisita(dune) x #>                imor      mclu         muni        imst       pchisq #> Achimill  2.1666667  1.923488  0.327101099  0.50672636 9.157890e-03 #> Agrostol  1.8085106  1.294730  0.785245032  0.51373357 1.142619e-05 #> Airaprae  8.0000000  4.463082 -1.523370880  0.61382303 3.571702e-04 #> Alopgeni  2.5396825  1.395781  0.711614757  0.53074307 3.024441e-08 #> Anthodor  2.6666667  1.692616  0.495325824  0.52660266 5.897217e-05 #> Bellpere  2.0512821  2.154361  0.158876373  0.45535255 3.451547e-02 #> Bromhord  3.2380952  1.989452  0.279036892  0.53466422 1.170437e-04 #> Chenalbu        NaN       Inf         -Inf         NaN          NaN #> Cirsarve 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03 #> Comapalu  6.6666667  5.617442 -2.364494506  0.53647558 1.055552e-02 #> Eleopalu  3.7333333  1.577180  0.579438187  0.55851854 2.958285e-10 #> Elymrepe  2.7692308  1.554093  0.596260659  0.53293787 1.180195e-06 #> Empenigr 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03 #> Hyporadi  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07 #> Juncarti  3.1372549  1.814843  0.406265675  0.53635966 2.066336e-05 #> Juncbufo  4.1025641  2.154361  0.158876373  0.55458486 1.503205e-05 #> Lolipere  1.5849970  1.243023  0.822921342  0.50911591 5.873839e-05 #> Planlanc  2.4615385  1.554093  0.596260659  0.52459747 1.921730e-05 #> Poaprat   1.1702128  1.294730  0.785245032  0.28876015 1.046531e-01 #> Poatriv   1.4644137  1.223425  0.837201879  0.50641728 2.747301e-04 #> Ranuflam  2.4175824  2.065564  0.223578191  0.50981405 7.010483e-03 #> Rumeacet  3.9215686  1.814843  0.406265675  0.55792432 1.530085e-07 #> Sagiproc  2.4210526  1.729070  0.468764025  0.51893672 4.956394e-04 #> Salirepe  5.8181818  2.385233 -0.009348352  0.59744520 2.687397e-07 #> Scorautu  0.9643606  1.261365  0.809556915 -0.09356972 5.823404e-01 #> Trifprat  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07 #> Trifrepe  1.2210916  1.301138  0.780576445  0.36709402 6.335449e-02 #> Vicilath  3.3333333  5.617442 -2.364494506  0.25266513 1.301890e-01 #> Bracruta  1.1904762  1.288590  0.789719093  0.33001160 8.071762e-02 #> Callcusp  5.3333333  2.539147 -0.121498169  0.58001287 7.982634e-06 y <- dispindmorisita(dune, unique.rm = TRUE) y #>               imor     mclu         muni        imst       pchisq #> Achimill 2.1666667 1.923488  0.327101099  0.50672636 9.157890e-03 #> Agrostol 1.8085106 1.294730  0.785245032  0.51373357 1.142619e-05 #> Airaprae 8.0000000 4.463082 -1.523370880  0.61382303 3.571702e-04 #> Alopgeni 2.5396825 1.395781  0.711614757  0.53074307 3.024441e-08 #> Anthodor 2.6666667 1.692616  0.495325824  0.52660266 5.897217e-05 #> Bellpere 2.0512821 2.154361  0.158876373  0.45535255 3.451547e-02 #> Bromhord 3.2380952 1.989452  0.279036892  0.53466422 1.170437e-04 #> Comapalu 6.6666667 5.617442 -2.364494506  0.53647558 1.055552e-02 #> Eleopalu 3.7333333 1.577180  0.579438187  0.55851854 2.958285e-10 #> Elymrepe 2.7692308 1.554093  0.596260659  0.53293787 1.180195e-06 #> Hyporadi 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07 #> Juncarti 3.1372549 1.814843  0.406265675  0.53635966 2.066336e-05 #> Juncbufo 4.1025641 2.154361  0.158876373  0.55458486 1.503205e-05 #> Lolipere 1.5849970 1.243023  0.822921342  0.50911591 5.873839e-05 #> Planlanc 2.4615385 1.554093  0.596260659  0.52459747 1.921730e-05 #> Poaprat  1.1702128 1.294730  0.785245032  0.28876015 1.046531e-01 #> Poatriv  1.4644137 1.223425  0.837201879  0.50641728 2.747301e-04 #> Ranuflam 2.4175824 2.065564  0.223578191  0.50981405 7.010483e-03 #> Rumeacet 3.9215686 1.814843  0.406265675  0.55792432 1.530085e-07 #> Sagiproc 2.4210526 1.729070  0.468764025  0.51893672 4.956394e-04 #> Salirepe 5.8181818 2.385233 -0.009348352  0.59744520 2.687397e-07 #> Scorautu 0.9643606 1.261365  0.809556915 -0.09356972 5.823404e-01 #> Trifprat 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07 #> Trifrepe 1.2210916 1.301138  0.780576445  0.36709402 6.335449e-02 #> Vicilath 3.3333333 5.617442 -2.364494506  0.25266513 1.301890e-01 #> Bracruta 1.1904762 1.288590  0.789719093  0.33001160 8.071762e-02 #> Callcusp 5.3333333 2.539147 -0.121498169  0.58001287 7.982634e-06 dim(x) ## with unique species #> [1] 30  5 dim(y) ## unique species removed #> [1] 27  5"},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":null,"dir":"Reference","previous_headings":"","what":"Dispersion-based weighting of species counts — dispweight","title":"Dispersion-based weighting of species counts — dispweight","text":"Transform abundance data downweighting species    overdispersed Poisson error.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dispersion-based weighting of species counts — dispweight","text":"","code":"dispweight(comm, groups, nsimul = 999, nullmodel = \"c0_ind\",     plimit = 0.05) gdispweight(formula, data, plimit = 0.05) # S3 method for dispweight summary(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dispersion-based weighting of species counts — dispweight","text":"comm Community data matrix. groups Factor describing group structure. missing,       sites regarded belonging one group. NA values       allowed. nsimul Number simulations. nullmodel nullmodel used     commsim within groups. default     follows Clarke et al. (2006). plimit Downweight species \\(p\\)-value      limit. formula, data Formula left-hand side     community data frame right-hand side gives explanatory     variables. explanatory variables found data frame     given data parent frame. object Result object dispweight     gdispweight. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dispersion-based weighting of species counts — dispweight","text":"dispersion index (\\(D\\)) calculated ratio variance expected value species.  species abundances follow Poisson distribution, expected dispersion \\(E(D) = 1\\), \\(D > 1\\), species overdispersed. inverse \\(1/D\\) can used downweight species abundances.  Species downweighted overdispersion judged statistically significant (Clarke et al. 2006). Function dispweight implements original procedure Clarke et al. (2006). one factor can used group sites find species means. significance overdispersion assessed freely distributing individuals species within factor levels. achieved using nullmodel \"c0_ind\" (accords Clarke et al. 2006), nullmodels can used, though may meaningful (see commsim alternatives). species absent factor level, whole level ignored calculation overdispersion, number degrees freedom can vary among species. reduced number degrees freedom used divisor overdispersion \\(D\\), species higher dispersion hence lower weights transformation. Function gdispweight generalized parametric version dispweight. function based glm quasipoisson error family. glm model can used, including several factors continuous covariates. Function gdispweight uses test statistic dispweight (Pearson Chi-square), ignore factor levels species absent, number degrees freedom equal species. Therefore transformation weights can higher dispweight. gdispweight function evaluates significance overdispersion parametrically Chi-square distribution (pchisq). Functions dispweight gdispweight transform data, add information overdispersion weights attributes result. summary can used extract print information.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dispersion-based weighting of species counts — dispweight","text":"Function returns transformed data following new attributes: D Dispersion statistic. df Degrees freedom species. p \\(p\\)-value Dispersion statistic \\(D\\). weights weights applied community data. nsimul Number simulations used assess \\(p\\)-value,       NA simulations performed. nullmodel name commsim null model,       NA simulations performed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dispersion-based weighting of species counts — dispweight","text":"Clarke, K. R., M. G. Chapman, P. J. Somerfield, H. R. Needham. 2006. Dispersion-based weighting species counts assemblage analyses. Marine Ecology Progress Series, 320, 11–27.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dispersion-based weighting of species counts — dispweight","text":"Eduard Szöcs eduardszoesc@gmail.com wrote original   dispweight, Jari Oksanen significantly modified code,   provided support functions developed gdispweight.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dispersion-based weighting of species counts — dispweight","text":"","code":"data(mite, mite.env) ## dispweight and its summary mite.dw <- with(mite.env, dispweight(mite, Shrub, nsimul = 99)) ## IGNORE_RDIFF_BEGIN summary(mite.dw) #>          Dispersion    Weight Df Pr(Disp.)    #> Brachy       9.6908 0.1031909 67      0.01 ** #> PHTH         3.2809 0.3047900 49      0.01 ** #> HPAV         6.5263 0.1532264 67      0.01 ** #> RARD         6.0477 0.1653525 49      0.01 ** #> SSTR         2.2619 0.4421053 49      0.01 ** #> Protopl      5.4229 0.1844031 49      0.01 ** #> MEGR         4.5354 0.2204860 67      0.01 ** #> MPRO         1.2687 0.7882353 67      0.03 *  #> TVIE         2.5956 0.3852706 67      0.01 ** #> HMIN        10.0714 0.0992906 67      0.01 ** #> HMIN2        7.5674 0.1321466 49      0.01 ** #> NPRA         2.6743 0.3739344 67      0.01 ** #> TVEL         9.6295 0.1038474 49      0.01 ** #> ONOV        11.3628 0.0880064 67      0.01 ** #> SUCT         8.7372 0.1144533 67      0.01 ** #> LCIL       129.4436 0.0077254 67      0.01 ** #> Oribatl1     4.1250 0.2424248 67      0.01 ** #> Ceratoz1     1.7150 0.5830768 67      0.02 *  #> PWIL         2.2943 0.4358538 67      0.01 ** #> Galumna1     2.8777 0.3474943 49      0.01 ** #> Stgncrs2     3.8242 0.2614953 49      0.01 ** #> HRUF         1.7575 0.5690021 67      0.01 ** #> Trhypch1    14.9225 0.0670128 67      0.01 ** #> PPEL         1.3628 1.0000000 49      0.07 .  #> NCOR         2.5875 0.3864771 67      0.01 ** #> SLAT         2.7857 0.3589744 49      0.01 ** #> FSET         4.8901 0.2044944 49      0.01 ** #> Lepidzts     1.6577 0.6032360 49      0.03 *  #> Eupelops     1.4611 0.6844033 67      0.02 *  #> Miniglmn     1.6505 0.6058733 49      0.01 ** #> LRUG        12.0658 0.0828790 67      0.01 ** #> PLAG2        3.2403 0.3086090 67      0.01 ** #> Ceratoz3     3.5125 0.2846947 67      0.01 ** #> Oppiminu     3.1680 0.3156525 67      0.01 ** #> Trimalc2    10.5927 0.0944046 67      0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Based on 99 simulations on 'c0_ind' nullmodel ## IGNORE_RDIFF_END ## generalized dispersion weighting mite.dw <- gdispweight(mite ~ Shrub + WatrCont, data = mite.env) rda(mite.dw ~ Shrub + WatrCont, data = mite.env) #> Call: rda(formula = mite.dw ~ Shrub + WatrCont, data = mite.env) #>  #>               Inertia Proportion Rank #> Total         38.1640     1.0000      #> Constrained    9.2129     0.2414    3 #> Unconstrained 28.9511     0.7586   35 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>  RDA1  RDA2  RDA3  #> 7.986 0.748 0.480  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8  #> 5.886 3.634 2.791 2.592 1.932 1.573 1.210 1.078  #> (Showing 8 of 35 unconstrained eigenvalues) #>"},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Connectedness of Dissimilarities — distconnected","title":"Connectedness of Dissimilarities — distconnected","text":"Function distconnected finds groups connected   disregarding dissimilarities threshold   NA. function can used find groups can   ordinated together transformed   stepacross. Function .shared returns logical   dissimilarity object, TRUE means sites   species common. minimal structure   distconnected can used set missing values   dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connectedness of Dissimilarities — distconnected","text":"","code":"distconnected(dis, toolong = 1, trace = TRUE)  no.shared(x)"},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connectedness of Dissimilarities — distconnected","text":"dis Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, .     toolong = 0 (negative), dissimilarity regarded     long. trace Summarize results distconnected x Community data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connectedness of Dissimilarities — distconnected","text":"Data sets disconnected sample plots groups   sample plots share species sites groups   sites. data sets sensibly ordinated   unconstrained method subsets related   . instance, correspondence analysis polarize   subsets eigenvalue 1. Neither can dissimilarities   transformed stepacross, path   points, result contain NAs. Function   distconnected find subsets dissimilarity   matrices. function return grouping vector can used   sub-setting data. data connected, result vector   \\(1\\)s. connectedness two points can defined   either threshold toolong using input dissimilarities   NAs. Function .shared returns dist structure value   TRUE two sites nothing common, value   FALSE least one shared species.   minimal structure can analysed distconnected.   function can used select dissimilarities shared species   indices fixed upper limit. Function distconnected uses depth-first search   (Sedgewick 1990).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connectedness of Dissimilarities — distconnected","text":"Function distconnected returns vector   observations using integers identify connected groups. data   connected, values 1. Function .shared returns object class dist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Connectedness of Dissimilarities — distconnected","text":"Sedgewick, R. (1990). Algorithms C. Addison Wesley.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Connectedness of Dissimilarities — distconnected","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connectedness of Dissimilarities — distconnected","text":"","code":"## There are no disconnected data in vegan, and the following uses an ## extremely low threshold limit for connectedness. This is for ## illustration only, and not a recommended practice. data(dune) dis <- vegdist(dune) gr <- distconnected(dis, toolong=0.4) #> Connectivity of distance matrix with threshold dissimilarity 0.4  #> Data are disconnected: 6 groups #> Groups sizes #>  1  2  3  4  5  6  #>  1 11  2  4  1  1  # Make sites with no shared species as NA in Manhattan dissimilarities dis <- vegdist(dune, \"manhattan\") is.na(dis) <- no.shared(dune)"},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Ecological Diversity Indices — diversity","title":"Ecological Diversity Indices — diversity","text":"Shannon, Simpson, Fisher diversity indices species   richness.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ecological Diversity Indices — diversity","text":"","code":"diversity(x, index = \"shannon\", groups, equalize.groups = FALSE,    MARGIN = 1, base = exp(1)) simpson.unb(x, inverse = FALSE) fisher.alpha(x, MARGIN = 1, ...) specnumber(x, groups, MARGIN = 1)"},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ecological Diversity Indices — diversity","text":"x Community data, matrix-like object vector. index Diversity index, one \"shannon\",     \"simpson\" \"invsimpson\". MARGIN Margin index computed. base logarithm base used shannon. inverse Use inverse Simpson similarly      diversity(x, \"invsimpson\"). groups grouping factor: given, finds diversity     communities pooled groups. equalize.groups Instead observed abundances, standardize     communities unit total. ... Parameters passed function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ecological Diversity Indices — diversity","text":"Shannon Shannon--Weaver (Shannon--Wiener) index defined   \\(H' = -\\sum_i p_i \\log_{b} p_i\\),   \\(p_i\\) proportional abundance species \\(\\) \\(b\\)   base logarithm.  popular use natural   logarithms, argue base \\(b = 2\\) (makes sense,   real difference). variants Simpson's index based \\(D = \\sum p_i^2\\). Choice simpson returns \\(1-D\\)   invsimpson returns \\(1/D\\). simpson.unb finds unbiased Simpson indices discrete   samples (Hurlbert 1971, eq. 5). less sensitive sample   size basic Simpson indices. unbiased indices can   calculated data integer counts. diversity function can find total (gamma) diversity   pooled communities argument groups. average alpha   diversity can found mean diversities groups,   difference ratio estimate beta diversity (see   Examples). pooling can based either observed   abundancies, communities can equalized unit total   pooling; see Jost (2007) discussion. Functions   adipart multipart provide canned   alternatives estimating alpha, beta gamma diversities   hierarchical settings. fisher.alpha estimates \\(\\alpha\\) parameter   Fisher's logarithmic series (see fisherfit).    estimation possible genuine   counts individuals. None diversity indices usable empty sampling units   without species, indices can give numeric   value. Filtering cases left user. Function specnumber finds number species.   MARGIN = 2, finds frequencies species. groups   given, finds total number species group (see    example finding one kind beta diversity option). Better stories can told Simpson's index   Shannon's index, still grander narratives   rarefaction (Hurlbert 1971).  However, indices   closely related (Hill 1973), reason despise one   others (graduate student, drag ,   obey Professor's orders). particular, exponent   Shannon index linearly related inverse Simpson (Hill 1973)   although former may sensitive rare species. Moreover,   inverse Simpson asymptotically equal rarefied species richness   sample two individuals, Fisher's \\(\\alpha\\)   similar inverse Simpson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ecological Diversity Indices — diversity","text":"vector diversity indices numbers species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ecological Diversity Indices — diversity","text":"Fisher, R.., Corbet, .S. & Williams, C.B. (1943). relation   number species number individuals   random sample animal population. Journal Animal Ecology   12, 42--58. Hurlbert, S.H. (1971). nonconcept species diversity: critique   alternative parameters. Ecology 52, 577--586. Jost, L. (2007) Partitioning diversity independent alpha beta   components. Ecology 88, 2427--2439.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ecological Diversity Indices — diversity","text":"Jari Oksanen   Bob O'Hara (fisher.alpha).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ecological Diversity Indices — diversity","text":"","code":"data(BCI, BCI.env) H <- diversity(BCI) simp <- diversity(BCI, \"simpson\") invsimp <- diversity(BCI, \"inv\") ## Unbiased Simpson unbias.simp <- simpson.unb(BCI) ## Fisher alpha alpha <- fisher.alpha(BCI) ## Plot all pairs(cbind(H, simp, invsimp, unbias.simp, alpha), pch=\"+\", col=\"blue\")  ## Species richness (S) and Pielou's evenness (J): S <- specnumber(BCI) ## rowSums(BCI > 0) does the same... J <- H/log(S) ## beta diversity defined as gamma/alpha - 1: ## alpha is the average no. of species in a group, and gamma is the ## total number of species in the group (alpha <- with(BCI.env, tapply(specnumber(BCI), Habitat, mean))) #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 85.75000 91.76923 91.58333 94.00000 90.00000  (gamma <- with(BCI.env, specnumber(BCI, Habitat))) #>  OldHigh   OldLow OldSlope    Swamp    Young  #>      158      210      183      128      117  gamma/alpha - 1 #>   OldHigh    OldLow  OldSlope     Swamp     Young  #> 0.8425656 1.2883487 0.9981802 0.3617021 0.3000000  ## similar calculations with Shannon diversity (alpha <- with(BCI.env, tapply(diversity(BCI), Habitat, mean))) # average #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 3.638598 3.876413 3.887122 4.003780 3.246729  (gamma <- with(BCI.env, diversity(BCI, groups=Habitat))) # pooled #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 3.873186 4.284972 4.212098 4.164335 3.387536  ## additive beta diversity based on Shannon index gamma-alpha #>   OldHigh    OldLow  OldSlope     Swamp     Young  #> 0.2345878 0.4085595 0.3249760 0.1605548 0.1408068"},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":null,"dir":"Reference","previous_headings":"","what":"Vegetation and Environment in Dutch Dune Meadows. — dune","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"dune meadow vegetation data, dune, cover class values   30 species 20 sites. corresponding environmental data frame   dune.env following entries:","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"","code":"data(dune)   data(dune.env)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"dune data frame observations 30 species 20   sites. species names abbreviated 4+4 letters (see   make.cepnames). following names changed   original source (Jongman et al. 1987): Leontodon   autumnalis Scorzoneroides, Potentilla   palustris Comarum. dune.env data frame 20 observations following   5 variables: A1: numeric vector thickness soil A1 horizon. Moisture: ordered factor levels: 1 < 2 <       4 < 5. Management: factor levels: BF (Biological       farming), HF (Hobby farming), NM (Nature       Conservation Management), SF (Standard Farming). Use: ordered factor land-use levels: Hayfield       < Haypastu < Pasture. Manure: ordered factor levels: 0 < 1 <       2 < 3 < 4.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"Jongman, R.H.G, ter Braak, C.J.F & van Tongeren,   O.F.R. (1987). Data Analysis Community Landscape     Ecology. Pudoc, Wageningen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"","code":"data(dune) data(dune.env)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":null,"dir":"Reference","previous_headings":"","what":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"Classification table species dune data   set.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"","code":"data(dune.taxon)   data(dune.phylodis)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"dune.taxon data frame 30 species (rows) classified   five taxonomic levels (columns). dune.phylodis   dist object estimated coalescence ages extracted   doi:10.5061/dryad.63q27  (Zanne et al. 2014) using tools packages   ape phylobase.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"families orders based APG IV (2016) vascular   plants Hill et al. (2006) mosses. higher levels   (superorder subclass) based Chase & Reveal (2009). Chase   & Reveal (2009) treat Angiosperms mosses subclasses class   Equisetopsida (land plants), brylogists traditionally used   much inflated levels adjusted match   Angiosperm classification.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"APG IV [Angiosperm Phylogeny Group] (2016) update   Angiosperm Phylogeny Group classification orders   families flowering plants: APG IV. Bot. J. Linnean Soc.   181: 1--20. Chase, M.W. & Reveal, J. L. (2009) phylogenetic classification   land plants accompany APG III. Bot. J. Linnean Soc.   161: 122--127. Hill, M.O et al. (2006) annotated checklist mosses Europe   Macaronesia. J. Bryology 28: 198--267. Zanne .E., Tank D.C., Cornwell, W.K., Eastman J.M., Smith, S..,   FitzJohn, R.G., McGlinn, D.J., O’Meara, B.C., Moles, .T., Reich,   P.B., Royer, D.L., Soltis, D.E., Stevens, P.F., Westoby, M., Wright,   .J., Aarssen, L., Bertin, R.., Calaminus, ., Govaerts, R.,   Hemmings, F., Leishman, M.R., Oleksyn, J., Soltis, P.S., Swenson,   N.G., Warman, L. & Beaulieu, J.M. (2014) Three keys radiation   angiosperms freezing environments. Nature   506: 89--92.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"","code":"data(dune.taxon)    data(dune.phylodis)"},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Eigenvalues from an Ordination Object — eigenvals","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Function extracts eigenvalues object . Many   multivariate methods return objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"","code":"eigenvals(x, ...) # S3 method for cca eigenvals(x, model = c(\"all\", \"unconstrained\", \"constrained\"),           constrained = NULL, ...) # S3 method for decorana eigenvals(x, kind = c(\"additive\", \"axiswise\", \"decorana\"),            ...) # S3 method for eigenvals summary(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"x object extract eigenvalues. object eigenvals result object. model eigenvalues return objects inherit class     \"cca\" . constrained Return constrained eigenvalues. Deprecated vegan     2.5-0. Use model instead. kind Kind eigenvalues returned decorana.     \"additive\" eigenvalues can used reporting importances     components summary. \"axiswise\" gives     non-additive eigenvalues, \"decorana\" decorana values     (see decorana details). ... arguments functions (usually ignored)","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"generic function methods cca,   wcmdscale, pcnm, prcomp,   princomp, dudi (ade4),    pca pco (   labdsv) result objects. default method also   extracts eigenvalues result looks like   eigen svd.  Functions   prcomp princomp contain square roots   eigenvalues called standard deviations,   eigenvals function returns squares.  Function   svd contains singular values, function   eigenvals returns squares. constrained ordination   methods cca, rda   capscale function returns constrained   unconstrained eigenvalues concatenated one vector, partial   component ignored. However, argument    constrained = TRUE constrained eigenvalues returned. summary eigenvals result returns eigenvalues,   proportion explained cumulative proportion explained. result   object can negative eigenvalues (wcmdscale,   capscale, pcnm) correspond   imaginary axes Euclidean mapping non-Euclidean distances   (Gower 1985). cases, sum absolute values   eigenvalues used calculating proportions explained,   real axes (corresponding positive eigenvalues) explain   part total variation (Mardia et al. 1979, Gower 1985).   decorana importances cumulative proportions   reported kind = \"additive\", alternatives   add total inertia input data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"object class \"eigenvals\", vector   eigenvalues. summary method returns object class  \"summary.eigenvals\", matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Gower, J. C. (1985). Properties Euclidean non-Euclidean   distance matrices. Linear Algebra Applications 67,   81--97. Mardia, K. V., Kent, J. T. Bibby, J. M. (1979).  Chapter 14   Multivariate Analysis, London: Academic Press.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"","code":"data(varespec) data(varechem) mod <- cca(varespec ~ Al + P + K, varechem) ev <- eigenvals(mod) ev #>      CCA1      CCA2      CCA3       CA1       CA2       CA3       CA4       CA5  #> 0.3615566 0.1699600 0.1126167 0.3500372 0.2200788 0.1850741 0.1551179 0.1351054  #>       CA6       CA7       CA8       CA9      CA10      CA11      CA12      CA13  #> 0.1002670 0.0772991 0.0536938 0.0365603 0.0350887 0.0282291 0.0170651 0.0122474  #>      CA14      CA15      CA16      CA17      CA18      CA19      CA20  #> 0.0101910 0.0094701 0.0055090 0.0030529 0.0025118 0.0019485 0.0005178  summary(ev) #> Importance of components: #>                         CCA1    CCA2    CCA3    CA1    CA2     CA3     CA4 #> Eigenvalue            0.3616 0.16996 0.11262 0.3500 0.2201 0.18507 0.15512 #> Proportion Explained  0.1736 0.08159 0.05406 0.1680 0.1056 0.08884 0.07446 #> Cumulative Proportion 0.1736 0.25514 0.30920 0.4772 0.5829 0.67172 0.74618 #>                           CA5     CA6     CA7     CA8     CA9    CA10    CA11 #> Eigenvalue            0.13511 0.10027 0.07730 0.05369 0.03656 0.03509 0.02823 #> Proportion Explained  0.06485 0.04813 0.03711 0.02577 0.01755 0.01684 0.01355 #> Cumulative Proportion 0.81104 0.85917 0.89627 0.92205 0.93960 0.95644 0.96999 #>                           CA12     CA13     CA14     CA15     CA16     CA17 #> Eigenvalue            0.017065 0.012247 0.010191 0.009470 0.005509 0.003053 #> Proportion Explained  0.008192 0.005879 0.004892 0.004546 0.002644 0.001465 #> Cumulative Proportion 0.978183 0.984062 0.988954 0.993500 0.996145 0.997610 #>                           CA18      CA19      CA20 #> Eigenvalue            0.002512 0.0019485 0.0005178 #> Proportion Explained  0.001206 0.0009353 0.0002486 #> Cumulative Proportion 0.998816 0.9997514 1.0000000  ## choose which eignevalues to return eigenvals(mod, model = \"unconstrained\") #>       CA1       CA2       CA3       CA4       CA5       CA6       CA7       CA8  #> 0.3500372 0.2200788 0.1850741 0.1551179 0.1351054 0.1002670 0.0772991 0.0536938  #>       CA9      CA10      CA11      CA12      CA13      CA14      CA15      CA16  #> 0.0365603 0.0350887 0.0282291 0.0170651 0.0122474 0.0101910 0.0094701 0.0055090  #>      CA17      CA18      CA19      CA20  #> 0.0030529 0.0025118 0.0019485 0.0005178"},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fits an Environmental Vector or Factor onto an Ordination — envfit","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"function fits environmental vectors factors onto   ordination. projections points onto vectors maximum   correlation corresponding environmental variables,   factors show averages factor levels. continuous varaibles   equal fitting linear trend surface (plane 2D)   variable (see ordisurf); trend surface can   presented showing gradient (direction steepest increase)   using arrow. environmental variables dependent   variables explained ordination scores,   dependent variable analysed separately.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"","code":"# S3 method for default envfit(ord, env, permutations = 999, strata = NULL,     choices=c(1,2),  display = \"sites\", w  = weights(ord, display),    na.rm = FALSE, ...) # S3 method for formula envfit(formula, data, ...) # S3 method for envfit plot(x, choices = c(1,2), labels, arrow.mul, at = c(0,0),     axis = FALSE, p.max = NULL, col = \"blue\", bg, add = TRUE, ...) # S3 method for envfit scores(x, display, choices, arrow.mul=1, tidy = FALSE, ...) vectorfit(X, P, permutations = 0, strata = NULL, w, ...) factorfit(X, P, permutations = 0, strata = NULL, w, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"ord ordination object structure     ordination scores can extracted (including data     frame matrix scores). env Data frame, matrix vector environmental     variables. variables can mixed type (factors, continuous     variables) data frames. X Matrix data frame ordination scores. P Data frame, matrix vector environmental     variable(s). must continuous vectorfit     factors characters factorfit. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. Set permutations = 0 skip     permutations. formula, data Model  formula data. na.rm Remove points missing values ordination scores     environmental variables. operation casewise: whole     row data removed missing value      na.rm = TRUE. x result object envfit. ordiArrowMul     ordiArrowTextXY must two-column matrix (    matrix-like object) containing coordinates arrow heads     two plot axes, methods extract structure     envfit results. choices Axes plotted. tidy Return scores compatible ggplot2:     scores single data.frame, score type     identified factor variable scores (\"vectors\"     \"factors\"), names variable label. scores     incompatible conventional plot functions, can     used ggplot2. labels Change plotting labels. argument list     elements vectors factors give new     plotting labels. either elements omitted,     default labels used. one type elements     (vectors factors), labels can     given vector. default labels can displayed     labels command. arrow.mul Multiplier vector lengths. arrows     automatically scaled similarly plot.cca     given plot add = TRUE. However,     scores can used adjust arrow lengths     plot function used. origin fitted arrows plot.  plot arrows     places origin, probably specify     arrrow.mul. axis Plot axis showing scaling fitted arrows. p.max Maximum estimated \\(P\\) value displayed     variables.  must calculate \\(P\\) values setting     permutations use option. col Colour plotting. bg Background colour labels. bg set,     labels displayed ordilabel instead     text. See Examples using semitransparent background. add Results added existing ordination plot. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. display fitting functions ordinary site scores     linear combination scores      (\"lc\") constrained ordination (cca,     rda, capscale). scores     function either \"vectors\" \"factors\"     (synonyms \"bp\" \"cn\", resp.). w Weights used fitting (concerns mainly cca     decorana results nonconstant weights). ... Parameters passed scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Function envfit finds vectors factor averages   environmental variables.  Function plot.envfit adds   ordination diagram.  X data.frame,   envfit   uses factorfit factor variables   vectorfit variables.  X matrix   vector, envfit uses vectorfit. Alternatively,   model can defined simplified model formula,   left hand side must ordination result object matrix   ordination scores, right hand   side lists environmental variables. formula interface can   used easier selection /transformation environmental   variables. main effects analysed even interaction   terms defined formula. ordination results extracted scores   extra arguments passed scores. fitted   models apply results defined extracting scores   using envfit. instance, scaling   constrained ordination (see scores.rda,   scores.cca) must set way   envfit plot ordination results (see   Examples). printed output continuous variables (vectors) gives   direction cosines coordinates heads unit   length vectors.  plot scaled   correlation (square root column r2)   “weak” predictors shorter arrows “strong”   predictors.  can see scaled relative lengths using command   scores.  plotted (scaled) arrows   adjusted current graph using constant multiplier:   keep relative r2-scaled lengths arrows tries   fill current plot.  can see multiplier using   ordiArrowMul(result_of_envfit), set   argument arrow.mul. Functions vectorfit factorfit can called directly.   Function vectorfit finds directions ordination space   towards environmental vectors change rapidly   maximal correlations ordination   configuration.  Function factorfit finds averages ordination   scores factor levels. Function factorfit treats ordered   unordered factors similarly. permutations \\(> 0\\), significance fitted vectors   factors assessed using permutation environmental variables.   goodness fit statistic squared correlation coefficient   (\\(r^2\\)).   factors defined \\(r^2 = 1 - ss_w/ss_t\\),   \\(ss_w\\) \\(ss_t\\) within-group total sums   squares. See permutations additional details   permutation tests Vegan. User can supply vector prior weights w. ordination   object weights, used. practise means   row totals used weights cca   decorana results. like , want   give equal weights sites, set w = NULL.    fitted vectors similar biplot arrows constrained ordination   fitted LC scores (display = \"lc\") set   scaling = \"species\" (see scores.cca).    weighted fitting gives similar results biplot arrows class   centroids cca. lengths arrows fitted vectors automatically adjusted   physical size plot, arrow lengths   compared across plots. similar scaling arrows, must   explicitly set arrow.mul argument plot   command; see ordiArrowMul   ordiArrowTextXY. results can accessed scores.envfit function   returns either fitted vectors scaled correlation coefficient   centroids fitted environmental variables, named list   .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Functions vectorfit factorfit return lists   classes vectorfit factorfit  print method.  result object following items: arrows Arrow endpoints vectorfit. arrows     scaled unit length. centroids Class centroids factorfit. r Goodness fit statistic: Squared correlation coefficient permutations Number permutations. control list control values permutations     returned function . pvals Empirical P-values variable. Function envfit returns list class envfit   results vectorfit envfit items. Function plot.envfit scales vectors correlation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Jari Oksanen.  permutation test derives code   suggested Michael Scroggie.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Fitted vectors become method choice displaying   environmental variables ordination.  Indeed, optimal   way presenting environmental variables Constrained   Correspondence Analysis cca, since   linear constraints.   unconstrained ordination relation external variables   ordination configuration may less linear, therefore   methods arrows may useful.  simplest adjust   plotting symbol sizes (cex, symbols)   environmental variables.   Fancier methods involve smoothing regression methods   abound R, ordisurf provides wrapper .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"","code":"data(varespec, varechem) library(MASS) ord <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.2169286  #> Run 2 stress 0.2109612  #> Run 3 stress 0.2104991  #> Run 4 stress 0.1962451  #> Run 5 stress 0.2126569  #> Run 6 stress 0.2114456  #> Run 7 stress 0.195049  #> Run 8 stress 0.2382234  #> Run 9 stress 0.2104573  #> Run 10 stress 0.2352374  #> Run 11 stress 0.195049  #> Run 12 stress 0.18458  #> ... Procrustes: rmse 0.04934217  max resid 0.157446  #> Run 13 stress 0.2101147  #> Run 14 stress 0.2166093  #> Run 15 stress 0.1967393  #> Run 16 stress 0.2087945  #> Run 17 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04162955  max resid 0.1518218  #> Run 18 stress 0.1843196  #> Run 19 stress 0.2704958  #> Run 20 stress 0.2028828  #> *** Best solution was not repeated -- monoMDS stopping criteria: #>     18: stress ratio > sratmax #>      2: scale factor of the gradient < sfgrmin (fit <- envfit(ord, varechem, perm = 999)) #>  #> ***VECTORS #>  #>             NMDS1    NMDS2     r2 Pr(>r)     #> N        -0.05728 -0.99836 0.2536  0.046 *   #> P         0.61969  0.78484 0.1938  0.092 .   #> K         0.76642  0.64234 0.1809  0.122     #> Ca        0.68516  0.72839 0.4119  0.007 **  #> Mg        0.63249  0.77457 0.4270  0.004 **  #> S         0.19135  0.98152 0.1752  0.126     #> Al       -0.87162  0.49019 0.5269  0.001 *** #> Fe       -0.93604  0.35189 0.4450  0.002 **  #> Mn        0.79871 -0.60172 0.5231  0.001 *** #> Zn        0.61754  0.78654 0.1879  0.108     #> Mo       -0.90307  0.42949 0.0609  0.540     #> Baresoil  0.92491 -0.38018 0.2508  0.041 *   #> Humdepth  0.93284 -0.36029 0.5200  0.002 **  #> pH       -0.64800  0.76164 0.2308  0.066 .   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 999 #>  #>  scores(fit, \"vectors\") #>               NMDS1      NMDS2 #> N        -0.0288474 -0.5028069 #> P         0.2728265  0.3455353 #> K         0.3259990  0.2732195 #> Ca        0.4397127  0.4674522 #> Mg        0.4133202  0.5061613 #> S         0.0800898  0.4108260 #> Al       -0.6327103  0.3558281 #> Fe       -0.6244512  0.2347516 #> Mn        0.5776554 -0.4351842 #> Zn        0.2677032  0.3409638 #> Mo       -0.2229426  0.1060291 #> Baresoil  0.4631721 -0.1903835 #> Humdepth  0.6727071 -0.2598200 #> pH       -0.3113030  0.3659007 plot(ord) plot(fit) plot(fit, p.max = 0.05, col = \"red\")  ## Adding fitted arrows to CCA. We use \"lc\" scores, and hope ## that arrows are scaled similarly in cca and envfit plots ord <- cca(varespec ~ Al + P + K, varechem) plot(ord, type=\"p\") fit <- envfit(ord, varechem, perm = 999, display = \"lc\") plot(fit, p.max = 0.05, col = \"red\")  ## 'scaling' must be set similarly in envfit and in ordination plot plot(ord, type = \"p\", scaling = \"sites\") fit <- envfit(ord, varechem, perm = 0, display = \"lc\", scaling = \"sites\") plot(fit, col = \"red\")   ## Class variables, formula interface, and displaying the ## inter-class variability with ordispider, and semitransparent ## white background for labels (semitransparent colours are not ## supported by all graphics devices) data(dune) data(dune.env) ord <- cca(dune) fit <- envfit(ord ~ Moisture + A1, dune.env, perm = 0) plot(ord, type = \"n\") with(dune.env, ordispider(ord, Moisture, col=\"skyblue\")) with(dune.env, points(ord, display = \"sites\", col = as.numeric(Moisture),                       pch=16)) plot(fit, cex=1.2, axis=TRUE, bg = rgb(1, 1, 1, 0.5))  ## Use shorter labels for factor centroids labels(fit) #> $vectors #> [1] \"A1\" #>  #> $factors #> [1] \"Moisture1\" \"Moisture2\" \"Moisture4\" \"Moisture5\" #>  plot(ord) plot(fit, labels=list(factors = paste(\"M\", c(1,2,4,5), sep = \"\")),    bg = rgb(1,1,0,0.5))"},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"function eventstar finds minimum (\\(q^*\\))  evenness profile based Tsallis entropy. scale factor entropy represents specific weighting species relative frequencies leads minimum evenness community (Mendes et al. 2008).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"","code":"eventstar(x, qmax = 5)"},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"x community matrix numeric vector. qmax Maximum scale parameter Tsallis entropy used  finding minimum Tsallis based evenness range c(0, qmax).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"function eventstar finds characteristic value scale  parameter \\(q\\) Tsallis entropy corresponding minimum evenness (equitability) profile based Tsallis entropy. value proposed Mendes et al. (2008) \\(q^*\\). \\(q^\\ast\\) index represents scale parameter one parameter Tsallis diversity family leads greatest deviation maximum equitability given relative  abundance vector community. value \\(q^\\ast\\) found identifying minimum evenness profile scaling factor \\(q\\) one-dimensional minimization. evenness profile known convex function, guaranteed underlying optimize function find unique solution range c(0, qmax). scale parameter value \\(q^\\ast\\) used  find corresponding values diversity (\\(H_{q^\\ast}\\)),  evenness (\\(H_{q^\\ast}(\\max)\\)), numbers equivalent (\\(D_{q^\\ast}\\)). calculation details, see tsallis Examples . Mendes et al. (2008) advocated use \\(q^\\ast\\) corresponding diversity, evenness, Hill numbers, unique value representing diversity profile, positively associated rare species community, thus potentially useful indicator certain relative abundance distributions communities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"data frame columns: qstar scale parameter value \\(q\\ast\\)     corresponding minimum value Tsallis based evenness profile. Estar Value evenness based normalized Tsallis      entropy \\(q^\\ast\\). Hstar Value Tsallis entropy \\(q^\\ast\\). Dstar Value Tsallis entropy \\(q^\\ast\\)      converted numbers equivalents     (also called Hill numbers, effective number species,      ‘true’ diversity; cf. Jost 2007). See tsallis calculation details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Mendes, R.S., Evangelista, L.R., Thomaz, S.M.,   Agostinho, .. Gomes, L.C. (2008) unified   index measure ecological diversity species   rarity. Ecography 31, 450--456. Jost, L. (2007) Partitioning diversity independent alpha beta components.   Ecology 88, 2427--2439. Tsallis, C. (1988) Possible generalization Boltzmann-Gibbs statistics.    J. Stat. Phis. 52, 479--487.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Values \\(q^\\ast\\) found Mendes et al. (2008) ranged 0.56 1.12 presenting low variability, interval 0 5 safely encompass possibly expected \\(q^\\ast\\) values practice, profiling evenness changing value qmax argument advised output values near range limits found.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Eduardo Ribeiro Cunha edurcunha@gmail.com  Heloisa Beatriz Antoniazi Evangelista helobeatriz@gmail.com,  technical input Péter Sólymos.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"","code":"data(BCI) (x <- eventstar(BCI[1:5,])) #>       qstar     Estar     Hstar    Dstar #> 1 0.6146389 0.4263687 10.524584 67.03551 #> 2 0.6249249 0.4080263  9.534034 57.66840 #> 3 0.6380858 0.4062032  9.225458 57.69174 #> 4 0.6245808 0.4062213 10.140189 65.50247 #> 5 0.6404825 0.4219957  9.828138 66.96440 ## profiling y <- as.numeric(BCI[10,]) (z <- eventstar(y)) #>       qstar     Estar    Hstar    Dstar #> 1 0.6372529 0.4117557 9.546332 61.77715 q <- seq(0, 2, 0.05) Eprof <- tsallis(y, scales=q, norm=TRUE) Hprof <- tsallis(y, scales=q) Dprof <- tsallis(y, scales=q, hill=TRUE) opar <- par(mfrow=c(3,1)) plot(q, Eprof, type=\"l\", main=\"Evenness\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar, norm=TRUE), col=2) plot(q, Hprof, type=\"l\", main=\"Diversity\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar), col=2) plot(q, Dprof, type=\"l\", main=\"Effective number of species\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar, hill=TRUE), col=2)  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Function fisherfit fits Fisher's logseries abundance   data. Function prestonfit groups species frequencies   doubling octave classes fits Preston's lognormal model,   function prestondistr fits truncated lognormal model   without pooling data octaves.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"","code":"fisherfit(x, ...) prestonfit(x, tiesplit = TRUE, ...) prestondistr(x, truncate = -1, ...) # S3 method for prestonfit plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\",      line.col = \"red\", lwd = 2, ...) # S3 method for prestonfit lines(x, line.col = \"red\", lwd = 2, ...) veiledspec(x, ...) as.fisher(x, ...) # S3 method for fisher plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\",              kind = c(\"bar\", \"hiplot\", \"points\", \"lines\"), add = FALSE, ...) as.preston(x, tiesplit = TRUE, ...) # S3 method for preston plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\", ...) # S3 method for preston lines(x, xadjust = 0.5, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"x Community data vector fitting functions result     object plot functions. tiesplit Split frequencies \\(1, 2, 4, 8\\) etc adjacent      octaves. truncate Truncation point log-Normal model, log2     units. Default value \\(-1\\) corresponds left border zero     Octave. choice strongly influences fitting results. xlab, ylab Labels x y axes. bar.col Colour data bars. line.col Colour fitted line. lwd Width fitted line. kind Kind plot drawn: \"bar\" similar bar plot     plot.fisherfit, \"hiplot\" draws vertical lines     plot(..., type=\"h\"), \"points\"     \"lines\" obvious. add Add existing plot. xadjust Adjustment horizontal positions octaves. ... parameters passed functions. Ignored      prestonfit tiesplit passed .preston     prestondistr.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Fisher's logarithmic series expected number species   \\(f\\) \\(n\\) observed individuals \\(f_n = \\alpha x^n /   n\\) (Fisher et al. 1943).  estimation possible   genuine counts individuals. parameter \\(\\alpha\\) used   diversity index can estimated separate function   fisher.alpha. parameter \\(x\\) taken   nuisance parameter estimated separately taken   \\(n/(n+\\alpha)\\). Helper function .fisher transforms   abundance data Fisher frequency table. Diversity given   NA communities one (zero) species:   reliable way estimating diversity, even equations   return bogus numeric value cases. Preston (1948) satisfied Fisher's model seemed   imply infinite species richness, postulated rare species   diminishing class species middle frequency   scale. achieved collapsing higher frequency classes   wider wider “octaves” doubling class limits: 1, 2, 3--4,   5--8, 9--16 etc. occurrences. seems Preston regarded   frequencies 1, 2, 4, etc.. “tied” octaves   (Williamson & Gaston 2005). means half species   frequency 1 shown lowest octave, rest   transferred second octave. Half species   second octave transferred higher one well,   usually large number species. practise makes data   look lognormal reducing usually high lowest   octaves. can achieved setting argument tiesplit = TRUE.    tiesplit = FALSE frequencies split,   ones lowest octave, twos second, etc.   Williamson & Gaston (2005) discuss alternative definitions   detail, consulted critical review   log-Normal model. logseries data look like lognormal plotted   Preston's way. expected frequency \\(f\\) abundance octave   \\(o\\) defined \\(f_o = S_0 \\exp(-(\\log_2(o) -   \\mu)^2/2/\\sigma^2)\\),   \\(\\mu\\) location mode \\(\\sigma\\) width,   \\(\\log_2\\) scale, \\(S_0\\) expected   number species mode. lognormal model usually truncated   left rare species observed. Function   prestonfit fits truncated lognormal model second   degree log-polynomial octave pooled data using Poisson (  tiesplit = FALSE) quasi-Poisson (tiesplit = TRUE)   error.  Function prestondistr fits left-truncated   Normal distribution \\(\\log_2\\) transformed non-pooled   observations direct maximization log-likelihood. Function   prestondistr modelled function   fitdistr can used alternative   distribution models. functions common print, plot lines   methods. lines function adds fitted curve   octave range line segments showing location mode   width (sd) response. Function .preston   transforms abundance data octaves.  Argument tiesplit   influence fit prestondistr, influence   barplot octaves. total extrapolated richness fitted Preston model can   found function veiledspec. function accepts results   prestonfit prestondistr.   veiledspec called species count vector,   internally use prestonfit. Function specpool   provides alternative ways estimating number unseen   species. fact, Preston's lognormal model seems truncated   ends, may main reason result differ   lognormal models fitted Rank--Abundance diagrams   functions rad.lognormal.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"function prestonfit returns object fitted  coefficients, observed (freq) fitted   (fitted) frequencies, string describing fitting  method. Function prestondistr omits entry  fitted.  function fisherfit returns result  nlm, item estimate \\(\\alpha\\).   result object amended nuisance parameter item  fisher observed data .fisher","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Fisher, R.., Corbet, .S. & Williams, C.B. (1943). relation   number species number individuals   random sample animal population. Journal Animal Ecology   12: 42--58. Preston, F.W. (1948) commonness rarity   species. Ecology 29, 254--283. Williamson, M. & Gaston, K.J. (2005). lognormal distribution   appropriate null hypothesis species--abundance   distribution. Journal Animal Ecology 74, 409--422.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Bob O'Hara Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"","code":"data(BCI) mod <- fisherfit(BCI[5,]) mod #>  #> Fisher log series model #> No. of species: 101  #> Fisher alpha:   37.96423  #>  # prestonfit seems to need large samples mod.oct <- prestonfit(colSums(BCI)) mod.ll <- prestondistr(colSums(BCI)) mod.oct #>  #> Preston lognormal model #> Method: Quasi-Poisson fit to octaves  #> No. of species: 225  #>  #>      mode     width        S0  #>  4.885798  2.932690 32.022923  #>  #> Frequencies by Octave #>                 0        1        2      3        4        5        6        7 #> Observed 9.500000 16.00000 18.00000 19.000 30.00000 35.00000 31.00000 26.50000 #> Fitted   7.994154 13.31175 19.73342 26.042 30.59502 31.99865 29.79321 24.69491 #>                 8        9       10     11 #> Observed 18.00000 13.00000 7.000000 2.0000 #> Fitted   18.22226 11.97021 7.000122 3.6443 #>  mod.ll #>  #> Preston lognormal model #> Method: maximized likelihood to log2 abundances  #> No. of species: 225  #>  #>      mode     width        S0  #>  4.365002  2.753531 33.458185  #>  #> Frequencies by Octave #>                0        1        2        3        4        5        6        7 #> Observed 9.50000 16.00000 18.00000 19.00000 30.00000 35.00000 31.00000 26.50000 #> Fitted   9.52392 15.85637 23.13724 29.58961 33.16552 32.58022 28.05054 21.16645 #>                 8         9       10      11 #> Observed 18.00000 13.000000 7.000000 2.00000 #> Fitted   13.99829  8.113746 4.121808 1.83516 #>  plot(mod.oct)   lines(mod.ll, line.col=\"blue3\") # Different ## Smoothed density den <- density(log2(colSums(BCI))) lines(den$x, ncol(BCI)*den$y, lwd=2) # Fairly similar to mod.oct  ## Extrapolated richness veiledspec(mod.oct) #> Extrapolated     Observed       Veiled  #>    235.40577    225.00000     10.40577  veiledspec(mod.ll) #> Extrapolated     Observed       Veiled  #>   230.931018   225.000000     5.931018"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Functions goodness inertcomp can   used assess goodness fit individual sites   species. Function vif.cca alias.cca can used   analyse linear dependencies among constraints conditions.   addition, diagnostic tools (see 'Details').","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"","code":"# S3 method for cca goodness(object, choices, display = c(\"species\", \"sites\"),     model = c(\"CCA\", \"CA\"), summarize = FALSE, addprevious = FALSE, ...) inertcomp(object, display = c(\"species\", \"sites\"),     unity = FALSE, proportional = FALSE) spenvcor(object) intersetcor(object) vif.cca(object) # S3 method for cca alias(object, names.only = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"object result object cca,     rda, dbrda capscale. display Display \"species\" \"sites\". Species     available dbrda capscale. choices Axes shown. Default show axes     \"model\". model Show constrained (\"CCA\") unconstrained     (\"CA\") results. summarize Show accumulated total. addprevious Add variation explained previous components      statistic=\"explained\". model = \"CCA\" add      conditioned (partialled ) variation, model = \"CA\"      add conditioned constrained variation. give      cumulative explanation previous components. unity Scale inertia components unit sum (sum items     1). proportional Give inertia components proportional     corresponding total item (sum row 1).     option takes precedence unity. names.Return names aliased variable(s) instead     defining equations. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Function goodness gives cumulative proportion inertia   accounted species chosen axes. proportions can   assessed either species sites depending argument   display, species available distance-based   dbrda. function implemented   capscale. Function inertcomp decomposes inertia partial,   constrained unconstrained components site species.   Legendre & De Cáceres (2012) called inertia   components local contributions beta-diversity (LCBD)   species contributions beta-diversity (SCBD), give   relative contributions summing unity (argument   unity = TRUE). interpretation, appropriate dissimilarity   measures used dbrda appropriate   standardization rda (Legendre & De   Cáceres 2012). function implemented   capscale. Function spenvcor finds -called “species --     environment correlation” (weighted) correlation   weighted average scores linear combination scores.  bad   measure goodness ordination, sensitive extreme   scores (like correlations ), sensitive overfitting   using many constraints. Better models often poorer   correlations. Function ordispider can show   graphically. Function intersetcor finds -called “interset     correlation” (weighted) correlation weighted averages scores   constraints.  defined contrasts used factor   variables.  bad measure since correlation.  ,   focuses correlations single contrasts single axes   instead looking multivariate relationship.  Fitted vectors   (envfit) provide better alternative.  Biplot scores   (see scores.cca) multivariate alternative   (weighted) correlation linear combination scores   constraints. Function vif.cca gives variance inflation factors   constraint contrast factor constraints. partial ordination,   conditioning variables analysed together constraints. Variance   inflation diagnostic tool identify useless constraints.   common rule values 10 indicate redundant   constraints. later constraints complete linear combinations   conditions previous constraints, completely removed   estimation, biplot scores centroids calculated   aliased constraints. note printed default   output aliased constraints. Function alias   give linear coefficients defining aliased constraints,   names argument names.= TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"functions return matrices vectors appropriate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Greenacre, M. J. (1984). Theory applications correspondence   analysis. Academic Press, London. Gross, J. (2003). Variance inflation factors. R News 3(1),   13--15. Legendre, P. & De Cáceres, M. (2012). Beta diversity   variance community data: dissimilarity coefficients   partitioning. Ecology Letters 16, 951--963.   doi:10.1111/ele.12141","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Jari Oksanen. vif.cca relies heavily code   W. N. Venables. alias.cca simplified version   alias.lm.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env) goodness(mod, addprevious = TRUE) #>                CCA1      CCA2      CCA3      CCA4 #> Achimill 0.36630013 0.3822685 0.3838616 0.4934158 #> Agrostol 0.67247051 0.6724758 0.6779597 0.7773267 #> Airaprae 0.36213737 0.3698100 0.3816619 0.3908018 #> Alopgeni 0.61547145 0.6966105 0.7042650 0.7212918 #> Anthodor 0.24619147 0.2795001 0.3509172 0.3609709 #> Bellpere 0.41185412 0.4179432 0.4847618 0.4849622 #> Bromhord 0.33487622 0.3397416 0.3870032 0.5505037 #> Chenalbu 0.23594716 0.2684323 0.2828928 0.2885321 #> Cirsarve 0.29041563 0.3013655 0.3080671 0.3591280 #> Comapalu 0.16338257 0.6836790 0.7390659 0.7963425 #> Eleopalu 0.55132024 0.6099415 0.6193301 0.6259818 #> Elymrepe 0.25239595 0.2710266 0.2761491 0.2882666 #> Empenigr 0.27089495 0.3132399 0.3153052 0.3154203 #> Hyporadi 0.31349648 0.3371809 0.3387669 0.3388716 #> Juncarti 0.43923609 0.4492937 0.4871043 0.5224072 #> Juncbufo 0.70439967 0.7226263 0.7228786 0.7257471 #> Lolipere 0.48141171 0.5720410 0.5727299 0.6034007 #> Planlanc 0.54969676 0.6084389 0.6802195 0.6826265 #> Poaprat  0.40267189 0.4944813 0.5014516 0.5326546 #> Poatriv  0.49694972 0.5409439 0.5468830 0.5594817 #> Ranuflam 0.68677962 0.6983001 0.7020461 0.7064850 #> Rumeacet 0.44788204 0.5211145 0.7673956 0.7691199 #> Sagiproc 0.27039747 0.3497634 0.3553109 0.3613746 #> Salirepe 0.64788354 0.7264891 0.7276110 0.7639711 #> Scorautu 0.54312496 0.5510319 0.6078931 0.6140593 #> Trifprat 0.37328840 0.4101104 0.6624199 0.6625703 #> Trifrepe 0.03048149 0.2115857 0.3300132 0.4207437 #> Vicilath 0.17824132 0.1784611 0.3762406 0.4279428 #> Bracruta 0.15585567 0.1641095 0.1672797 0.2449864 #> Callcusp 0.30771429 0.3143582 0.3308502 0.3518027 goodness(mod, addprevious = TRUE, summ = TRUE) #>  Achimill  Agrostol  Airaprae  Alopgeni  Anthodor  Bellpere  Bromhord  Chenalbu  #> 0.4934158 0.7773267 0.3908018 0.7212918 0.3609709 0.4849622 0.5505037 0.2885321  #>  Cirsarve  Comapalu  Eleopalu  Elymrepe  Empenigr  Hyporadi  Juncarti  Juncbufo  #> 0.3591280 0.7963425 0.6259818 0.2882666 0.3154203 0.3388716 0.5224072 0.7257471  #>  Lolipere  Planlanc   Poaprat   Poatriv  Ranuflam  Rumeacet  Sagiproc  Salirepe  #> 0.6034007 0.6826265 0.5326546 0.5594817 0.7064850 0.7691199 0.3613746 0.7639711  #>  Scorautu  Trifprat  Trifrepe  Vicilath  Bracruta  Callcusp  #> 0.6140593 0.6625703 0.4207437 0.4279428 0.2449864 0.3518027  # Inertia components inertcomp(mod, prop = TRUE) #>                pCCA        CCA        CA #> Achimill 0.34271900 0.15069678 0.5065842 #> Agrostol 0.55602406 0.22130269 0.2226733 #> Airaprae 0.06404726 0.32675457 0.6091982 #> Alopgeni 0.34238968 0.37890210 0.2787082 #> Anthodor 0.10259139 0.25837947 0.6390291 #> Bellpere 0.40972447 0.07523776 0.5150378 #> Bromhord 0.33046684 0.22003683 0.4494963 #> Chenalbu 0.11064346 0.17788865 0.7114679 #> Cirsarve 0.26649913 0.09262886 0.6408720 #> Comapalu 0.16096277 0.63537969 0.2036575 #> Eleopalu 0.53954819 0.08643366 0.3740182 #> Elymrepe 0.22234322 0.06592337 0.7117334 #> Empenigr 0.10361994 0.21180040 0.6845797 #> Hyporadi 0.03889627 0.29997533 0.6611284 #> Juncarti 0.43439190 0.08801527 0.4775928 #> Juncbufo 0.66622672 0.05952038 0.2742529 #> Lolipere 0.46273045 0.14067027 0.3965993 #> Planlanc 0.51993753 0.16268893 0.3173735 #> Poaprat  0.39408053 0.13857406 0.4673454 #> Poatriv  0.05598349 0.50349824 0.4405183 #> Ranuflam 0.68509904 0.02138594 0.2935150 #> Rumeacet 0.40125987 0.36786003 0.2308801 #> Sagiproc 0.26050435 0.10087025 0.6386254 #> Salirepe 0.12527838 0.63869277 0.2360289 #> Scorautu 0.10895437 0.50510492 0.3859407 #> Trifprat 0.34544815 0.31712212 0.3374297 #> Trifrepe 0.02132183 0.39942191 0.5792563 #> Vicilath 0.12125433 0.30668844 0.5720572 #> Bracruta 0.07222706 0.17275938 0.7550136 #> Callcusp 0.29447422 0.05732850 0.6481973 inertcomp(mod) #>                  pCCA         CCA         CA #> Achimill 0.0173766015 0.007640656 0.02568493 #> Agrostol 0.0456558521 0.018171449 0.01828399 #> Airaprae 0.0066672285 0.034014687 0.06341666 #> Alopgeni 0.0325977567 0.036073980 0.02653486 #> Anthodor 0.0096274015 0.024246897 0.05996790 #> Bellpere 0.0154640710 0.002839669 0.01943887 #> Bromhord 0.0180126793 0.011993496 0.02450059 #> Chenalbu 0.0031913088 0.005130874 0.02052099 #> Cirsarve 0.0110663060 0.003846389 0.02661204 #> Comapalu 0.0127652351 0.050389111 0.01615116 #> Eleopalu 0.0797827194 0.012780901 0.05530588 #> Elymrepe 0.0193932154 0.005749967 0.06207879 #> Empenigr 0.0063826176 0.013046147 0.04216766 #> Hyporadi 0.0046669914 0.035992710 0.07932587 #> Juncarti 0.0359126341 0.007276518 0.03948420 #> Juncbufo 0.0494087668 0.004414156 0.02033917 #> Lolipere 0.0368344271 0.011197683 0.03157023 #> Planlanc 0.0366139947 0.011456552 0.02234944 #> Poaprat  0.0142991623 0.005028142 0.01695757 #> Poatriv  0.0028845344 0.025942611 0.02269759 #> Ranuflam 0.0446783229 0.001394671 0.01914141 #> Rumeacet 0.0288221948 0.026423110 0.01658394 #> Sagiproc 0.0151161507 0.005853146 0.03705718 #> Salirepe 0.0142756439 0.072779924 0.02689581 #> Scorautu 0.0030643984 0.014206339 0.01085478 #> Trifprat 0.0228613139 0.020986733 0.02233067 #> Trifrepe 0.0008339368 0.015622139 0.02265580 #> Vicilath 0.0049088357 0.012415912 0.02315905 #> Bracruta 0.0032317812 0.007730074 0.03378289 #> Callcusp 0.0319130878 0.006212868 0.07024716 # vif.cca vif.cca(mod) #>   Moisture.L   Moisture.Q   Moisture.C           A1 ManagementHF ManagementNM  #>     1.504327     1.284489     1.347660     1.367328     2.238653     2.570972  #> ManagementSF  #>     2.424444  # Aliased constraints mod <- cca(dune ~ ., dune.env) mod #> Call: cca(formula = dune ~ A1 + Moisture + Management + Use + Manure, #> data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    1.5032     0.7106   12 #> Unconstrained  0.6121     0.2894    7 #> Inertia is scaled Chi-square  #> Some constraints or conditions were aliased because they were redundant #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11  #> 0.4671 0.3410 0.1761 0.1532 0.0953 0.0703 0.0589 0.0499 0.0318 0.0260 0.0228  #>  CCA12  #> 0.0108  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7  #> 0.27237 0.10876 0.08975 0.06305 0.03489 0.02529 0.01798  #>  vif.cca(mod) #>           A1   Moisture.L   Moisture.Q   Moisture.C ManagementHF ManagementNM  #>     2.208249     2.858927     3.072715     3.587087     6.608315   142.359372  #> ManagementSF        Use.L        Use.Q     Manure.L     Manure.Q     Manure.C  #>    12.862713     2.642718     3.007238    80.828330    49.294455    21.433337  #>     Manure^4  #>           NA  alias(mod) #> Model : #> dune ~ A1 + Moisture + Management + Use + Manure #>  #> Complete : #>          A1 Moisture.L Moisture.Q Moisture.C ManagementHF ManagementNM #> Manure^4                                                   8.366600    #>          ManagementSF Use.L Use.Q Manure.L  Manure.Q  Manure.C  #> Manure^4                           5.291503 -4.472136  2.645751 #>  with(dune.env, table(Management, Manure)) #>           Manure #> Management 0 1 2 3 4 #>         BF 0 2 1 0 0 #>         HF 0 1 2 2 0 #>         NM 6 0 0 0 0 #>         SF 0 0 1 2 3 # The standard correlations (not recommended) ## IGNORE_RDIFF_BEGIN spenvcor(mod) #>      CCA1      CCA2      CCA3      CCA4      CCA5      CCA6      CCA7      CCA8  #> 0.9636709 0.9487249 0.9330741 0.8734876 0.9373716 0.8362687 0.9748793 0.8392720  #>      CCA9     CCA10     CCA11     CCA12  #> 0.8748741 0.6087512 0.6633248 0.7581210  intersetcor(mod) #>                    CCA1        CCA2        CCA3         CCA4        CCA5 #> A1           -0.5332506  0.13691202 -0.47996401 -0.259859587 -0.09894964 #> Moisture.L   -0.8785505  0.17867589  0.03714134  0.181952935 -0.09826534 #> Moisture.Q   -0.1956664 -0.33044917 -0.27321286 -0.180333890  0.26609291 #> Moisture.C   -0.2023782 -0.09698397  0.28596824 -0.261712720 -0.49103002 #> ManagementHF  0.3473460  0.01680324 -0.51205769  0.194144965  0.30752664 #> ManagementNM -0.5699549 -0.61111645  0.14751127 -0.013777789  0.04571982 #> ManagementSF -0.1197499  0.64084416  0.19780650  0.134892908 -0.09679992 #> Use.L        -0.1871999  0.32990444 -0.30941161 -0.372747011  0.09586963 #> Use.Q        -0.1820298 -0.48874152 -0.01997442 -0.009812946  0.04812588 #> Manure.L      0.3175126  0.65945634  0.03724864 -0.025383543 -0.04077470 #> Manure.Q     -0.4075615 -0.21149073  0.49297244 -0.176686201  0.11973190 #> Manure.C      0.4676279  0.11376054  0.29132473 -0.173382982  0.14219924 #> Manure^4      0.2222349 -0.12789494 -0.12921227  0.108367170 -0.02559567 #>                     CCA6        CCA7        CCA8        CCA9         CCA10 #> A1           -0.15225816  0.25788462  0.19247720 -0.27694466 -0.1158449480 #> Moisture.L   -0.02923342  0.07858647 -0.10772510  0.07101300  0.0952517164 #> Moisture.Q   -0.11211675  0.05062810 -0.48302647  0.06138704 -0.2053304965 #> Moisture.C   -0.23581275 -0.38693407 -0.10144580 -0.21907160  0.1875632770 #> ManagementHF -0.24278705  0.16364055 -0.14053438  0.31066725  0.1310215145 #> ManagementNM -0.06430101  0.23917584  0.14375754 -0.27103732  0.0002768613 #> ManagementSF -0.01611984 -0.49726250  0.08073472 -0.30235728 -0.1381281272 #> Use.L         0.19127262 -0.44624831 -0.18450714  0.12950951  0.0452826749 #> Use.Q         0.13485545  0.10367354 -0.11020112  0.41245485 -0.0766932005 #> Manure.L     -0.22265819 -0.49627772 -0.16971786 -0.03943343 -0.0045229147 #> Manure.Q     -0.19402211 -0.11937394  0.17611673 -0.44002593  0.0903998202 #> Manure.C      0.14760330  0.07842345  0.37774417  0.10181374  0.1055057288 #> Manure^4     -0.36683782  0.05953330  0.40927409 -0.06054381 -0.1500198368 #>                    CCA11       CCA12 #> A1           -0.03550223 -0.08881387 #> Moisture.L    0.06404776 -0.08587882 #> Moisture.Q   -0.21810558  0.16917878 #> Moisture.C    0.13701079 -0.14260914 #> ManagementHF  0.17283125  0.13296499 #> ManagementNM -0.01358436  0.09533598 #> ManagementSF -0.01468592 -0.06614834 #> Use.L        -0.08584883  0.32559307 #> Use.Q         0.41893616  0.04881247 #> Manure.L      0.02396993  0.13049087 #> Manure.Q      0.12987366  0.07137031 #> Manure.C      0.05176927 -0.41550238 #> Manure^4     -0.41603287  0.01661279 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness.metaMDS find goodness fit measure   points nonmetric multidimensional scaling, function   stressplot makes Shepard diagram.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"","code":"# S3 method for metaMDS goodness(object, dis, ...) # S3 method for default stressplot(object, dis, pch, p.col = \"blue\", l.col = \"red\",      lwd = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"object result object metaMDS,      monoMDS isoMDS. dis Dissimilarities.  used     metaMDS monoMDS, must used     isoMDS. pch Plotting character points.  Default dependent     number points. p.col, l.col Point line colours. lwd Line width. monoMDS default     lwd = 1 two lines drawn, lwd = 2      otherwise. ... parameters functions, e.g. graphical parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness.metaMDS finds goodness fit statistic   observations (points).  defined sum squared   values equal squared stress.  Large values indicate poor fit.   absolute values goodness statistic depend   definition stress: isoMDS expresses   stress percents, therefore goodness values 100 times   higher monoMDS expresses   stress proportion. Function stressplot draws Shepard diagram plot   ordination distances monotone linear fit line   original dissimilarities.  addition, displays two   correlation-like statistics goodness fit graph.   nonmetric fit based stress \\(S\\) defined \\(R^2   = 1-S^2\\).  “linear fit” squared   correlation fitted values ordination distances.   monoMDS, “linear fit” \\(R^2\\)   “stress type 2” equal. functions can used metaMDS,   monoMDS isoMDS.  original   dissimilarities given monoMDS   metaMDS results (latter tries reconstruct   dissimilarities using metaMDSredist   isoMDS used engine).    isoMDS dissimilarities must given.    either case, functions inspect dissimilarities   consistent current ordination, refuse analyse   inconsistent dissimilarities.  Function goodness.metaMDS   generic vegan, must spell name completely   isoMDS class.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness returns vector values. Function  stressplot returns invisibly object items   original dissimilarities, ordination distances fitted values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"","code":"data(varespec) mod <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.1955839  #> Run 2 stress 0.1974418  #> Run 3 stress 0.195049  #> Run 4 stress 0.1948413  #> Run 5 stress 0.1969805  #> Run 6 stress 0.2005511  #> Run 7 stress 0.2080749  #> Run 8 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04161743  max resid 0.1517614  #> Run 9 stress 0.1843196  #> Run 10 stress 0.2166093  #> Run 11 stress 0.2088293  #> Run 12 stress 0.2066172  #> Run 13 stress 0.1955842  #> Run 14 stress 0.195049  #> Run 15 stress 0.2109853  #> Run 16 stress 0.195049  #> Run 17 stress 0.1955836  #> Run 18 stress 0.2245479  #> Run 19 stress 0.1825658  #> ... Procrustes: rmse 1.859013e-06  max resid 5.255336e-06  #> ... Similar to previous best #> Run 20 stress 0.2093085  #> *** Best solution repeated 1 times stressplot(mod)  gof <- goodness(mod) gof #>  [1] 0.02984501 0.03513712 0.04189552 0.04598085 0.04003109 0.03441359 #>  [7] 0.03295039 0.03050115 0.03060825 0.02994103 0.03526095 0.02621454 #> [13] 0.03831015 0.02980923 0.03369273 0.02225952 0.03561673 0.03505294 #> [19] 0.06577458 0.03268326 0.03502942 0.02956642 0.05168324 0.04601820 plot(mod, display = \"sites\", type = \"n\") points(mod, display = \"sites\", cex = 2*gof/mean(gof))"},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicator Power of Species — indpower","title":"Indicator Power of Species — indpower","text":"Indicator power calculation Halme et al.  (2009)   congruence indicator target species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicator Power of Species — indpower","text":"","code":"indpower(x, type = 0)"},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicator Power of Species — indpower","text":"x Community data frame matrix. type type   statistic returned. See Details explanation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indicator Power of Species — indpower","text":"Halme et al. (2009) described index indicator power defined   \\(IP_I = \\sqrt{\\times  b}\\), \\(= S / O_I\\)   \\(b = 1 - (O_T - S) / (N - O_I)\\).    \\(N\\) number sites,   \\(S\\) number shared occurrences indicator (\\(\\))   target (\\(T\\)) species. \\(O_I\\) \\(O_T\\) number   occurrences indicator target species. type   argument function call enables choose statistic   return. type = 0 returns \\(IP_I\\), type = 1 returns    \\(\\), type = 2 returns \\(b\\).   Total indicator power (TIP) indicator species column mean   (without value, see examples).     Halme et al. (2009) explain calculate confidence   intervals statistics, see Examples.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicator Power of Species — indpower","text":"matrix indicator species rows   target species columns (indicated first letters   row/column names).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indicator Power of Species — indpower","text":"Halme, P., Mönkkönen, M., Kotiaho, J. S,  Ylisirniö, -L. 2009. Quantifying indicator power indicator species. Conservation Biology 23: 1008--1016.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indicator Power of Species — indpower","text":"Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indicator Power of Species — indpower","text":"","code":"data(dune) ## IP values ip <- indpower(dune) ## and TIP values diag(ip) <- NA (TIP <- rowMeans(ip, na.rm=TRUE)) #> i.Achimill i.Agrostol i.Airaprae i.Alopgeni i.Anthodor i.Bellpere i.Bromhord  #>  0.3186250  0.3342800  0.2168133  0.3416198  0.3567884  0.3432281  0.3665632  #> i.Chenalbu i.Cirsarve i.Comapalu i.Eleopalu i.Elymrepe i.Empenigr i.Hyporadi  #>  0.2095044  0.2781640  0.1713273  0.2414787  0.3263516  0.2016196  0.2378197  #> i.Juncarti i.Juncbufo i.Lolipere i.Planlanc  i.Poaprat  i.Poatriv i.Ranuflam  #>  0.2915850  0.3331330  0.3998442  0.3426064  0.4094319  0.3929520  0.2663080  #> i.Rumeacet i.Sagiproc i.Salirepe i.Scorautu i.Trifprat i.Trifrepe i.Vicilath  #>  0.3484684  0.3788905  0.2898512  0.4362493  0.3145854  0.4503764  0.2605349  #> i.Bracruta i.Callcusp  #>  0.4252676  0.2070766   ## p value calculation for a species ## from Halme et al. 2009 ## i is ID for the species i <- 1 fun <- function(x, i) indpower(x)[i,-i] ## 'c0' randomizes species occurrences os <- oecosimu(dune, fun, \"c0\", i=i, nsimul=99) #> Warning: nullmodel transformed 'comm' to binary data ## get z values from oecosimu output z <- os$oecosimu$z ## p-value (p <- sum(z) / sqrt(length(z))) #> [1] -1.616282 ## 'heterogeneity' measure (chi2 <- sum((z - mean(z))^2)) #> [1] 93.72683 pchisq(chi2, df=length(z)-1) #> [1] 1 ## Halme et al.'s suggested output out <- c(TIP=TIP[i],      significance=p,     heterogeneity=chi2,     minIP=min(fun(dune, i=i)),     varIP=sd(fun(dune, i=i)^2)) out #> TIP.i.Achimill   significance  heterogeneity          minIP          varIP  #>      0.3186250     -1.6162817     93.7268284      0.0000000      0.2142097"},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Diagnostics for Constrained Ordination — influence.cca","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"set function extracts influence statistics   linear model statistics directly constrained ordination result   object cca, rda,   capscale dbrda. constraints   linear model functions support functions return identical   results corresponding linear models (lm),   can use documentation. main functions normal usage   leverage values (hatvalues), standardized residuals   (rstandard), studentized leave-one-residuals   (rstudent), Cook's distance   (cooks.distance).  addition, vcov   returns variance-covariance matrix coefficients,   diagonal values variances coefficients. functions   mainly support functions , can used directly.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"","code":"# S3 method for cca hatvalues(model, ...) # S3 method for cca rstandard(model, type = c(\"response\", \"canoco\"), ...) # S3 method for cca rstudent(model, type = c(\"response\", \"canoco\"), ...) # S3 method for cca cooks.distance(model, type = c(\"response\", \"canoco\"), ...)  # S3 method for cca sigma(object, type = c(\"response\", \"canoco\"), ...) # S3 method for cca vcov(object, type = \"canoco\", ...) # S3 method for cca SSD(object, type = \"canoco\", ...)  # S3 method for cca qr(x, ...) # S3 method for cca df.residual(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"model, object, x constrained ordination result object. type Type statistics used extracting raw residuals     residual standard deviation (sigma). Either     \"response\" species data difference WA LC     scores \"canoco\". ... arguments functions (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"vegan algorithm constrained ordination uses linear model   (weighted linear model cca) find fitted   values dependent community data, constrained ordination   based fitted response (Legendre & Legendre 2012).   hatvalues give leverage values constraints,   leverage independent response data. influence   statistics (rstandard, rstudent,   cooks.distance) based leverage, raw   residuals residual standard deviation (sigma).   type = \"response\" raw residuals given   unconstrained component constrained ordination, influence   statistics matrix dimensions . observations times   . species. cca statistics   obtained lm model using Chi-square standardized   species data (see decostand) dependent variable,   row sums community data weights, rda   lm model uses non-modified community data   weights. algorithm CANOCO software constraints results   iteration performing linear regression weighted averages (WA)   scores constraints taking fitted values regression   linear combination (LC) scores (ter Braak 1984). WA scores   directly found species scores, LC scores linear   combinations constraints regression. type =   \"canoco\" raw residuals differences WA LC scores,   residual standard deviation (sigma) taken   axis sum squared WA scores minus one. quantities   relationship residual component ordination, rather   methodological artefacts algorithm used   vegan. result matrix dimensions .   observations times . constrained axes. Function vcov returns matrix variances   covariances regression coefficients. diagonal values   matrix variances, square roots give standard   errors regression coefficients. function based   SSD extracts sum squares crossproducts   residuals. residuals defined similarly influence   measures type similar properties   limitations, define dimensions result matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd   English ed. Elsevier. ter Braak, C.J.F. (1984--): CANOCO -- FORTRAN program   canonical community ordination [partial]   [detrended] [canonical] correspondence analysis, principal components   analysis redundancy analysis. TNO Inst. Applied Computer   Sci., Stat. Dept. Wageningen, Netherlands.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Function .mlm casts ordination object multiple   linear model class \"mlm\" (see lm), similar   statistics can derived modified object set   functions. However, problems R   implementation analysis multiple linear model   objects. results differ, current set functions   probable correct. use .mlm objects   avoided.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"","code":"data(varespec, varechem) mod <- cca(varespec ~ Al + P + K, varechem) ## leverage hatvalues(mod) #>         18         15         24         27         23         19         22  #> 0.06904416 0.06666628 0.15245083 0.18944882 0.09291510 0.05122338 0.15309307  #>         16         28         13         14         20         25          7  #> 0.09605909 0.27139695 0.75889765 0.04958141 0.06582891 0.10590183 0.20630888  #>          5          6          3          4          2          9         12  #> 0.19797654 0.16280522 0.22738889 0.30915530 0.15557066 0.14855598 0.09046701  #>         10         11         21  #> 0.12745850 0.10984996 0.14195559  plot(hatvalues(mod), type = \"h\")  ## ordination plot with leverages: points with high leverage have ## similar LC and WA scores plot(mod, type = \"n\") ordispider(mod)       # segment from LC to WA scores points(mod, dis=\"si\", cex=5*hatvalues(mod), pch=21, bg=2) # WA scores text(mod, dis=\"bp\", col=4)   ## deviation and influence head(rstandard(mod)) #>      Callvulg   Empenigr    Rhodtome     Vaccmyrt   Vaccviti   Pinusylv #> 18  0.4084518  0.9442480 -0.68178124 -0.798241724  0.9883838 -0.3086868 #> 15 -1.3902462 -1.5717947 -0.70784872 -0.645563228  0.2353736 -0.1679226 #> 24  0.9622453 -0.9520875 -0.08884556 -0.654099911  0.2420416  0.4832198 #> 27 -1.1080099  1.0938951  1.70146427 -0.196668562 -0.3937467 -0.7424140 #> 23  0.3979939  1.3218254 -0.63872221 -1.003315524  1.8996365 -0.4495408 #> 19 -1.5874575  0.7894087 -0.59609083 -0.006142973  0.1334143 -0.1060450 #>      Descflex   Betupube   Vacculig   Diphcomp      Dicrsp     Dicrfusc #> 18 -0.5785258 -0.4585683  0.7640788  4.3748349 -0.39301720 -0.656213958 #> 15 -0.5416812 -0.4594716 -0.3410155 -0.2704388 -0.05769657  0.406022095 #> 24 -0.6409619  0.1908003  0.0198320 -0.2175720  3.75416938 -0.009140093 #> 27  4.2976822 -0.2704153  0.9211453 -0.2037075 -0.84410200 -0.712968237 #> 23 -0.8356637 -0.2779318 -0.0206861 -0.2899895 -0.67773316 -0.294674408 #> 19 -0.4453843 -0.3739569 -0.3174207 -0.2429740 -0.14281646 -0.819230368 #>      Dicrpoly   Hylosple   Pleuschr    Polypili   Polyjuni   Polycomm #> 18 -0.4933634 -0.6030042 -1.3812122 -0.07430854 -0.5332731 -0.7140513 #> 15 -0.3630434 -0.4055353  1.9930791  0.02126658 -0.2274864 -0.6730241 #> 24  2.2312025 -1.3907968  0.5792314 -0.45358405 -0.4628096 -0.2153846 #> 27 -0.5715008  1.6310289  0.8124329 -0.34628172 -0.8630615  0.9423113 #> 23 -0.4684368 -1.1995321 -0.8241477 -0.04953929  0.7890327 -0.6774675 #> 19 -0.3186606 -0.3948224  0.6180114  0.05035990  0.8260214  2.3626483 #>      Pohlnuta    Ptilcili    Barbhatc   Cladarbu    Cladrang   Cladstel #> 18  0.2918311 -0.42027512 -0.40191333  1.5303054  0.85056948 -0.2218833 #> 15 -0.6168627 -0.47096984 -0.42715787  0.1758993 -0.45409579 -0.3739920 #> 24  1.9274063  0.09984384  0.21066100  0.1668363 -0.08508535 -1.2835676 #> 27 -1.5729552 -0.31944598 -0.09167396 -0.1864165  0.51080623 -0.1083797 #> 23  0.4875575  0.61798970 -0.18848086  0.5574309  0.28079468 -0.4026464 #> 19 -0.1141521 -0.25344373 -0.31179839 -0.2391669 -0.65577452  0.6584127 #>       Cladunci    Cladcocc   Cladcorn    Cladgrac   Cladfimb   Cladcris #> 18 -0.39796095  0.93836573 -0.2564543  0.33864378  1.1572584 -0.2083305 #> 15  0.06761526  0.24340663 -0.1767166  0.27491203  1.0721632  1.9724410 #> 24  1.24902375 -0.98471253 -0.4801382  2.51184311 -1.4063518 -0.3084304 #> 27 -0.59021669 -1.25354423 -0.2460447 -1.09351514 -1.1681499 -1.0337232 #> 23 -0.34604539 -0.10730202  3.9477300  2.51924664  0.3536280  3.3882402 #> 19 -0.33866721  0.02698153  0.1776632  0.03968833 -0.7512944 -0.4763562 #>      Cladchlo   Cladbotr   Cladamau     Cladsp   Cetreric   Cetrisla #> 18 -0.5711604 -0.4914716  4.0852019  0.2489284 -0.4428064 -0.5834462 #> 15 -0.4347061 -0.6517740 -0.3155708 -0.2568784  0.2369559 -0.3468005 #> 24  0.6013607  0.4603779 -0.1576900 -0.5995616  2.7826114  0.3931826 #> 27 -0.5436659 -0.2788962 -0.1606997  0.1557879 -0.7298364 -0.5867612 #> 23  0.1029999  0.6494142 -0.3415411 -0.2330698 -0.6309632 -0.5301977 #> 19  0.2793712 -0.1315438 -0.2705486 -0.2865837 -0.4664078 -0.5056846 #>       Flavniva   Nepharct      Stersp   Peltapht     Icmaeric    Cladcerv #> 18  0.30428187 -0.3624631 -0.23665431 -0.1571633 -0.630333375  0.12058739 #> 15  0.17345018 -0.1919943  0.05469573 -0.3233311 -0.561177494  0.08518455 #> 24 -0.74154401 -0.4146848 -0.05500461 -0.7609417  0.255058737 -0.92761801 #> 27  0.11301489 -0.5064006 -0.08681568 -0.1247151 -0.001277338 -0.04038189 #> 23  0.09411988 -0.4627811  0.47668055  3.5826478 -0.274664798 -0.05517988 #> 19  0.07211309 -0.1693122 -0.17244475 -0.3155345 -0.461532920 -0.02709075 #>       Claddefo   Cladphyl #> 18 -0.43581630 -0.2098378 #> 15  0.94176661 -0.1028102 #> 24 -0.07508682 -1.0479632 #> 27 -1.06110299 -0.4908554 #> 23  2.66430575 -0.4244333 #> 19 -0.08427954 -0.1692474 head(cooks.distance(mod)) #>       Callvulg   Empenigr     Rhodtome     Vaccmyrt     Vaccviti     Pinusylv #> 18 0.003093283 0.01653142 0.0086184263 1.181427e-02 0.0181129462 0.0017667454 #> 15 0.034513793 0.04411649 0.0089472619 7.441951e-03 0.0009892926 0.0005035324 #> 24 0.041636714 0.04076229 0.0003549575 1.923947e-02 0.0026344196 0.0105001237 #> 27 0.071736260 0.06992022 0.1691597848 2.260067e-03 0.0090591037 0.0322065174 #> 23 0.004056312 0.04474315 0.0104472601 2.577825e-02 0.0924100906 0.0051750754 #> 19 0.034013281 0.00841101 0.0047958896 5.093326e-07 0.0002402422 0.0001517834 #>       Descflex    Betupube     Vacculig     Diphcomp       Dicrsp     Dicrfusc #> 18 0.006205594 0.003898934 1.082466e-02 0.3548634058 2.863921e-03 7.984152e-03 #> 15 0.005239584 0.003769873 2.076622e-03 0.0013060122 5.944416e-05 2.943802e-03 #> 24 0.018474359 0.001637053 1.768633e-05 0.0021286828 6.337714e-01 3.756697e-06 #> 27 1.079245024 0.004272814 4.958014e-02 0.0024247421 4.163335e-02 2.970242e-02 #> 23 0.017883042 0.001978130 1.095811e-05 0.0021534900 1.176240e-02 2.223634e-03 #> 19 0.002677405 0.001887502 1.359924e-03 0.0007968265 2.752966e-04 9.058502e-03 #>       Dicrpoly    Hylosple    Pleuschr     Polypili     Polyjuni    Polycomm #> 18 0.004513066 0.006741841 0.035371924 1.023801e-04 0.0052727512 0.009453588 #> 15 0.002353565 0.002936747 0.070934636 8.076156e-06 0.0009241023 0.008088546 #> 24 0.223863289 0.086982577 0.015087217 9.251676e-03 0.0096318471 0.002086096 #> 27 0.019084693 0.155444288 0.038567940 7.006653e-03 0.0435246182 0.051884812 #> 23 0.005619275 0.036846999 0.017393559 6.284604e-05 0.0159429407 0.011753178 #> 19 0.001370570 0.002104010 0.005155103 3.423056e-05 0.0092093061 0.075342921 #>        Pohlnuta     Ptilcili     Barbhatc     Cladarbu     Cladrang #> 18 0.0015790689 0.0032749544 0.0029950405 0.0434204290 0.0134139742 #> 15 0.0067949512 0.0039609143 0.0032582625 0.0005525065 0.0036821731 #> 24 0.1670519112 0.0004482780 0.0019955986 0.0012516596 0.0003255476 #> 27 0.1445719869 0.0059627459 0.0004910701 0.0020305802 0.0152462776 #> 23 0.0060873754 0.0097800450 0.0009097308 0.0079572035 0.0020190921 #> 19 0.0001758783 0.0008669766 0.0013121758 0.0007720518 0.0058043470 #>        Cladstel     Cladunci     Cladcocc     Cladcorn     Cladgrac    Cladfimb #> 18 0.0009128242 2.936424e-03 1.632609e-02 0.0012194323 2.126298e-03 0.024831249 #> 15 0.0024976637 8.163919e-05 1.057972e-03 0.0005576530 1.349574e-03 0.020527262 #> 24 0.0740870642 7.015301e-02 4.360375e-02 0.0103666250 2.837200e-01 0.088939118 #> 27 0.0006863532 2.035516e-02 9.181862e-02 0.0035373629 6.987166e-02 0.079734929 #> 23 0.0041517010 3.066511e-03 2.948453e-04 0.3990922140 1.625248e-01 0.003202372 #> 19 0.0058511426 1.548070e-03 9.826017e-06 0.0004260291 2.126033e-05 0.007618415 #>        Cladcris     Cladchlo     Cladbotr     Cladamau      Cladsp    Cetreric #> 18 0.0008047178 0.0060485887 0.0044785217 0.3094317912 0.001148912 0.003635513 #> 15 0.0694732020 0.0033744318 0.0075858327 0.0017782910 0.001178323 0.001002639 #> 24 0.0042777886 0.0162620357 0.0095308986 0.0011181833 0.016164882 0.348184969 #> 27 0.0624395810 0.0172709295 0.0045450274 0.0015089732 0.001418140 0.031124511 #> 23 0.2939860714 0.0002716767 0.0107999564 0.0029872002 0.001391075 0.010194981 #> 19 0.0030627243 0.0010534342 0.0002335528 0.0009879496 0.001108529 0.002936134 #>       Cetrisla     Flavniva     Nepharct       Stersp     Peltapht     Icmaeric #> 18 0.006311601 1.716683e-03 0.0024359336 1.038405e-03 0.0004579733 7.366793e-03 #> 15 0.002147676 5.372282e-04 0.0006582422 5.342149e-05 0.0018668272 5.623539e-03 #> 24 0.006951741 2.472742e-02 0.0077328775 1.360514e-04 0.0260380002 2.925400e-03 #> 27 0.020117510 7.463161e-04 0.0149844191 4.404005e-04 0.0009088445 9.533741e-08 #> 23 0.007198701 2.268512e-04 0.0054844061 5.818798e-03 0.3286900860 1.931899e-03 #> 19 0.003451467 7.018956e-05 0.0003869197 4.013694e-04 0.0013438101 2.875078e-03 #>        Cladcerv     Claddefo     Cladphyl #> 18 2.696135e-04 3.521639e-03 0.0008164040 #> 15 1.295779e-04 1.583784e-02 0.0001887477 #> 24 3.869397e-02 2.535317e-04 0.0493852158 #> 27 9.528504e-05 6.579101e-02 0.0140785723 #> 23 7.797221e-05 1.817802e-01 0.0046131462 #> 19 9.905729e-06 9.587131e-05 0.0003866237  ## Influence measures from lm y <- decostand(varespec, \"chi.square\") # needed in cca y1 <- with(y, Cladstel)         # take one species for lm lmod1 <- lm(y1 ~ Al + P + K, varechem, weights = rowSums(varespec)) ## numerically identical within 2e-15 all(abs(cooks.distance(lmod1) - cooks.distance(mod)[, \"Cladstel\"]) < 1e-8) #> [1] TRUE  ## t-values of regression coefficients based on type = \"canoco\" ## residuals coef(mod) #>            CCA1         CCA2         CCA3 #> Al  0.007478556 -0.001883637  0.003380774 #> P  -0.006491081 -0.102189737 -0.022306682 #> K  -0.006755568  0.015343662  0.017067351 coef(mod)/sqrt(diag(vcov(mod, type = \"canoco\"))) #>          CCA1      CCA2      CCA3 #> Al  6.5615451 -1.397643  3.313629 #> P  -0.4576132 -6.092557 -1.756774 #> K  -2.0862129  4.007159  5.887926"},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":null,"dir":"Reference","previous_headings":"","what":"Isometric Feature Mapping Ordination — isomap","title":"Isometric Feature Mapping Ordination — isomap","text":"function performs isometric feature mapping consists   three simple steps: (1) retain shortest   dissimilarities among objects, (2) estimate dissimilarities   shortest path distances, (3) perform metric scaling (Tenenbaum et   al. 2000).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Isometric Feature Mapping Ordination — isomap","text":"","code":"isomap(dist, ndim=10, ...) isomapdist(dist, epsilon, k, path = \"shortest\", fragmentedOK =FALSE, ...) # S3 method for isomap summary(object, axes = 4, ...) # S3 method for isomap plot(x, net = TRUE, n.col = \"gray\", type = \"points\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Isometric Feature Mapping Ordination — isomap","text":"dist Dissimilarities. ndim Number axes metric scaling (argument k     cmdscale). epsilon Shortest dissimilarity retained. k Number shortest dissimilarities retained point.    epsilon k given, epsilon used. path Method used stepacross estimate     shortest path, alternatives \"shortest\" \"extended\". fragmentedOK dissimilarity matrix     fragmented. TRUE, analyse largest connected group,     otherwise stop error. x, object isomap result object. axes Number axes displayed. net Draw net retained dissimilarities. n.col Colour drawn net segments. can also vector     recycled points, colour net segment     mixture joined points. type Plot observations either \"points\",     \"text\" use \"none\" plot observations.     \"text\" use ordilabel net = TRUE      ordiplot net = FALSE, pass     extra arguments functions. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Isometric Feature Mapping Ordination — isomap","text":"function isomap first calls function isomapdist   dissimilarity transformation, performs metric scaling   result. arguments isomap passed   isomapdist. functions separate   isompadist transformation easily used   functions simple linear mapping cmdscale. Function isomapdist retains either dissimilarities equal shorter   epsilon, epsilon given, least k   shortest dissimilarities point.  complete dissimilarity   matrix reconstructed using stepacross using either   flexible shortest paths extended dissimilarities (details, see   stepacross). De'ath (1999) actually published essentially method   Tenenbaum et al. (2000), De'ath's function available function   xdiss non-CRAN package mvpart. differences   isomap introduced k criterion, whereas De'ath   used epsilon criterion.  practice, De'ath also retains   higher proportion dissimilarities typical isomap. plot function uses internally ordiplot,   except adds text net using ordilabel.   plot function passes extra arguments functions.    addition, vegan3d package function   rgl.isomap make dynamic 3D plots can   rotated screen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Isometric Feature Mapping Ordination — isomap","text":"Function isomapdist returns dissimilarity object similar  dist. Function isomap returns object class  isomap plot summary methods.  plot function returns invisibly object class  ordiplot. Function scores can extract   ordination scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Isometric Feature Mapping Ordination — isomap","text":"De'ath, G. (1999)  Extended dissimilarity: method robust      estimation ecological distances high beta diversity data.      Plant Ecology 144, 191--199 Tenenbaum, J.B., de Silva, V. & Langford, J.C. (2000) global      network framework nonlinear dimensionality      reduction. Science 290, 2319--2323.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Isometric Feature Mapping Ordination — isomap","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Isometric Feature Mapping Ordination — isomap","text":"Tenenbaum et al. (2000) justify isomap tool unfolding   manifold (e.g. 'Swiss Roll'). Even manifold structure,   sampling must even dense   dissimilarities along manifold shorter across   folds. data manifold structure, results   sensitive parameter values.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Isometric Feature Mapping Ordination — isomap","text":"","code":"## The following examples also overlay minimum spanning tree to ## the graphics in red. op <- par(mar=c(4,4,1,1)+0.2, mfrow=c(2,2)) data(BCI) dis <- vegdist(BCI) tr <- spantree(dis) pl <- ordiplot(cmdscale(dis), main=\"cmdscale\") #> species scores not available lines(tr, pl, col=\"red\") ord <- isomap(dis, k=3) ord #>  #> Isometric Feature Mapping (isomap) #>  #> Call: #> isomap(dist = dis, k = 3)  #>  #> Distance method: bray shortest isomap  #> Criterion: k = 3  pl <- plot(ord, main=\"isomap k=3\") lines(tr, pl, col=\"red\") pl <- plot(isomap(dis, k=5), main=\"isomap k=5\") lines(tr, pl, col=\"red\") pl <- plot(isomap(dis, epsilon=0.45), main=\"isomap epsilon=0.45\") lines(tr, pl, col=\"red\")  par(op) ## colour points and web by the dominant species dom <- apply(BCI, 1, which.max) ## need nine colours, but default palette  has only eight op <- palette(c(palette(\"default\"), \"sienna\")) plot(ord, pch = 16, col = dom, n.col = dom)   palette(op)"},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":null,"dir":"Reference","previous_headings":"","what":"Kendall coefficient of concordance — kendall.global","title":"Kendall coefficient of concordance — kendall.global","text":"Function kendall.global computes tests coefficient   concordance among several judges (variables, species)   permutation test. Function kendall.post carries posteriori tests   contributions individual judges (variables, species)   overall concordance group permutation tests. several groups judges identified data table,   coefficients concordance (kendall.global) posteriori   tests (kendall.post) computed group   separately. Use ecology: identify significant species   associations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kendall coefficient of concordance — kendall.global","text":"","code":"kendall.global(Y, group, nperm = 999, mult = \"holm\") kendall.post(Y, group, nperm = 999, mult = \"holm\")"},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kendall coefficient of concordance — kendall.global","text":"Y Data file (data frame matrix) containing quantitative     semiquantitative data. Rows objects columns judges     (variables). community ecology, table often     site--species table. group vector defining judges divided     groups. See example . groups explicitly defined,     judges data file considered forming single     group. nperm Number permutations performed. Default     999. mult Correct P-values multiple testing using     alternatives described p.adjust addition     \"sidak\" (see Details). Bonferroni correction overly     conservative; recommended. included allow     comparisons methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kendall coefficient of concordance — kendall.global","text":"Y must contain quantitative data. transformed   ranks within column computation coefficient   concordance. search species associations described Legendre (2005)   proceeds 3 steps: (1) Correlation analysis species. possible method   compute Ward's agglomerative clustering matrix correlations   among species. detail: (1.1) compute Pearson Spearman   correlation matrix (correl.matrix) among species; (1.2)   turn distance matrix: mat.D = .dist(1-correl.matrix);    (1.3) carry Ward's hierarchical   clustering matrix using hclust:    clust.ward = hclust(mat.D, \"ward\"); (1.4) plot dendrogram:   plot(clust.ward, hang=-1); (1.5) cut dendrogram two   groups, retrieve vector species membership:    group.2 = cutree(clust.ward, k=2). (1.6) steps 2 3 ,    may   come back try divisions species k = \\(3, 4, 5, \\dots\\)    groups. (2) Compute global tests significance 2 () groups   using function kendall.global vector defining   groups. Groups globally significant must refined   abandoned. (3) Compute posteriori tests contribution individual   species concordance group using function   kendall.post vector defining groups.   species negative values \"Spearman.mean\", means   species clearly belong group, hence group   inclusive. Go back (1.5) cut dendrogram   finely. left right groups can cut separately,   independently levels along dendrogram; write   vector group membership cutree produce   desired groups. corrections used multiple testing applied list   P-values (P); take account number tests (k) carried   simultaneously (number groups kendall.global,   number species kendall.post). corrections   performed using function p.adjust; see function   description correction methods. addition,   Šidák correction defined    \\(P_{corr} = 1 -(1 - P)^k\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kendall coefficient of concordance — kendall.global","text":"table containing following information rows. columns   correspond groups \"judges\" defined vector \"group\".   function Kendall.post used, many tables   number predefined groups. W Kendall's coefficient concordance, W. F F statistic. F = W*(m-1)/(1-W) m number   judges. Prob.F Probability associated F statistic, computed   F distribution nu1 = n-1-(2/m) nu2 = nu1*(m-1); n   number objects. Corrected prob.F Probabilities associated F, corrected   using method selected parameter mult. Shown   one group. Chi2 Friedman's chi-square statistic (Friedman 1937) used   permutation test W. Prob.perm Permutational probabilities, uncorrected. Corrected prob.perm Permutational probabilities corrected   using method selected parameter mult. Shown   one group. Spearman.mean Mean Spearman correlations   judge test judges group. W.per.species Contribution judge test   overall concordance statistic group.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kendall coefficient of concordance — kendall.global","text":"Friedman, M. 1937. use ranks avoid assumption normality implicit analysis variance. Journal American Statistical Association 32: 675-701. Kendall, M. G. B. Babington Smith. 1939. problem m rankings. Annals Mathematical Statistics 10: 275-287. Legendre, P. 2005. Species associations: Kendall coefficient concordance revisited. Journal Agricultural, Biological, Environmental Statistics 10: 226-245. Legendre, P. 2009. Coefficient concordance. : Encyclopedia Research Design. SAGE Publications (press). Siegel, S. N. J. Castellan, Jr. 1988. Nonparametric statistics behavioral sciences. 2nd edition. McGraw-Hill, New York.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Kendall coefficient of concordance — kendall.global","text":"F. Guillaume Blanchet, University Alberta, Pierre   Legendre, Université de Montréal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kendall coefficient of concordance — kendall.global","text":"","code":"data(mite) mite.hel <- decostand(mite, \"hel\")  # Reproduce the results shown in Table 2 of Legendre (2005), a single group mite.small <- mite.hel[c(4,9,14,22,31,34,45,53,61,69),c(13:15,23)] kendall.global(mite.small, nperm=49) #> $Concordance_analysis #>               Group.1 #> W          0.44160305 #> F          2.37252221 #> Prob.F     0.04403791 #> Chi2      15.89770992 #> Prob.perm  0.02000000 #>  #> attr(,\"class\") #> [1] \"kendall.global\" kendall.post(mite.small, mult=\"holm\", nperm=49) #> $A_posteriori_tests #>                     TVEL      ONOV      SUCT   Trhypch1 #> Spearman.mean  0.3265678 0.3965503 0.4570402 -0.1681251 #> W.per.species  0.4949258 0.5474127 0.5927802  0.1239061 #> Prob           0.1400000 0.0200000 0.0200000  0.7000000 #> Corrected prob 0.2800000 0.0800000 0.0800000  0.7000000 #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.post\"  # Reproduce the results shown in Tables 3 and 4 of Legendre (2005), 2 groups group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2) kendall.global(mite.hel, group=group, nperm=49) #> $Concordance_analysis #>                          Group.1      Group.2 #> W                   3.097870e-01 2.911888e-01 #> F                   1.032305e+01 4.108130e+00 #> Prob.F              1.177138e-85 4.676566e-22 #> Corrected prob.F    2.354275e-85 4.676566e-22 #> Chi2                5.130073e+02 2.210123e+02 #> Prob.perm           2.000000e-02 2.000000e-02 #> Corrected prob.perm 4.000000e-02 4.000000e-02 #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.global\" kendall.post(mite.hel, group=group, mult=\"holm\", nperm=49) #> $A_posteriori_tests_Group #> $A_posteriori_tests_Group[[1]] #>                   Brachy      PHTH     RARD      SSTR   Protopl      MEGR #> Spearman.mean  0.1851177 0.4258111 0.359058 0.2505486 0.1802160 0.2833298 #> W.per.species  0.2190711 0.4497357 0.385764 0.2817757 0.2143736 0.3131911 #> Prob           0.0200000 0.0200000 0.020000 0.0200000 0.0400000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.700000 0.7000000 0.7000000 0.7000000 #>                      MPRO      HMIN     HMIN2      NPRA      TVEL      ONOV #> Spearman.mean  0.09248024 0.2444656 0.4138494 0.1263751 0.4177343 0.3301159 #> W.per.species  0.13029357 0.2759462 0.4382723 0.1627761 0.4419954 0.3580278 #> Prob           0.10000000 0.0200000 0.0200000 0.0400000 0.0200000 0.0200000 #> Corrected prob 0.70000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     SUCT Oribatl1      PWIL  Galumna1  Stgncrs2      HRUF #> Spearman.mean  0.2185421 0.421216 0.2574779 0.4180699 0.3623428 0.1250230 #> W.per.species  0.2511028 0.445332 0.2884163 0.4423170 0.3889118 0.1614804 #> Prob           0.0200000 0.020000 0.0200000 0.0200000 0.0200000 0.0800000 #> Corrected prob 0.7000000 0.700000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     PPEL      SLAT      FSET  Lepidzts  Eupelops  Miniglmn #> Spearman.mean  0.2188216 0.3016159 0.4217606 0.2577037 0.1108022 0.2301430 #> W.per.species  0.2513707 0.3307153 0.4458539 0.2886327 0.1478521 0.2622203 #> Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0800000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>  #> $A_posteriori_tests_Group[[2]] #>                     HPAV      TVIE      LCIL  Ceratoz1  Trhypch1      NCOR #> Spearman.mean  0.1222579 0.2712078 0.1906408 0.1375601 0.1342409 0.3342345 #> W.per.species  0.2020527 0.3374616 0.2642189 0.2159637 0.2129463 0.3947586 #> Prob           0.0600000 0.0200000 0.0200000 0.0200000 0.0400000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     LRUG     PLAG2  Ceratoz3  Oppiminu  Trimalc2 #> Spearman.mean  0.3446561 0.1833099 0.3188922 0.1764232 0.2498877 #> W.per.species  0.4042328 0.2575544 0.3808111 0.2512938 0.3180797 #> Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>  #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.post\"  # NOTE: 'nperm' argument usually needs to be larger than 49. # It was set to this low value for demonstration purposes."},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"Function linestack plots vertical one-dimensional plots   numeric vectors.  plots always labelled, labels   moved vertically avoid overwriting.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"","code":"linestack(x, labels, cex = 0.8, side = \"right\", hoff = 2, air = 1.1,           at = 0, add = FALSE, axis = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"x Numeric vector plotted. labels Labels used instead default (names x). May     expressions drawn plotmath. cex Size labels. side Put labels \"right\" \"left\"     axis. hoff Distance vertical axis label units     width letter “m”. air Multiplier string height leave empty space     labels. Position plot horizontal axis. add Add existing plot. axis Add axis plot. ... graphical parameters labels.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"function returns invisibly shifted positions labels   user coordinates.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"Jari Oksanen modifications Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"function always draws labelled diagrams.  want   unlabelled diagrams, can use, e.g., plot,   stripchart rug.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"","code":"## First DCA axis data(dune) ord <- decorana(dune) linestack(scores(ord, choices=1, display=\"sp\")) linestack(scores(ord, choices=1, display=\"si\"), side=\"left\", add=TRUE) title(main=\"DCA axis 1\")   ## Expressions as labels N <- 10          # Number of sites df <- data.frame(Ca = rlnorm(N, 2), NO3 = rlnorm(N, 4),                  SO4 = rlnorm(N, 10), K = rlnorm(N, 3)) ord <- rda(df, scale = TRUE) ### vector of expressions for labels labs <- expression(Ca^{2+phantom()},                    NO[3]^{-phantom()},                    SO[4]^{2-phantom()},                    K^{+phantom()}) scl <- \"sites\" linestack(scores(ord, choices = 1, display = \"species\", scaling = scl),           labels = labs, air = 2) linestack(scores(ord, choices = 1, display = \"site\", scaling = scl),           side = \"left\", add = TRUE) title(main = \"PCA axis 1\")"},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"standard CEP name four first letters generic name   four first letters specific epithet Latin name. last   epithet, may subspecific name, used current   function. name one component, abbreviated   eight characters (see abbreviate).   returned names made unique function   make.unique adds numbers end CEP names needed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"","code":"make.cepnames(names, seconditem = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"names names formatted CEP names. seconditem Take always second item original name     abbreviated name instead last original item     (default).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Cornell Ecology Programs (CEP) used eight-letter   abbreviations species site names. species, names   formed taking four first letters generic name four   first letters specific subspecific epithet. current   function first makes valid R names using make.names,   splits elements. CEP name made taking   four first letters first element, four first letters   last (default) second element (   seconditem = TRUE). one name element,   abbreviated eight letters. Finally, names   made unique may add numbers duplicated names. CEP names originally used, old FORTRAN IV   CHARACTER data type, text stored   numerical variables, popular computers hold four   characters. modern times, reason limitation,   ecologists used names, may practical   avoid congestion ordination plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Function returns CEP names.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"function simpleminded rigid. must write better one   need.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"","code":"make.cepnames(c(\"Aa maderoi\", \"Poa sp.\", \"Cladina rangiferina\", \"Cladonia cornuta\", \"Cladonia cornuta var. groenlandica\", \"Cladonia rangiformis\", \"Bryoerythrophyllum\")) #> [1] \"Aamade\"     \"Poasp\"      \"Cladrang\"   \"Cladcorn\"   \"Cladgroe\"   #> [6] \"Cladrang.1\" \"Bryrythr\"   data(BCI) colnames(BCI) <- make.cepnames(colnames(BCI))"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Mantel Correlogram — mantel.correlog","title":"Mantel Correlogram — mantel.correlog","text":"Function mantel.correlog computes multivariate   Mantel correlogram. Proposed Sokal (1986) Oden Sokal   (1986), method also described Legendre Legendre (2012,   pp. 819--821).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mantel Correlogram — mantel.correlog","text":"","code":"mantel.correlog(D.eco, D.geo=NULL, XY=NULL, n.class=0, break.pts=NULL,  cutoff=TRUE, r.type=\"pearson\", nperm=999, mult=\"holm\", progressive=TRUE) # S3 method for mantel.correlog plot(x, alpha=0.05, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mantel Correlogram — mantel.correlog","text":"D.eco ecological distance matrix, class   either dist matrix. D.geo geographic distance matrix, class either   dist matrix. Provide either D.geo   XY. Default: D.geo=NULL. XY file Cartesian geographic coordinates   points. Default: XY=NULL. n.class Number classes. n.class=0, Sturges   equation used unless break points provided. break.pts Vector containing break points distance   distribution. Provide (n.class+1) breakpoints, , list   beginning ending point. Default: break.pts=NULL. cutoff second half distance classes,   cutoff = TRUE limits correlogram distance classes   include points. cutoff = FALSE, correlogram   includes distance classes. r.type Type correlation calculation Mantel   statistic. Default: r.type=\"pearson\".  choices   r.type=\"spearman\" r.type=\"kendall\", functions   cor mantel. nperm Number permutations tests   significance. Default: nperm=999. large data files,   permutation tests rather slow. mult Correct P-values multiple testing. correction   methods \"holm\" (default), \"hochberg\",   \"sidak\", methods available   p.adjust function: \"bonferroni\" (best known,   recommended overly conservative), \"hommel\",   \"BH\", \"\", \"fdr\", \"none\". progressive Default: progressive=TRUE progressive   correction multiple-testing, described Legendre Legendre   (1998, p. 721). Test first distance class: correction;   second distance class: correct 2 simultaneous tests; distance   class k: correct k simultaneous tests. progressive=FALSE:   correct tests n.class simultaneous tests. x Output mantel.correlog. alpha Significance level points drawn black   symbols correlogram. Default: alpha=0.05. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mantel Correlogram — mantel.correlog","text":"correlogram graph spatial correlation values   plotted, ordinate, function geographic distance   classes among study sites along abscissa. Mantel   correlogram, Mantel correlation (Mantel 1967) computed   multivariate (e.g. multi-species) distance matrix user's choice   design matrix representing geographic distance   classes turn. Mantel statistic tested   permutational Mantel test performed vegan's   mantel function. correction multiple testing applied, permutations   necessary -correction case, obtain significant   p-values higher correlogram classes. print.mantel.correlog function prints   correlogram. See examples.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mantel Correlogram — mantel.correlog","text":"mantel.res table distance classes rows   class indices, number distances per class, Mantel statistics   (computed using Pearson's r, Spearman's r, Kendall's tau),   p-values columns. positive Mantel statistic indicates positive   spatial correlation. additional column p-values corrected   multiple testing added unless mult=\"none\". n.class n umber distance classes. break.pts break points provided user computed     program. mult name correction multiple testing.     correction: mult=\"none\". progressive logical (TRUE, FALSE) value   indicating whether progressive correction multiple   testing requested. n.tests number distance classes Mantel   tests computed tested significance. call function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mantel Correlogram — mantel.correlog","text":"Pierre Legendre, Université de Montréal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mantel Correlogram — mantel.correlog","text":"Legendre, P. L. Legendre. 2012. Numerical ecology, 3rd English   edition. Elsevier Science BV, Amsterdam. Mantel, N. 1967. detection disease clustering generalized   regression approach. Cancer Res. 27: 209-220. Oden, N. L. R. R. Sokal. 1986. Directional autocorrelation:   extension spatial correlograms two dimensions. Syst. Zool. 35:   608-617. Sokal, R. R. 1986. Spatial data analysis historical   processes. 29-43 : E. Diday et al. [eds.] Data analysis   informatics, IV. North-Holland, Amsterdam. Sturges, H. . 1926. choice class interval. Journal    American Statistical Association 21: 65–66.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mantel Correlogram — mantel.correlog","text":"","code":"# Mite data available in \"vegan\" data(mite)         data(mite.xy)   mite.hel <- decostand(mite, \"hellinger\")  # Detrend the species data by regression on the site coordinates mite.hel.resid <- resid(lm(as.matrix(mite.hel) ~ ., data=mite.xy))  # Compute the detrended species distance matrix mite.hel.D <- dist(mite.hel.resid)  # Compute Mantel correlogram with cutoff, Pearson statistic mite.correlog <- mantel.correlog(mite.hel.D, XY=mite.xy, nperm=49) summary(mite.correlog) #>            Length Class  Mode      #> mantel.res 65     -none- numeric   #> n.class     1     -none- numeric   #> break.pts  14     -none- numeric   #> mult        1     -none- character #> n.tests     1     -none- numeric   #> call        4     -none- call      mite.correlog    #>  #> Mantel Correlogram Analysis #>  #> Call: #>   #> mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, nperm = 49)  #>  #>         class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)   #> D.cl.1     0.514182 358.000000   0.135713       0.02          0.02 * #> D.cl.2     1.242546 650.000000   0.118174       0.02          0.04 * #> D.cl.3     1.970910 796.000000   0.037820       0.04          0.06 . #> D.cl.4     2.699274 696.000000  -0.098605       0.02          0.08 . #> D.cl.5     3.427638 500.000000  -0.112682       0.02          0.10 . #> D.cl.6     4.156002 468.000000  -0.107603       0.02          0.12   #> D.cl.7     4.884366 364.000000  -0.022264       0.12          0.14   #> D.cl.8     5.612730 326.000000         NA         NA            NA   #> D.cl.9     6.341094 260.000000         NA         NA            NA   #> D.cl.10    7.069458 184.000000         NA         NA            NA   #> D.cl.11    7.797822 130.000000         NA         NA            NA   #> D.cl.12    8.526186  66.000000         NA         NA            NA   #> D.cl.13    9.254550  32.000000         NA         NA            NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # or: print(mite.correlog) # or: print.mantel.correlog(mite.correlog) plot(mite.correlog)   # Compute Mantel correlogram without cutoff, Spearman statistic mite.correlog2 <- mantel.correlog(mite.hel.D, XY=mite.xy, cutoff=FALSE,     r.type=\"spearman\", nperm=49) summary(mite.correlog2) #>            Length Class  Mode      #> mantel.res 65     -none- numeric   #> n.class     1     -none- numeric   #> break.pts  14     -none- numeric   #> mult        1     -none- character #> n.tests     1     -none- numeric   #> call        6     -none- call      mite.correlog2 #>  #> Mantel Correlogram Analysis #>  #> Call: #>   #> mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, cutoff = FALSE,      r.type = \"spearman\", nperm = 49)  #>  #>         class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)   #> D.cl.1     0.514182 358.000000   0.134229       0.02          0.02 * #> D.cl.2     1.242546 650.000000   0.121270       0.02          0.04 * #> D.cl.3     1.970910 796.000000   0.035413       0.08          0.08 . #> D.cl.4     2.699274 696.000000  -0.095899       0.02          0.08 . #> D.cl.5     3.427638 500.000000  -0.118692       0.02          0.10 . #> D.cl.6     4.156002 468.000000  -0.117148       0.02          0.12   #> D.cl.7     4.884366 364.000000  -0.031123       0.08          0.16   #> D.cl.8     5.612730 326.000000   0.026064       0.08          0.24   #> D.cl.9     6.341094 260.000000   0.050573       0.06          0.24   #> D.cl.10    7.069458 184.000000   0.057017       0.02          0.20   #> D.cl.11    7.797822 130.000000   0.036195       0.14          0.32   #> D.cl.12    8.526186  66.000000  -0.054242       0.06          0.36   #> D.cl.13    9.254550  32.000000  -0.066677       0.06          0.42   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mite.correlog2)   # NOTE: 'nperm' argument usually needs to be larger than 49. # It was set to this low value for demonstration purposes."},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":null,"dir":"Reference","previous_headings":"","what":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Function mantel  finds Mantel statistic matrix   correlation two dissimilarity matrices, function   mantel.partial finds partial Mantel statistic   partial matrix correlation three dissimilarity matrices.    significance statistic evaluated permuting rows   columns first dissimilarity matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"","code":"mantel(xdis, ydis, method=\"pearson\", permutations=999, strata = NULL,     na.rm = FALSE, parallel = getOption(\"mc.cores\")) mantel.partial(xdis, ydis, zdis, method = \"pearson\", permutations = 999,      strata = NULL, na.rm = FALSE, parallel = getOption(\"mc.cores\"))"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"xdis, ydis, zdis Dissimilarity matrices ordist     objects. first object xdis permuted     permutation tests. method Correlation method, accepted cor:     \"pearson\", \"spearman\" \"kendall\". permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. na.rm Remove missing values calculation Mantel     correlation. Use option care: Permutation tests can     biased, particular two matrices missing values     matching positions. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Mantel statistic simply correlation entries two   dissimilarity matrices (use cross products,   linearly related).  However, significance directly   assessed, \\(N(N-1)/2\\) entries just \\(N\\)   observations.  Mantel developed asymptotic test, use   permutations \\(N\\) rows columns dissimilarity   matrix. first matrix (xdist) permuted,   second kept constant. See permutations   additional details permutation tests Vegan. Partial Mantel statistic uses partial correlation   conditioned third matrix. first matrix permuted   correlation structure second first matrices   kept constant. Although mantel.partial silently accepts   methods \"pearson\", partial correlations probably   wrong methods. function uses cor, accept   alternatives pearson product moment correlations   spearman kendall rank correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"function returns list class mantel following   components: Call Function call. method Correlation method used, returned     cor.test. statistic Mantel statistic. signif Empirical significance level permutations. perm vector permuted values. distribution     permuted values can inspected permustats      function. permutations Number permutations. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"test due Mantel, course,   current implementation based Legendre Legendre. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   Edition. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Legendre & Legendre (2012, Box 10.4) warn using partial   Mantel correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"","code":"## Is vegetation related to environment? data(varespec) data(varechem) veg.dist <- vegdist(varespec) # Bray-Curtis env.dist <- vegdist(scale(varechem), \"euclid\") mantel(veg.dist, env.dist) #>  #> Mantel statistic based on Pearson's product-moment correlation  #>  #> Call: #> mantel(xdis = veg.dist, ydis = env.dist)  #>  #> Mantel statistic r: 0.3047  #>       Significance: 0.001  #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.116 0.144 0.176 0.209  #> Permutation: free #> Number of permutations: 999 #>  mantel(veg.dist, env.dist, method=\"spear\") #>  #> Mantel statistic based on Spearman's rank correlation rho  #>  #> Call: #> mantel(xdis = veg.dist, ydis = env.dist, method = \"spear\")  #>  #> Mantel statistic r: 0.2838  #>       Significance: 0.001  #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.120 0.162 0.182 0.208  #> Permutation: free #> Number of permutations: 999 #>"},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS performs Nonmetric   Multidimensional Scaling (NMDS), tries find stable solution   using several random starts. addition, standardizes   scaling result, configurations easier   interpret, adds species scores site ordination.   metaMDS function provide actual NMDS, calls   another function purpose. Currently monoMDS   default choice, also possible call   isoMDS (MASS package).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"","code":"metaMDS(comm, distance = \"bray\", k = 2, try = 20, trymax = 20,      engine = c(\"monoMDS\", \"isoMDS\"), autotransform =TRUE,     noshare = (engine == \"isoMDS\"), wascores = TRUE, expand = TRUE,      trace = 1, plot = FALSE, previous.best,  ...) # S3 method for metaMDS plot(x, display = c(\"sites\", \"species\"), choices = c(1, 2),     type = \"p\", shrink = FALSE, ...) # S3 method for metaMDS points(x, display = c(\"sites\", \"species\"),     choices = c(1,2), shrink = FALSE, select, ...) # S3 method for metaMDS text(x, display = c(\"sites\", \"species\"), labels,      choices = c(1,2), shrink = FALSE, select, ...) # S3 method for metaMDS scores(x, display = c(\"sites\", \"species\"), shrink = FALSE,      choices, tidy = FALSE, ...) metaMDSdist(comm, distance = \"bray\", autotransform = TRUE,      noshare = TRUE, trace = 1, commname, zerodist = \"ignore\",      distfun = vegdist, ...) metaMDSiter(dist, k = 2, try = 20, trymax = 20, trace = 1, plot = FALSE,      previous.best, engine = \"monoMDS\", maxit = 200,     parallel = getOption(\"mc.cores\"), ...)    initMDS(x, k=2) postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8,     nthreshold=10, plot=FALSE, ...) metaMDSredist(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"comm Community data. Alternatively, dissimilarities either     dist structure symmetric square matrix.      latter case stages skipped except random      starts centring pc rotation axes. distance Dissimilarity index used vegdist. k Number dimensions.  NB., number points \\(n\\)     \\(n > 2k + 1\\), preferably higher     global non-metric MDS, still higher local NMDS. try, trymax Minimum maximum numbers random starts     search stable solution. try reached,     iteration stop similar solutions repeated     trymax reached. engine function used MDS. default use     monoMDS function vegan, backward     compatibility also possible use isoMDS     MASS. autotransform Use simple heuristics possible data     transformation typical community data (see ).     community data, probably set     autotransform = FALSE. noshare Triggering calculation step-across extended     dissimilarities function stepacross.     argument can logical numerical value greater zero     less one. TRUE, extended dissimilarities     used always shared species sites,     FALSE, never used. noshare     numerical value, stepacross used     proportion site pairs shared species exceeds     noshare. number pairs shared species     found .shared function, noshare     effect input data dissimilarities instead     community data. wascores Calculate species scores using function     wascores. expand Expand weighted averages species     wascores. trace Trace function; trace = 2 higher     voluminous. plot Graphical tracing: plot interim results. may want set     par(ask = TRUE) option. previous.best Start searches previous solution. x metaMDS result (dissimilarity structure   initMDS). choices Axes shown. type Plot type: \"p\" points, \"t\" text,    \"n\" axes . display Display \"sites\" \"species\". shrink Shrink back species scores expanded    originally. tidy Return scores compatible ggplot2:    scores single data.frame, score type    identified factor variable code (\"sites\"    \"species\"), names variable label. scores    incompatible conventional plot functions, can    used ggplot2. labels Optional test used instead row names. select Items displayed.  can either logical    vector TRUE displayed items vector indices    displayed items. X Configuration multidimensional scaling. commname name comm: given    function called directly. zerodist Handling zero dissimilarities: either    \"fail\" \"add\" small positive value,    \"ignore\". monoMDS accepts zero dissimilarities    default zerodist = \"ignore\",    isoMDS may need set zerodist = \"add\". distfun Dissimilarity function. function returning    dist object accepting argument method can used    (extra arguments may cause name conflicts). maxit Maximum number iterations single NMDS run;    passed engine function monoMDS    isoMDS. parallel Number parallel processes predefined socket    cluster.  use pre-defined socket clusters (say,    clus), must issue clusterEvalQ(clus,    library(vegan)) make available internal vegan    functions. parallel = 1 uses ordinary, non-parallel    processing. parallel processing done parallel    package. dist Dissimilarity matrix used multidimensional scaling. pc Rotate principal components. center Centre configuration. halfchange Scale axes half-change units. defaults   TRUE dissimilarities known theoretical   maximum value (ceiling). Function vegdist   information attribute maxdist, distfun   interpreted simple test (can fail),   information may available input data distances.   FALSE, ordination dissimilarities scaled   range input dissimilarities. threshold Largest dissimilarity used half-change scaling.    dissimilarities known (inferred) ceiling, threshold    relative ceiling (see halfchange). nthreshold Minimum number points half-change scaling. object result object metaMDS. ... parameters passed functions. Function    metaMDS passes arguments component functions    metaMDSdist, metaMDSiter, postMDS,    distfun engine.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Non-metric Multidimensional Scaling (NMDS) commonly   regarded robust unconstrained ordination method   community ecology (Minchin 1987).  Function metaMDS   wrapper function calls several functions combine   Minchin's (1987) recommendations one command. complete   steps metaMDS : Transformation: data values larger common     abundance class scales, function performs Wisconsin double     standardization (wisconsin).  values look     large, function also performs sqrt     transformation. standardizations generally found     improve results. However, limits completely     arbitrary (present, data maximum 50 triggers sqrt     \\(>9\\) triggers wisconsin). want     full control analysis, set     autotransform = FALSE standardize transform data     independently. autotransform intended community     data, data types, set     autotransform = FALSE. step perfomed using     metaMDSdist, step skipped input     dissimilarities. Choice dissimilarity: good result, use     dissimilarity indices good rank order relation     ordering sites along gradients (Faith et al. 1987).  default     Bray-Curtis dissimilarity, often test     winner. However, dissimilarity index     vegdist can used. Function     rankindex can used finding test winner     data gradients. default choice may bad     analyse community data, probably select     appropriate index using argument distance.  step     performed using metaMDSdist, step skipped     input dissimilarities. Step-across dissimilarities: Ordination may difficult     large proportion sites shared species.     case, results may improved stepacross     dissimilarities, flexible shortest paths among sites.      default NMDS engine monoMDS able     break tied values maximum dissimilarity, often     sufficient handle cases shared species,     therefore default use stepacross     monoMDS.  Function isoMDS     handle tied values adequately, therefore default     use stepacross always sites     shared species engine = \"isoMDS\".     stepacross triggered option noshare.     like manipulation original distances, set     noshare = FALSE.  step skipped input data     dissimilarities instead community data. step performed     using metaMDSdist, step skipped always     input dissimilarities. NMDS random starts: NMDS easily gets trapped local     optima, must start NMDS several times random starts     confident found global solution.     strategy metaMDS first run NMDS starting     metric scaling (cmdscale usually finds good     solution often close local optimum), use     previous.best solution supplied, take solution     standard (Run 0). metaMDS starts NMDS     several random starts (minimum number given try     maximum number trymax). random starts     generated initMDS. solution better (lower     stress) previous standard, taken new     standard. solution better close standard,     metaMDS compares two solutions using Procrustes analysis     (function procrustes option     symmetric = TRUE). solutions similar     Procrustes rmse largest residual small,     solutions regarded repeated better one taken     new standard.  conditions stringent, may     found good relatively similar solutions although     function yet satisfied. Setting trace = TRUE     monitor final stresses, plot = TRUE display     Procrustes overlay plots comparison. step     performed using metaMDSiter. first step     performed input data (comm) dissimilarities. Random     starts can run parallel processing (argument     parallel). Scaling results: metaMDS run postMDS     final result. Function postMDS provides     following ways “fixing” indeterminacy scaling     orientation axes NMDS: Centring moves origin     average axes; Principal components rotate configuration     variance points maximized first dimension     (function MDSrotate can alternatively     rotate configuration first axis parallel     environmental variable); Half-change scaling scales     configuration one unit means halving community     similarity replicate similarity.  Half-change scaling     based closer dissimilarities relation     ordination distance community dissimilarity rather linear     (limit set argument threshold).     enough points threshold (controlled parameter     nthreshold), dissimilarities regressed distances.     intercept regression taken replicate     dissimilarity, half-change distance similarity     halves according linear regression.  Obviously method     applicable dissimilarity indices scaled \\(0 \\ldots     1\\), Kulczynski, Bray-Curtis Canberra indices.     half-change scaling used, ordination scaled     range original dissimilarities. Half-change scaling     skipped default input dissimilarities, can     turned argument halfchange = TRUE. NB., PC     rotation changes directions reference axes,     influence configuration solution general. Species scores: Function adds species scores final     solution weighted averages using function     wascores given value parameter     expand.  expansion weighted averages can undone     shrink = TRUE plot scores     functions, calculation species scores can suppressed     wascores = FALSE. step skipped input     dissimilarities community data unavailable. However,     species scores can added replaced     sppscores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"results-could-not-be-repeated","dir":"Reference","previous_headings":"","what":"Results Could Not Be Repeated","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Non-linear optimization hard task, best possible solution   (“global optimum”) may found random starting   configuration. software solve starting result   metric scaling (cmdscale). probably give   good result, necessarily “global   optimum”. Vegan , metaMDS tries   verify improve first solution (“try 0”) using several   random starts seeing result can repeated improved   improved solution repeated. succeed, get   message result repeated. However, result   least good usual standard strategy starting   metric scaling may improved. may need   anything message, can satisfied   result. want sure probably “global   optimum” may try following instructions. default engine = \"monoMDS\" function     tabulate stopping criteria used, can see     criterion made stringent. criteria can given     arguments metaMDS current values     described monoMDS. particular, reach     maximum number iterations, increase value     maxit. may ask larger number random starts     without losing old ones giving previous solution     argument previous.best. addition slack convergence criteria low number     random starts, wrong number dimensions (argument k)     common reason able repeat similar     solutions. NMDS usually run low number dimensions     (k=2 k=3), complex data increasing     k one may help. run NMDS much higher number     dimensions (say, k=10 ), reconsider     drastically reduce k.     heterogeneous data sets partial disjunctions, may help     set stepacross, data sets default     weakties = TRUE sufficient. Please note can give arguments     metaMDS* functions NMDS engine (default     monoMDS) metaMDS command,    check documentation functions details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"common-wrong-claims","dir":"Reference","previous_headings":"","what":"Common Wrong Claims","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"NMDS often misunderstood wrong claims properties     common Web even publications. often claimed     NMDS configuration non-metric means     fit environmental variables species onto     space. false statement. fact, result     configuration NMDS metric, can used like     ordination result. NMDS rank orders Euclidean distances     among points ordination non-metric monotone relationship     observed dissimilarities. transfer function     observed dissimilarities ordination distances non-metric     (Kruskal 1964a, 1964b), ordination result configuration     metric observed dissimilarities can kind (metric     non-metric). ordination configuration usually rotated principal     components metaMDS. rotation performed     finding result, changes direction     reference axes. important feature NMDS solution     ordination distances, change     rotation. Similarly, rank order distances change     uniform scaling centring configuration points. can also     rotate NMDS solution external environmental variables     MDSrotate. rotation also change     orientation axes, change configuration points     distances points ordination space. Function stressplot displays method graphically:     plots observed dissimilarities distances     ordination space, also shows non-metric monotone     regression.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS returns object class  metaMDS. final site ordination stored item  points, species ordination item species,   stress item stress (NB, scaling stress   depends engine: isoMDS uses   percents, monoMDS proportions range \\(0   \\ldots 1\\)). items store information steps taken   items returned engine function. object  print, plot, points text methods.   Functions metaMDSdist metaMDSredist return  vegdist objects.  Function initMDS returns   random configuration intended used within  isoMDS .  Functions metaMDSiter  postMDS returns result NMDS updated   configuration.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Faith, D. P, Minchin, P. R. Belbin, L. (1987).   Compositional dissimilarity robust measure ecological   distance. Vegetatio 69, 57--68. Kruskal, J.B. (1964a). Multidimensional scaling optimizing       goodness--fit nonmetric hypothesis. Psychometrika       29, 1--28. Kruskal, J.B. (1964b). Nonmetric multidimensional scaling: numerical       method. Psychometrika 29, 115--129. Minchin, P.R. (1987). evaluation relative robustness   techniques ecological ordinations. Vegetatio 69,   89--107.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS simple wrapper NMDS engine   (either monoMDS isoMDS)   support functions (metaMDSdist,   stepacross, metaMDSiter, initMDS,   postMDS, wascores).  can call support   functions separately better control results.  Data   transformation, dissimilarities possible   stepacross made function metaMDSdist   returns dissimilarity result. Iterative search (  starting values initMDS monoMDS)   made metaMDSiter.  Processing result configuration   done postMDS, species scores added   wascores.  want certain reaching   global solution, can compare results several independent   runs. can also continue analysis previous results   configuration.  Function may save used   dissimilarity matrix (monoMDS ),   metaMDSredist tries reconstruct used dissimilarities   original data transformation possible   stepacross. metaMDS function designed used community   data.  type data, probably set   arguments non-default values: probably least wascores,   autotransform noshare FALSE.   negative data entries, metaMDS set previous   FALSE warning.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"metaMDS uses monoMDS   NMDS engine vegan version 2.0-0, replaced   isoMDS function. can set argument   engine select old engine.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"","code":"## The recommended way of running NMDS (Minchin 1987) ## data(dune) ## IGNORE_RDIFF_BEGIN ## Global NMDS using monoMDS sol <- metaMDS(dune) #> Run 0 stress 0.1192678  #> Run 1 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 0.02027085  max resid 0.06496502  #> Run 2 stress 0.1183186  #> ... Procrustes: rmse 7.091627e-06  max resid 1.854739e-05  #> ... Similar to previous best #> Run 3 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 7.843875e-06  max resid 1.948718e-05  #> ... Similar to previous best #> Run 4 stress 0.1183186  #> ... Procrustes: rmse 2.646268e-06  max resid 7.785898e-06  #> ... Similar to previous best #> Run 5 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 1.748593e-06  max resid 6.04809e-06  #> ... Similar to previous best #> Run 6 stress 0.1192679  #> Run 7 stress 0.1183186  #> ... Procrustes: rmse 8.258378e-06  max resid 2.60339e-05  #> ... Similar to previous best #> Run 8 stress 0.1812932  #> Run 9 stress 0.1192678  #> Run 10 stress 0.1812932  #> Run 11 stress 0.1192678  #> Run 12 stress 0.1183186  #> ... Procrustes: rmse 7.880904e-06  max resid 2.440234e-05  #> ... Similar to previous best #> Run 13 stress 0.1192679  #> Run 14 stress 0.1192678  #> Run 15 stress 0.1192678  #> Run 16 stress 0.1192679  #> Run 17 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 2.066359e-06  max resid 5.876586e-06  #> ... Similar to previous best #> Run 18 stress 0.1192679  #> Run 19 stress 0.1183186  #> ... Procrustes: rmse 8.209042e-06  max resid 2.501796e-05  #> ... Similar to previous best #> Run 20 stress 0.1183186  #> ... Procrustes: rmse 1.088766e-05  max resid 3.540763e-05  #> ... Similar to previous best #> *** Best solution repeated 3 times sol #>  #> Call: #> metaMDS(comm = dune)  #>  #> global Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: bray  #>  #> Dimensions: 2  #> Stress:     0.1183186  #> Stress type 1, weak ties #> Best solution was repeated 3 times in 20 tries #> The best solution was from try 17 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  plot(sol, type=\"t\")  ## Start from previous best solution sol <- metaMDS(dune, previous.best = sol) #> Starting from 2-dimensional configuration #> Run 0 stress 0.1183186  #> Run 1 stress 0.1183186  #> ... Procrustes: rmse 8.078151e-06  max resid 2.506486e-05  #> ... Similar to previous best #> Run 2 stress 0.1183186  #> ... Procrustes: rmse 2.7742e-05  max resid 8.244208e-05  #> ... Similar to previous best #> Run 3 stress 0.1192678  #> Run 4 stress 0.1183186  #> ... Procrustes: rmse 3.215555e-06  max resid 1.069389e-05  #> ... Similar to previous best #> Run 5 stress 0.1183186  #> ... Procrustes: rmse 3.626146e-06  max resid 1.088104e-05  #> ... Similar to previous best #> Run 6 stress 0.1192678  #> Run 7 stress 0.1183186  #> ... Procrustes: rmse 3.412101e-06  max resid 9.929112e-06  #> ... Similar to previous best #> Run 8 stress 0.1183186  #> ... Procrustes: rmse 4.325184e-06  max resid 1.443563e-05  #> ... Similar to previous best #> Run 9 stress 0.1183186  #> ... Procrustes: rmse 1.067267e-05  max resid 3.243463e-05  #> ... Similar to previous best #> Run 10 stress 0.1183186  #> ... Procrustes: rmse 1.040545e-06  max resid 3.205164e-06  #> ... Similar to previous best #> Run 11 stress 0.1192679  #> Run 12 stress 0.1192678  #> Run 13 stress 0.1192678  #> Run 14 stress 0.1812932  #> Run 15 stress 0.1183186  #> ... Procrustes: rmse 1.829323e-06  max resid 6.209742e-06  #> ... Similar to previous best #> Run 16 stress 0.1183186  #> ... Procrustes: rmse 1.379716e-05  max resid 4.309554e-05  #> ... Similar to previous best #> Run 17 stress 0.1183186  #> ... Procrustes: rmse 1.161158e-06  max resid 2.619725e-06  #> ... Similar to previous best #> Run 18 stress 0.1192678  #> Run 19 stress 0.1183186  #> ... Procrustes: rmse 6.012635e-06  max resid 1.936476e-05  #> ... Similar to previous best #> Run 20 stress 0.1192678  #> *** Best solution repeated 15 times ## Local NMDS and stress 2 of monoMDS sol2 <- metaMDS(dune, model = \"local\", stress=2) #> Run 0 stress 0.1928478  #> Run 1 stress 0.1928481  #> ... Procrustes: rmse 0.0006002976  max resid 0.00173639  #> ... Similar to previous best #> Run 2 stress 0.1928475  #> ... New best solution #> ... Procrustes: rmse 0.0002775662  max resid 0.0007923902  #> ... Similar to previous best #> Run 3 stress 0.1928478  #> ... Procrustes: rmse 0.000236207  max resid 0.0006921182  #> ... Similar to previous best #> Run 4 stress 0.1928475  #> ... Procrustes: rmse 0.0001198222  max resid 0.0003263339  #> ... Similar to previous best #> Run 5 stress 0.1928475  #> ... Procrustes: rmse 0.00012049  max resid 0.0003561698  #> ... Similar to previous best #> Run 6 stress 0.1928477  #> ... Procrustes: rmse 0.0001848885  max resid 0.000542114  #> ... Similar to previous best #> Run 7 stress 0.1928475  #> ... Procrustes: rmse 9.102768e-05  max resid 0.0002611822  #> ... Similar to previous best #> Run 8 stress 0.1928475  #> ... Procrustes: rmse 8.192876e-05  max resid 0.0002410819  #> ... Similar to previous best #> Run 9 stress 0.1928478  #> ... Procrustes: rmse 0.0002569454  max resid 0.0007584787  #> ... Similar to previous best #> Run 10 stress 0.1928476  #> ... Procrustes: rmse 0.0001293167  max resid 0.0003894915  #> ... Similar to previous best #> Run 11 stress 0.192848  #> ... Procrustes: rmse 0.0002858608  max resid 0.0008114817  #> ... Similar to previous best #> Run 12 stress 0.1928475  #> ... Procrustes: rmse 6.022345e-05  max resid 0.000181882  #> ... Similar to previous best #> Run 13 stress 0.1928475  #> ... New best solution #> ... Procrustes: rmse 1.332565e-05  max resid 4.452186e-05  #> ... Similar to previous best #> Run 14 stress 0.1928475  #> ... Procrustes: rmse 0.0001027541  max resid 0.0002806373  #> ... Similar to previous best #> Run 15 stress 0.1928478  #> ... Procrustes: rmse 0.0002569864  max resid 0.0007514771  #> ... Similar to previous best #> Run 16 stress 0.1928477  #> ... Procrustes: rmse 0.0001949828  max resid 0.0005737796  #> ... Similar to previous best #> Run 17 stress 0.1928475  #> ... Procrustes: rmse 4.307509e-05  max resid 0.0001216359  #> ... Similar to previous best #> Run 18 stress 0.1928475  #> ... Procrustes: rmse 5.921482e-05  max resid 0.0001702916  #> ... Similar to previous best #> Run 19 stress 0.1928478  #> ... Procrustes: rmse 0.0002239957  max resid 0.000658783  #> ... Similar to previous best #> Run 20 stress 0.1928475  #> ... Procrustes: rmse 7.641547e-05  max resid 0.0002257675  #> ... Similar to previous best #> *** Best solution repeated 8 times sol2 #>  #> Call: #> metaMDS(comm = dune, model = \"local\", stress = 2)  #>  #> local Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: bray  #>  #> Dimensions: 2  #> Stress:     0.1928475  #> Stress type 2, weak ties #> Best solution was repeated 8 times in 20 tries #> The best solution was from try 13 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  ## Use Arrhenius exponent 'z' as a binary dissimilarity measure sol <- metaMDS(dune, distfun = betadiver, distance = \"z\") #> Run 0 stress 0.1067169  #> Run 1 stress 0.1073148  #> Run 2 stress 0.1067169  #> ... Procrustes: rmse 1.589173e-05  max resid 4.504859e-05  #> ... Similar to previous best #> Run 3 stress 0.1067169  #> ... Procrustes: rmse 1.159388e-05  max resid 2.61694e-05  #> ... Similar to previous best #> Run 4 stress 0.1073148  #> Run 5 stress 0.1067169  #> ... Procrustes: rmse 1.878678e-06  max resid 5.314962e-06  #> ... Similar to previous best #> Run 6 stress 0.1073148  #> Run 7 stress 0.1067169  #> ... New best solution #> ... Procrustes: rmse 1.330249e-06  max resid 3.480961e-06  #> ... Similar to previous best #> Run 8 stress 0.1067169  #> ... Procrustes: rmse 9.506602e-07  max resid 3.301707e-06  #> ... Similar to previous best #> Run 9 stress 0.1067169  #> ... New best solution #> ... Procrustes: rmse 1.263971e-06  max resid 2.890598e-06  #> ... Similar to previous best #> Run 10 stress 0.1073148  #> Run 11 stress 0.1069786  #> ... Procrustes: rmse 0.006771704  max resid 0.02385729  #> Run 12 stress 0.1073148  #> Run 13 stress 0.1067169  #> ... Procrustes: rmse 3.175453e-06  max resid 7.631149e-06  #> ... Similar to previous best #> Run 14 stress 0.1069788  #> ... Procrustes: rmse 0.006835151  max resid 0.02414438  #> Run 15 stress 0.1073148  #> Run 16 stress 0.107471  #> Run 17 stress 0.1742034  #> Run 18 stress 0.1067169  #> ... Procrustes: rmse 2.56492e-05  max resid 8.270364e-05  #> ... Similar to previous best #> Run 19 stress 0.1073148  #> Run 20 stress 0.1073148  #> *** Best solution repeated 3 times sol #>  #> Call: #> metaMDS(comm = dune, distance = \"z\", distfun = betadiver)  #>  #> global Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: beta.z  #>  #> Dimensions: 2  #> Stress:     0.1067169  #> Stress type 1, weak ties #> Best solution was repeated 3 times in 20 tries #> The best solution was from try 9 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":null,"dir":"Reference","previous_headings":"","what":"Oribatid Mite Data with Explanatory Variables — mite","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Oribatid mite data. 70 soil cores collected Daniel Borcard 1989. See Borcard et al. (1992, 1994) details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"","code":"data(mite) data(mite.env) data(mite.pcnm) data(mite.xy)"},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"three linked data sets: mite contains data   35 species Oribatid mites, mite.env contains   environmental data sampling sites, mite.xy   contains geographic coordinates,  mite.pcnm   contains 22 PCNM base functions (columns) computed geographic   coordinates 70 sampling sites (Borcard & Legendre 2002).   whole sampling area 2.5 m x 10 m size. fields environmental data : SubsDens Substrate density (g/L) WatrCont Water content substrate (g/L) Substrate Substrate type, factor levels Sphagn1, \tSphagn2 Sphagn3 Sphagn Litter Barepeat Interface Shrub Shrub density, ordered factor levels 1 <       2 < 3 Topo Microtopography, factor levels Blanket Hummock","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Pierre Legendre","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Borcard, D., P. Legendre P. Drapeau. 1992. Partialling spatial component ecological variation. Ecology 73: 1045-1055. Borcard, D. P. Legendre. 1994. Environmental control spatial structure ecological communities: example using Oribatid mites (Acari, Oribatei). Environmental Ecological Statistics 1: 37-61. Borcard, D. P. Legendre. 2002. -scale spatial analysis ecological data means principal coordinates neighbour matrices. Ecological Modelling 153: 51-68.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"","code":"data(mite)"},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Function implements Kruskal's (1964a,b) non-metric   multidimensional scaling (NMDS) using monotone regression   primary (“weak”) treatment ties. addition   traditional global NMDS, function implements local NMDS, linear   hybrid multidimensional scaling.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"","code":"monoMDS(dist, y, k = 2, model = c(\"global\", \"local\", \"linear\", \"hybrid\"),     threshold = 0.8, maxit = 200, weakties = TRUE, stress = 1,     scaling = TRUE, pc = TRUE, smin = 1e-4, sfgrmin = 1e-7,     sratmax=0.999999, ...) # S3 method for monoMDS scores(x, choices = NA, ...) # S3 method for monoMDS plot(x, choices = c(1,2), type = \"t\", ...) # S3 method for monoMDS points(x, choices = c(1,2), select, ...) # S3 method for monoMDS text(x, labels, choices = c(1,2), select, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"dist Input dissimilarities. y Starting configuration. random configuration     generated missing. k Number dimensions. NB., number points \\(n\\)     \\(n > 2k + 1\\), preferably higher     non-metric MDS. model MDS model: \"global\" normal non-metric MDS     monotone regression, \"local\" non-metric MDS     separate regressions point, \"linear\" uses linear     regression, \"hybrid\" uses linear regression     dissimilarities threshold addition monotone     regression. See Details. threshold Dissimilarity linear regression     used alternately monotone regression. maxit Maximum number iterations. weakties Use primary weak tie treatment, equal     observed dissimilarities allowed different fitted     values. FALSE, secondary (strong) tie treatment     used, tied values broken. stress Use stress type 1 2 (see Details). scaling Scale final scores unit root mean squares. pc Rotate final scores principal components. smin, sfgrmin, sratmax Convergence criteria: iterations stop     stress drops smin, scale factor gradient     drops sfgrmin, stress ratio two iterations     goes sratmax (still \\(< 1\\)). x monoMDS result. choices Dimensions returned plotted. default NA     returns dimensions. type type plot: \"t\" text, \"p\"     points, \"n\" none. select Items displayed.  can either logical           vector TRUE displayed items vector           indices displayed items. labels Labels use used instead row names. ... parameters functions (ignored     monoMDS, passed graphical functions plot.).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"several versions non-metric multidimensional   scaling R, monoMDS offers following unique   combination features: “Weak” treatment ties (Kruskal 1964a,b), tied     dissimilarities can broken monotone regression.     especially important cases compared sites share species     dissimilarities tied maximum value one. Breaking     ties allows points different distances can help     recovering long coenoclines (gradients).  Functions     smacof package also hav adequate tie treatment. Handles missing values meaningful way. Offers “local” “hybrid” scaling     addition usual “global” NMDS (see ). Uses fast compiled code (isoMDS     MASS package also uses compiled code). Function monoMDS uses Kruskal's (1964b) original monotone   regression minimize stress. two alternatives   stress: Kruskal's (1964a,b) original “stress 1”   alternative version “stress 2” (Sibson 1972).   stresses can expressed general formula $$s^2 = \\frac{\\sum (d - \\hat d)^2}{\\sum(d - d_0)^2}$$ \\(d\\) distances among points ordination configuration,   \\(\\hat d\\) fitted ordination distances,   \\(d_0\\) ordination distances null model.    “stress 1” \\(d_0 = 0\\), “stress 2”   \\(d_0 = \\bar{d}\\) mean distances. “Stress 2”   can expressed \\(s^2 = 1 - R^2\\),   \\(R^2\\) squared correlation fitted values   ordination distances, related “linear fit”   stressplot. Function monoMDS can fit several alternative NMDS variants   can selected argument model.  default model =   \"global\" fits global NMDS, Kruskal's (1964a,b) original NMDS   similar isoMDS (MASS).  Alternative   model = \"local\" fits local NMDS independent monotone   regression used point (Sibson 1972).  Alternative   model = \"linear\" fits linear MDS. fits linear   regression instead monotone, identical metric scaling   principal coordinates analysis (cmdscale)   performs eigenvector decomposition dissimilarities (Gower   1966). Alternative model = \"hybrid\" implements hybrid MDS   uses monotone regression points linear regression   dissimilarities threshold dissimilarity   alternating steps (Faith et al. 1987). Function   stressplot can used display kind regression   model. Scaling, orientation direction axes arbitrary.   However, function always centres axes, default   scaling scale configuration unit root mean   square rotate axes (argument pc) principal   components first dimension shows major variation.   possible rotate solution first axis   parallel given environmental variable using function   MDSrotate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"convergence-criteria","dir":"Reference","previous_headings":"","what":"Convergence Criteria","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"NMDS iterative, function stops   convergence criteria met. actually criterion   assured convergence, solution can local optimum.   compare several random starts (use monoMDS via   metaMDS) assess solutions likely global   optimum. stopping criteria : maxit: Maximum number iterations. Reaching      criterion means solutions almost certainly found,      maxit increased. smin: Minimum stress. stress nearly zero,      fit almost perfect. Usually means data set      small requested analysis, may several      different solutions almost perfect. reduce      number dimensions (k), get data (     observations) use method, metric scaling      (cmdscale, wcmdscale). sratmax: Change stress. Values close one      mean almost unchanged stress. may mean solution,      can also signal stranding suboptimal solution flat stress      surface. sfgrmin: Minimum scale factor. Values close      zero mean almost unchanged configuration. may mean      solution, also happen local optima.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Returns object class \"monoMDS\". final scores   returned item points (function scores extracts   results), stress item stress. addition,   large number items (may change without   notice future releases).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Faith, D.P., Minchin, P.R Belbin, L. 1987. Compositional       dissimilarity robust measure ecological       distance. Vegetatio 69, 57--68. Gower, J.C. (1966). distance properties latent root       vector methods used multivariate analysis. Biometrika       53, 325--328. Kruskal, J.B. 1964a. Multidimensional scaling optimizing       goodness--fit nonmetric hypothesis. Psychometrika       29, 1--28. Kruskal, J.B. 1964b. Nonmetric multidimensional scaling: numerical       method. Psychometrika 29, 115--129. Minchin, P.R. 1987. evaluation relative robustness       techniques ecological ordinations. Vegetatio 69,       89--107. Sibson, R. 1972. Order invariant methods data       analysis. Journal Royal Statistical Society B 34,       311--349.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Peter R. Michin (Fortran core) Jari Oksanen (R interface).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"default NMDS function used    metaMDS. Function metaMDS adds support    functions NMDS can run like recommended Minchin    (1987).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"","code":"data(dune) dis <- vegdist(dune) m <- monoMDS(dis, model = \"loc\") m #>  #> Call: #> monoMDS(dist = dis, model = \"loc\")  #>  #> Local non-metric Multidimensional Scaling #>  #> 20 points, dissimilarity ‘bray’, call ‘vegdist(x = dune)’ #>  #> Dimensions: 2  #> Stress:     0.07626803  #> Stress type 1, weak ties #> Scores scaled to unit root mean square, rotated to principal components #> Stopped after 56 iterations: Stress nearly unchanged (ratio > sratmax) plot(m)"},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":null,"dir":"Reference","previous_headings":"","what":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"Multiple Response Permutation Procedure (MRPP) provides test whether significant difference two groups sampling units. Function meandist finds mean within block dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"","code":"mrpp(dat, grouping, permutations = 999, distance = \"euclidean\",      weight.type = 1, strata = NULL, parallel = getOption(\"mc.cores\")) meandist(dist, grouping, ...) # S3 method for meandist summary(object, ...) # S3 method for meandist plot(x, kind = c(\"dendrogram\", \"histogram\"),  cluster = \"average\",       ylim, axes = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"dat data matrix data frame rows samples     columns response variable(s), dissimilarity object     symmetric square matrix dissimilarities. grouping Factor numeric index grouping observations. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. used assess     significance MRPP statistic, \\(delta\\). distance Choice distance metric measures     dissimilarity two observations . See vegdist     options.  used dat dissimilarity     structure symmetric square matrix. weight.type choice group weights. See Details options. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. dist dist object dissimilarities,     produced functions dist, vegdist     designdist. . object, x meandist result object. kind Draw dendrogram histogram; see Details. cluster clustering method hclust     function kind = \"dendrogram\".      hclust method can used, perhaps     \"average\" \"single\" make sense. ylim Limits vertical axes (optional). axes Draw scale vertical axis. ... arguments passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"Multiple Response Permutation Procedure (MRPP) provides test   whether significant difference two groups   sampling units. difference may one location (differences   mean) one spread (differences within-group distance;   cf. Warton et al. 2012). Function mrpp operates   data.frame matrix rows observations responses   data matrix. response(s) may uni- multivariate. method   philosophically mathematically allied analysis   variance, compares dissimilarities within among   groups. two groups sampling units really different (e.g.   species composition), average within-group   compositional dissimilarities less average   dissimilarities two random collection sampling units drawn   entire population. mrpp statistic \\(\\delta\\) overall weighted mean   within-group means pairwise dissimilarities among sampling   units. choice group weights currently clear.   mrpp function offers three choices: (1) group size (\\(n\\)),   (2) degrees--freedom analogue (\\(n-1\\)), (3) weight   number unique distances calculated among \\(n\\) sampling   units (\\(n(n-1)/2\\)). mrpp algorithm first calculates pairwise distances   entire dataset, calculates \\(\\delta\\). permutes   sampling units associated pairwise distances,   recalculates \\(\\delta\\) based permuted data. repeats   permutation step permutations times. significance test   fraction permuted deltas less observed delta,   small sample correction. function also calculates   change-corrected within-group agreement \\(= 1 -\\delta/E(\\delta)\\),   \\(E(\\delta)\\) expected \\(\\delta\\) assessed   average dissimilarities. first argument dat can interpreted   dissimilarities, used directly. cases   function treats dat observations, uses   vegdist find dissimilarities.  default   distance Euclidean traditional use method,   dissimilarities vegdist also available. Function meandist calculates matrix mean within-cluster   dissimilarities (diagonal) -cluster dissimilarities   (-diagonal elements), attribute n grouping   counts. Function summary finds within-class, -class   overall means dissimilarities, MRPP statistics   weight.type options Classification Strength,   CS (Van Sickle Hughes, 2000). CS defined dissimilarities   \\(\\bar{B} - \\bar{W}\\), \\(\\bar{B}\\)   mean cluster dissimilarity \\(\\bar{W}\\) mean   within cluster dissimilarity weight.type = 1. function   perform significance tests statistics, must   use mrpp appropriate weight.type.   currently significance test CS, mrpp   weight.type = 1 gives correct test \\(\\bar{W}\\)   good approximation CS.  Function plot draws   dendrogram histogram result matrix based   within-group group dissimilarities. dendrogram   found method given cluster argument using   function hclust. terminal segments hang   within-cluster dissimilarity. clusters   heterogeneous combined class, leaf segment reversed.   histograms based dissimilarities, ore otherwise similar   Van Sickle Hughes (2000): horizontal line drawn   level mean -cluster dissimilarity vertical lines   connect within-cluster dissimilarities line.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"function returns list class mrpp following items: call Function call. delta overall weighted mean group mean distances. E.delta expected delta, null hypothesis group     structure. mean original dissimilarities. CS Classification strength (Van Sickle Hughes,     2000). Currently implemented always NA. n Number observations class. classdelta Mean dissimilarities within classes. overall     \\(\\delta\\) weighted average values given     weight.type . Pvalue Significance test. chance-corrected estimate proportion distances     explained group identity; value analogous coefficient      determination linear model. distance Choice distance metric used; \"method\" entry     dist object. weight.type choice group weights used. boot.deltas vector \"permuted deltas,\" deltas     calculated permuted datasets. distribution     item can inspected permustats function. permutations number permutations used. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"B. McCune J. B. Grace. 2002. Analysis Ecological   Communities. MjM  Software Design, Gleneden Beach, Oregon, USA. P. W. Mielke K. J. Berry. 2001. Permutation Methods:   Distance  Function Approach. Springer Series   Statistics. Springer. J. Van Sickle R. M. Hughes 2000. Classification strengths   ecoregions, catchments, geographic clusters aquatic vertebrates   Oregon. J. N. . Benthol. Soc. 19:370--384. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate   analyses confound location dispersion effects. Methods   Ecology Evolution, 3, 89--101","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"M. Henry H. Stevens HStevens@muohio.edu Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"difference may one location (differences mean) one spread (differences within-group distance). , may find significant difference two groups simply one groups greater dissimilarities among sampling units. mrpp models can analysed adonis2 seems suffer problems mrpp robust alternative.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"","code":"data(dune) data(dune.env) dune.mrpp <- with(dune.env, mrpp(dune, Management)) dune.mrpp #>  #> Call: #> mrpp(dat = dune, grouping = Management)  #>  #> Dissimilarity index: euclidean  #> Weights for groups:  n  #>  #> Class means and counts: #>  #>       BF    HF    NM    SF    #> delta 10.03 11.08 10.66 12.27 #> n     3     5     6     6     #>  #> Chance corrected within-group agreement A: 0.1246  #> Based on observed delta 11.15 and expected delta 12.74  #>  #> Significance of delta: 0.001  #> Permutation: free #> Number of permutations: 999 #>   # Save and change plotting parameters def.par <- par(no.readonly = TRUE) layout(matrix(1:2,nr=1))  plot(dune.ord <- metaMDS(dune, trace=0), type=\"text\", display=\"sites\" ) with(dune.env, ordihull(dune.ord, Management))  with(dune.mrpp, {   fig.dist <- hist(boot.deltas, xlim=range(c(delta,boot.deltas)),                   main=\"Test of Differences Among Groups\")   abline(v=delta);    text(delta, 2*mean(fig.dist$counts), adj = -0.5,      expression(bold(delta)), cex=1.5 )  } )  par(def.par) ## meandist dune.md <- with(dune.env, meandist(vegdist(dune), Management)) dune.md #>           BF        HF        NM        SF #> BF 0.4159972 0.4736637 0.7296979 0.6247169 #> HF 0.4736637 0.4418115 0.7217933 0.5673664 #> NM 0.7296979 0.7217933 0.6882438 0.7723367 #> SF 0.6247169 0.5673664 0.7723367 0.5813015 #> attr(,\"class\") #> [1] \"meandist\" \"matrix\"   #> attr(,\"n\") #> grouping #> BF HF NM SF  #>  3  5  6  6  summary(dune.md) #>  #> Mean distances: #>                  Average #> within groups  0.5746346 #> between groups 0.6664172 #> overall        0.6456454 #>  #> Summary statistics: #>                         Statistic #> MRPP A weights n        0.1423836 #> MRPP A weights n-1      0.1339124 #> MRPP A weights n(n-1)   0.1099842 #> Classification strength 0.1127012 plot(dune.md)  plot(dune.md, kind=\"histogram\")"},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function mso adds attribute vario   object class \"cca\" describes spatial   partitioning cca object performs optional   permutation test spatial independence residuals.   function plot.mso creates diagnostic plot spatial   partitioning \"cca\" object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"","code":"mso(object.cca, object.xy, grain = 1, round.up = FALSE, permutations = 0) msoplot(x, alpha = 0.05, explained = FALSE, ylim = NULL, legend = \"topleft\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"object.cca object class cca, created cca     rda function. object.xy vector, matrix data frame spatial     coordinates data represented object.cca.     number rows must match number observations (given     nobs) cca.object. Alternatively, interpoint     distances can supplied dist object. grain Interval size distance classes. round.Determines choice breaks. false, distances     rounded nearest multiple grain. true, distances     rounded upper multiple grain. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. x result object mso. alpha Significance level two-sided permutation test     Mantel statistic spatial independence residual inertia     point-wise envelope variogram total     variance. Bonferroni-type correction can achieved dividing     overall significance value (e.g. 0.05) number distance     classes. explained false, suppresses plotting variogram     explained variance. ylim Limits y-axis. legend x y co-ordinates used position legend.      can specified keyword way accepted      legend. ... arguments passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"Mantel test adaptation function mantel   vegan package parallel testing several distance classes.   compares mean inertia distance class pooled mean   inertia distance classes. explanatory variables (RDA, CCA, pRDA, pCCA)   significance test residual autocorrelation performed   running function mso, function plot.mso   print estimate much autocorrelation (based   significant distance classes) causes global error variance   regression analysis underestimated","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function mso returns amended cca rda object additional attributes grain, H,  H.test vario. grain grain attribute defines interval size     distance classes . H H object class 'dist' contains geographic     distances observations. H.test H.test contains set dummy variables describe     pairs observations (rows = elements object$H) fall     distance class (columns). vario vario attribute data frame contains     following components rda case (cca case       brackets): H Distance class multiples grain. Dist Average distance pairs observations distance class H. n Number unique pairs observations distance class \tH. Empirical (chi-square) variogram total variance \t(inertia). Sum Sum empirical (chi-square) variograms explained \tresidual variance (inertia). CA Empirical (chi-square) variogram residual variance \t(inertia). CCA Empirical (chi-square) variogram explained variance \t(inertia). pCCA Empirical (chi-square) variogram conditioned \tvariance (inertia). se Standard error empirical (chi-square) variogram \ttotal variance (inertia). CA.signif P-value permutation test spatial \tindependence residual variance (inertia).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"Wagner, H.H. 2004. Direct multi-scale ordination   canonical correspondence analysis. Ecology 85: 342--351.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"responsible author Helene Wagner.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function based code published Ecological   Archives E085-006 (doi:10.1890/02-0738 ).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"","code":"## Reconstruct worked example of Wagner (submitted): X <- matrix(c(1, 2, 3, 2, 1, 0), 3, 2) Y <- c(3, -1, -2) tmat <- c(1:3) ## Canonical correspondence analysis (cca): Example.cca <- cca(X, Y) Example.cca <- mso(Example.cca, tmat) #> Set of permutations < 'minperm'. Generating entire set. msoplot(Example.cca)  Example.cca$vario #>   H Dist n  All       Sum         CA       CCA se #> 1 1    1 2 0.25 0.3456633 0.07461735 0.2710459  0 #> 2 2    2 1 1.00 0.8086735 0.01147959 0.7971939 NA  ## Correspondence analysis (ca): Example.ca <- mso(cca(X), tmat) #> Set of permutations < 'minperm'. Generating entire set. msoplot(Example.ca)   ## Unconstrained ordination with test for autocorrelation ## using oribatid mite data set as in Wagner (2004) data(mite) data(mite.env) data(mite.xy)  mite.cca <- cca(log(mite + 1)) mite.cca <- mso(mite.cca, mite.xy, grain =  1, permutations = 99) msoplot(mite.cca)  mite.cca #> Call: mso(object.cca = mite.cca, object.xy = mite.xy, grain = 1, #> permutations = 99) #>  #>               Inertia Rank #> Total           1.164      #> Unconstrained   1.164   34 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.3662 0.1328 0.0723 0.0658 0.0559 0.0481 0.0418 0.0391  #> (Showing 8 of 34 unconstrained eigenvalues) #>  #> mso variogram: #>  #>     H   Dist   n    All     CA CA.signif #> 0   0 0.3555  63 0.6250 0.6250      0.01 #> 1   1 1.0659 393 0.7556 0.7556      0.01 #> 2   2 2.0089 534 0.8931 0.8931      0.01 #> 3   3 2.9786 417 1.0988 1.0988      0.02 #> 4   4 3.9817 322 1.3321 1.3321      0.01 #> 5   5 5.0204 245 1.5109 1.5109      0.01 #> 10 10 6.8069 441 1.7466 1.7466      0.01 #>  #> Permutation: free #> Number of permutations: 99 #>   ## Constrained ordination with test for residual autocorrelation ## and scale-invariance of species-environment relationships mite.cca <- cca(log(mite + 1) ~ SubsDens + WatrCont + Substrate + Shrub + Topo, mite.env) mite.cca <- mso(mite.cca, mite.xy, permutations = 99) msoplot(mite.cca)  #> Error variance of regression model underestimated by 0.4 percent  mite.cca #> Call: mso(object.cca = mite.cca, object.xy = mite.xy, permutations = #> 99) #>  #>               Inertia Proportion Rank #> Total          1.1638     1.0000      #> Constrained    0.5211     0.4478   11 #> Unconstrained  0.6427     0.5522   34 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1    CCA2    CCA3    CCA4    CCA5    CCA6    CCA7    CCA8    CCA9   CCA10  #> 0.31207 0.06601 0.04117 0.02938 0.02438 0.01591 0.01201 0.00752 0.00612 0.00373  #>   CCA11  #> 0.00284  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8  #> 0.07888 0.06752 0.05457 0.04023 0.03855 0.03491 0.03233 0.02692  #> (Showing 8 of 34 unconstrained eigenvalues) #>  #> mso variogram: #>  #>     H   Dist   n    All    Sum     CA    CCA      se CA.signif #> 0   0 0.3555  63 0.6250 0.7479 0.5512 0.1967 0.03506      0.01 #> 1   1 1.0659 393 0.7556 0.8820 0.6339 0.2482 0.01573      0.17 #> 2   2 2.0089 534 0.8931 0.9573 0.6473 0.3100 0.01487      0.74 #> 3   3 2.9786 417 1.0988 1.1010 0.6403 0.4607 0.01858      0.49 #> 4   4 3.9817 322 1.3321 1.2548 0.6521 0.6027 0.02439      0.97 #> 5   5 5.0204 245 1.5109 1.4564 0.6636 0.7928 0.02801      0.35 #> 10 10 6.8069 441 1.7466 1.6266 0.6914 0.9351 0.02052      0.19 #>  #> Permutation: free #> Number of permutations: 99 #>"},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiplicative Diversity Partitioning — multipart","title":"Multiplicative Diversity Partitioning — multipart","text":"multiplicative diversity partitioning, mean values alpha diversity lower levels sampling hierarchy compared total diversity entire data set pooled samples (gamma diversity).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multiplicative Diversity Partitioning — multipart","text":"","code":"multipart(...) # S3 method for default multipart(y, x, index=c(\"renyi\", \"tsallis\"), scales = 1,     global = FALSE, relative = FALSE, nsimul=99, method = \"r2dtable\", ...) # S3 method for formula multipart(formula, data, index=c(\"renyi\", \"tsallis\"), scales = 1,     global = FALSE, relative = FALSE, nsimul=99, method = \"r2dtable\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multiplicative Diversity Partitioning — multipart","text":"y community matrix. x matrix number rows y, columns     coding levels sampling hierarchy. number groups within     hierarchy must decrease left right. x missing,     two levels assumed: row group first level,     rows group second level. formula two sided model formula form y ~ x,     y community data matrix samples rows     species column. Right hand side (x) must grouping     variable(s) referring levels sampling hierarchy, terms     right left treated nested (first column lowest,     last highest level). formula add unique     indentifier rows constant rows always produce     estimates row-level alpha overall gamma diversities. must     use non-formula interface avoid behaviour. Interaction terms     allowed. data data frame look variables defined     right hand side formula. missing, variables looked     global environment. index Character, entropy index calculated (see Details). relative Logical, TRUE beta diversity     standardized maximum (see Details). scales Numeric, length 1, order generalized     diversity index used. global Logical, indicates calculation beta diversity values,     see Details. nsimul Number permutations use.  nsimul = 0,     FUN argument evaluated.     thus possible reuse statistic values     without null model. method Null model method: either name (character string)     method defined make.commsim     commsim function.     default \"r2dtable\" keeps row sums column sums fixed.     See oecosimu Details Examples. ... arguments passed oecosimu, .e.     method, thin burnin.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiplicative Diversity Partitioning — multipart","text":"Multiplicative diversity partitioning based Whittaker's (1972) ideas, recently generalised one parametric diversity families (.e. Rényi Tsallis) Jost (2006, 2007). Jost recommends use numbers equivalents (Hill numbers), instead pure diversities, proofs, satisfies multiplicative partitioning requirements. current implementation multipart calculates Hill numbers based functions renyi tsallis (provided index argument). values one scales desired, done separate runs, adds extra dimensionality implementation, resolved efficiently. Alpha diversities averages Hill numbers hierarchy levels, global gamma diversity alpha value calculated highest hierarchy level. global = TRUE, beta calculated relative global gamma value: $$\\beta_i = \\gamma / \\alpha_{}$$ global = FALSE, beta calculated relative local gamma values (local gamma means diversity calculated particular cluster based pooled abundance vector): $$\\beta_ij = \\alpha_{(+1)j} / mean(\\alpha_{ij})$$ \\(j\\) particular cluster hierarchy level \\(\\). beta diversity value level \\(\\) mean beta values clusters level, \\(\\beta_{} = mean(\\beta_{ij})\\). relative = TRUE, respective beta diversity values standardized maximum possible values (\\(mean(\\beta_{ij}) / \\beta_{max,ij}\\)) given \\(\\beta_{max,ij} = n_{j}\\) (number lower level units given cluster \\(j\\)). expected diversity components calculated nsimul times individual based randomization community data matrix. done \"r2dtable\" method oecosimu default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multiplicative Diversity Partitioning — multipart","text":"object class \"multipart\" structure \"oecosimu\" objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiplicative Diversity Partitioning — multipart","text":"Jost, L. (2006). Entropy diversity. Oikos, 113, 363--375. Jost, L. (2007). Partitioning diversity independent alpha beta components. Ecology, 88, 2427--2439. Whittaker, R. (1972). Evolution measurement species diversity. Taxon, 21, 213--251.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiplicative Diversity Partitioning — multipart","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multiplicative Diversity Partitioning — multipart","text":"","code":"## NOTE: 'nsimul' argument usually needs to be >= 99 ## here much lower value is used for demonstration  data(mite) data(mite.xy) data(mite.env) ## Function to get equal area partitions of the mite data cutter <- function (x, cut = seq(0, 10, by = 2.5)) {     out <- rep(1, length(x))     for (i in 2:(length(cut) - 1))         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i     return(out)} ## The hierarchy of sample aggregation levsm <- with(mite.xy, data.frame(     l2=cutter(y, cut = seq(0, 10, by = 2.5)),     l3=cutter(y, cut = seq(0, 10, by = 5)))) ## Multiplicative diversity partitioning multipart(mite, levsm, index=\"renyi\", scales=1, nsimul=19) #> multipart object #>  #> Call: multipart(y = mite, x = levsm, index = \"renyi\", scales = 1, #> nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES    mean    2.5%     50%   97.5% Pr(sim.)   #> alpha.1    11.235 -102.364 14.0828 14.0304 14.0823 14.1272     0.05 * #> gamma      12.006 -281.558 14.1360 14.1225 14.1395 14.1441     0.05 * #> beta.1      1.071   38.791  1.0038  1.0009  1.0038  1.0069     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ l2 + l3, levsm, index=\"renyi\", scales=1, nsimul=19) #> multipart object #>  #> Call: multipart(formula = mite ~ l2 + l3, data = levsm, index = #> \"renyi\", scales = 1, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES     mean     2.5%      50%   97.5% Pr(sim.)   #> alpha.1    8.0555  -58.621 12.19232 12.09532 12.17629 12.3010     0.05 * #> alpha.2   11.2353  -99.401 14.09710 14.05752 14.09992 14.1476     0.05 * #> alpha.3   12.0064 -302.279 14.13508 14.12234 14.13589 14.1463     0.05 * #> gamma     14.1603    0.000 14.16027 14.16027 14.16027 14.1603     1.00   #> beta.1     1.3568   30.782  1.15871  1.14935  1.15802  1.1711     0.05 * #> beta.2     1.0710   38.611  1.00271  0.99982  1.00240  1.0057     0.05 * #> beta.3     1.1794  355.814  1.00178  1.00099  1.00172  1.0027     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ ., levsm, index=\"renyi\", scales=1, nsimul=19, relative=TRUE) #> multipart object #>  #> Call: multipart(formula = mite ~ ., data = levsm, index = \"renyi\", #> scales = 1, relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES      mean      2.5%       50%   97.5% Pr(sim.)   #> alpha.1  8.055481  -57.340 12.224063 12.116113 12.236814 12.3617     0.05 * #> alpha.2 11.235261 -117.838 14.085919 14.049300 14.086691 14.1277     0.05 * #> alpha.3 12.006443 -373.475 14.134179 14.127141 14.133105 14.1449     0.05 * #> gamma   14.160271    0.000 14.160271 14.160271 14.160271 14.1603     1.00   #> beta.1   0.078594   22.948  0.068093  0.067219  0.068089  0.0689     0.05 * #> beta.2   0.535514   37.594  0.501713  0.500020  0.501788  0.5032     0.05 * #> beta.3   0.589695  439.760  0.500923  0.500543  0.500961  0.5012     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ ., levsm, index=\"renyi\", scales=1, nsimul=19, global=TRUE) #> multipart object #>  #> Call: multipart(formula = mite ~ ., data = levsm, index = \"renyi\", #> scales = 1, global = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global TRUE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES    mean    2.5%     50%   97.5% Pr(sim.)   #> alpha.1    8.0555  -66.262 12.1821 12.0605 12.1870 12.2667     0.05 * #> alpha.2   11.2353 -111.738 14.0941 14.0491 14.0928 14.1436     0.05 * #> alpha.3   12.0064 -310.829 14.1369 14.1230 14.1379 14.1478     0.05 * #> gamma     14.1603    0.000 14.1603 14.1603 14.1603 14.1603     1.00   #> beta.1     1.7578   99.871  1.1624  1.1544  1.1619  1.1741     0.05 * #> beta.2     1.2603  140.199  1.0047  1.0012  1.0048  1.0079     0.05 * #> beta.3     1.1794  365.916  1.0017  1.0009  1.0016  1.0026     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":null,"dir":"Reference","previous_headings":"","what":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Patches local communities regarded nested   subsets community. general, species poor communities   subsets species rich communities, rare species   occur species rich communities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"","code":"nestedchecker(comm) nestedn0(comm) nesteddisc(comm, niter = 200) nestedtemp(comm, ...) nestednodf(comm, order = TRUE, weighted = FALSE, wbinary = FALSE) nestedbetasor(comm) nestedbetajac(comm) # S3 method for nestedtemp plot(x, kind = c(\"temperature\", \"incidence\"),     col=rev(heat.colors(100)),  names = FALSE, ...) # S3 method for nestednodf plot(x, col = \"red\", names = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"comm Community data. niter Number iterations reorder tied columns. x Result object plot. col Colour scheme matrix temperatures. kind kind plot produced. names Label columns rows plot using names comm.     logical vector length 2, row column labels     returned accordingly. order Order rows columns frequencies. weighted Use species abundances weights interactions. wbinary Modify original method binary data give     result weighted unweighted analysis. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"nestedness functions evaluate alternative indices nestedness.   functions intended used together Null model   communities used argument oecosimu analyse   non-randomness results. Function nestedchecker gives number checkerboard units,   2x2 submatrices species occur different   sites (Stone & Roberts 1990). Function nestedn0 implements   nestedness measure N0 number absences sites   richer pauperate site species occurs   (Patterson & Atmar 1986). Function nesteddisc implements discrepancy index   number ones shifted fill row ones   table arranged species frequencies (Brualdi & Sanderson   1999). original definition arranges species (columns)   frequencies, method handling tied   frequencies.  nesteddisc function tries order tied   columns minimize discrepancy statistic rather   slow, large number tied columns guarantee   best ordering found (argument niter gives   maximum number tried orders). case warning tied   columns issued. Function nestedtemp finds matrix temperature   defined sum “surprises” arranged matrix.    arranged unsurprising matrix species within proportion given   matrix fill upper left corner matrix,   surprise absence presences diagonal distance   fill line (Atmar & Patterson 1993). Function tries pack species   sites low temperature (Rodríguez-Gironés   & Santamaria 2006), iterative procedure,   temperatures usually vary among runs.  Function nestedtemp also   plot method can display either incidences   temperatures surprises. Matrix temperature rather vaguely   described (Atmar & Patterson 1993),   Rodríguez-Gironés & Santamaria (2006)   explicit description used . However, results   probably differ implementations, users   cautious interpreting results. details calculations   explained vignette Design decisions   implementation can read using functions   browseVignettes. Function   nestedness bipartite package   direct port BINMATNEST programme   Rodríguez-Gironés & Santamaria (2006). Function nestednodf implements nestedness metric based   overlap decreasing fill (Almeida-Neto et al., 2008). Two basic   properties required matrix maximum degree   nestedness according metric: (1) complete overlap 1's   right left columns rows, (2)   decreasing marginal totals pairs columns   pairs rows. nestedness statistic evaluated separately   columns (N columns) rows (N rows) combined   whole matrix (NODF).  set order = FALSE,   statistic evaluated current matrix ordering allowing   tests meaningful hypothesis matrix structure   default ordering row column totals (breaking ties total   abundances weighted = TRUE) (see Almeida-Neto et   al. 2008). weighted = TRUE, function finds   weighted version index (Almeida-Neto & Ulrich,   2011). However, requires quantitative null models adequate   testing. Almeida-Neto & Ulrich (2011) say positive   nestedness values first row/column higher   second.  condition, weighted analysis binary data   always give zero nestedness. argument wbinary = TRUE,   equality rows/columns also indicates nestedness, binary data   give identical results weighted unweighted analysis.   However, can also influence results weighted analysis   results may differ Almeida-Neto & Ulrich (2011). Functions nestedbetasor nestedbetajac find   multiple-site dissimilarities decompose components   turnover nestedness following Baselga (2012); pairwise   dissimilarities can found designdist. can   seen decomposition beta diversity (see   betadiver).  Function nestedbetasor uses   Sørensen dissimilarity turnover component   Simpson dissimilarity (Baselga 2012), nestedbetajac uses   analogous methods Jaccard index. functions return   vector three items: turnover, nestedness sum   multiple Sørensen Jaccard dissimilarity.   last one total beta diversity (Baselga 2012). functions   treat data presence/absence (binary) can used   binary nullmodel. overall dissimilarity   constant nullmodels fix species (column)   frequencies (\"c0\"), components constant row   columns also fixed (e.g., model \"quasiswap\"),   functions meaningful null models.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"result returned nestedness function contains item called  statistic, components differ among functions.   functions constructed can handled  oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Almeida-Neto, M., Guimarães, P.,   Guimarães, P.R., Loyola, R.D. & Ulrich, W. (2008).   consistent metric nestedness analysis ecological systems:   reconciling concept measurement. Oikos 117, 1227--1239. Almeida-Neto, M. & Ulrich, W. (2011). straightforward   computational approach measuring nestedness using quantitative   matrices. Env. Mod. Software 26, 173--178. Atmar, W. & Patterson, B.D. (1993). measurement order   disorder distribution species fragmented   habitat. Oecologia 96, 373--382. Baselga, . (2012). relationship species replacement,   dissimilarity derived nestedness, nestedness. Global   Ecol. Biogeogr. 21, 1223--1232. Brualdi, R.. & Sanderson, J.G. (1999). Nested species subsets, gaps,   discrepancy. Oecologia 119, 256--264. Patterson, B.D. & Atmar, W. (1986). Nested subsets structure   insular mammalian faunas archipelagos. Biol. J. Linnean     Soc. 28, 65--82. Rodríguez-Gironés, M..  & Santamaria, L.   (2006). new algorithm calculate nestedness temperature   presence-absence matrices. J. Biogeogr. 33, 924--935. Stone, L. & Roberts, . (1990). checkerboard score species   distributions. Oecologia 85, 74--79. Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Jari Oksanen Gustavo Carvalho (nestednodf).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"","code":"data(sipoo) ## Matrix temperature out <- nestedtemp(sipoo) out #> nestedness temperature: 10.25693  #> with matrix fill 0.2233333  plot(out)  plot(out, kind=\"incid\")  ## Use oecosimu to assess the non-randomness of checker board units nestedchecker(sipoo) #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  oecosimu(sipoo, nestedchecker, \"quasiswap\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = #> \"quasiswap\") #>  #> nullmodel method ‘quasiswap’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.) #> checkerboards      2767 0.40441 2725.2 2575.2 2729.0 2957.3     0.63 ## Another Null model and standardized checkerboard score oecosimu(sipoo, nestedchecker, \"r00\", statistic = \"C.score\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = \"r00\", #> statistic = \"C.score\") #>  #> nullmodel method ‘r00’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>         statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)    #> C.score    2.2588 -25.667 9.1890 8.7433 9.2033 9.7188     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Number of Observations from a vegan Fit. — nobs.cca","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Extract number ‘observations’ vegan model fit.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"","code":"# S3 method for cca nobs(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"object fitted model object. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Function nobs generic R,   vegan provides methods objects   betadisper, cca related   methods, CCorA, decorana,   isomap, metaMDS, pcnm,   procrustes, radfit,   varpart wcmdscale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"single number, normally integer, giving number   observations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Null Model and Simulation — nullmodel","title":"Null Model and Simulation — nullmodel","text":"nullmodel function creates object, can serve basis Null Model simulation via simulate method. update method updates nullmodel object without sampling (effective sequential algorithms). smbind binds together multiple simmat objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Null Model and Simulation — nullmodel","text":"","code":"nullmodel(x, method) # S3 method for nullmodel print(x, ...) # S3 method for nullmodel simulate(object, nsim = 1, seed = NULL,     burnin = 0, thin = 1, ...) # S3 method for nullmodel update(object, nsim = 1, seed = NULL, ...) # S3 method for simmat print(x, ...) smbind(object, ..., MARGIN, strict = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Null Model and Simulation — nullmodel","text":"x community matrix. print method, object printed. method Character, specifying one null model algorithms listed help page commsim. can user supplied object class commsim. object object class nullmodel returned function nullmodel. case smbind simmat object returned update simulate methods. nsim Positive integer, number simulated matrices return. update method, number burnin steps made sequential algorithms update status input model object. seed object specifying random number generator initialized (\"seeded\"). Either NULL integer used call set.seed simulating matrices. set, value saved \"seed\" attribute returned value. default, NULL change random generator state, return .Random.seed \"seed\"  attribute, see Value. burnin Nonnegative integer, specifying number steps discarded starting simulation. Active sequential null model algorithms. Ignored non-sequential null model algorithms. thin Positive integer, number simulation steps made returned matrix. Active sequential null model algorithms. Ignored non-sequential null model algorithms. MARGIN Integer, indicating dimension multiple simmat objects bound together smbind. 1: matrices stacked (row bound), 2: matrices column bound, 3: iterations combined. Needs length 1. dimensions expected match across objects. strict Logical, consistency time series attributes (\"start\", \"end\", \"thin\", number simulated matrices) simmat objects strictly enforced binding multiple objects together using smbind. Applies input objects based sequential null model algorithms. ... Additional arguments supplied algorithms. case smbind can contain multiple simmat objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Null Model and Simulation — nullmodel","text":"purpose nullmodel function create object, necessary statistics input matrix calculated . information reused, recalculated step simulation process done simulate method. simulate method carries simulation, simulated matrices stored array. sequential algorithms, method updates state input nullmodel object. Therefore, possible diagnostic tests returned simmat object, make simulations, use increased thinning value desired. update method makes burnin steps case sequential algorithms update status input model without attempt return matrices. non-sequential algorithms method nothing. update preferred way making burnin iterations without sampling. Alternatively, burnin can done via simulate method. convergence diagnostics, recommended use simulate method without burnin. input nullmodel object updated, samples can simulated desired without start process . See Examples. smbind function can used combine multiple simmat objects. comes handy null model simulations stratified sites (MARGIN = 1) species (MARGIN = 2), case multiple objects returned identical/consistent settings e.g. parallel computations (MARGIN = 3). Sanity checks made ensure combining multiple objects sensible, user's responsibility check independence simulated matrices null distribution converged case sequential null model algorithms. strict = FALSE setting can relax checks regarding start, end, thinning values sequential null models.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Null Model and Simulation — nullmodel","text":"function nullmodel returns object class nullmodel. set objects sharing environment: data: original matrix integer mode. nrow: number rows. ncol: number columns. rowSums: row sums. colSums: column sums. rowFreq: row frequencies (number nonzero cells). colFreq: column frequencies (number nonzero cells). totalSum: total sum. fill: number nonzero cells matrix. commsim: commsim object result     method argument. state: current state permutations,     matrix similar original.     NULL non-sequential algorithms. iter: current number iterations   sequential algorithms.     NULL non-sequential algorithms. simulate method returns object class simmat. array simulated matrices (third dimension corresponding nsim argument). update method returns current state (last updated matrix) invisibly, update input object sequential algorithms. non sequential algorithms, returns NULL. smbind function returns object class simmat.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Null Model and Simulation — nullmodel","text":"Jari Oksanen Peter Solymos","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Null Model and Simulation — nullmodel","text":"Care must taken input matrix contains single row column. input invalid swapping hypergeometric distribution (calling r2dtable) based algorithms. also applies cases input stratified subsets.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Null Model and Simulation — nullmodel","text":"","code":"data(mite) x <- as.matrix(mite)[1:12, 21:30]  ## non-sequential nullmodel (nm <- nullmodel(x, \"r00\")) #> An object of class “nullmodel”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #>  (sm <- simulate(nm, nsim=10)) #> An object of class “simmat”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #>   ## sequential nullmodel (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  (sm1 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 5, End = 50, Thin = 5 #>  (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 55, End = 100, Thin = 5 #>   ## sequential nullmodel with burnin and extra updating (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  (sm1 <- simulate(nm, burnin=10, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 15, End = 60, Thin = 5 #>  (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 5, End = 50, Thin = 5 #>   ## sequential nullmodel with separate initial burnin (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  nm <- update(nm, nsim=10) (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 15, End = 60, Thin = 5 #>   ## combining multiple simmat objects  ## stratification nm1 <- nullmodel(x[1:6,], \"r00\") sm1 <- simulate(nm1, nsim=10) nm2 <- nullmodel(x[7:12,], \"r00\") sm2 <- simulate(nm2, nsim=10) smbind(sm1, sm2, MARGIN=1) #> An object of class “simmat”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #>   ## binding subsequent samples from sequential algorithms ## start, end, thin retained nm <- nullmodel(x, \"swap\") nm <- update(nm, nsim=10) sm1 <- simulate(nm, nsim=10, thin=5) sm2 <- simulate(nm, nsim=20, thin=5) sm3 <- simulate(nm, nsim=10, thin=5) smbind(sm3, sm2, sm1, MARGIN=3) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 40  #> Start = 15, End = 210, Thin = 5 #>   ## 'replicate' based usage which is similar to the output ## of 'parLapply' or 'mclapply' in the 'parallel' package ## start, end, thin are set, also noting number of chains smfun <- function(x, burnin, nsim, thin) {     nm <- nullmodel(x, \"swap\")     nm <- update(nm, nsim=burnin)     simulate(nm, nsim=nsim, thin=thin) } smlist <- replicate(3, smfun(x, burnin=50, nsim=10, thin=5), simplify=FALSE) smbind(smlist, MARGIN=3) # Number of permuted matrices = 30 #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 30  #> Start = 55, End = 100, Thin = 5 (3 chains) #>   if (FALSE) { ## parallel null model calculations library(parallel)  if (.Platform$OS.type == \"unix\") { ## forking on Unix systems smlist <- mclapply(1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5)) smbind(smlist, MARGIN=3) }  ## socket type cluster, works on all platforms cl <- makeCluster(3) clusterEvalQ(cl, library(vegan)) clusterExport(cl, c(\"smfun\", \"x\")) smlist <- parLapply(cl, 1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5)) stopCluster(cl) smbind(smlist, MARGIN=3) }"},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function evaluates statistic vector statistics   community evaluates significance series simulated   random communities.  approach used traditionally   analysis nestedness, function general can   used statistics evaluated simulated   communities. Function oecosimu collects evaluates   statistics. Null model communities described   make.commsim permatfull/   permatswap, definition Null models   nullmodel, nestedness statistics   nestednodf (describes several alternative   statistics, including nestedness temperature, \\(N0\\), checker   board units, nestedness discrepancy NODF).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"","code":"oecosimu(comm, nestfun, method, nsimul = 99, burnin = 0, thin = 1,    statistic = \"statistic\", alternative = c(\"two.sided\", \"less\", \"greater\"),     batchsize = NA, parallel = getOption(\"mc.cores\"), ...) # S3 method for oecosimu as.ts(x, ...) # S3 method for oecosimu toCoda(x)"},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"comm Community data, Null model object generated     nullmodel object class simmat (array     permuted matrices simulate.nullmodel).     comm community data, null model simulation     method must specified.  comm     nullmodel, simulation method ignored,     comm simmat object, arguments     ignored except nestfun, statistic     alternative. nestfun Function analysed. nestedness functions     provided vegan (see nestedtemp),     function can used accepts community first     argument, returns either plain number vector     result list item name defined argument     statistic. See Examples defining functions. method Null model method: either name (character string)     method defined make.commsim     commsim function. argument ignored     comm nullmodel simmat     object. See Details Examples. nsimul Number simulated null communities (ignored     comm simmat object). burnin Number null communities discarded proper     analysis sequential methods (\"tswap\")     (ignored non-sequential methods comm     simmat object). thin Number discarded null communities two     evaluations nestedness statistic sequential methods (ignored     non-sequential methods comm simmat     object). statistic name statistic returned     nestfun. alternative character string specifying alternative     hypothesis, must one \"two.sided\" (default), \"greater\"     \"less\". Please note \\(p\\)-value two-sided     test approximately two times higher corresponding     one-sided test (\"greater\" \"less\" depending     sign difference). batchsize Size Megabytes largest simulation object.     larger structure produced, analysis broken     internally batches. default NA analysis     broken batches.  See Details. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.  define nestfun Windows needs     R packages vegan permute, must set     socket cluster call. x oecosimu result object. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function oecosimu wrapper evaluates statistic   using function given nestfun, simulates series   null models based nullmodel, evaluates   statistic null models. vegan packages contains   nestedness functions described separately   (nestedchecker, nesteddisc,   nestedn0, nestedtemp,   nestednodf), many functions can used   long meaningful simulated communities.    applicable function must return either statistic plain   number vector, list element \"statistic\" (like   chisq.test), item whose name given   argument statistic.  statistic can single number   (like typical nestedness index), can vector.   vector indices can used analyse site (row) species (column)   properties, see treedive example. Raup-Crick   index (raupcrick) gives example using   dissimilarities. Null model type can given name (quoted character string)   used define Null model make.commsim.   include binary models described Wright et al. (1998),   Jonsson (2001), Gotelli & Entsminger (2003), Miklós &   Podani (2004), others. several quantitative Null   models, discussed Hardy (2008), several   unpublished (see make.commsim,   permatfull, permatswap   discussion). user can also define commsim   function (see Examples). Function works first defining nullmodel   given commsim, generating series   simulated communities simulate.nullmodel.   shortcut can used stages input can Community data (comm), Null model function       (nestfun) number simulations (nsimul). nullmodel object number       simulations, argument method ignored. three-dimensional array simulated communities generated       simulate.nullmodel, arguments       method nsimul ignored. last case allows analysing several statistics   simulations. function first generates simulations given   nullmodel analyses using   nestfun.  large data sets /large number   simulations, generated objects can large,   memory exhausted, analysis can become slow   system can become unresponsive. simulation broken   several smaller batches simulated nullmodel   objective set batchsize avoid memory   problems (see object.size estimating size   current data set). parallel processing still increases   memory needs.  parallel processing used evaluating   nestfun.  main load may simulation   nullmodel, parallel argument help   . Function .ts transforms simulated results sequential   methods time series ts object. allows   using analytic tools time series studying sequences (see   examples). Function toCoda transforms simulated results   sequential methods \"mcmc\" object   coda package. coda package provides functions   analysis stationarity, adequacy sample size,   autocorrelation, need burn-much sequential   methods, summary results. Please consult   documentation coda package. Function permustats provides support standard   density, densityplot,   qqnorm qqmath functions   simulated values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function oecosimu returns object class  \"oecosimu\".  result object items statistic  oecosimu.  statistic contains complete object   returned nestfun original data.   oecosimu component contains following items: statistic Observed values statistic. simulated Simulated values statistic. means Mean values statistic simulations. z Standardized effect sizes (SES, .k.. \\(z\\)-values)      observed statistic based simulations. pval \\(P\\)-values statistic based simulations. alternative type testing given argument alternative. method method used nullmodel. isSeq TRUE method sequential.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Hardy, O. J. (2008)    Testing spatial phylogenetic structure local communities:    statistical performances different null models    test statistics locally neutral community.    Journal Ecology 96, 914--926. Gotelli, N.J. & Entsminger, N.J. (2003). Swap algorithms null model   analysis. Ecology 84, 532--535. Jonsson, B.G. (2001) null model randomization tests   nestedness species assemblages. Oecologia 127, 309--313. Miklós, . & Podani, J. (2004). Randomization presence-absence   matrices: comments new algorithms. Ecology 85, 86--92. Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Jari Oksanen Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"wonder name oecosimu, look journal   names References (nestedtemp). internal structure function radically changed   vegan 2.2-0 introduction commsim   nullmodel deprecation   commsimulator.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"","code":"## Use the first eigenvalue of correspondence analysis as an index ## of structure: a model for making your own functions. data(sipoo) ## Traditional nestedness statistics (number of checkerboard units) oecosimu(sipoo, nestedchecker, \"r0\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = \"r0\") #>  #> nullmodel method ‘r0’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)    #> checkerboards      2767 -19.246 8044.2 7429.2 8063.0 8539.5     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## sequential model, one-sided test, a vector statistic out <- oecosimu(sipoo, decorana, \"swap\", burnin=100, thin=10,     statistic=\"evals\", alt = \"greater\") out #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = decorana, method = \"swap\", #> burnin = 100, thin = 10, statistic = \"evals\", alternative = \"greater\") #>  #> nullmodel method ‘swap’ with 99 simulations #> options:  thin 10, burnin 100 #> alternative hypothesis: statistic is greater than simulated values #>  #>  #> Call: #> nestfun(veg = comm)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.4436  #>  #>                        DCA1   DCA2   DCA3    DCA4 #> Eigenvalues          0.3822 0.2612 0.1668 0.08723 #> Additive Eigenvalues 0.3822 0.2609 0.1631 0.07650 #> Decorana values      0.4154 0.2465 0.1391 0.04992 #> Axis lengths         2.9197 2.5442 2.7546 1.78074 #>  #>  #>      statistic      SES    mean     50%    95% Pr(sim.)    #> DCA1  0.382249  2.32135 0.32264 0.32330 0.3622     0.01 ** #> DCA2  0.261208  1.75257 0.21898 0.22145 0.2530     0.03 *  #> DCA3  0.166788  0.46289 0.15711 0.15855 0.1901     0.32    #> DCA4  0.087226 -2.13283 0.12814 0.12458 0.1613     0.99    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Inspect the swap sequence as a time series object plot(as.ts(out))  lag.plot(as.ts(out))  acf(as.ts(out))  ## Density plot densityplot(permustats(out), as.table = TRUE, layout = c(1,4))  ## Use quantitative null models to compare ## mean Bray-Curtis dissimilarities data(dune) meandist <- function(x) mean(vegdist(x, \"bray\")) mbc1 <- oecosimu(dune, meandist, \"r2dtable\") mbc1 #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = meandist, method = \"r2dtable\") #>  #> nullmodel method ‘r2dtable’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>           statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)    #> statistic   0.64565 13.347 0.46589 0.43848 0.46665 0.4913     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Define your own null model as a 'commsim' function: shuffle cells ## in each row foo <- function(x, n, nr, nc, ...) {    out <- array(0, c(nr, nc, n))    for (k in seq_len(n))       out[,,k] <- apply(x, 2, function(z) sample(z, length(z)))    out } cf <- commsim(\"myshuffle\", foo, isSeq = FALSE, binary = FALSE,     mode = \"double\") oecosimu(dune, meandist, cf) #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = meandist, method = cf) #>  #> nullmodel method ‘myshuffle’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>           statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)    #> statistic   0.64565 3.2201 0.63568 0.63049 0.63535 0.6422     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Use pre-built null model nm <- simulate(nullmodel(sipoo, \"curveball\"), 99) oecosimu(nm, nestedchecker) #> oecosimu object #>  #> Call: oecosimu(comm = nm, nestfun = nestedchecker) #>  #> nullmodel method ‘curveball’ with 99 simulations #> options:  thin 1, burnin 0 #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic    SES   mean   2.5%    50% 97.5% Pr(sim.)   #> checkerboards      2767 1.8472 2692.5 2618.0 2688.0  2768     0.09 . #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Several chains of a sequential model -- this can be generalized ## for parallel processing (see ?smbind) nm <- replicate(5, simulate(nullmodel(sipoo, \"swap\"), 99,    thin=10, burnin=100), simplify = FALSE) ## nm is now a list of nullmodels: use smbind to combine these into one ## nullmodel with several chains ## IGNORE_RDIFF_BEGIN nm <- smbind(nm, MARGIN = 3) nm #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 18 x 50 matrix #> Number of permuted matrices = 495  #> Start = 110, End = 1090, Thin = 10 (5 chains) #>  oecosimu(nm, nestedchecker) #> oecosimu object #>  #> Call: oecosimu(comm = nm, nestfun = nestedchecker) #>  #> nullmodel method ‘swap’ with 495 simulations #> options:  thin 10, burnin 100, chains 5 #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.) #> checkerboards      2767 0.61153 2705.6 2557.3 2690.0 2942.6   0.4657 ## IGNORE_RDIFF_END ## After this you can use toCoda() and tools in the coda package to ## analyse the chains (these will show that thin, burnin and nsimul are ## all too low for real analysis)."},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Functions for Drawing Vectors — ordiArrowTextXY","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"Support functions assist drawing vectors (arrows)   ordination plots. ordiArrowMul finds multiplier   coordinates head vector occupy   fill proportion plot region. ordiArrowTextXY   finds coordinates locations labels drawn just   beyond head vector.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"","code":"ordiArrowTextXY(x, labels, display, choices = c(1,2),                 rescale = TRUE, fill = 0.75, at = c(0,0), ...) ordiArrowMul(x, at = c(0,0), fill = 0.75,              display, choices = c(1,2), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"x R object, scores can determine     suitable ordination scores object created     envfit, two-column matrix coordinates arrow     heads two plot axes. labels Change plotting labels. character vector labels     label coordinates sought. supplied,     determined row names x, scores(x, ...)     required. either defined, suitable labels     generated. display character string known scores one     methods indicates type scores extract.     fitting functions ordinary site scores linear     combination scores (\"lc\") constrained ordination     (cca, rda, capscale).     x created envfit display can     set user takes value \"vectors\". Ignored     x matrix. choices Axes plotted. rescale logical; coordinates extracted     x rescaled fill fill proportion plot     region? default always rescale coordinates     usually desired objects x coordinates     retrieved. supplying x 2-column matrix already     rescaled, set FALSE. fill numeric; proportion plot fill span     arrows. origin fitted arrows plot.  plot arrows     places origin, probably specify     arrrow.mul. ... Parameters passed scores,     strwidth strheight.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"ordiArrowMul finds multiplier scale bunch   arrows fill ordination plot, ordiArrowTextXY finds   coordinates labels arrows. NB.,   ordiArrowTextXY draw labels; simply returns   coordinates labels drawn use another   function, text.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"ordiArrowTextXY, 2-column matrix coordinates   label centres coordinate system currently active   plotting device. ordiArrowMul, length-1 vector containing scaling   factor.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"Jari Oksanen, modifications Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"","code":"## Scale arrows by hand to fill 80% of the plot     ## Biplot arrows by hand     data(varespec, varechem)     ord <- cca(varespec ~ Al + P + K, varechem)     plot(ord, display = c(\"species\",\"sites\"))      ## biplot scores     bip <- scores(ord, choices = 1:2, display = \"bp\")      ## scaling factor for arrows to fill 80% of plot     (mul <- ordiArrowMul(bip, fill = 0.8)) #> [1] 2.092173     bip.scl <- bip * mul                    # Scale the biplot scores     labs <- rownames(bip)                   # Arrow labels      ## calculate coordinate of labels for arrows     (bip.lab <- ordiArrowTextXY(bip.scl, rescale = FALSE, labels = labs)) #>          [,1]       [,2] #> Al  1.9098765 -0.3562415 #> P  -0.9298005 -1.6652122 #> K  -1.0069931 -0.3764923      ## draw arrows and text labels     arrows(0, 0, bip.scl[,1], bip.scl[,2], length = 0.1)     text(bip.lab, labels = labs)       ## Handling of ordination objects directly     mul2 <- ordiArrowMul(ord, display = \"bp\", fill = 0.8)     stopifnot(all.equal(mul, mul2))"},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Functions add arrows, line segments, regular grids   points. ordination diagrams can produced vegan   plot.cca, plot.decorana   ordiplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"","code":"ordiarrows(ord, groups, levels, replicates, order.by, display = \"sites\",          col = 1, show.groups, startmark, label = FALSE, length = 0.1, ...) ordisegments(ord, groups, levels, replicates, order.by, display = \"sites\",          col = 1, show.groups, label = FALSE, ...) ordigrid(ord, levels, replicates, display = \"sites\",  lty = c(1,1),           col = c(1,1), lwd = c(1,1), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"ord ordination object ordiplot object. groups Factor giving groups graphical item     drawn. levels, replicates Alternatively, regular     groups can defined arguments levels     replicates, levels gives number groups,     replicates number successive items     group. order.Order points increasing order variable     within groups. Reverse sign variable decreasing     ordering. display Item displayed. show.groups Show given groups. can vector,     TRUE want show items condition     TRUE. argument makes possible use different     colours line types groups. default show groups. label Label groups names.     ordiellipse, ordihull ordispider     group name centroid object, ordiarrows     start arrow, ordisegments     ends. ordiellipse ordihull use standard     text, others use ordilabel. startmark plotting character used mark first item.     default use mark, instance, startmark = 1     draw circle.  plotting characters, see pch     points. col Colour lines, label borders     startmark ordiarrows     ordisegments. can vector recycled     groups. ordigrid can vector length 2     used levels replicates. length Length edges arrow head (inches). lty, lwd Line type, line width used      levels replicates ordigrid. ... Parameters passed graphical functions     lines, segments, arrows,     scores select axes scaling etc.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Function ordiarrows draws arrows   ordisegments draws line segments   successive items groups. Function ordigrid draws line   segments within groups   corresponding items among groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"functions add graphical items ordination graph: must   draw graph first.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"","code":"example(pyrifos) #>  #> pyrifs> data(pyrifos) #>  #> pyrifs> ditch <- gl(12, 1, length=132) #>  #> pyrifs> week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) #>  #> pyrifs> dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11)) mod <- rda(pyrifos) plot(mod, type = \"n\") ## Annual succession by ditches, colour by dose ordiarrows(mod, ditch, label = TRUE, col = as.numeric(dose)) legend(\"topright\", levels(dose), lty=1, col=1:5, title=\"Dose\")  ## Show only control and highest Pyrifos treatment plot(mod, type = \"n\") ordiarrows(mod, ditch, label = TRUE,     show.groups = c(\"2\", \"3\", \"5\", \"11\")) ordiarrows(mod, ditch, label = TRUE, show = c(\"6\", \"9\"),    col = 2) legend(\"topright\", c(\"Control\", \"Pyrifos 44\"), lty = 1, col = c(1,2))"},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Functions add convex hulls, “spider” graphs, ellipses   cluster dendrogram ordination diagrams. ordination   diagrams can produced vegan plot.cca,   plot.decorana ordiplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"","code":"ordihull(ord, groups, display = \"sites\", draw = c(\"lines\",\"polygon\", \"none\"),          col = NULL, alpha = 127, show.groups, label = FALSE,          border = NULL, lty = NULL, lwd = NULL, ...) ordiellipse(ord, groups, display=\"sites\", kind = c(\"sd\",\"se\", \"ehull\"),          conf, draw = c(\"lines\",\"polygon\", \"none\"),    w = weights(ord, display), col = NULL, alpha = 127, show.groups,    label = FALSE, border = NULL, lty = NULL, lwd=NULL, ...) ordibar(ord, groups, display = \"sites\", kind = c(\"sd\", \"se\"), conf,          w = weights(ord, display), col = 1, show.groups, label = FALSE,    lwd = NULL, length = 0,  ...) ordispider(ord, groups, display=\"sites\", w = weights(ord, display),    spiders = c(\"centroid\", \"median\"),  show.groups,          label = FALSE, col = NULL, lty = NULL, lwd = NULL, ...) ordicluster(ord, cluster, prune = 0, display = \"sites\",             w = weights(ord, display), col = 1, draw = c(\"segments\", \"none\"),             ...) # S3 method for ordihull summary(object, ...) # S3 method for ordiellipse summary(object, ...) ordiareatest(ord, groups, area = c(\"hull\", \"ellipse\"), kind = \"sd\",          permutations = 999, parallel = getOption(\"mc.cores\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"ord ordination object ordiplot object. groups Factor giving groups graphical item     drawn. display Item displayed. draw character; objects represented plot?     ordihull ordiellipse use either     lines polygon draw     lines. ordicluster, line segments drawn using     segments. suppress plotting, use     \"none\". Graphical parameters passed . main     difference polygons may filled     non-transparent. none nothing drawn, function     returns invisible plotting. col Colour hull ellipse lines (draw = \"lines\")     fills (draw = \"polygon\") ordihull     ordiellipse.  draw = \"polygon\", colour     bordering lines can set argument border     polygon function. functions effect     depends underlining functions argument passed .     multiple values col specified used     element names(table(groups)) (order),     shorter vectors recycled. Function ordicluster     groups, argument recycled     points, colour connecting lines mixture point     s cluster. alpha Transparency fill colour draw     = \"polygon\" ordihull ordiellipse.      argument takes precedence possible transparency definitions     colour. value must range \\(0...255\\), low     values transparent.  Transparency available     graphics devices file formats. show.groups Show given groups. can vector,     TRUE want show items condition     TRUE. argument makes possible use different     colours line types groups. default show groups. label Label groups names centroid     object. ordiellipse ordihull use standard     text, others use ordilabel. w Weights used find average within group. Weights     used automatically cca     decorana results, unless undone     user. w=NULL sets equal weights points. kind Draw standard deviations points (sd), standard     errors (se) ellipsoid hulls enclose points     group (ehull). conf Confidence limit ellipses, e.g. 0.95. given,     corresponding sd se multiplied     corresponding value found Chi-squared distribution     2df. spiders centres spider bodies calculated either     centroids (averages) spatial medians. cluster Result hierarchic cluster analysis,     hclust agnes. prune Number upper level hierarchies removed     dendrogram. prune \\(>0\\), dendrogram     disconnected. object result object ordihull     ordiellipse. result invisible,     can saved, used summaries (areas etc. hulls     ellipses). area Evaluate area convex hulls ordihull,     ellipses ordiellipse. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. lty, lwd, border Vectors parameters can supplied     applied (appropriate) element     names(table(groups)) (order). Shorter vectors     recycled. length Width (inches) small (“caps”)     ends bar segment (passed arrows). ... Parameters passed graphical functions     scores select axes scaling etc.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Function ordihull draws lines   polygons convex   hulls found function chull encircling   items groups. Function ordiellipse draws lines   polygons ellipses groups. function   can either draw standard deviation points (kind=\"sd\")   standard error (weighted) centroids (kind=\"se\"),   (weighted) correlation defines direction principal   axis ellipse. kind = \"se\" used together   argument conf, ellipses show confidence regions   locations group centroids. kind=\"ehull\"   function draws ellipse encloses points group using   ellipsoidhull (cluster package). Function ordibar draws crossed “error bars” using   either either standard deviation point scores standard error   (weighted) average scores. principal axes   corresponding ordiellipse, found principal   component analysis (weighted) covariance matrix. Functions ordihull ordiellipse return invisibly   object summary method returns coordinates   centroids areas hulls ellipses. Function   ordiareatest studies one-sided hypothesis   areas smaller randomized groups. Argument   kind can used select kind ellipse,   effect convex hulls. Function ordispider draws ‘spider’ diagram   point connected group centroid   segments.  Weighted centroids used   correspondence analysis methods cca   decorana user gives weights   call. ordispider called cca   rda result without groups argument,   function connects ‘WA’ scores corresponding   ‘LC’ score. argument (invisible)   ordihull object, function connect points   hull centroid. Function ordicluster overlays cluster dendrogram onto   ordination. needs result hierarchic clustering   hclust agnes,   similar structure. Function ordicluster connects cluster   centroids line segments. Function   uses centroids points clusters, therefore   similar average linkage methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"functions add graphical items ordination graph:   must draw graph first. draw line segments, grids arrows, see   ordisegments, ordigrid   andordiarrows.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Functions ordihull, ordiellipse ordispider return invisible plotting structure. Function ordispider return coordinates   point connected (centroids ‘LC’ scores). Function ordihull ordiellipse return invisibly   object summary method returns coordinates   centroids areas hulls ellipses. Function  ordiareatest studies one-sided hypothesis   areas smaller randomized groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ Management, dune.env) plot(mod, type=\"n\", scaling = \"symmetric\") ## Catch the invisible result of ordihull... pl <- with(dune.env, ordihull(mod, Management,                               scaling = \"symmetric\", label = TRUE))  ## ... and find centres and areas of the hulls summary(pl) #>             BF         HF         NM         SF #> CCA1 0.2917476 0.36826105 -1.3505642  0.2762936 #> CCA2 0.8632208 0.09419919  0.2681515 -0.8139398 #> Area 0.1951715 0.59943363  1.7398193  1.0144372 ## use more colours and add ellipsoid hulls plot(mod, type = \"n\") pl <- with(dune.env, ordihull(mod, Management,                               scaling = \"symmetric\", col = 1:4,                               draw=\"polygon\", label =TRUE)) with(dune.env, ordiellipse(mod, Management, scaling = \"symmetric\",                            kind = \"ehull\", col = 1:4, lwd=3))  ## ordispider to connect WA and LC scores plot(mod, dis=c(\"wa\",\"lc\"), type=\"p\") ordispider(mod)  ## Other types of plots plot(mod, type = \"p\", display=\"sites\") cl <- hclust(vegdist(dune)) ordicluster(mod, cl, prune=3, col = cutree(cl, 4))  ## confidence ellipse: location of the class centroids plot(mod, type=\"n\", display = \"sites\") with(dune.env, text(mod, display=\"sites\", labels = as.character(Management),                     col=as.numeric(Management))) pl <- with(dune.env, ordiellipse(mod, Management, kind=\"se\", conf=0.95, lwd=2,                                  draw = \"polygon\", col=1:4, border=1:4,                                  alpha=63)) summary(pl) #>             BF        HF          NM         SF #> CCA1 0.4312652 0.5583211 -1.87848340  0.5601499 #> CCA2 1.3273917 0.6373120 -0.05503211 -1.3859924 #> Area 1.4559842 1.3806668  2.73667419  1.5559135 ## add confidence bars with(dune.env, ordibar(mod, Management, kind=\"se\", conf=0.95, lwd=2, col=1:4,                        label=TRUE))"},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"Function ordilabel similar   text, text opaque label. can help   crowded ordination plots: still see text labels,   least uppermost readable. Argument priority helps   make important labels visible.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"","code":"ordilabel(x, display, labels, choices = c(1, 2), priority, select,      cex = 0.8, fill = \"white\", border = NULL, col = NULL, xpd = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"x ordination object object known     scores. display Kind scores displayed (passed     scores). labels Optional text used plots. given,      text found ordination object. choices Axes shown (passed scores). priority Vector length number     labels. items high priority plotted uppermost. select Items displayed. can either logical     vector TRUE displayed items vector     indices displayed items. cex Character expansion text (passed     text). fill Background colour labels (col argument     polygon). border colour visibility border label     defined polygon. col Text colour. Default NULL give value     border par(\"fg\") border NULL. xpd Draw labels also outside plot region (see      par). ... arguments (passed text).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"function may useful crowded ordination plots,   particular together argument priority. see   text labels, least readable. alternatives   crowded plots identify.ordiplot,   orditorp orditkplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"","code":"data(dune) ord <- cca(dune) plot(ord, type = \"n\") ordilabel(ord, dis=\"sites\", cex=1.2, font=3, fill=\"hotpink\", col=\"blue\") ## You may prefer separate plots, but here species as well ordilabel(ord, dis=\"sp\", font=2, priority=colSums(dune))"},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Alternative plot and identify Functions for Ordination — ordiplot","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot alternative plotting function   can worked vegan ordination result many   non-vegan results. addition, plot functions   vegan ordinations return invisibly \"ordiplot\" result   object, allows using ordiplot support functions   result: identify can used add labels selected   site, species constraint points, points   text can add elements plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"","code":"ordiplot(ord, choices = c(1, 2), type=\"points\", display, xlim, ylim,      cex = 0.7, ...) # S3 method for ordiplot identify(x, what, labels,  ...) # S3 method for ordiplot points(x, what, select, arrows = FALSE, ...) # S3 method for ordiplot text(x, what, labels, select, arrows = FALSE,     length = 0.05, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"ord result ordination. choices Axes shown. type type graph may \"points\",     \"text\" \"none\" ordination method. display Display \"sites\" \"species\". default     methods display , cca,     rda capscale     plot.cca. xlim, ylim x y limits (min,max) plot. cex Character expansion factor points text. ... graphical parameters. x result object ordiplot. Items identified ordination plot. types depend     kind plot used. methods know sites     species, functions cca rda     know addition      constraints (LC scores), centroids     biplot, plot.procrustes ordination plot     heads points. labels Optional text used labels. Row names used     missing. arrows Draw arrows origin. always     TRUE biplot scores value ignored. Setting     TRUE draw arrows type scores.     allows, e.g, using biplot arrows species. arrow head     value scores, possible text moved outwards. length Length arrow heads (see arrows). select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot draws ordination diagram using black circles   sites red crosses species.  returns invisibly object   class ordiplot can used identify.ordiplot   label selected sites species, constraints   cca rda. function can handle output several alternative ordination   methods. cca, rda   decorana uses plot method option   type = \"points\". addition, plot functions   methods return invisibly ordiplot object can   used identify.ordiplot label points.   ordinations relies scores extract scores. full user control plots, best call ordiplot   type = \"none\" save result, add sites   species using points.ordiplot text.ordiplot   pass arguments corresponding default graphical   functions. functions can chained pipes allows   alternative intuitive way building plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot returns invisibly object class  ordiplot used scores. general, vegan  plot functions ordination results also return invisible  ordiplot object. plot(..., type = \"n\") used   originally, plot empty, items can added   invisible object. Functions points text return   input object without modification, allows chaining   commands pipes. Function identify.ordiplot uses   object label point.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"purpose functions provide similar functionality   plot, plotid specid methods library   labdsv. functions somewhat limited parametrization,   can call directly standard identify   plot functions better user control.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"","code":"## Draw a plot for a non-vegan ordination (cmdscale). data(dune) dune.dis <- vegdist(wisconsin(dune)) dune.mds <- cmdscale(dune.dis, eig = TRUE) dune.mds$species <- wascores(dune.mds$points, dune, expand = TRUE) pl <- ordiplot(dune.mds, type = \"none\") points(pl, \"sites\", pch=21, col=\"red\", bg=\"yellow\") text(pl, \"species\", col=\"blue\", cex=0.9)  if (FALSE) { ## same plot using pipes (|>) ordiplot(dune.mds, type=\"n\") |>   points(\"sites\", pch=21, col=\"red\", bg=\"yellow\") |>   text(\"species\", col=\"blue\", cex=0.9) ## Some people think that species should be shown with arrows in PCA. ## Other ordination methods also return an invisible ordiplot object and ## we can use pipes to draw those arrows. mod <- rda(dune) plot(mod, type=\"n\") |>   points(\"sites\", pch=16, col=\"red\") |>   text(\"species\", arrows = TRUE, length=0.05, col=\"blue\") } ## Default plot of the previous using identify to label selected points if (FALSE) { pl <- ordiplot(dune.mds) identify(pl, \"spec\")}"},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function ordipointlabel produces ordination plots   points text label points. points exact   location given ordination, function tries optimize   location text labels minimize overplotting text.   function may useful moderately crowded ordination plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"","code":"ordipointlabel(x, display = c(\"sites\", \"species\"), choices = c(1, 2),    col = c(1, 2),  pch = c(\"o\", \"+\"), font = c(1, 1),     cex = c(0.8, 0.8), add = FALSE, select, ...)  # S3 method for ordipointlabel plot(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"x ordipointlabel() result object     ordination function. plot.ordipointlabel object     resulting call ordipointlabel(). display Scores displayed plot. choices Axes shown. col, pch, font, cex Colours, point types, font style      character expansion kind scores displayed      plot. vectors length number      items display. add Add existing plot. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. select used single set     scores plotted (.e. length(display) == 1),     otherwise ignored warning issued. logical vector     used, must length scores plotted. ... arguments passed points   text.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function uses simulated annealing (optim,   method = \"SANN\") optimize location text labels   points. eight possible locations: , , sides   corners. weak preference text right   point, weak avoidance corner positions. exact locations   goodness solution varies runs,   guarantee finding global optimum. optimization can take   long time difficult cases high number potential   overlaps. Several sets scores can displayed one plot. function modelled pointLabel   maptools package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function returns invisibly object class  ordipointlabel items xy coordinates   points, labels coordinates labels, items pch,  cex font graphical parameters point   label. addition, returns result optim   attribute \"optim\". unit overlap area   character \"m\", variable cex   smallest alternative. plot method based orditkplot   alter reset graphical parameters via par. result object ordipointlabel inherits  orditkplot, can also replotted  plot method. may possible edit result   object orditkplot, good results   necessary points span whole horizontal axis without empty   margins.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function designed ordination graphics,   optimization works properly plots isometric aspect ratio.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"","code":"data(dune) ord <- cca(dune) plt <- ordipointlabel(ord)   ## set scaling - should be no warnings! ordipointlabel(ord, scaling = \"sites\")   ## plot then add plot(ord, scaling = \"symmetric\", type = \"n\") ordipointlabel(ord, display = \"species\", scaling = \"symm\", add = TRUE) ordipointlabel(ord, display = \"sites\", scaling = \"symm\", add = TRUE)   ## redraw plot without rerunning SANN optimisation plot(plt)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"function provides plot.lm style diagnostic plots   results constrained ordination cca,   rda capscale. Normally need   plots, ordination descriptive   make assumptions distribution residuals. However,   permute residuals significance tests (anova.cca),   may interested inspecting residuals really   exchangeable independent fitted values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"","code":"ordiresids(x, kind = c(\"residuals\", \"scale\", \"qqmath\"),    residuals = \"working\", type = c(\"p\", \"smooth\", \"g\"),    formula, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"x Ordination result cca, rda     capscale. kind type plot: \"residuals\" plot residuals     fitted values, \"scale\" square root absolute     residuals fitted values, \"qqmath\" residuals     expected distribution (defaults qnorm),     unless defined differently formula  argument. residuals kind residuals fitted values, alternatives     \"working\", \"response\", \"standardized\"     \"studentized\" (see Details). type type plot. argument passed     lattice functions. formula Formula override default plot. formula can     contain items Fitted, Residuals, Species     Sites (provided names species sites available     ordination result). ... arguments passed lattice functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"default plots similar plot.lm,   use Lattice functions   xyplot qqmath.   alternatives default formulae can replaced   user. elements available formula groups argument   Fitted, Residuals, Species Sites. residuals = \"response\" residuals = \"working\"   fitted values residuals found functions   fitted.cca residuals.cca.   residuals = \"standardized\" residuals found   rstandard.cca, residuals = \"studentized\"   found rstudent.cca, cases   fitted values standardized sigma.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"function returns Lattice object can   displayed plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"","code":"data(varespec) data(varechem) mod <- cca(varespec ~ Al + P + K, varechem) ordiresids(mod)  ordiresids(mod, formula = Residuals ~ Fitted | Species, residuals=\"standard\",    cex = 0.5)"},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Automatic stepwise model building constrained ordination methods   (cca, rda, capscale).   function ordistep modelled step   can forward, backward stepwise model selection using permutation tests.   Function ordiR2step performs forward model choice solely adjusted   \\(R^2\\) P-value, ordination objects created rda capscale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"","code":"ordistep(object, scope, direction = c(\"both\", \"backward\", \"forward\"),    Pin = 0.05, Pout = 0.1, permutations = how(nperm = 199), steps = 50,    trace = TRUE, ...) ordiR2step(object, scope, Pin = 0.05, R2scope = TRUE,    permutations = how(nperm = 499), trace = TRUE, R2permutations = 1000, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"object ordistep, ordination object inheriting   cca rda. scope Defines range models examined stepwise   search.  can list containing components upper   lower, formulae. single item, interpreted   target scope, depending direction.   direction \"forward\", single item interpreted   upper scope formula input object   lower scope.  See step details.   ordiR2step, defines upper scope; can also   ordination object model extracted. direction mode stepwise search, can one \"\",   \"backward\", \"forward\", default   \"\".  scope argument missing, default   direction \"backward\" ordistep (  ordiR2step argument, works   forward). Pin, Pout Limits permutation \\(P\\)-values adding (Pin) term   model, dropping (Pout) model. Term added   \\(P \\le\\) Pin, removed \\(P >\\) Pout. R2scope Use adjusted \\(R^2\\) stopping criterion: models   lower adjusted \\(R^2\\) scope accepted. permutations list control values permutations     returned function , number     permutations required, permutation matrix row     gives permuted indices. passed     anova.cca: see details. steps Maximum number iteration steps dropping adding terms. trace positive, information printed model building. Larger   values may give information. R2permutations Number permutations used estimation   adjusted \\(R^2\\) cca using   RsquareAdj. ... additional arguments add1.cca   drop1.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"basic functions model choice constrained ordination   add1.cca drop1.cca. functions,   ordination models can chosen standard R function   step bases term choice AIC. AIC-like   statistics ordination provided functions   deviance.cca extractAIC.cca (  similar functions rda). Actually, constrained   ordination methods AIC, therefore step   may trusted. function provides alternative using   permutation \\(P\\)-values. Function ordistep defines model, scope models   considered, direction procedure similarly   step. function alternates drop   add steps stops model changed one   step. - + signs summary table indicate   stage performed.  often sensible Pout   \\(>\\) Pin stepwise models avoid cyclic adds drops   single terms. Function ordiR2step builds model forward maximizes   adjusted \\(R^2\\) (function RsquareAdj) every   step, stopping adjusted \\(R^2\\) starts decrease,   adjusted \\(R^2\\) scope exceeded,   selected permutation \\(P\\)-value exceeded (Blanchet et   al. 2008). second criterion ignored option R2scope =   FALSE, third criterion can ignored setting Pin = 1   (higher).  function used adjusted \\(R^2\\)   calculated. number predictors higher   number observations, adjusted \\(R^2\\) also unavailable.   models can analysed R2scope = FALSE,   variable selection stop models become overfitted adjusted   \\(R^2\\) calculated, adjusted \\(R^2\\)   reported zero. \\(R^2\\) cca   based simulations (see RsquareAdj) different runs   ordiR2step can give different results. Functions ordistep (based \\(P\\) values) ordiR2step   (based adjusted \\(R^2\\) hence eigenvalues) can select   variables different order.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Functions return selected model one additional   component, anova, contains brief information steps   taken. can suppress voluminous output model building   setting trace = FALSE, find summary model history   anova item.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Blanchet, F. G., Legendre, P. & Borcard, D. (2008) Forward selection   explanatory variables. Ecology 89, 2623--2632.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"","code":"## See add1.cca for another example  ### Dune data data(dune) data(dune.env) mod0 <- rda(dune ~ 1, dune.env)  # Model with intercept only mod1 <- rda(dune ~ ., dune.env)  # Model with all explanatory variables  ## With scope present, the default direction is \"both\" mod <- ordistep(mod0, scope = formula(mod1)) #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.010 ** #> + A1          1 89.591 1.9217  0.045 *  #> + Use         2 91.032 1.1741  0.345    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>              Df   AIC    F Pr(>F)    #> - Management  3 89.62 2.84  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.005 ** #> + Manure    3 87.517 1.3902  0.075 .  #> + A1        1 87.424 1.2965  0.220    #> + Use       2 88.284 1.0510  0.320    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>              Df    AIC      F Pr(>F)    #> - Management  3 87.707 2.1769  0.015 *  #> - Moisture    3 87.082 1.9764  0.010 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225   0.36 #> + A1      1 86.220 0.8359   0.60 #> + Use     2 86.842 0.8027   0.71 #>  mod #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>  ## summary table of steps mod$anova #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 85.567 1.9764  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Example of ordistep, forward ordistep(mod0, scope = formula(mod1), direction=\"forward\") #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.025 *  #> + A1          1 89.591 1.9217  0.050 *  #> + Use         2 91.032 1.1741  0.240    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.010 ** #> + Manure    3 87.517 1.3902  0.115    #> + A1        1 87.424 1.2965  0.235    #> + Use       2 88.284 1.0510  0.450    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225   0.29 #> + A1      1 86.220 0.8359   0.57 #> + Use     2 86.842 0.8027   0.70 #>  #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>   ## Example of ordiR2step (always forward) ## stops because R2 of 'mod1' exceeded ordiR2step(mod0, mod1) #> Step: R2.adj= 0  #> Call: dune ~ 1  #>   #>                 R2.adjusted #>   0.32508817 #> + Management     0.22512409 #> + Moisture       0.20050225 #> + Manure         0.16723149 #> + A1             0.04626579 #> + Use            0.01799755 #>            0.00000000 #>  #>              Df    AIC    F Pr(>F)    #> + Management  3 87.082 2.84  0.002 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: R2.adj= 0.2251241  #> Call: dune ~ Management  #>   #>                 R2.adjusted #> + Moisture        0.3450334 #>    0.3250882 #> + Manure          0.2779515 #> + A1              0.2392216 #> + Use             0.2300349 #>             0.2251241 #>  #> Call: rda(formula = dune ~ Management, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   29.2307     0.3475    3 #> Unconstrained 54.8930     0.6525   16 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3  #> 14.865 10.690  3.675  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8    PC9   PC10   PC11  #> 15.270  8.428  6.899  5.675  3.988  3.121  2.588  2.380  1.818  1.376  0.995  #>   PC12   PC13   PC14   PC15   PC16  #>  0.785  0.661  0.467  0.283  0.159  #>"},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Function ordisurf fits smooth surface given variable   plots result ordination diagram.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"","code":"# S3 method for default ordisurf(x, y, choices = c(1, 2), knots = 10,          family = \"gaussian\", col = \"red\", isotropic = TRUE,          thinplate = TRUE, bs = \"tp\", fx = FALSE, add = FALSE,          display = \"sites\", w = weights(x, display), main, nlevels = 10,          levels, npoints = 31, labcex = 0.6, bubble = FALSE,          cex = 1, select = TRUE, method = \"REML\", gamma = 1,          plot = TRUE, lwd.cl = par(\"lwd\"), ...)  # S3 method for formula ordisurf(formula, data, ...)  # S3 method for ordisurf calibrate(object, newdata, ...)  # S3 method for ordisurf plot(x, what = c(\"contour\",\"persp\",\"gam\"),      add = FALSE, bubble = FALSE, col = \"red\", cex = 1,      nlevels = 10, levels, labcex = 0.6, lwd.cl = par(\"lwd\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"x ordisurf ordination configuration, either     matrix result known scores.     plot.ordisurf object class \"ordisurf\"     returned ordisurf. y Variable plotted / modelled function     ordination scores. choices Ordination axes. knots Number initial knots gam (one     degrees freedom). knots = 0     knots = 1  function fit linear trend surface,     knots = 2 function  fit quadratic trend surface     instead smooth surface. vector length 2 allowed     isotropic = FALSE, first second elements     knots referring first second ordination     dimensions (indicated choices) respectively. family Error distribution gam. col Colour contours. isotropic, thinplate Fit isotropic smooth surface (.e.     smoothness ordination dimensions) via     gam. Use thinplate deprecated     removed future version package. bs two letter character string indicating smoothing basis     use. (e.g. \"tp\" thin plate regression spline,     \"cr\" cubic regression spline). One c(\"tp\", \"ts\",       \"cr\", \"cs\", \"ds\", \"ps\", \"ad\"). See     smooth.terms view     refer . default use thin plate splines: bs = \"tp\". fx indicates whether smoothers fixed degree freedom     regression splines (fx = FALSE) penalised regression     splines (fx = TRUE). Can vector length 2     anisotropic surfaces (isotropic = FALSE). make     sense use fx = TRUE select = TRUE     error . warning issued specify     fx = TRUE forget use select = FALSE though     fitting continues using select = FALSE. add Add contours existing diagram draw new plot? display Type scores known scores: typically     \"sites\" ordinary site scores \"lc\" linear combination scores. w Prior weights data. Concerns mainly cca     decorana results nonconstant weights. main main title plot, default name     plotted variable new plot. nlevels, levels Either vector levels contours     drawn, suggested number contours nlevels     levels supplied. npoints numeric; number locations evaluate     fitted surface. represents number locations     dimension. labcex Label size contours.  Setting zero suppress     labels. bubble Use “bubble plot” points, vary point     diameter value plotted variable. bubble     numeric, value used maximum symbol size (    cex), bubble = TRUE, value cex gives     maximum. minimum size always cex = 0.4.      option effect add = FALSE. cex Character expansion plotting symbols. select Logical; specify gam argument     \"select\". TRUE gam can     add extra  penalty term can penalized     zero. means smoothing parameter estimation part     fitting can completely remove terms model.     corresponding smoothing parameter estimated zero extra     penalty effect. method character; smoothing parameter estimation     method. Options allowed : \"GCV.Cp\" uses GCV models     unknown scale parameter Mallows' Cp/UBRE/AIC models     known scale; \"GACV.Cp\" \"GCV.Cp\" uses GACV     (Generalised Approximate CV) instead GCV; \"REML\"     \"ML\" use restricted maximum likelihood maximum likelihood     estimation known unknown scale; \"P-REML\"     \"P-ML\" use REML ML estimation use Pearson estimate     scale. gamma Multiplier inflate model degrees freedom GCV     UBRE/AIC score . effectively places extra penalty     complex models. oft-used value gamma = 1.4. plot logical; plotting done     ordisurf? Useful want fitted response     surface model. lwd.cl numeric; lwd (line width) parameter use     drawing contour lines. formula, data Alternative definition fitted model     x ~ y, left-hand side ordination x     right-hand side single fitted continuous variable     y. variable y must working environment     data frame environment given data.     arguments passed default method. object ordisurf result object. newdata Coordinates two-dimensional ordination new     points. character; type plot produce. \"contour\"     produces contour plot response surface, see     contour details. \"persp\" produces     perspective plot , see persp     details. \"gam\" plots fitted GAM model, object     inherits class \"gam\" returned ordisurf, see     plot.gam. ... parameters passed scores,     graphical functions. See Note exceptions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Function ordisurf fits smooth surface using penalised   splines (Wood 2003) gam, uses   predict.gam find fitted values regular   grid. smooth surface can fitted extra penalty   allows entire smoother penalized back 0 degrees   freedom, effectively removing term model (see Marra &   Wood, 2011). addition extra penalty invoked   setting argument select TRUE. alternative   use spline basis includes shrinkage (bs = \"ts\"   bs = \"cs\"). ordisurf() exposes large number options   gam specifying basis functions used   surface. stray defaults, read   Notes section relevant documentation   s smooth.terms. function plots fitted contours convex hull data points   either existing ordination diagram draws new plot.   select = TRUE smooth effectively penalised   model, contours plotted. gam determines degree smoothness   fitted response surface model fitting, unless fx =   TRUE. Argument method controls gam   performs smoothness selection. See gam   details available options. Using \"REML\" \"ML\"   yields p-values smooths best coverage properties   things matter . function uses scores extract ordination scores,   x can result object known function. user can supply vector prior weights w.   ordination object weights, used. practise   means row totals used weights cca   decorana results. like , want   give equal weights sites, set w =   NULL. behaviour consistent envfit.   complete accordance constrained cca, set   display = \"lc\". Function calibrate returns fitted values response   variable. newdata must coordinates points   fitted values desired. function based   predict.gam pass extra arguments   function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"ordisurf usually called side effect drawing   contour plot. function returns result object class  \"ordisurf\" inherits gam used   internally fit surface, adds item grid   contains data grid surface. item grid   elements x y vectors axis coordinates,   element z matrix fitted values  contour. values outside convex hull observed   points indicated NA z.  gam component result can used   analysis like predicting new values (see  predict.gam).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Dave Roberts, Jari Oksanen Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"default use isotropic smoother via   s employing thin plate regression splines   (bs = \"tp\"). make sense ordination   equal smoothing directions rotation invariant. However,   different degrees smoothness along dimensions required,   anisotropic smooth surface may applicable. can   achieved use isotropic = FALSE, wherein   surface fitted via tensor product smoother via   te (unless bs = \"ad\", case   separate splines dimension fitted using   s). Cubic regression splines P splines can used   isotropic = FALSE. Adaptive smooths (bs = \"ad\"), especially two dimensions,   require large number observations; without many hundreds   observations, default complexities smoother exceed   number observations fitting fail. get old behaviour ordisurf use select = FALSE,   method = \"GCV.Cp\", fx = FALSE, bs = \"tp\".   latter two options current defaults. Graphical arguments supplied plot.ordisurf passed   underlying plotting functions, contour, persp,   plot.gam. exception arguments   col cex can currently passed   plot.gam bug way function   evaluates arguments arranging plot. work-around call plot.gam directly   result call ordisurf. See Examples   illustration .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"fitted GAM regression model usual assumptions   models. particular note assumption independence   residuals. observations independent (e.g.   repeat measures set objects, experimental design,   inter alia) trust p-values GAM   output. need control (.e. add additional fixed effects   model, use complex smoothers), extract ordination   scores using scores function generate   gam call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Marra, G.P & Wood, S.N. (2011) Practical variable selection   generalized additive models. Comput. Stat. Data Analysis 55,   2372--2387. Wood, S.N. (2003) Thin plate regression splines.   J. R. Statist. Soc. B 65, 95--114.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"","code":"data(varespec) data(varechem) vare.dist <- vegdist(varespec) vare.mds <- monoMDS(vare.dist) ## IGNORE_RDIFF_BEGIN ordisurf(vare.mds ~ Baresoil, varechem, bubble = 5) #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.51  total = 7.51  #>  #> REML score: 92.20464       ## as above but without the extra penalties on smooth terms, ## and using GCV smoothness selection (old behaviour of `ordisurf()`): ordisurf(vare.mds ~ Baresoil, varechem, col = \"blue\", add = TRUE,                         select = FALSE, method = \"GCV.Cp\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 7.82  total = 8.82  #>  #> GCV score: 125.6649       ## Cover of Cladina arbuscula fit <- ordisurf(vare.mds ~ Cladarbu, varespec, family=quasipoisson)  ## Get fitted values calibrate(fit) #>        18        15        24        27        23        19        22        16  #> 21.920918  7.210220  3.778808  2.599524  7.849188  5.409767  7.798663  9.866940  #>        28        13        14        20        25         7         5         6  #>  1.701333 29.381996  8.565427  9.294810  5.960113 27.308407 22.837172 28.861374  #>         3         4         2         9        12        10        11        21  #>  7.579617 15.298175  3.299211  1.330609  4.261901  1.904892  9.860122 11.170813  ## Variable selection via additional shrinkage penalties ## This allows non-significant smooths to be selected out ## of the model not just to a linear surface. There are 2 ## options available: ##  - option 1: `select = TRUE` --- the *default* ordisurf(vare.mds ~ Baresoil, varechem, method = \"REML\", select = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.51  total = 7.51  #>  #> REML score: 92.20464      ##  - option 2: use a basis with shrinkage ordisurf(vare.mds ~ Baresoil, varechem, method = \"REML\", bs = \"ts\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"ts\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 4.64  total = 5.64  #>  #> REML score: 96.0339      ## or bs = \"cs\" with `isotropic = FALSE` ## IGNORE_RDIFF_END ## Plot method plot(fit, what = \"contour\")   ## Plotting the \"gam\" object plot(fit, what = \"gam\") ## 'col' and 'cex' not passed on  ## or via plot.gam directly library(mgcv) #> Loading required package: nlme #> This is mgcv 1.9-1. For overview type 'help(\"mgcv-package\")'. plot.gam(fit, cex = 2, pch = 1, col = \"blue\")  ## 'col' effects all objects drawn...  ### controlling the basis functions used ## Use Duchon splines ordisurf(vare.mds ~ Baresoil, varechem, bs = \"ds\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"ds\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.56  total = 7.56  #>  #> REML score: 92.14761       ## A fixed degrees of freedom smooth, must use 'select = FALSE' ordisurf(vare.mds ~ Baresoil, varechem, knots = 4,                         fx = TRUE, select = FALSE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 4, bs = \"tp\", fx = TRUE) #>  #> Estimated degrees of freedom: #> 3  total = 4  #>  #> REML score: 81.10221       ## An anisotropic smoother with cubic regression spline bases ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,                         bs = \"cr\", knots = 4)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ te(x1, x2, k = c(4, 4), bs = c(\"cr\", \"cr\"), fx = c(FALSE,  #>     FALSE)) #>  #> Estimated degrees of freedom: #> 3.97  total = 4.97  #>  #> REML score: 92.17793       ## An anisotropic smoother with cubic regression spline with ## shrinkage bases & different degrees of freedom in each dimension ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,                         bs = \"cs\", knots = c(3,4), fx = TRUE,                         select = FALSE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ te(x1, x2, k = c(3, 4), bs = c(\"cs\", \"cs\"), fx = c(TRUE,  #>     TRUE)) #>  #> Estimated degrees of freedom: #> 11  total = 12  #>  #> REML score: 40.66178"},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Text or Points to Ordination Plots — orditorp","title":"Add Text or Points to Ordination Plots — orditorp","text":"function adds text points   ordination plots.  Text used can done without   overwriting text labels, points used otherwise.   function can help reducing clutter ordination graphics,   manual editing may still necessary.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Text or Points to Ordination Plots — orditorp","text":"","code":"orditorp(x, display, labels, choices = c(1, 2), priority,     select, cex = 0.7, pcex, col = par(\"col\"), pcol,     pch = par(\"pch\"), air = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Text or Points to Ordination Plots — orditorp","text":"x result object ordination ordiplot     result. display Items displayed plot.  one     alternative allowed. Typically \"sites\"     \"species\". labels Optional text used labels. Row names used   missing. choices Axes shown. priority Text used items higher priority     labels overlap.  vector     length number items plotted. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. logical vector used, must     length scores plotted. cex, pcex Text point sizes, see plot.default.. col, pcol Text point colours, see plot.default. pch Plotting character, see points. air Amount empty space text labels. Values <1 allow     overlapping text. ... arguments scores (various     methods), text points.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Text or Points to Ordination Plots — orditorp","text":"Function orditorp add either text points existing   plot. items high priority added first   text used can done without   overwriting previous labels,points used   otherwise. priority missing, labels added   outskirts centre. Function orditorp can used   ordination results, plotting results   ordiplot ordination plot functions   (plot.cca, plot.decorana,   plot.metaMDS). Arguments can passed relevant scores method   ordination object (x) drawn. See relevant   scores help page arguments can used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Text or Points to Ordination Plots — orditorp","text":"function returns invisibly logical vector TRUE means item labelled text FALSE means   marked point. returned vector can used  select argument ordination text points functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Text or Points to Ordination Plots — orditorp","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Text or Points to Ordination Plots — orditorp","text":"","code":"## A cluttered ordination plot : data(BCI) mod <- cca(BCI) plot(mod, dis=\"sp\", type=\"t\")  # Now with orditorp and abbreviated species names cnam <- make.cepnames(names(BCI)) plot(mod, dis=\"sp\", type=\"n\") stems <- colSums(BCI) orditorp(mod, \"sp\", label = cnam, priority=stems, pch=\"+\", pcol=\"grey\")   ## show select in action set.seed(1) take <- sample(ncol(BCI), 50) plot(mod, dis=\"sp\", type=\"n\") stems <- colSums(BCI) orditorp(mod, \"sp\", label = cnam, priority=stems, select = take,          pch=\"+\", pcol=\"grey\")  # \\dontshow{ ## example(orditorp) should not set random seed in the user session rm(.Random.seed) #> Warning: object '.Random.seed' not found # }"},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Trellis (Lattice) Plots for Ordination — ordixyplot","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"Functions ordicloud, ordisplom ordixyplot   provide interface plot ordination results using Trellis   functions cloud, splom   xyplot package lattice.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"","code":"ordixyplot(x, data = NULL, formula, display = \"sites\", choices = 1:3,     panel = \"panel.ordi\", aspect = \"iso\", envfit,     type = c(\"p\", \"biplot\"), ...) ordisplom(x, data=NULL, formula = NULL,  display = \"sites\", choices = 1:3,     panel = \"panel.ordi\", type = \"p\",  ...) ordicloud(x, data = NULL, formula, display = \"sites\", choices = 1:3,      panel = \"panel.ordi3d\", prepanel = \"prepanel.ordi3d\",  ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"x ordination result scores knows:     ordination result vegan many others. data Optional data amend ordination results. ordination     results found x, may give data     variables needed plots. Typically environmental data. formula Formula define plots. default formula     used omitted.     ordination axes must called names     ordination results (names vary among methods).     ordisplom, special character . refers     ordination result. display kind scores: argument passed     scores. choices axes selected: argument passed     scores. panel, prepanel names panel prepanel     functions. aspect aspect plot (passed lattice     function). envfit Result envfit function displayed     ordixyplot. Please note needs choices     ordixyplot. type type plot. knows alternatives     panel.xyplot. addition ordixyplot     alternatives \"biplot\", \"arrows\"     \"polygon\". first displays fitted vectors factor     centroids envfit, constrained ordination,     biplot arrows factor centroids envfit     given. second (type = \"arrows\") trellis variant     ordiarrows draws arrows groups.     line parameters controlled     trellis.par.set superpose.line,     user can set length, angle ends     parameters panel.arrows.  last one     (type = \"polygon\") draws polygon enclosing points     panel polygon enclosing points data.     overall polygon controlled     trellis.par.set plot.polygon,     panel polygon controlled superpose.polygon. ... Arguments passed scores methods     lattice functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"functions provide interface corresponding lattice   functions.  graphical parameters passed lattice   function graphs extremely configurable. See   Lattice xyplot,     splom cloud   details, usage possibilities. argument x must always ordination result. scores   extracted vegan function scores   functions work vegan ordinations many others. formula used define models. functions   simple default formulae used formula missing.    formula omitted ordisplom   produces pairs plot ordination axes variables   data. formula given, ordination results must   referred . variables names.   functions, formula must use names ordination scores names   data. ordination scores found x, data   optional. data contain variables   ordination scores used plots. Typically,   environmental variables (typically factors) define panels plot   symbols. proper work done panel function. layout can   changed defining panel functions. See   panel.xyplot,   panel.splom   panel.cloud details survey   possibilities. Ordination graphics always isometric: scale   used axes. controlled (can changed)   argument aspect ordixyplot. ordicloud   isometric scaling defined panel prepanel   functions. must replace functions want   non-isometric scaling graphs. select isometric scaling   ordisplom.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"function return Lattice objects class  \"trellis\".","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"","code":"data(dune, dune.env) ord <- cca(dune) ## Pairs plots ordisplom(ord)  ordisplom(ord, data=dune.env, choices=1:2)  ordisplom(ord, data=dune.env, form = ~ . | Management, groups=Manure)  ## Scatter plot with polygons ordixyplot(ord, data=dune.env, form = CA1 ~ CA2 | Management,   groups=Manure, type = c(\"p\",\"polygon\"))  ## Choose a different scaling ordixyplot(ord, scaling = \"symmetric\")  ## ... Slices of third axis ordixyplot(ord, form = CA1 ~ CA2 | equal.count(CA3, 4),    type = c(\"g\",\"p\", \"polygon\"))  ## Display environmental variables ordixyplot(ord, envfit = envfit(ord ~ Management + A1, dune.env, choices=1:3))  ## 3D Scatter plots ordicloud(ord, form = CA2 ~ CA3*CA1, groups = Manure, data = dune.env)  ordicloud(ord, form = CA2 ~ CA3*CA1 | Management, groups = Manure,    data = dune.env, auto.key = TRUE, type = c(\"p\",\"h\"))"},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":null,"dir":"Reference","previous_headings":"","what":"Principal Coordinates of Neighbourhood Matrix — pcnm","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"function computed classical PCNM principal coordinate   analysis truncated distance matrix. commonly used   transform (spatial) distances rectangular data suitable   constrained ordination regression.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"","code":"pcnm(dis, threshold, w, dist.ret = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"dis distance matrix. threshold threshold value truncation distance.     missing, minimum distance giving connected network     used. found longest distance minimum spanning     tree dis. w Prior weights rows. dist.ret Return distances used calculate PCNMs.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Principal Coordinates Neighbourhood Matrix (PCNM) map distances   rows onto rectangular matrix rows using truncation   threshold long distances (Borcard & Legendre 2002). original   distances Euclidean distances two dimensions (like normal   spatial distances), mapped onto two dimensions   truncation distances. truncation,   higher number principal coordinates. selection truncation   distance huge influence PCNM vectors. default   use longest distance keep data connected. distances   truncation threshold given arbitrary value 4 times   threshold.  regular data, first PCNM vectors show wide scale   variation later PCNM vectors show smaller scale variation (Borcard   & Legendre 2002), irregular data interpretation   clear. PCNM functions used express distances rectangular form   similar normal explanatory variables used , e.g.,   constrained ordination (rda, cca   capscale) univariate regression (lm)   together environmental variables (row weights supplied   cca; see Examples). regarded   powerful method forcing rectangular environmental data   distances using partial mantel analysis   (mantel.partial) together geographic distances   (Legendre et al. 2008, see Tuomisto & Ruokolainen 2008). function based pcnm function Dray's unreleased   spacemakeR package. differences current   function uses spantree internal support   function. current function also can use prior weights rows   using weighted metric scaling wcmdscale. use   row weights allows finding orthonormal PCNMs also correspondence   analysis (e.g., cca).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"list following elements: values Eigenvalues obtained principal coordinates     analysis. vectors Eigenvectors obtained principal coordinates     analysis. scaled unit norm. vectors can extracted     scores function. default return PCNM vectors,     argument choices selects given vectors. threshold Truncation distance. dist distance matrix values threshold     replaced arbitrary value four times     threshold. String \"pcnm\" added method     attribute, new attribute threshold added     distances. returned dist.ret = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Borcard D. Legendre P. (2002) -scale spatial analysis   ecological data means principal coordinates neighbour   matrices. Ecological Modelling 153, 51--68. Legendre, P., Borcard, D Peres-Neto, P. (2008) Analyzing   explaining beta diversity? Comment. Ecology 89,   3238--3244. Tuomisto, H. & Ruokolainen, K. (2008) Analyzing explaining beta   diversity? reply. Ecology 89, 3244--3256.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Jari Oksanen, based code Stephane Dray.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"","code":"## Example from Borcard & Legendre (2002) data(mite.xy) pcnm1 <- pcnm(dist(mite.xy)) op <- par(mfrow=c(1,3)) ## Map of PCNMs in the sample plot ordisurf(mite.xy, scores(pcnm1, choi=1), bubble = 4, main = \"PCNM 1\") #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 8.71  total = 9.71  #>  #> REML score: 25.8026      ordisurf(mite.xy, scores(pcnm1, choi=2), bubble = 4, main = \"PCNM 2\") #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 7.18  total = 8.18  #>  #> REML score: 43.10693      ordisurf(mite.xy, scores(pcnm1, choi=3), bubble = 4, main = \"PCNM 3\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 8.32  total = 9.32  #>  #> REML score: 52.38255      par(op) ## Plot first PCNMs against each other ordisplom(pcnm1, choices=1:4)  ## Weighted PCNM for CCA data(mite) rs <- rowSums(mite)/sum(mite) pcnmw <- pcnm(dist(mite.xy), w = rs) ord <- cca(mite ~ scores(pcnmw)) ## Multiscale ordination: residual variance should have no distance ## trend msoplot(mso(ord, mite.xy))"},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":null,"dir":"Reference","previous_headings":"","what":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Individual (count data) incidence (presence-absence data) based null models can generated community level simulations. Options preserving characteristics original matrix (rows/columns sums, matrix fill) restricted permutations (based strata) discussed Details section.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"","code":"permatfull(m, fixedmar = \"both\", shuffle = \"both\", strata = NULL,      mtype = \"count\", times = 99, ...) permatswap(m, method = \"quasiswap\", fixedmar=\"both\", shuffle = \"both\",     strata = NULL, mtype = \"count\", times = 99,      burnin = 0, thin = 1, ...) # S3 method for permat print(x, digits = 3, ...) # S3 method for permat summary(object, ...) # S3 method for summary.permat print(x, digits = 2, ...) # S3 method for permat plot(x, type = \"bray\", ylab, xlab, col, lty,     lowess = TRUE, plot = TRUE, text = TRUE, ...) # S3 method for permat lines(x, type = \"bray\", ...) # S3 method for permat as.ts(x, type = \"bray\", ...) # S3 method for permat toCoda(x)"},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"m community data matrix plots (samples) rows     species (taxa) columns. fixedmar character, stating row/column sums     preserved (\"none\", \"rows\", \"columns\", \"\"). strata Numeric vector factor length     nrow(m) grouping rows within strata restricted     permutations. Unique values levels used. mtype Matrix data type, either \"count\" count data,     \"prab\" presence-absence type incidence data. times Number permuted matrices. method Character method used swap algorithm     (\"swap\", \"tswap\", \"quasiswap\",     \"backtrack\") described function     make.commsim. mtype=\"count\"     \"quasiswap\", \"swap\", \"swsh\"     \"abuswap\" methods available (see details). shuffle Character, indicating whether individuals     (\"ind\"), samples (\"samp\") (\"\")     shuffled, see details. burnin Number null communities discarded proper     analysis sequential (\"swap\", \"tswap\") methods. thin Number discarded permuted matrices two     evaluations sequential (\"swap\", \"tswap\") methods. x, object Object class \"permat\" digits Number digits used rounding. ylab, xlab, col, lty graphical parameters plot     method. type Character, type plot displayed: \"bray\"     Bray-Curtis dissimilarities, \"chisq\" Chi-squared values. lowess, plot, text Logical arguments plot     method, whether locally weighted regression curve drawn,     plot drawn, statistic values printed     plot. ... arguments passed simulate.nullmodel      methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"function permatfull useful matrix fill   allowed vary, matrix type count.  fixedmar   argument used set constraints permutation.  none   margins fixed, cells randomised within matrix.    rows columns fixed, cells within rows columns   randomised, respectively.  margins fixed,   r2dtable function used based Patefield's   (1981) algorithm. presence absence data, matrix fill   necessarily fixed, permatfull wrapper function   make.commsim. r00, r0, c0, quasiswap   algorithms make.commsim used \"none\",   \"rows\", \"columns\", \"\" values fixedmar argument,   respectively shuffle argument effect mtype =   \"count\" permatfull function used \"none\",   \"rows\", \"columns\" values fixedmar. cases   count data individual based randomisations. \"samp\"   \"\" options result fixed matrix fill. \"\"   option means individuals shuffled among non zero cells   ensuring cell zeros result, cell   (zero new valued cells) shuffled. function permatswap useful matrix fill   (.e. proportion empty cells) row/columns sums   kept constant. permatswap uses different kinds swap   algorithms, row columns sums fixed cases.    presence-absence data, swap tswap methods   make.commsim can used.  count data, special   swap algorithm ('swapcount') implemented results permuted   matrices fixed marginals matrix fill time. 'quasiswapcount' algorithm (method=\"quasiswap\"   mtype=\"count\") uses trick Carsten Dormann's   swap.web function package   bipartite. First, random matrix generated   r2dtable function retaining row column sums.   original matrix fill reconstructed sequential steps   increase decrease matrix fill random matrix. steps   based swapping 2x2 submatrices (see 'swapcount' algorithm   details) maintain row column totals. algorithm generates   independent matrices step, burnin thin   arguments considered. default method,   sequential (swapcount ) independence subsequent   matrices checked. swapcount algorithm (method=\"swap\"   mtype=\"count\") tries find 2x2 submatrices (identified 2   random row 2 random column indices), can swapped order   leave column row totals fill unchanged. First,   algorithm finds largest value submatrix can swapped   (\\(d\\)) whether diagonal antidiagonal way. Submatrices   contain values larger zero either diagonal   antidiagonal position can swapped. Swap means values   diagonal antidiagonal positions decreased \\(d\\),   remaining cells increased \\(d\\). swap made fill   change. algorithm sequential, subsequent matrices   independent, swaps modify little matrix   large. cases many burnin steps thinning needed get   independent random matrices. Although algorithm implemented   C, large burnin thin values can slow   considerably. WARNING: according simulations, algorithm seems   biased non random, thus use avoided! algorithm \"swsh\" function permatswap   hybrid algorithm. First, makes binary quasiswaps keep row   column incidences constant, non-zero values modified   according shuffle argument (\"samp\"   \"\" available case, applied   non-zero values). also recognizes fixedmar   argument \"\" (vegan versions <= 2.0   algorithm fixedmar = \"none\"). algorithm \"abuswap\" produces two kinds null models   (based fixedmar=\"columns\" fixedmar=\"rows\")   described Hardy (2008; randomization scheme 2x 3x,   respectively).  preserve column row occurrences, column   row sums time. (Note similar constraints   can achieved non sequential \"swsh\" algorithm   fixedmar argument set \"columns\"   \"rows\", respectively.) Constraints row/column sums, matrix fill, total sum sums within   strata can checked summary method. plot method   visually testing randomness permuted matrices,   especially sequential swap algorithms.   tendency graph, higher burnin thin values can   help sequential methods.  New lines can added existing plot   lines method. Unrestricted restricted permutations: strata   NULL, functions perform unrestricted permutations. Otherwise,   used restricted permutations. strata contain   least 2 rows order perform randomization (case low row   numbers, swap algorithms can rather slow). design   well balanced (.e. number observations within stratum),   permuted matrices may biased constraints forced   submatrices different dimensions. often means, number   potential permutations decrease dimensions.    constraints put, less randomness can expected. plot method useful graphically testing trend   independence permuted matrices. especially important   using sequential algorithms (\"swap\", \"tswap\", \"abuswap\"). .ts method can used extract Bray-Curtis   dissimilarities Chi-squared values time series. can   used testing independence (see Examples). method toCoda   useful accessing diagnostic tools available coda   package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Functions permatfull permatswap return   object class \"permat\" containing function call   (call), original data matrix used permutations   (orig) list permuted matrices length times (perm). summary method returns various statistics list   (including mean Bray-Curtis dissimilarities calculated pairwise among   original permuted matrices, Chi-square statistics, check   results constraints; see Examples). Note  strata used original call, summary calculation may   take longer. plot creates plot side effect. .ts method returns object class \"ts\".","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Original references presence-absence algorithms   given help page make.commsim. Hardy, O. J. (2008) Testing spatial phylogenetic structure   local communities: statistical performances different null models   test statistics locally neutral community. Journal Ecology   96, 914--926. Patefield, W. M. (1981) Algorithm AS159. efficient method   generating r x c tables given row column totals.     Applied Statistics 30, 91--97.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Péter Sólymos, solymos@ualberta.ca Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"","code":"## A simple artificial community data matrix. m <- matrix(c(     1,3,2,0,3,1,     0,2,1,0,2,1,     0,0,1,2,0,3,     0,0,0,1,4,3     ), 4, 6, byrow=TRUE) ## Using the quasiswap algorithm to create a  ## list of permuted matrices, where ## row/columns sums and matrix fill are preserved: x1 <- permatswap(m, \"quasiswap\") summary(x1) #> Summary of object of class 'permat' #>  #> Call: permatswap(m = m, method = \"quasiswap\") #>  #> Matrix type: count  #> Permutation type: swap #> Method: quasiswap_count, burnin: 0, thin: 1 #> Restricted: FALSE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 100 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    1.01 % #> Column incidences retained: 13.13 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3667  0.4333  0.4145  0.4667  0.6000  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   16.27   19.59   21.10   21.51   23.36   31.69  ## Unrestricted permutation retaining ## row/columns sums but not matrix fill: x2 <- permatfull(m) summary(x2) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m) #>  #> Matrix type: count  #> Permutation type: full #> Method: r2dtable #> Restricted: FALSE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 16.16 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    0 % #> Column incidences retained: 1.01 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3333  0.3667  0.3865  0.4333  0.6333  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   7.824  12.046  15.660  16.015  19.413  28.132  ## Unrestricted permutation of presence-absence type ## not retaining row/columns sums: x3 <- permatfull(m, \"none\", mtype=\"prab\") x3$orig  ## note: original matrix is binarized! #>      [,1] [,2] [,3] [,4] [,5] [,6] #> [1,]    1    1    1    0    1    1 #> [2,]    0    1    1    0    1    1 #> [3,]    0    0    1    1    0    1 #> [4,]    0    0    0    1    1    1 summary(x3) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m, fixedmar = \"none\", mtype = \"prab\") #>  #> Matrix type: prab  #> Permutation type: full #> Method: r00 #> Restricted: FALSE  #> Fixed margins: none #> Individuals and samples are shuffled #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 15 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 100 % #> Row sums retained:    4.04 % #> Column sums retained: 0 % #> Row incidences retained:    4.04 % #> Column incidences retained: 0 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3333  0.4000  0.3852  0.4000  0.5333  #>  #> Chi-squared for original matrix: 8.4 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   8.812  13.583  15.208  15.295  17.083  21.896  ## Restricted permutation, ## check sums within strata: x4 <- permatfull(m, strata=c(1,1,2,2)) summary(x4) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m, strata = c(1, 1, 2, 2)) #>  #> Matrix type: count  #> Permutation type: full #> Method: r2dtable #> Restricted: TRUE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 38.38 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    1.01 % #> Column incidences retained: 2.02 % #> Sums within strata retained: 100 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #> 0.06667 0.20000 0.26667 0.23502 0.26667 0.46667  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   14.21   18.68   21.05   22.09   25.26   36.50   ## NOTE: 'times' argument usually needs to be >= 99 ## here much lower value is used for demonstration  ## Not sequential algorithm data(BCI) a <- permatswap(BCI, \"quasiswap\", times=19) ## Sequential algorithm b <- permatswap(BCI, \"abuswap\", fixedmar=\"col\",     burnin=0, thin=100, times=19) opar <- par(mfrow=c(2,2)) plot(a, main=\"Not sequential\") plot(b, main=\"Sequential\") plot(a, \"chisq\") plot(b, \"chisq\")  par(opar) ## Extract Bray-Curtis dissimilarities ## as time series bc <- as.ts(b) ## Lag plot lag.plot(bc)  ## First order autoregressive model mar <- arima(bc, c(1,0,0)) mar #>  #> Call: #> arima(x = bc, order = c(1, 0, 0)) #>  #> Coefficients: #>          ar1  intercept #>       0.9915     0.1850 #> s.e.  0.0120     0.1374 #>  #> sigma^2 estimated as 0.000346:  log likelihood = 46.71,  aic = -87.42 ## Ljung-Box test of residuals Box.test(residuals(mar)) #>  #> \tBox-Pierce test #>  #> data:  residuals(mar) #> X-squared = 0.35725, df = 1, p-value = 0.55 #>  ## Graphical diagnostics tsdiag(mar)"},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract, Analyse and Display Permutation Results — permustats","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function extracts permutation results   vegan functions. support functions can find quantiles   standardized effect sizes, plot densities Q-Q plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract, Analyse and Display Permutation Results — permustats","text":"","code":"permustats(x, ...) # S3 method for permustats summary(object, interval = 0.95, alternative, ...) # S3 method for permustats densityplot(x, data, xlab = \"Permutations\", ...) # S3 method for permustats density(x, observed = TRUE, ...) # S3 method for permustats qqnorm(y, observed = TRUE, ...) # S3 method for permustats qqmath(x, data, observed = TRUE, sd.scale = FALSE,     ylab = \"Permutations\", ...) # S3 method for permustats boxplot(x, scale = FALSE, names, ...) # S3 method for permustats pairs(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract, Analyse and Display Permutation Results — permustats","text":"object, x, y object handled. interval numeric; coverage interval reported. alternative character string specifying limits used     interval direction test evaluating     \\(p\\)-values. Must one \"two.sided\" (upper     lower limit), \"greater\" (upper limit), \"less\"     (lower limit). Usually alternative given result     object, can specified argument. xlab, ylab Arguments     densityplot     qqmath functions. observed Add observed statistic among permutations. sd.scale Scale permutations unit standard deviation observed     statistic standardized effect size. data Ignored. scale Use standardized effect size (SES). names Names boxes (default: names statistics). ... arguments passed function.     density passed density.default,     boxplot boxplot.default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function extracts permutation results   observed statistics several vegan functions perform   permutations simulations. summary method permustats estimates   standardized effect sizes (SES) difference observed   statistic mean permutations divided standard deviation   permutations (also known \\(z\\)-values). also prints   mean, median, limits contain interval percent   permuted values. default (interval = 0.95),   two-sided test (2.5%, 97.5%) one-sided tests   either 5% 95% quantile \\(p\\)-value depending   test direction. mean, quantiles \\(z\\) values evaluated   permuted values without observed statistic,   \\(p\\)-value evaluated observed statistic.   intervals \\(p\\)-value evaluated test   direction original test, can changed   argument alternative. Several permustats objects can   combined c function. c function checks   statistics equal, performs sanity tests. density densityplot methods display   kernel density estimates permuted values. observed value   statistic included permuted values,   densityplot method marks observed statistic vertical   line. However density method uses standard plot   method mark observed value. qqnorm qqmath display Q-Q plots   permutations, optionally together observed value (default)   shown horizontal line plots. qqnorm plots   permutation values standard Normal variate. qqmath   defaults standard Normal well, can accept   alternatives (see standard qqmath).   qqmath function can also plot observed statistic   standardized effect size (SES) standandized permutations   (argument sd.scale). permutations standardized   without observed statistic, similarly summary. Functions density qqnorm based   standard R methods accept arguments. handle   one statistic, used several test statistic   evaluated. densityplot   qqmath lattice graphics, can   used either one several statistics.  functions   pass arguments underlying functions; see   documentation. Functions qqmath   densityplot default use axis scaling   subplots lattice. can use argument scales   set independent scaling subplots appropriate (see   xyplot exhaustive list arguments). Function boxplot draws box--whiskers plots effect   size, difference permutations observed statistic.   scale = TRUE, permutations standardized unit standard   deviation, plot show standardized effect sizes. Function pairs plots permutation values statistics   . function passes extra arguments   pairs. permustats can extract permutation statistics   results adonis2,   anosim, anova.cca, mantel,   mantel.partial, mrpp,   oecosimu, ordiareatest,   permutest.cca, protest,   permutest.betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function returns object class  \"permustats\". list items \"statistic\"   observed statistics, permutations contains permuted   values, alternative contains text defining   character test (\"two.sided\", \"less\"  \"greater\"). qqnorm  density methods return standard result objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract, Analyse and Display Permutation Results — permustats","text":"Jari Oksanen contributions Gavin L. Simpson   (permustats.permutest.betadisper method related   modifications summary.permustats print   method) Eduard Szöcs (permustats.anova.cca).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract, Analyse and Display Permutation Results — permustats","text":"","code":"data(dune, dune.env) mod <- adonis2(dune ~ Management + A1, data = dune.env) ## use permustats perm <- permustats(mod) summary(perm) #>  #>            statistic    SES   mean lower median  upper Pr(perm)    #> Management    3.0730 4.6870 1.0387       0.9565 1.8217    0.004 ** #> A1            2.7676 2.7175 1.0022       0.8484 2.2436    0.028 *  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> (Interval (Upper - Lower) = 0.95) densityplot(perm)  qqmath(perm)  boxplot(perm, scale=TRUE, lty=1, pch=16, cex=0.6, col=\"hotpink\", ylab=\"SES\") abline(h=0, col=\"skyblue\")  ## example of multiple types of statistic mod <- with(dune.env, betadisper(vegdist(dune), Management)) pmod <- permutest(mod, nperm = 99, pairwise = TRUE) perm <- permustats(pmod) summary(perm, interval = 0.90) #>  #>             statistic     SES    mean   lower  median   upper Pr(perm)   #> Overall (F)    1.9506  0.7173  1.1427          0.8211  2.4909    0.154   #> BF-HF (t)     -0.5634 -0.4124 -0.0443 -2.0202 -0.0293  1.8851    0.591   #> BF-NM (t)     -2.2387 -1.8672 -0.0045 -1.8423  0.0074  2.0628    0.067 . #> BF-SF (t)     -1.1675 -0.9341 -0.0086 -1.9337 -0.0450  1.9486    0.283   #> HF-NM (t)     -2.1017 -1.9328  0.0277 -1.6716  0.0346  1.7582    0.067 . #> HF-SF (t)     -0.8789 -0.7872  0.0321 -1.8598  0.0284  1.8394    0.379   #> NM-SF (t)      0.9485  0.8265  0.0121 -1.9118  0.0690  1.7827    0.379   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> (Interval (Upper - Lower) = 0.9)"},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation tests in Vegan — permutations","title":"Permutation tests in Vegan — permutations","text":"version 2.2-0, vegan significantly improved access   restricted permutations brings line offered   Canoco. permutation designs modelled permutation   schemes Canoco 3.1 (ter Braak, 1990). vegan currently provides following features within   permutation tests: Free permutation DATA, also known randomisation, Free permutation DATA within levels       grouping variable, Restricted permutations line transects time series, Permutation groups samples whilst retaining       within-group ordering, Restricted permutations spatial grids, Blocking, samples never permuted blocks,       Split-plot designs, permutation whole plots, split       plots, . , use DATA mean either observed data   function data, example residuals   ordination model presence covariables. capabilities provided functions permute   package. user can request particular type permutation   supplying permutations argument function   object returned , defines samples   permuted. Alternatively, user can simply specify required   number permutations simple randomisation procedure   performed. Finally, user can supply matrix permutations (  number rows equal number permutations number   columns equal number observations data)   vegan use permutations instead generating new   permutations. majority functions vegan allow full range   possibilities outlined . Exceptions include   kendall.post kendall.global. Null hypothesis first two types permutation test listed   assumes free exchangeability DATA (within levels   grouping variable, specified). Dependence   observations, arises due spatial temporal   autocorrelation, -complicated experimental designs,   split-plot designs, violates fundamental assumption test   requires complex restricted permutation test designs.   designs available via permute package   vegan provides access version 2.2-0 onwards. Unless otherwise stated help pages specific functions,   permutation tests vegan follow format/structure: appropriate test statistic chosen. statistic       chosen described help pages individual       functions. value test statistic evaluate observed       data analysis/model recorded. Denote value       \\(x_0\\). DATA randomly permuted according one       schemes, value test statistic       permutation evaluated recorded. Step 3 repeated total \\(n\\) times, \\(n\\)       number permutations requested. Denote values       \\(x_i\\), \\(= 1, ..., n\\) Count number values test statistic,       \\(x_i\\), Null distribution extreme       test statistic observed data \\(x_0\\). Denote       count \\(N\\).      use phrase extreme include cases       two-sided test performed large negative values test       statistic considered. permutation p-value computed       $$p = \\frac{N + 1}{n + 1}$$ description illustrates default number   permutations specified vegan functions takes values 199   999 example. Pretty p values achieved   \\(+ 1\\) denominator results division 200 1000,   199 999 random permutations used test. simple intuition behind presence \\(+ 1\\) numerator   denominator represent inclusion observed   value statistic Null distribution (e.g. Manly 2006).   Phipson & Smyth (2010) present compelling explanation   inclusion \\(+ 1\\) numerator denominator   p value calculation. Fisher (1935) mind permutation test involve   enumeration possible permutations data yielding exact   test. However, complete enumeration may feasible   practice owing potentially vast number arrangements   data, even modestly-sized data sets free permutation   samples. result evaluate p value tail   probability Null distribution test statistic directly   random sample possible permutations. Phipson & Smyth   (2010) show naive calculation permutation p   value $$p = \\frac{N}{n}$$ leads invalid test incorrect type error rate.   go show replacing unknown tail probability (  p value) Null distribution biased estimator $$p = \\frac{N + 1}{n + 1}$$ positive bias induced just right size   account  uncertainty estimation tail probability   set randomly sampled permutations yield test   correct type error rate. estimator described correct situation   permutations data samples randomly without   replacement. strictly happens vegan   permutations drawn pseudo-randomly independent one   another. Note actual chance happening practice   small functions permute guarantee generate   unique set permutations unless complete enumeration   permutations requested. feasible   smallest data sets restrictive permutation designs,   cases chance drawing set permutations repeats   lessened sample size, thence size set   possible permutations, increases. situation sampling permutations replacement ,   tail probability \\(p\\) calculated biased estimator   described somewhat conservative, large   amount depends number possible values test   statistic can take permutation data (Phipson & Smyth,   2010). represents slight loss statistical power   conservative p value calculation used . However, unless   sample sizes small permutation design   set values test statistic can take also small,   loss power unlikely critical. minimum achievable p-value $$p_{\\mathrm{min}} = \\frac{1}{n + 1}$$ hence depends number permutations evaluated. However,   one simply increase number permutations (\\(n\\))   achieve potentially lower p-value unless number observations   available permits number permutations. unlikely   problem smallest data sets free permutation   (randomisation) valid, restricted permutation designs   low number observations, may many unique   permutations data might desire reach required   level significance. currently responsibility user determine total   number possible permutations DATA. number   possible permutations allowed specified design can   calculated using numPerms   permute package. Heuristics employed within   shuffleSet function used vegan can   triggered generate entire set permutations instead   random set. settings controlling triggering complete   enumeration step contained within permutation design created   using link[permute]{} can set user. See   details. Limits total number permutations DATA   severe temporally spatially ordered data experimental designs   low replication. example, time series \\(n = 100\\)   observations just 100 possible permutations including   observed ordering. situations low number permutations possible due   nature DATA experimental design, enumeration   permutations becomes important achievable computationally. , provided brief overview capabilities   vegan permute. get best new   functionality details set permutation designs   using , consult vignette   Restricted permutations; using permute package supplied   permute accessible via vignette(\"permutations\",   package = \"permute\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"random-number-generation","dir":"Reference","previous_headings":"","what":"Random Number Generation","title":"Permutation tests in Vegan — permutations","text":"permutations based random number generator provided   R. may change R releases change permutations   vegan test results. One change R release   3.6.0. new version clearly better permutation tests   use . However, need reproduce old results,   can set R random number generator previous version   RNGversion.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation tests in Vegan — permutations","text":"Manly, B. F. J. (2006). Randomization, Bootstrap Monte Carlo   Methods Biology, Third Edition. Chapman Hall/CRC. Phipson, B., & Smyth, G. K. (2010). Permutation P-values never   zero: calculating exact P-values permutations randomly   drawn. Statistical Applications Genetics Molecular     Biology, 9, Article 39. DOI: 10.2202/1544-6115.1585 ter Braak, C. J. F. (1990). Update notes: CANOCO version     3.1. Wageningen: Agricultural Mathematics Group. (UR). See also: Davison, . C., & Hinkley, D. V. (1997). Bootstrap Methods     Application. Cambridge University Press.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation tests in Vegan — permutations","text":"Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Implements permutation-based test multivariate homogeneity   group dispersions (variances) results call   betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"","code":"# S3 method for betadisper permutest(x, pairwise = FALSE,           permutations = 999,           parallel = getOption(\"mc.cores\"),           ...)"},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"x object class \"betadisper\", result     call betadisper. pairwise logical; perform pairwise comparisons group means? permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. ... Arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"test one groups variable others, ANOVA   distances group centroids can performed parametric   theory used interpret significance F. alternative   use permutation test. permutest.betadisper permutes model   residuals generate permutation distribution F Null   hypothesis difference dispersion groups. Pairwise comparisons group mean dispersions can performed   setting argument pairwise TRUE. classical t test   performed pairwise group dispersions. combined   permutation test based t statistic calculated pairwise group   dispersions. alternative classical comparison group   dispersions, calculate Tukey's Honest Significant Differences   groups, via TukeyHSD.betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"permutest.betadisper returns list class  \"permutest.betadisper\" following components: tab ANOVA table object inheriting class     \"data.frame\". pairwise list components observed     permuted containing observed permuted p-values     pairwise comparisons group mean distances (dispersions variances). groups character; levels grouping factor. control list, result call     .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Anderson, M.J. (2006) Distance-based tests homogeneity   multivariate dispersions. Biometrics 62(1), 245--253. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters   9(6), 683--693.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Gavin L. Simpson","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"","code":"data(varespec)  ## Bray-Curtis distances between samples dis <- vegdist(varespec)  ## First 16 sites grazed, remaining 8 sites ungrazed groups <- factor(c(rep(1,16), rep(2,8)), labels = c(\"grazed\",\"ungrazed\"))  ## Calculate multivariate dispersions mod <- betadisper(dis, groups) mod #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3926   0.2706  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## Perform test anova(mod) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07931 0.079306  4.6156 0.04295 * #> Residuals 22 0.37801 0.017182                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Permutation test for F pmod <- permutest(mod, permutations = 99, pairwise = TRUE)  ## Tukey's Honest Significant Differences (mod.HSD <- TukeyHSD(mod)) #>   Tukey multiple comparisons of means #>     95% family-wise confidence level #>  #> Fit: aov(formula = distances ~ group, data = df) #>  #> $group #>                       diff        lwr          upr     p adj #> ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502 #>  plot(mod.HSD)   ## Has permustats() method pstat <- permustats(pmod) densityplot(pstat, scales = list(x = list(relation = \"free\")))  qqmath(pstat, scales = list(relation = \"free\"))"},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"Functions plot extract results constrained correspondence analysis   (cca), redundancy analysis (rda)   constrained analysis principal coordinates (capscale).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"","code":"# S3 method for cca plot(x, choices = c(1, 2), display = c(\"sp\", \"wa\", \"cn\"),      scaling = \"species\", type, xlim, ylim, const,      correlation = FALSE, hill = FALSE, ...) # S3 method for cca text(x, display = \"sites\", labels, choices = c(1, 2),      scaling = \"species\", arrow.mul, head.arrow = 0.05, select, const,      axis.bp = FALSE, correlation = FALSE, hill = FALSE, ...) # S3 method for cca points(x, display = \"sites\", choices = c(1, 2),        scaling = \"species\", arrow.mul, head.arrow = 0.05, select, const,        axis.bp = FALSE, correlation = FALSE, hill = FALSE, ...) # S3 method for cca scores(x, choices = c(1,2), display = c(\"sp\",\"wa\",\"bp\",\"cn\"),        scaling = \"species\", hill = FALSE, tidy = FALSE, ...) # S3 method for rda scores(x, choices = c(1,2), display = c(\"sp\",\"wa\",\"bp\",\"cn\"),        scaling = \"species\", const, correlation = FALSE, tidy = FALSE, ...) # S3 method for cca summary(object, scaling = \"species\", axes = 6,         display = c(\"sp\", \"wa\", \"lc\", \"bp\", \"cn\"),         digits = max(3, getOption(\"digits\") - 3),         correlation = FALSE, hill = FALSE, ...) # S3 method for summary.cca print(x, digits = x$digits, head = NA, tail = head, ...) # S3 method for summary.cca head(x, n = 6, tail = 0, ...) # S3 method for summary.cca tail(x, n = 6, head = 0, ...) # S3 method for cca labels(object, display, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"x, object cca result object. choices Axes shown. display Scores shown.  must include     alternatives \"species\" \"sp\" species scores,     sites \"wa\" site scores, \"lc\" linear     constraints LC scores, \"bp\" biplot arrows     \"cn\" centroids factor constraints instead arrow,     \"reg\" regression coefficients (.k.. canonical     coefficients). alternative \"\" selects available     scores. scaling Scaling species site scores. Either species     (2) site (1) scores scaled eigenvalues,     set scores left unscaled, 3     scaled symmetrically square root eigenvalues.  Corresponding     negative values can used cca additionally multiply     results \\(\\sqrt(1/(1-\\lambda))\\).  scaling know Hill     scaling (although nothing Hill's rescaling     decorana). corresponding negative values     rda, species scores divided standard deviation     species multiplied equalizing constant. Unscaled raw     scores stored result can accessed scaling = 0. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Arguments correlation hill     scores.rda scores.cca respectively can used     combination character descriptions get     corresponding negative value. correlation, hill logical; scaling character     description scaling type, correlation hill     used select corresponding negative scaling type; either     correlation-like scores Hill's scaling PCA/RDA CA/CCA     respectively. See argument scaling details. tidy Return scores compatible     ggplot2: scores single data.frame,     score type identified factor variable score,     names variable label, weights (CCA)     variable weight. possible values score     species, sites (WA scores), constraints     (LC scores sites calculated directly constraining     variables), biplot (biplot arrows), centroids     (levels factor variables), factorbiplot (biplot     arrows model centroids), regression (regression     coefficients find LC scores constraints). scores     used conventional plot,     directly suitable used ggplot2 package. type Type plot: partial match text     text labels, points points, none     setting frames .  omitted, text selected     smaller data sets, points larger. xlim, ylim x y limits (min,max) plot. labels Optional text used instead row names.     use , good check default labels order     using labels command. arrow.mul Factor expand arrows graph.  Arrows     scaled automatically fit graph missing. head.arrow Default length arrow heads. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. const General scaling constant rda scores.     default use constant gives biplot scores, ,     scores approximate original data (see vignette     ‘Design Decisions’ browseVignettes(\"vegan\")     details discussion). const vector two     items, first used species, second item site     scores. axis.bp Draw axis biplot arrows. axes Number axes summaries. digits Number digits output. n, head, tail Number rows printed head tail     species site scores.  Default NA prints . ... Parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"plot function used cca   rda. produces quick, standard plot current   scaling. plot function sets colours (col), plotting   characters (pch) character sizes (cex)   certain standard values. fuller control produced plot,   best call plot type=\"none\" first, add   plotting item separately using text.cca   points.cca functions. use default settings standard   text points functions accept   parameters, allowing  full user control produced plots. Environmental variables receive special treatment.   display=\"bp\", arrows drawn. labelled   text unlabelled points. arrows   basically unit scaling, sites scaled (scaling   \"sites\" \"symmetric\"), scores requested axes   adjusted relative axis highest eigenvalue.    scaling = \"species\" scaling = \"none\", arrows   consistent vectors fitted linear combination scores   (display = \"lc\" function envfit),   scaling alternatives differ. basic plot   function uses simple heuristics adjusting unit-length arrows   current plot area, user can give expansion factor   mul.arrow.  display=\"cn\" centroids levels   factor variables displayed (available   factors formula interface used   cca rda). option continuous   variables still presented arrows ordered factors arrows   centroids. display = \"reg\" arrows drawn   regression coefficients (.k.. canonical coefficients) constraints   conditions. Biplot arrows can interpreted individually,   regression coefficients must interpreted together: LC score   site sum regressions displayed arrows.   partialled conditions zero shown biplot arrows,   shown regressions, show effect must   partialled get LC scores. biplot arrows   standard easily interpreted, regression arrows   used know need . want better control plots, best   construct plot text points commands   accept graphical parameters. important remember use   scaling, correlation hill arguments   calls. plot.cca command returns invisibly   ordiplot result object, consistent   scaling elements. easiest way full control   graphics first set plot frame using plot   type = \"n\" needed scores display save   result. points text commands   ordiplot allow full graphical control (see   section Examples). Utility function labels returns default   labels order applied text. Function summary lists scores output can   long.  can suppress scores setting axes = 0   display = NA display = NULL. can display   first last () rows scores using head   tail explicit print command summary. Palmer (1993) suggested using linear constraints (“LC scores”)   ordination diagrams, gave better results   simulations site scores (“WA scores”) step   constrained unconstrained analysis.  However, McCune (1997) showed   noisy environmental variables (environmental measurements   noisy) destroy “LC scores” whereas “WA scores”   little affected.  Therefore plot function uses site scores   (“WA scores”) default. consistent usage   statistics functions R (lda,   cancor).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"plot function returns   invisibly plotting structure can used function  identify.ordiplot identify points   functions ordiplot family.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Moisture + Management, dune.env) ## better control -- remember to set scaling etc identically plot(mod, type=\"n\", scaling=\"sites\") text(mod, dis=\"cn\", scaling=\"sites\") points(mod, pch=21, col=\"red\", bg=\"yellow\", cex=1.2, scaling=\"sites\") text(mod, \"species\", col=\"blue\", cex=0.8, scaling=\"sites\")  ## catch the invisible result and use ordiplot support - the example ## will make a biplot with arrows for species and correlation scaling pca <- rda(dune) pl <- plot(pca, type=\"n\", scaling=\"sites\", correlation=TRUE) with(dune.env, points(pl, \"site\", pch=21, col=1, bg=Management)) text(pl, \"sp\", arrow=TRUE, length=0.05, col=4, cex=0.6, xpd=TRUE) with(dune.env, legend(\"bottomleft\", levels(Management), pch=21, pt.bg=1:4, bty=\"n\"))  ## Limited output of 'summary' (NB. Signs of axes are arbitrary and can change ## when the command is run repeatedly). ## IGNORE_RDIFF_BEGIN head(summary(mod), tail=2) #>  #> Call: #> cca(formula = dune ~ A1 + Moisture + Management, data = dune.env)  #>  #> Partitioning of scaled Chi-square: #>               Inertia Proportion #> Total          2.1153     1.0000 #> Constrained    1.1392     0.5385 #> Unconstrained  0.9761     0.4615 #>  #> Eigenvalues, and their contribution to the scaled Chi-square  #>  #> Importance of components: #>                         CCA1   CCA2    CCA3    CCA4    CCA5    CCA6    CCA7 #> Eigenvalue            0.4483 0.3001 0.14995 0.10733 0.05668 0.04335 0.03345 #> Proportion Explained  0.2119 0.1419 0.07089 0.05074 0.02680 0.02050 0.01581 #> Cumulative Proportion 0.2119 0.3538 0.42470 0.47544 0.50223 0.52273 0.53855 #>                          CA1     CA2     CA3     CA4     CA5     CA6     CA7 #> Eigenvalue            0.3064 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 #> Proportion Explained  0.1448 0.06236 0.05444 0.05175 0.03652 0.03581 0.02303 #> Cumulative Proportion 0.6834 0.74574 0.80018 0.85194 0.88845 0.92427 0.94730 #>                           CA8     CA9     CA10     CA11     CA12 #> Eigenvalue            0.03758 0.03106 0.021024 0.012542 0.009277 #> Proportion Explained  0.01777 0.01468 0.009939 0.005929 0.004386 #> Cumulative Proportion 0.96506 0.97975 0.989685 0.995614 1.000000 #>  #> Accumulated constrained eigenvalues #> Importance of components: #>                         CCA1   CCA2   CCA3    CCA4    CCA5    CCA6    CCA7 #> Eigenvalue            0.4483 0.3001 0.1499 0.10733 0.05668 0.04335 0.03345 #> Proportion Explained  0.3935 0.2635 0.1316 0.09422 0.04976 0.03806 0.02937 #> Cumulative Proportion 0.3935 0.6570 0.7886 0.88282 0.93258 0.97063 1.00000 #>  #> 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 #> Achimill  0.8150 -0.4375 -0.11236  0.35595 -0.114763 -0.01972 #> Agrostol -0.7488  0.4783  0.03561  0.17039  0.187389  0.23471 #> Airaprae -0.8186 -1.7469  1.04506 -0.28593  0.191836  0.73077 #> Alopgeni -0.3442  1.0216  0.37620  0.02296 -0.004041  0.04789 #> Anthodor  0.3367 -0.7694 -0.07602 -0.05421  0.136354  0.42463 #> Bellpere  0.6535 -0.2200  0.03438  0.60436 -0.090469  0.28138 #> ....                                                          #> Bracruta -0.1309 -0.2009 -0.03708 -0.17421 -0.109657  0.04381 #> Callcusp -1.5181 -0.3834 -0.23255  0.15246  0.104239 -0.11424 #>  #>  #> Site scores (weighted averages of species scores) #>  #>         CCA1    CCA2     CCA3    CCA4    CCA5    CCA6 #> 1     1.2468  0.4017  0.91955  0.7292  1.5785 -1.0196 #> 2     0.8622  0.1641  0.25789  1.7240 -0.7592 -0.6479 #> 3     0.3165  0.9785  0.82952  0.7451  0.6556  0.3256 #> 4     0.2405  0.8699  1.07861  1.4103  1.1164  2.4714 #> 5     1.1362 -0.2621 -1.10847 -0.9417  0.5630  1.1495 #> 6     1.0575 -0.4041 -1.65035 -1.8483  1.0287 -0.1690 #> ....                                                  #> 19   -0.7913 -2.7451  2.93017 -1.3851 -0.3932  1.7277 #> 20   -2.0770 -1.0113 -0.02581 -0.8949  1.6406 -1.7917 #>  #>  #> Site constraints (linear combinations of constraining variables) #>  #>         CCA1    CCA2     CCA3    CCA4    CCA5     CCA6 #> 1     0.7245  0.3695  1.25652 -0.3678  0.9827 -0.60590 #> 2     0.9033 -0.4250  0.03901  1.0557 -1.0860 -1.61234 #> 3     0.4493  0.6694  0.67765  0.8695  0.9609  1.52307 #> 4     0.4550  0.6532  0.72768  0.8529  0.9795  1.50218 #> 5     0.9671  0.2010 -1.93972 -0.5807  0.2582  0.31905 #> 6     1.0805 -0.1235 -0.93911 -0.9126  0.6307 -0.09863 #> ....                                                   #> 19   -1.4581 -1.6074  1.16812 -0.5305  0.3178 -0.40336 #> 20   -1.4468 -1.6399  1.26818 -0.5637  0.3551 -0.44513 #>  #>  #> Biplot scores for constraining variables #>  #>                 CCA1    CCA2     CCA3     CCA4     CCA5     CCA6 #> A1           -0.5554  0.1617 -0.67982  0.10708 -0.17998  0.30507 #> Moisture.L   -0.9437  0.1638  0.07974 -0.02238  0.03067 -0.02368 #> Moisture.Q   -0.1876 -0.3571 -0.45352 -0.17237  0.28350 -0.63025 #> Moisture.C   -0.2069 -0.1732  0.10635  0.68203  0.50123  0.35887 #> ManagementHF  0.3645  0.1171 -0.42202 -0.67746  0.17212 -0.12317 #> ManagementNM -0.5855 -0.7267 -0.01115 -0.09642 -0.11445  0.27037 #> ManagementSF -0.1511  0.6957  0.38543  0.24770  0.29469  0.23829 #>  #>  #> Centroids for factor constraints #>  #>                 CCA1     CCA2     CCA3     CCA4     CCA5    CCA6 #> Moisture1     0.9119 -0.35388 -0.40013 -0.26218  0.02084 -0.4708 #> Moisture2     0.5015  0.06706  0.60222  1.12478  0.33942  1.2024 #> Moisture4    -0.1522  1.35873  0.76544 -1.37289 -1.80794  0.3849 #> Moisture5    -1.3394 -0.11972 -0.20942  0.04843  0.39751 -0.3902 #> ManagementBF  0.8376 -0.41614  0.13885  1.40679 -0.97766 -0.9604 #> ManagementHF  0.5426  0.17426 -0.62822 -1.00848  0.25622 -0.1834 #> ManagementNM -1.1010 -1.36665 -0.02097 -0.18131 -0.21523  0.5084 #> ManagementSF -0.2320  1.06831  0.59183  0.38035  0.45250  0.3659 #>  ## IGNORE_RDIFF_END ## Scaling can be numeric or more user-friendly names ## e.g. Hill's scaling for (C)CA scrs <- scores(mod, scaling = \"sites\", hill = TRUE) ## or correlation-based scores in PCA/RDA scrs <- scores(rda(dune ~ A1 + Moisture + Management, dune.env),                scaling = \"sites\", correlation = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":null,"dir":"Reference","previous_headings":"","what":"Principal Response Curves for Treatments with Repeated Observations — prc","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"Principal Response Curves (PRC) special case   Redundancy Analysis (rda) multivariate responses   repeated observation design. originally suggested   ecological communities. easier interpret   traditional constrained ordination. can also used study   effects factor depend levels factor   B, + :B, multivariate response   experiment.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"","code":"prc(response, treatment, time, ...) # S3 method for prc summary(object, axis = 1, scaling = \"symmetric\", const,         digits = 4, correlation = FALSE, ...) # S3 method for prc plot(x, species = TRUE, select, scaling = \"symmetric\",      axis = 1, correlation = FALSE, const, type = \"l\", xlab, ylab, ylim,      lty = 1:5, col = 1:6, pch, legpos, cex = 0.8, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"response Multivariate response data. Typically     community (species) data. data counts, probably     log transformed prior analysis. treatment factor treatments. time unordered factor defining observations times     repeated design. object, x prc result object. axis Axis shown (one axis can selected). scaling Scaling species scores, identical     scaling scores.rda. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Argument correlation can used combination     character descriptions get corresponding negative     value. const General scaling constant species scores (see     scores.rda details). Lower values reduce     range species scores, influence regression     coefficients. digits Number significant digits displayed. correlation logical; scaling character     description scaling type, correlation can used     select correlation-like scores PCA. See argument scaling     details. species Display species scores. select Vector select displayed species. can vector     indices logical vector TRUE selected     species type Type plot: \"l\" lines, \"p\" points     \"b\" . xlab, ylab Text replace default axis labels. ylim Limits vertical axis. lty, col, pch Line type, colour plotting characters     (defaults supplied). legpos position legend. guess     made supplied, NA suppress legend. cex Character expansion symbols species labels. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"PRC special case rda single   factor treatment single factor time points   repeated observations. vegan, corresponding   rda model defined rda(response ~ treatment *   time + Condition(time)). Since time appears twice   model formula, main effects aliased, main   effect treatment interaction terms available,   used PRC. Instead usual multivariate ordination diagrams, PRC   uses canonical (regression) coefficients species scores   single axis. current functions provide special   summary plot methods display   rda results PRC fashion. current version   works default contrasts (contr.treatment)   coefficients contrasts first level, levels   must arranged first level control (  baseline). necessary, must change baseline level   function relevel. Function summary prints species scores   coefficients. Function plot plots coefficients   time using matplot, similar defaults.   graph (PRC) meaningful first treatment   level control, results contrasts first level   unordered factors used. plot also displays species scores   right vertical axis using function   linestack. Typically number species high   can displayed default settings, users can   reduce character size padding (air)   linestack, select subset   species. legend displayed unless suppressed   legpos = NA, functions tries guess put   legend legpos supplied.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"function special case rda returns   result object (see cca.object). However, special  summary plot methods display returns differently   rda.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"van den Brink, P.J. & ter Braak, C.J.F. (1999). Principal response   curves: Analysis time-dependent multivariate responses   biological community stress. Environmental Toxicology   Chemistry, 18, 138--148.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"Jari Oksanen Cajo ter Braak","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"first level treatment must   control: use function relevel guarantee correct   reference level. current version ignore user setting   contrasts always use treatment contrasts   (contr.treatment). time must unordered   factor.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"","code":"## Chlorpyrifos experiment and experimental design: Pesticide ## treatment in ditches (replicated) and followed over from 4 weeks ## before to 24 weeks after exposure  data(pyrifos) week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11)) ditch <- gl(12, 1, length=132)  ## IGNORE_RDIFF_BEGIN ## PRC mod <- prc(pyrifos, dose, week) mod            # RDA #> Call: prc(response = pyrifos, treatment = dose, time = week) #>  #>                Inertia Proportion Rank #> Total         288.9920     1.0000      #> Conditional    63.3493     0.2192   10 #> Constrained    96.6837     0.3346   44 #> Unconstrained 128.9589     0.4462   77 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11  #> 25.282  8.297  6.044  4.766  4.148  3.857  3.587  3.334  3.087  2.551  2.466  #>  RDA12  RDA13  RDA14  RDA15  RDA16  RDA17  RDA18  RDA19  RDA20  RDA21  RDA22  #>  2.209  2.129  1.941  1.799  1.622  1.579  1.440  1.398  1.284  1.211  1.133  #>  RDA23  RDA24  RDA25  RDA26  RDA27  RDA28  RDA29  RDA30  RDA31  RDA32  RDA33  #>  1.001  0.923  0.862  0.788  0.750  0.712  0.685  0.611  0.584  0.537  0.516  #>  RDA34  RDA35  RDA36  RDA37  RDA38  RDA39  RDA40  RDA41  RDA42  RDA43  RDA44  #>  0.442  0.417  0.404  0.368  0.340  0.339  0.306  0.279  0.271  0.205  0.179  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8  #> 17.156  9.189  7.585  6.064  5.730  4.843  4.518  4.105  #> (Showing 8 of 77 unconstrained eigenvalues) #>  summary(mod)   # PRC #>  #> Call: #> prc(response = pyrifos, treatment = dose, time = week)  #> Species scores: #>     Simve     Daplo     Cerpu     Alogu     Aloco     Alore     Aloaf     Copsp  #>  2.688099  1.464566  0.542739  0.280040  0.177019  0.315038  0.426524  1.169368  #>     Ostsp     Slyla     Acrha     Aloex     Chysp     Alona     Plead     Oxyte  #>  2.312186 -0.556899  0.105535  0.228092  0.095042  0.063689  0.138397  0.025401  #>     Grate     Copdi     NauLa     CilHa     Strvi     amosp     Ascmo     Synsp  #>  0.096840  1.428854  4.847070  0.895241  3.069709 -1.357663  0.069736 -0.026494  #>     Squro     Squmu     Polar     Kerqu     Anufi     Mytve     Mytvi     Mytmu  #>  0.264390 -0.452667  0.461989  0.495348  0.432767  0.074372  0.090928  0.105891  #>     Lepsp     Leppa     Colob     Colbi     Colun     Lecsp     Lecqu     Lecco  #>  0.998286  0.084809 -0.723051 -0.139569 -0.828338  0.472866 -0.088860 -0.290531  #>     Leclu     Lecfl     Tripo     Cepsp     Monlo     Monae     Scalo     Trilo  #>  0.049788 -0.408035  0.215234 -0.809597 -0.527913 -0.089948 -0.077192 -0.039086  #>   Tripo.1     Tricy     Trisp     Tepat     Rotne     Notla     Filsp     Lopox  #>  0.246435  0.335400  0.078423  0.007719  0.143730 -0.114301 -0.168356 -0.030990  #>  hydrspec  bothrosp  olchaeta  erpoocto  glsicomp  alglhete  hebdstag   sphidae  #> -0.048698  0.398665 -1.165154 -0.901030 -0.144389 -0.073049  0.902223  1.463655  #>  ansuvote  armicris  bathcont  binitent  gyraalbu  hippcomp  lymnstag  lymnaes7  #>  0.140685  1.680010  0.073282 -1.950500  0.033051  0.404473 -0.263679  0.135150  #>  physfont  plbacorn  popyanti  radiovat  radipere  valvcris  valvpisc  hycarina  #> -0.026383  0.084761  1.272223 -0.019815 -0.625468  0.010579 -0.267577  1.044034  #>  gammpule  aselaqua  proameri  collembo  caenhora  caenluct  caenrobu  cloedipt  #>  1.526450  1.578743  0.116577  0.029906  5.767844  2.376188  0.126181  4.734035  #>  cloesimi  aeshniae  libellae  conagrae  corident  coripanz  coripunc  cymabons  #>  1.242207  0.212699 -0.081867  1.630574  0.013761  0.120439 -0.176746  0.046360  #>  hesplinn  hespsahl  notoglau  notomacu  notoobli  notoviri  pacoconc  pleaminu  #> -0.069465  0.033240  0.555201  0.050060  0.082356  0.215863  0.016709  0.071168  #>  sigadist  sigafall  sigastri  sigarasp  colyfusc  donacis6  gyrimari  haliconf  #>  0.076479 -0.018364  0.060206 -0.277312  0.036493 -0.078608  0.010579  0.446911  #>  haliflav  haligruf  haliobli  herubrev  hya_herm  hyglpusi  hyhyovat  hypoplan  #>  0.044538  0.450146  0.131472 -0.128486 -0.322379 -0.011775  0.024196  0.014976  #>  hyporusp  hytuinae  hytuvers  laphminu  noteclav  rhantusp  sialluta  ablalong  #>  0.232042  2.316179  1.772351  0.632897  0.007912  0.067618  1.109341  0.014976  #>  ablaphmo  cltanerv  malopisp  mopetenu  prdiussp  pstavari  chironsp  crchirsp  #>  2.992695  0.075631  0.047658  0.008716  0.554911  0.082842  1.889916  0.016709  #>  crclglat  ditendsp  mitegchl  pachgarc  pachgvit  popegnub  popedisp  acriluce  #>  0.028953  0.083481  0.230629 -0.012187 -0.029907  0.224272 -0.069649 -0.007950  #>  chclpige  conescut  cricotsp  liesspec  psclbarb  psclgsli  psclobvi  psclplat  #> -0.008744  0.821036  0.121530  0.107387 -0.028639  0.601568 -0.362378 -0.052054  #>  psclpsil  pscladsp  cladotsp  laa_spec  patanysp  tatarssp  zaa_spec  anopmacu  #>  0.007339  0.005674  0.539894  0.034105  0.146807  0.669430  0.049949 -0.163731  #>  cepogoae  chaoobsc  cucidae4  tabanusp  agdasphr  athrater  cyrncren  holodubi  #>  2.555403  2.442310  0.033240 -0.011601  0.271815  0.067618  0.071168  0.094754  #>  holopici  leceriae  lilurhom  monaangu  mystazur  mystloni  oecefurv  oecelacu  #>  0.611618  0.298633  0.009063  0.644295  0.033240  2.998460  0.536628  0.259064  #>  triabico  paponysp  #>  0.088915  0.097788  #>  #> Coefficients for dose + week:dose interaction #> which are contrasts to dose 0  #> rows are dose, columns are week #>           -4      -1     0.1        1       2       4        8      12      15 #> 0.1 -0.07218 -0.1375 -0.1020 -0.04068 -0.2101 -0.1364 -0.08077 -0.1536 -0.1123 #> 0.9 -0.08106 -0.1935 -0.1936 -0.47699 -0.4977 -0.4306 -0.13532 -0.3548 -0.2408 #> 6   -0.16616 -0.1232 -0.4539 -1.15638 -1.0835 -1.1511 -0.56112 -0.4698 -0.3078 #> 44  -0.13979 -0.1958 -0.7308 -1.26088 -1.2978 -1.4627 -1.29139 -1.0081 -0.7819 #>          19       24 #> 0.1 -0.2163 -0.07835 #> 0.9 -0.1756 -0.15442 #> 6   -0.3293 -0.18227 #> 44  -0.5768 -0.31022 logabu <- colSums(pyrifos) plot(mod, select = logabu > 100)  ## IGNORE_RDIFF_END ## Ditches are randomized, we have a time series, and are only ## interested in the first axis ctrl <- how(plots = Plots(strata = ditch,type = \"free\"),     within = Within(type = \"series\"), nperm = 99) anova(mod, permutations = ctrl, first=TRUE) #> Permutation test for rda under reduced model #> Plots: ditch, plot permutation: free #> Permutation: series #> Number of permutations: 99 #>  #> Model: prc(response = pyrifos, treatment = dose, time = week) #>          Df Variance      F Pr(>F)    #> RDA1      1   25.282 15.096   0.01 ** #> Residual 77  128.959                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Function predict can used find site species scores   estimates response data new data sets, Function   calibrate estimates values constraints new data set.   Functions fitted residuals return estimates   response data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"","code":"# S3 method for cca fitted(object, model = c(\"CCA\", \"CA\", \"pCCA\"),     type =  c(\"response\", \"working\"), ...) # S3 method for capscale fitted(object, model = c(\"CCA\", \"CA\", \"pCCA\", \"Imaginary\"),     type = c(\"response\", \"working\"), ...) # S3 method for cca residuals(object, ...) # S3 method for cca predict(object, newdata, type = c(\"response\", \"wa\", \"sp\", \"lc\", \"working\"),         rank = \"full\", model = c(\"CCA\", \"CA\"), scaling = \"none\",         hill = FALSE, ...) # S3 method for rda predict(object, newdata, type = c(\"response\", \"wa\", \"sp\", \"lc\", \"working\"),         rank = \"full\", model = c(\"CCA\", \"CA\"), scaling = \"none\",         correlation = FALSE, const, ...) # S3 method for cca calibrate(object, newdata, rank = \"full\", ...) # S3 method for cca coef(object, norm = FALSE, ...) # S3 method for decorana predict(object, newdata, type = c(\"response\", \"sites\", \"species\"),     rank = 4, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"object result object cca,     rda, dbrda, capscale     decorana. model Show constrained (\"CCA\"), unconstrained     (\"CA\") conditioned “partial” (\"pCCA\")     results. fitted method capscale can     also \"Imaginary\" imaginary components negative     eigenvalues newdata New data frame used prediction     calibration.  Usually new community data frame,     type = \"lc\" constrained component type =     \"response\" type = \"working\" must data frame     constraints.  newdata must number rows     original community data cca result     type = \"response\" type = \"working\".      original model row column names, new data must contain     rows columns names (row names species scores,     column names \"wa\" scores constraint names     \"lc\" scores). cases rows columns must match     directly. type type prediction, fitted values residuals:     \"response\" scales results ordination gives     results, \"working\" gives values used     internally, Chi-square standardization     cca scaling centring     rda. capscale     dbrda \"response\" gives     dissimilarities, \"working\" internal data structure     analysed ordination. Alternative \"wa\" gives site     scores weighted averages community data, \"lc\"     site scores linear combinations environmental data,     \"sp\" species scores. predict.decorana     alternatives scores \"sites\" \"species\". rank rank number axes used approximation.     default use axes (full rank) \"model\"     available four axes predict.decorana. scaling logical, character, numeric; Scaling predicted     scores meaning cca,     rda, dbrda,     capscale. See scores.cca details     acceptable values. correlation, hill logical; correlation-like scores Hill's     scaling appropriate RDA CCA respectively. See     scores.cca additional details. const Constant multiplier  RDA scores. used     scaling FALSE, default value     give similar scaling scores.rda. norm Coefficients variables centred scaled     unit norm. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Function fitted gives approximation original data   matrix dissimilarities ordination result either   scale response scaled internally function.   Function residuals gives approximation original data   unconstrained ordination.  argument type =   \"response\" fitted.cca residuals.cca function   give marginal totals original data matrix,   fitted residuals add original data.  Functions   fitted residuals dbrda   capscale give dissimilarities type =   \"response\", additive.  However,   \"working\" scores additive capscale (  dbrda). fitted residuals   capscale dbrda include   additive constant requested function call.    variants fitted residuals defined   model mod <- cca(y ~ x), cca(fitted(mod)) equal   constrained ordination, cca(residuals(mod)) equal   unconstrained part ordination. Function predict can find estimate original data   matrix dissimilarities (type = \"response\") rank.   rank = \"full\" identical fitted.    addition, function can find species scores site scores   community data matrix cca rda.   function can used new data, can used add new   species site scores existing ordinations.  function returns   (weighted) orthonormal scores default, must specify   explicit scaling add scores ordination   diagrams. type = \"wa\" function finds site scores   species scores. case, new data can contain new sites,   species must match original new data.  type=\"sp\"    function finds species scores site constraints   (linear combination scores). case new data can contain new   species, sites must match original new data.   type = \"lc\" function finds linear combination scores   sites environmental data. case new data frame   must contain constraining conditioning environmental variables   model formula. type = \"response\"    type = \"working\" new data must contain environmental variables    constrained component desired, community data matrix   residual unconstrained component desired.  types,   function uses newdata find new \"lc\" (constrained)   \"wa\" scores (unconstrained) finds response   working data new row scores species scores.    original site (row) species (column) weights used   type = \"response\" type = \"working\" correspondence   analysis (cca) therefore number rows must   match original data newdata. completely new data frame created, extreme care needed   defining variables similarly original model, particular   (ordered) factors. ordination performed formula   interface, newdata can data frame matrix,   extreme care needed columns match original   newdata. Function calibrate.cca finds estimates constraints   community ordination \"wa\" scores cca,   rda capscale. often known   calibration, bioindication environmental reconstruction.   Basically, method similar projecting site scores onto   biplot arrows, uses regression coefficients.  function   can called newdata cross-validation   possible.  newdata may contain new sites, species   must match original new data.  function work   ‘partial’ models Condition term,   used newdata capscale   dbrda results.  results may interpretable   continuous variables. Function coef give regression coefficients centred   environmental variables (constraints conditions) linear   combination scores. coefficients unstandardized environmental   variables. coefficients NA aliased effects. Function predict.decorana similar predict.cca.   However, type = \"species\" available detrended   correspondence analysis  (DCA), detrending destroys mutual   reciprocal averaging (except first axis rescaling   used). Detrended CA attempt approximate original data   matrix, type = \"response\" meaning detrended   analysis (except rank = 1).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"functions return matrices, vectors dissimilarities appropriate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Greenacre, M. J. (1984). Theory applications correspondence   analysis. Academic Press, London.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env) # Definition of the concepts 'fitted' and 'residuals' mod #> Call: cca(formula = dune ~ A1 + Management + Condition(Moisture), data #> = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Conditional    0.6283     0.2970    3 #> Constrained    0.5109     0.2415    4 #> Unconstrained  0.9761     0.4615   12 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1    CCA2    CCA3    CCA4  #> 0.24932 0.12090 0.08160 0.05904  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10  #> 0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102  #>    CA11    CA12  #> 0.01254 0.00928  #>  cca(fitted(mod)) #> Call: cca(X = fitted(mod)) #>  #>               Inertia Rank #> Total          0.5109      #> Unconstrained  0.5109    4 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4  #> 0.24932 0.12090 0.08160 0.05904  #>  cca(residuals(mod)) #> Call: cca(X = residuals(mod)) #>  #>               Inertia Rank #> Total          0.9761      #> Unconstrained  0.9761   12 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10  #> 0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102  #>    CA11    CA12  #> 0.01254 0.00928  #>  # Remove rare species (freq==1) from 'cca' and find their scores # 'passively'. freq <- specnumber(dune, MARGIN=2) freq #> Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu  #>        7       10        2        8        6        6        5        1  #> Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo  #>        1        2        5        6        1        3        5        4  #> Lolipere Planlanc  Poaprat  Poatriv Ranuflam Rumeacet Sagiproc Salirepe  #>       12        7       14       13        6        5        7        3  #> Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp  #>       18        3       16        3       15        3  mod <- cca(dune[, freq>1] ~ A1 + Management + Condition(Moisture), dune.env) ## IGNORE_RDIFF_BEGIN predict(mod, type=\"sp\", newdata=dune[, freq==1], scaling=\"species\") #>                CCA1      CCA2       CCA3        CCA4 #> Chenalbu  1.5737337 0.7842538  0.5503660 -0.35108333 #> Cirsarve  0.5945146 0.3714228 -0.2862647 -0.88373727 #> Empenigr -1.8771953 0.9904299 -0.2446222 -0.04858656 # New sites predict(mod, type=\"lc\", new=data.frame(A1 = 3, Management=\"NM\", Moisture=\"2\"), scal=2) #>       CCA1     CCA2       CCA3      CCA4 #> 1 -2.38829 1.230652 -0.2363485 0.3338258 # Calibration and residual plot mod <- cca(dune ~ A1 + Moisture, dune.env) pred <- calibrate(mod) pred #>            A1  Moisture.L  Moisture.Q   Moisture.C #> 1   2.2630533 -0.62633470 -0.20456759  0.220761764 #> 2   4.0510042 -0.47341146 -0.36986691  0.474939409 #> 3   4.2752294 -0.07214500 -0.60797514  0.303213289 #> 4   4.5398659  0.03192745 -1.12417368  0.932223234 #> 5   5.0409406 -0.84235946  0.43000738 -0.291599200 #> 6   5.1962100 -0.91316862  1.11354235 -0.804453944 #> 7   4.2452549 -0.76452556  0.60464291 -0.484842066 #> 8   5.0208369  0.43886340  0.08169514  0.132995916 #> 9   4.2663219  0.10720486 -0.34067849 -0.675151598 #> 10  4.0411356 -0.65472729  0.02832164  0.558402684 #> 11  2.8280051 -0.45762457  0.63079135 -0.089977975 #> 12  5.1204137  0.36328912 -0.69118581 -0.665622948 #> 13  4.9034218  0.47069541 -0.54378271 -0.118643453 #> 14 11.6455841  0.60920550  0.78341426  0.532852308 #> 15 10.7829689  0.69208513  0.82190786  0.237311062 #> 16  7.9892176  0.96421599  0.46793089  0.373647014 #> 17  0.9218684 -0.15822891  0.14593271  1.189161582 #> 18  3.1680733 -0.41737900  1.03352732 -0.236938282 #> 19 -1.2003506  0.57033354  0.72777285  0.509955590 #> 20  4.7876770  1.00324330  1.49898460  0.009202396 ## IGNORE_RDIFF_END with(dune.env, plot(A1, pred[,\"A1\"] - A1, ylab=\"Prediction Error\")) abline(h=0)"},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":null,"dir":"Reference","previous_headings":"","what":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Function procrustes rotates configuration maximum similarity   another configuration. Function protest tests   non-randomness (significance) two configurations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"","code":"procrustes(X, Y, scale = TRUE, symmetric = FALSE, scores = \"sites\", ...) # S3 method for procrustes summary(object, digits = getOption(\"digits\"), ...) # S3 method for procrustes plot(x, kind=1, choices=c(1,2), to.target = TRUE,      type = \"p\", xlab, ylab, main, ar.col = \"blue\", length=0.05,      cex = 0.7, ...) # S3 method for procrustes points(x, display = c(\"target\", \"rotated\"),     choices = c(1,2), truemean = FALSE, ...) # S3 method for procrustes text(x, display = c(\"target\", \"rotated\"),     choices = c(1,2), labels, truemean = FALSE, ...) # S3 method for procrustes lines(x, type = c(\"segments\", \"arrows\"),     choices = c(1, 2), truemean = FALSE, ...) # S3 method for procrustes residuals(object, ...) # S3 method for procrustes fitted(object, truemean = TRUE, ...) # S3 method for procrustes predict(object, newdata, truemean = TRUE, ...) protest(X, Y, scores = \"sites\", permutations = how(nperm = 999), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"X Target matrix Y Matrix rotated. scale Allow scaling axes Y. symmetric Use symmetric Procrustes statistic (rotation     still non-symmetric). scores Kind scores used. display argument   used corresponding scores function: see   scores, scores.cca   scores.cca alternatives. x, object object class procrustes. digits Number digits output. kind plot function, kind plot produced:     kind = 1 plots shifts two configurations, kind = 0     draws corresponding empty plot, kind = 2     plots impulse diagram residuals. choices Axes (dimensions) plotted. xlab, ylab Axis labels, defaults unacceptable. main Plot title, default unacceptable. display Show \"target\" \"rotated\"     matrix points. .target Draw arrows point target. type type plot drawn. plot, type     can \"points\" \"text\" select marker     tail arrow, \"none\" drawing empty     plot. lines type selects either     arrows line segments connect     target rotated configuration. truemean Use original range target matrix instead     centring fitted values. Function plot.procrustes needs     truemean = FALSE, adding graphical items plots     original results may need truemean = TRUE. newdata Matrix coordinates rotated translated      target. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. ar.col Arrow colour. length Width arrow head. labels Character vector text labels. Rownames result      object used default. cex Character expansion points text. ... parameters passed functions. procrustes     protest parameters passed scores,     graphical functions underlying graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Procrustes rotation rotates matrix maximum similarity   target matrix minimizing sum squared differences.  Procrustes   rotation typically used comparison ordination results.    particularly useful comparing alternative solutions   multidimensional scaling.  scale=FALSE, function   rotates matrix Y. scale=TRUE, scales linearly   configuration Y maximum similarity.  Since Y scaled   fit X, scaling non-symmetric. However,   symmetric=TRUE, configurations scaled equal   dispersions  symmetric version Procrustes statistic   computed. Instead matrix, X Y can results   ordination scores can extract results.   Function procrustes passes extra arguments   scores, scores.cca etc. can   specify arguments scaling. Function plot plots procrustes object returns   invisibly ordiplot object function   identify.ordiplot can used identifying   points. items ordiplot object called   heads points kind=1 (ordination   diagram) sites kind=2 (residuals).    ordination diagrams, arrow heads point target   configuration .target = TRUE, rotated   configuration .target = FALSE.  Target original   rotated axes shown cross hairs two-dimensional Procrustes   analysis, higher number dimensions, rotated axes   projected onto plot scaled centred   range. Function plot passes parameters underlying plotting   functions.  full control plots, can draw axes using   plot kind = 0, add items   points lines.  functions pass parameters   underlying functions can select plotting   characters, size, colours etc., can select width,   colour type line segments arrows, can   select orientation head width arrows. Function residuals returns pointwise   residuals, fitted fitted values, either centred zero   mean (truemean=FALSE) original scale (  hardly make sense symmetric = TRUE).   addition, summary print methods. matrix X lower number columns matrix   Y, matrix X filled zero columns   match dimensions. means function can used rotate   ordination configuration environmental variable (  practically extracting result fitted   function). Function predict can used add new rotated   coordinates target. predict function always   translate coordinates original non-centred matrix.   function used newdata symmetric   analysis. Function protest performs symmetric Procrustes analysis   repeatedly estimate significance Procrustes   statistic. Function protest uses correlation-like statistic   derived symmetric Procrustes sum squares \\(ss\\)   \\(r =\\sqrt{1-ss}\\), also prints sum   squares symmetric analysis, sometimes called   \\(m_{12}^2\\). Function protest   print method, otherwise uses procrustes   methods. Thus plot protest object yields   Procrustean superimposition plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Function procrustes returns object class  procrustes items. Function protest inherits  procrustes, amends new items: Yrot Rotated matrix Y. X Target matrix. ss Sum squared differences X Yrot. rotation Orthogonal rotation matrix. translation Translation origin. scale Scaling factor. xmean centroid target. symmetric Type ss statistic. call Function call. t0 following items class     protest:  Procrustes correlation non-permuted solution. t Procrustes correlations permutations. distribution     correlations can inspected permustats     function. signif Significance t permutations Number permutations. control list control values permutations     returned function . control list passed argument control describing     permutation design.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Mardia, K.V., Kent, J.T. Bibby,   J.M. (1979). Multivariate Analysis. Academic Press. Peres-Neto, P.R. Jackson, D.. (2001). well multivariate   data sets match? advantages Procrustean superimposition   approach Mantel test. Oecologia 129: 169-178.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"function protest follows Peres-Neto & Jackson (2001),   implementation still Mardia et al.   (1979).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"","code":"## IGNORE_RDIFF_BEGIN data(varespec) vare.dist <- vegdist(wisconsin(varespec)) mds.null <- monoMDS(vare.dist, y = cmdscale(vare.dist)) mds.alt <- monoMDS(vare.dist) vare.proc <- procrustes(mds.alt, mds.null) vare.proc #>  #> Call: #> procrustes(X = mds.alt, Y = mds.null)  #>  #> Procrustes sum of squares: #> 11.17  #>  summary(vare.proc) #>  #> Call: #> procrustes(X = mds.alt, Y = mds.null)  #>  #> Number of objects: 24    Number of dimensions: 2  #>  #> Procrustes sum of squares:   #>  11.17448  #> Procrustes root mean squared error:  #>  0.6823512  #> Quantiles of Procrustes errors: #>       Min        1Q    Median        3Q       Max  #> 0.1642438 0.2425785 0.2783603 0.4983976 2.4447632  #>  #> Rotation matrix: #>            [,1]        [,2] #> [1,] 0.99937107 -0.03546065 #> [2,] 0.03546065  0.99937107 #>  #> Translation of averages: #>               [,1]        [,2] #> [1,] -1.713781e-17 1.56769e-17 #>  #> Scaling of target: #> [1] 0.7310245 #>  plot(vare.proc)  plot(vare.proc, kind=2)  residuals(vare.proc) #>        18        15        24        27        23        19        22        16  #> 0.2734040 0.2032392 0.4708118 0.4420710 0.3547337 0.1642438 0.2515286 0.2611623  #>        28        13        14        20        25         7         5         6  #> 0.7773604 0.3075051 0.2833167 0.1749943 0.2684784 0.5167965 0.9747233 0.2437827  #>         3         4         2         9        12        10        11        21  #> 0.2252071 0.7586954 2.4447632 0.2389659 0.2093104 0.2597721 0.4922646 1.0884414  ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":null,"dir":"Reference","previous_headings":"","what":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data log transformed abundances aquatic invertebrate   twelve ditches studied eleven times insecticide   treatment.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"","code":"data(pyrifos)"},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data frame 132 observations log-transformed (log(10*x + 1)) abundances   178 species. twelve sites (ditches, mesocosms),   studied repeatedly eleven occasions. treatment   levels, treatment times, ditch ID's data frame,   data regular, example shows obtain   external variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data set obtained experiment outdoor   experimental ditches. Twelve mesocosms allocated random   treatments; four served controls, remaining eight    treated insecticide chlorpyrifos, nominal dose   levels 0.1, 0.9, 6, 44  \\(\\mu\\)g/ L two mesocosms   . example data set invertebrates.   Sampling done 11 times, week -4 pre-treatment   week 24 post-treatment, giving total 132 samples (12 mesocosms   times 11 sampling dates), see van den Brink & ter Braak (1999)   details. data set contains species data,   example shows obtain treatment, time   ditch ID variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"CANOCO 4 example data, permission Cajo J. F. ter Braak.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"van den Brink, P.J. & ter Braak, C.J.F. (1999). Principal response   curves: Analysis time-dependent multivariate responses   biological community stress. Environmental Toxicology   Chemistry, 18, 138--148.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"","code":"data(pyrifos) ditch <- gl(12, 1, length=132) week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))"},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Rank -- Abundance or Dominance / Diversity Models — radfit","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Functions construct rank -- abundance dominance / diversity   Whittaker plots fit brokenstick, preemption, log-Normal,   Zipf Zipf-Mandelbrot models species abundance.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"","code":"# S3 method for default radfit(x, ...) rad.null(x, family=poisson, ...) rad.preempt(x, family = poisson, ...) rad.lognormal(x, family = poisson, ...) rad.zipf(x, family = poisson, ...) rad.zipfbrot(x, family = poisson, ...) # S3 method for radline predict(object, newdata, total, ...) # S3 method for radfit plot(x, BIC = FALSE, legend = TRUE, ...) # S3 method for radfit.frame plot(x, order.by, BIC = FALSE, model, legend = TRUE,      as.table = TRUE, ...) # S3 method for radline plot(x, xlab = \"Rank\", ylab = \"Abundance\", type = \"b\", ...) radlattice(x, BIC = FALSE, ...) # S3 method for radfit lines(x, ...) # S3 method for radfit points(x, ...) as.rad(x) # S3 method for rad plot(x, xlab = \"Rank\", ylab = \"Abundance\", log = \"y\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"x Data frame, matrix vector giving species abundances, object     plotted. family Error distribution (passed glm).     alternatives accepting link = \"log\" family     can used, although make sense. object fitted result object. newdata Ranks used ordinations. models can     interpolate non-integer “ranks” (although may     approximate), extrapolation may fail total new total used predicting abundance. Observed     total count used omitted. order.vector used ordering sites plots. BIC Use Bayesian Information Criterion, BIC, instead     Akaike's AIC. penalty BIC \\(k = \\log(S)\\)  \\(S\\) number species, whereas AIC uses     \\(k = 2\\). model Show specified model. missing, AIC used     select model. model names (can abbreviated)     Null, Preemption, Lognormal, Zipf,     Mandelbrot. legend Add legend line colours. .table Arrange panels starting upper left corner (passed     xyplot). xlab,ylab Labels x y axes. type Type plot, \"b\" plotting observed points     fitted lines, \"p\" points, \"l\"     fitted lines, \"n\" setting frame. log Use logarithmic scale given axis. default     log = \"y\" gives traditional plot community ecology     preemption model straight line,     log = \"xy\" Zipf model straight line.     log = \"\" axes original arithmetic scale. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Rank--Abundance Dominance (RAD) Dominance/Diversity plots   (Whittaker 1965) display logarithmic species abundances   species rank order. plots supposed effective   analysing types abundance distributions communities.   functions fit popular models mainly following   Wilson (1991). Functions rad.null, rad.preempt, rad.lognormal,   rad.zipf zipfbrot fit individual models   (described ) single vector (row data frame),   function radfit fits models. argument function   radfit can either vector single community data   frame row represents distinct community. Function rad.null fits brokenstick model expected   abundance species rank \\(r\\) \\(a_r = (J/S)   \\sum_{x=r}^S (1/x)\\) (Pielou   1975), \\(J\\) total number individuals (site total)   \\(S\\) total number species community.    gives Null model individuals randomly distributed   among observed species, fitted parameters.   Function rad.preempt fits niche preemption model,   .k.. geometric series Motomura model, expected   abundance \\(\\) species rank \\(r\\) \\(a_r = J \\alpha   (1 - \\alpha)^{r-1}\\).   estimated parameter preemption coefficient \\(\\alpha\\)   gives decay rate abundance per rank.  niche preemption   model straight line RAD plot.  Function   rad.lognormal fits log-Normal model assumes   logarithmic abundances distributed Normally, \\(a_r = \\exp(   \\log \\mu + \\log \\sigma N)\\),   \\(N\\) Normal deviate.  Function rad.zipf fits   Zipf model \\(a_r = J p_1 r^\\gamma\\)   \\(p_1\\) fitted proportion abundant species,   \\(\\gamma\\) decay coefficient. Zipf--Mandelbrot model   (rad.zipfbrot) adds one parameter: \\(a_r = J c (r +   \\beta)^\\gamma\\) \\(p_1\\)   Zipf model changes meaningless scaling constant   \\(c\\). Log-Normal Zipf models generalized linear models   (glm) logarithmic link function.  Zipf--Mandelbrot   adds one nonlinear parameter Zipf model, fitted using   nlm nonlinear parameter estimating   parameters log-Likelihood glm. Preemption   model fitted purely nonlinear model. estimated   parameters Null model. default family poisson   appropriate genuine counts (integers), families   accept link = \"log\" can used. Families   Gamma gaussian may appropriate   abundance data, cover. best model selected   AIC. Therefore ‘quasi’ families   quasipoisson used:   AIC log-Likelihood needed non-linear models. functions plot functions.   radfit applied data frame, plot uses   Lattice graphics, plot   functions use ordinary graphics. ordinary graphics functions   return invisibly ordiplot object observed points,   function identify.ordiplot can used label   selected species.  Alternatively, radlattice uses   Lattice graphics display radfit   model single site separate panel together AIC   BIC values. Function .rad base function construct ordered RAD   data. plot used RAD plot functions   pass extra arguments (xlab log)   function. function returns ordered vector taxa   occurring site, corresponding attribute \"index\"   included taxa.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Functions rad.null, rad.preempt, rad.lognormal,  zipf zipfbrot fit single RAD model   single site. result object class \"radline\"   inherits glm, can handled (  ) glm methods. Function radfit fits models either single site   rows data frame matrix. fitted single site,   function returns object class \"radfit\" items  y (observed values), family, models list fitted \"radline\" models.  applied   data frame matrix, radfit function returns object   class \"radfit.frame\" list \"radfit\" objects, item names corresponding row name. result objects (\"radline\", \"radfit\",  \"radfit.frame\") can accessed method functions.   following methods available: AIC,  coef, deviance, logLik.   addition fit results can accessed fitted,  predict residuals (inheriting  residuals.glm). graphical functions discussed   Details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Pielou, E.C. (1975) Ecological Diversity. Wiley & Sons. Preston, F.W. (1948) commonness rarity   species. Ecology 29, 254--283. Whittaker, R. H. (1965) Dominance diversity plant   communities. Science 147, 250--260. Wilson, J. B. (1991) Methods fitting dominance/diversity   curves. Journal Vegetation Science 2, 35--46.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"RAD models usually fitted proportions instead original   abundances. However, nothing models seems require division   abundances site totals, original observations used   functions. wish use proportions, must standardize   data site totals, e.g. decostand use   appropriate family Gamma. lognormal model fitted standard way, think   quite correct -- least equivalent fitting Normal   density log abundances like originally suggested (Preston 1948). models may fail. particular, estimation Zipf-Mandelbrot   model difficult.  fitting fails, NA returned. Wilson (1991) defined preemption model \\(a_r = J p_1 (1     - \\alpha)^{r-1}\\), \\(p_1\\)     fitted proportion first species. However, parameter     \\(p_1\\) completely defined \\(\\alpha\\) since fitted     proportions must add one, therefore handle preemption     one-parameter model. Veiled log-Normal model included earlier releases     function, removed flawed: implicit veil     line also appears ordinary log-Normal. latest release version     rad.veil 1.6-10.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"","code":"data(BCI) mod <- rad.lognormal(BCI[5,]) mod #>  #> RAD model: Log-Normal  #> Family: poisson  #> No. of species:  101  #> Total abundance: 505  #>  #>     log.mu  log.sigma   Deviance        AIC        BIC  #>   0.951926   1.165929  17.077549 317.656487 322.886728  plot(mod)  mod <- radfit(BCI[1,]) ## Standard plot overlaid for all models ## Preemption model is a line plot(mod)  ## log for both axes: Zipf model is a line plot(mod, log = \"xy\")  ## Lattice graphics separately for each model radlattice(mod)  # Take a subset of BCI to save time and nerves mod <- radfit(BCI[3:5,]) mod #>  #> Deviance for RAD models: #>  #>                  3       4      5 #> Null       86.1127 49.8111 80.855 #> Preemption 58.9295 39.7817 76.311 #> Lognormal  29.2719 16.6588 17.078 #> Zipf       50.1262 47.9108 30.936 #> Mandelbrot  5.7342  5.5665 10.573 plot(mod, pch=\".\")"},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares Dissimilarity Indices for Gradient Detection — rankindex","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Rank correlations dissimilarity indices   gradient separation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"","code":"rankindex(grad, veg, indices = c(\"euc\", \"man\", \"gow\", \"bra\", \"kul\"),           stepacross = FALSE, method = \"spearman\",      metric = c(\"euclidean\", \"mahalanobis\", \"manhattan\", \"gower\"),     ...)"},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"grad gradient variable matrix. veg community data matrix. indices Dissimilarity indices compared, partial matches     alternatives vegdist.     Alternatively, can (named) list functions returning     objects class 'dist'. stepacross Use stepacross find     shorter path dissimilarity. dissimilarities site pairs     shared species set NA using     .shared indices fixed     upper limit can also analysed. method Correlation method used. metric Metric evaluate gradient separation. See Details. ... parameters stepacross.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"good dissimilarity index multidimensional scaling   high rank-order similarity gradient separation.  function   compares indices vegdist gradient   separation using rank correlation coefficients   cor. gradient separation point   assessed using given metric. default use Euclidean   distance continuous variables scaled unit variance, use   Gower metric mixed data using function   daisy grad factors.   alternatives Mahalanabis distances based   grad matrix scaled columns orthogonal   (uncorrelated) unit variance, Manhattan distances   grad variables scaled unit range. indices argument can accept dissimilarity    indices besides ones calculated    vegdist function. , argument value   (possibly named) list functions.   function must return valid 'dist' object dissimilarities,   similarities accepted converted dissimilarities   beforehand.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Returns named vector rank correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Faith, F.P., Minchin, P.R. Belbin,   L. (1987).  Compositional dissimilarity robust measure     ecological distance. Vegetatio 69, 57-68.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Jari Oksanen, additions Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"several problems using rank correlation coefficients.   Typically many ties \\(n(n-1)/2\\) gradient   separation values derived just \\(n\\) observations.   Due floating point arithmetics, many tied values differ   machine epsilon arbitrarily ranked differently   rank used cor.test.  Two indices   identical certain   transformation standardization may differ slightly   (magnitude \\(10^{-15}\\)) may lead third fourth decimal   instability rank correlations.  Small differences rank   correlations taken seriously.  Probably method   replaced sounder method, yet know   ...  may experiment mantel,   anosim even protest. Earlier version function used method = \"kendall\",   far slow large data sets. functions returning dissimilarity objects self contained,   ... argument passes additional parameters   stepacross functions supplied   via indices argument.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"","code":"data(varespec) data(varechem) ## The variables are automatically scaled rankindex(varechem, varespec) #>       euc       man       gow       bra       kul  #> 0.2396330 0.2735087 0.2288358 0.2837910 0.2839834  rankindex(varechem, wisconsin(varespec)) #>       euc       man       gow       bra       kul  #> 0.4200990 0.4215642 0.3708606 0.4215642 0.4215642  ## Using non vegdist indices as functions funs <- list(Manhattan=function(x) dist(x, \"manhattan\"),     Gower=function(x) cluster:::daisy(x, \"gower\"),     Ochiai=function(x) designdist(x, \"1-J/sqrt(A*B)\")) rankindex(scale(varechem), varespec, funs) #> Manhattan     Gower    Ochiai  #> 0.2735087 0.2288358 0.1696862"},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":null,"dir":"Reference","previous_headings":"","what":"Rarefaction Species Richness — rarefy","title":"Rarefaction Species Richness — rarefy","text":"Rarefied species richness community ecologists.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rarefaction Species Richness — rarefy","text":"","code":"rarefy(x, sample, se = FALSE, MARGIN = 1) rrarefy(x, sample) drarefy(x, sample) rarecurve(x, step = 1, sample, xlab = \"Sample Size\", ylab = \"Species\",           label = TRUE, col, lty, tidy = FALSE, ...) rareslope(x, sample)"},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rarefaction Species Richness — rarefy","text":"x Community data, matrix-like object vector. MARGIN Margin index computed. sample Subsample size rarefying community, either single     value vector. se Estimate standard errors. step Step size sample sizes rarefaction curves. xlab, ylab Axis labels plots rarefaction curves. label Label rarefaction curves rownames x     (logical). col, lty plotting colour line type, see     par. Can vector length nrow(x), one per     sample, extended length internally. tidy Instead drawing plot, return “tidy”     data frame can used ggplot2 graphics. data     frame variables Site (factor), Sample     Species. ... Parameters passed nlm, plot,     lines ordilabel rarecurve.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rarefaction Species Richness — rarefy","text":"Function rarefy gives expected species richness random   subsamples size sample community. size   sample smaller total community size,   function work larger sample well (warning)   return non-rarefied species richness (standard error =   0). sample vector, rarefaction observations   performed sample size separately.  Rarefaction can   performed genuine counts individuals.  function   rarefy based Hurlbert's (1971) formulation,   standard errors Heck et al. (1975). Function rrarefy generates one randomly rarefied community   data frame vector given sample size. sample   can vector giving sample sizes row.    sample size equal larger observed number   individuals, non-rarefied community returned.    random rarefaction made without replacement variance   rarefied communities rather related rarefaction proportion   size sample. Random rarefaction   sometimes used remove effects different sample   sizes. usually bad idea: random rarefaction discards valid   data, introduces random error reduces quality data   (McMurdie & Holmes 2014). better use normalizing   transformations (decostand vegan) possible   variance stabilization (decostand   dispweight vegan) methods   sensitive sample sizes. Function drarefy returns probabilities species occur   rarefied community size sample. sample can   vector giving sample sizes row. sample   equal larger observed number individuals,   observed species sampling probability 1. Function rarecurve draws rarefaction curve row   input data. rarefaction curves evaluated using   interval step sample sizes, always including 1 total   sample size.  sample specified, vertical line   drawn sample horizontal lines rarefied   species richnesses. Function rareslope calculates slope rarecurve   (derivative rarefy) given sample size;   sample need integer. Rarefaction functions used observed counts.   think necessary use multiplier data, rarefy first   multiply. Removing rare species rarefaction can also   give biased results. Observed count data normally include singletons   (species count 1), missing, functions issue   warnings. may false positives, recommended   check observed counts multiplied rare taxa   removed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rarefaction Species Richness — rarefy","text":"vector rarefied species richness values. single  sample se = TRUE, function rarefy returns   2-row matrix rarefied richness (S) standard error   (se). sample vector rarefy,   function returns matrix column sample size,   se = TRUE, rarefied richness standard error   consecutive lines. Function rarecurve returns invisible list  rarefy results corresponding drawn curve. Alternatively,   tidy = TRUE returns data frame can used  ggplot2 graphics.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Rarefaction Species Richness — rarefy","text":"Heck, K.L., van Belle, G. & Simberloff, D. (1975). Explicit   calculation rarefaction diversity measurement   determination sufficient sample size. Ecology 56,   1459--1461. Hurlbert, S.H. (1971). nonconcept species diversity: critique   alternative parameters. Ecology 52, 577--586. McMurdie, P.J. & Holmes, S. (2014). Waste , want :   rarefying microbiome data inadmissible. PLoS Comput Biol   10(4): e1003531. doi:10.1371/journal.pcbi.1003531","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rarefaction Species Richness — rarefy","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rarefaction Species Richness — rarefy","text":"","code":"data(BCI) S <- specnumber(BCI) # observed number of species (raremax <- min(rowSums(BCI))) #> [1] 340 Srare <- rarefy(BCI, raremax) plot(S, Srare, xlab = \"Observed No. of Species\", ylab = \"Rarefied No. of Species\") abline(0, 1)  rarecurve(BCI, step = 20, sample = raremax, col = \"blue\", cex = 0.6)"},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":null,"dir":"Reference","previous_headings":"","what":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Function finds Raup-Crick dissimilarity   probability number co-occurring species species   occurrence probabilities proportional species frequencies.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"","code":"raupcrick(comm, null = \"r1\", nsimul = 999, chase = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"comm Community data treated presence/absence data. null Null model used method      oecosimu. nsimul Number null communities assessing      dissimilarity index. chase Use Chase et al. (2011) method tie handling (     recommended except comparing results Chase      script). ... parameters passed oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Raup-Crick index probability compared sampling   units non-identical species composition.  probability can   regarded dissimilarity, although metric: identical   sampling units can dissimilarity slightly \\(0\\),   dissimilarity can nearly zero range shared species,   sampling units shared species can dissimilarity   slightly \\(1\\). Moreover, communities sharing rare species   appear similar (lower probability finding rare species   together), communities sharing number common   species. function always treat data binary (presence/   absence). probability assessed using simulation   oecosimu test statistic observed   number shared species sampling units evaluated   community null model (see Examples).  default null model   \"r1\" probability selecting species   proportional species frequencies. vegdist function implements variant   Raup-Crick index equal sampling probabilities species using   exact analytic equations without simulation. corresponds   null model \"r0\" also can used   current function.  null model methods   oecosimu can used current function,   new unpublished methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"function returns object inheriting  dist can interpreted dissimilarity   matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Chase, J.M., Kraft, N.J.B., Smith, K.G., Vellend, M. Inouye,   B.D. (2011). Using null models disentangle variation community   dissimilarity variation \\(\\alpha\\)-diversity.   Ecosphere 2:art24 doi:10.1890/ES10-00117.1","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"function developed Brian Inouye contacted us   informed us method Chase et al. (2011),   function takes idea code published   paper. current function written Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"test statistic number shared species,   typically tied large number simulation results. tied   values handled differently current function   function published Chase et al. (2011). vegan,   index number simulated values smaller   equal observed value, smaller observed value   used Chase et al. (2011) option split = FALSE   script; can achieved chase = TRUE   vegan.  Chase et al. (2011) script split = TRUE   uses half tied simulation values calculate distance measure,   choice directly reproduced vegan (  average vegan raupcrick results    chase = TRUE chase = FALSE).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"","code":"## data set with variable species richness data(sipoo) ## default raupcrick dr1 <- raupcrick(sipoo) ## use null model \"r0\" of oecosimu dr0 <- raupcrick(sipoo, null = \"r0\") ## vegdist(..., method = \"raup\") corresponds to 'null = \"r0\"' d <- vegdist(sipoo, \"raup\") op <- par(mfrow=c(2,1), mar=c(4,4,1,1)+.1) plot(dr1 ~ d, xlab = \"Raup-Crick with Null R1\", ylab=\"vegdist\") plot(dr0 ~ d, xlab = \"Raup-Crick with Null R0\", ylab=\"vegdist\")  par(op)  ## The calculation is essentially as in the following oecosimu() call, ## except that designdist() is replaced with faster code if (FALSE)  oecosimu(sipoo, function(x) designdist(x, \"J\", \"binary\"), method = \"r1\")"},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads a CEP (Canoco) data file — read.cep","title":"Reads a CEP (Canoco) data file — read.cep","text":"read.cep reads file formatted relaxed strict CEP format   used Canoco software, among others.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads a CEP (Canoco) data file — read.cep","text":"","code":"read.cep(file, positive=TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads a CEP (Canoco) data file — read.cep","text":"file File name (character variable). positive positive entries, like community data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reads a CEP (Canoco) data file — read.cep","text":"Cornell Ecology Programs (CEP) introduced several data formats   designed punched cards.  One ‘condensed   strict’ format adopted popular software DECORANA   TWINSPAN. relaxed variant format later adopted   Canoco software (ter Braak 1984). Function read.cep reads   legacy files written format. condensed CEP CANOCO formats : Two three title cards, importantly specifying format       number items per record. Data condensed format: First number line       site identifier (integer), followed pairs       (‘couplets’) numbers identifying species       abundance (integer floating point number). Species site names, given Fortran format (10A8):       Ten names per line, eight columns . option positive = TRUE function removes rows   columns zero negative marginal sums.  community data   positive entries, removes empty sites species.   data entries can negative, ruins data, data sets   read option positive = FALSE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads a CEP (Canoco) data file — read.cep","text":"Returns data frame, columns species rows   sites. Column row names taken CEP file, changed   unique R names make.names stripping blanks.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Reads a CEP (Canoco) data file — read.cep","text":"ter Braak, C.J.F. (1984--): CANOCO -- FORTRAN program canonical   community ordination [partial] [detrended] [canonical]   correspondence analysis, principal components analysis redundancy   analysis. TNO Inst. Applied Computer Sci., Stat. Dept. Wageningen,   Netherlands.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reads a CEP (Canoco) data file — read.cep","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Reads a CEP (Canoco) data file — read.cep","text":"Function read.cep used Fortran read data vegan   2.4-5 earlier, Fortran /O longer allowed CRAN   packages, function re-written R. original   Fortran code robust, several legacy data sets   may fail current version, read   previous Fortran version. CRAN package cepreader makes   available original Fortran-based code run separate   subprocess. cepreader package can also read ‘free’   ‘open’ Canoco formats handled   function. function based read.fortran.   REAL format defines decimal part species abundances   (F5.1), read.fortran divides   input corresponding power 10 even input data   explicit decimal separator. F5.1, 100 become   10, 0.1 become 0.01. Function read.cep tries undo   division, check scaling results reading   data, necessary, multiply results original scale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads a CEP (Canoco) data file — read.cep","text":"","code":"## Provided that you have the file \"dune.spe\" if (FALSE) { theclassic <- read.cep(\"dune.spe\")}"},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":null,"dir":"Reference","previous_headings":"","what":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Function renyi  find Rényi diversities   scale corresponding Hill number (Hill 1973).  Function   renyiaccum finds statistics accumulating sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"","code":"renyi(x, scales = c(0, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, Inf),    hill = FALSE) # S3 method for renyi plot(x, ...) renyiaccum(x, scales = c(0, 0.5, 1, 2, 4, Inf), permutations = 100,     raw = FALSE, collector = FALSE, subset, ...) # S3 method for renyiaccum plot(x, what = c(\"Collector\", \"mean\", \"Qnt 0.025\", \"Qnt 0.975\"),     type = \"l\",     ...) # S3 method for renyiaccum persp(x, theta = 220, col = heat.colors(100), zlim, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"x Community data matrix plotting object. scales Scales Rényi diversity. hill Calculate Hill numbers. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,     permutation matrix row gives permuted indices. raw FALSE return summary statistics     permutations, TRUE returns individual     permutations. collector Accumulate diversities order sites     data set, collector curve can plotted     summary permutations. argument ignored raw = TRUE. subset logical expression indicating sites (rows) keep: missing     values taken FALSE. Items plotted. type Type plot, type = \"l\" means lines. theta Angle defining viewing direction (azimuthal)     persp. col Colours used surface. Single colour passed ,     vector colours     selected midpoint rectangle persp. zlim Limits vertical axis. ... arguments passed renyi     graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Common diversity indices special cases   Rényi diversity   $$H_a = \\frac{1}{1-} \\log \\sum p_i^$$   \\(\\) scale parameter, Hill (1975) suggested   use -called ‘Hill numbers’ defined \\(N_a = \\exp(H_a)\\).  Hill numbers number species   \\(= 0\\), \\(\\exp(H')\\) exponent Shannon   diversity \\(= 1\\), inverse Simpson \\(= 2\\)   \\(1/ \\max(p_i)\\) \\(= \\infty\\). According   theory diversity ordering, one community can regarded   diverse another Rényi diversities higher   (Tóthmérész  1995). plot method renyi uses lattice graphics,   displays diversity values scale separate panel   site together minimum, maximum median values   complete data. Function renyiaccum similar specaccum   finds Rényi Hill diversities given scales   random permutations accumulated sites.  plot   function uses lattice function xyplot   display accumulation curves value scales   separate panel.  addition, persp method   plot diversity surface scale number   sites. Similar dynamic graphics can made   rgl.renyiaccum vegan3d package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Function renyi returns data frame selected   indices.  Function renyiaccum argument raw = FALSE returns three-dimensional array, first dimension   accumulated sites, second dimension diversity scales,   third dimension summary statistics mean, stdev,  min, max, Qnt 0.025 Qnt 0.975.    argument raw = TRUE statistics third dimension   replaced individual permutation results.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Hill, M.O. (1973). Diversity evenness: unifying notation    consequences. Ecology 54, 427--473. Kindt, R., Van Damme, P., Simons, .J. (2006). Tree diversity western    Kenya: using profiles characterise richness    evenness. Biodiversity Conservation 15, 1253--1270. Tóthmérész, B. (1995). Comparison different methods diversity    ordering. Journal Vegetation Science 6, 283--290.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Roeland Kindt Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"","code":"data(BCI) i <- sample(nrow(BCI), 12) mod <- renyi(BCI[i,]) plot(mod)  mod <- renyiaccum(BCI[i,]) plot(mod, as.table=TRUE, col = c(1, 2, 2))  persp(mod)"},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Reorder a Hierarchical Clustering Tree — reorder.hclust","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Function takes hierarchical clustering tree   hclust vector values reorders   clustering tree order supplied vector, maintaining   constraints tree. method generic function   reorder alternative reordering   \"dendrogram\" object reorder.dendrogram","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"","code":"# S3 method for hclust reorder(x, wts,     agglo.FUN = c(\"mean\", \"min\", \"max\", \"sum\", \"uwmean\"), ...) # S3 method for hclust rev(x) # S3 method for hclust scores(x, display = \"internal\", ...) cutreeord(tree, k = NULL, h = NULL)"},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"x, tree hierarchical clustering hclust. wts numeric vector reordering. agglo.FUN function weights agglomeration, see . display return \"internal\" nodes \"terminal\" nodes (also   called \"leaves\"). k, h scalars vectors giving numbers desired groups heights   tree cut (passed function   cutree). ... additional arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Dendrograms can ordered many ways. reorder function   reorders hclust tree provides alternative   reorder.dendrogram can reorder   dendrogram. current function also work   differently agglo.FUN \"mean\":   reorder.dendrogram always take direct mean   member groups ignoring sizes, function used   weighted.mean weighted group sizes,   group mean always mean member leaves (terminal nodes).   want ignore group sizes, can use unweighted mean   \"uwmean\". function accepts limited list agglo.FUN   functions assessing value wts groups.   ordering always ascending, order leaves can   reversed rev. Function scores finds coordinates nodes two-column   matrix. terminal nodes (leaves) value item   merged tree, labels can still hang   level (see plot.hclust). Function cutreeord cuts tree groups numbered left   right tree. based standard function   cutree numbers groups order appear   input data instead order tree.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Reordered hclust result object added item  value gives value statistic merge   level.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"functions really base R.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"","code":"## reorder by water content of soil data(mite, mite.env) hc <- hclust(vegdist(wisconsin(sqrt(mite)))) ohc <- with(mite.env, reorder(hc, WatrCont)) plot(hc)  plot(ohc)   ## label leaves by the observed value, and each branching point ## (internal node) by the cluster mean with(mite.env, plot(ohc, labels=round(WatrCont), cex=0.7)) ordilabel(scores(ohc), label=round(ohc$value), cex=0.7)   ## Slightly different from reordered 'dendrogram' which ignores group ## sizes in assessing means. den <- as.dendrogram(hc) den <- with(mite.env, reorder(den, WatrCont, agglo.FUN = mean)) plot(den)"},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Species or Site Scores from an Ordination — scores","title":"Get Species or Site Scores from an Ordination — scores","text":"Function access either species site scores specified axes   ordination methods. scores function generic   vegan, vegan ordination functions   scores functions documented separately   method (see e.g. scores.cca,   scores.metaMDS, scores.decorana).   help file documents default scores method   used non-vegan ordination objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Species or Site Scores from an Ordination — scores","text":"","code":"# S3 method for default scores(x, choices,     display=c(\"sites\", \"species\", \"both\"), tidy = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Species or Site Scores from an Ordination — scores","text":"x ordination result. choices Ordination axes.  missing, default method returns axes. display Partial match access scores \"sites\"     \"species\" \"\". tidy Return \"\" scores data frame     compatible ggplot2, variable score     labelling scores \"sites\" \"species\". ... parameters (unused).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Species or Site Scores from an Ordination — scores","text":"Function scores generic method vegan. Several   vegan functions scores methods   defaults new arguments. help page describes   default method. methods, see, e.g.,   scores.cca, scores.rda,   scores.decorana. vegan ordination functions scores   method used extract scores instead   directly accessing . Scaling transformation scores   also happen scores function. scores   function available, results can plotted using   ordiplot, ordixyplot etc.,   ordination results can compared procrustes   analysis. scores.default function used extract scores   non-vegan ordination results.  Many standard ordination   methods libraries specific class,   specific method can written .  However,   scores.default guesses commonly used functions   keep site scores possible species scores. x matrix, scores.default returns chosen   columns matrix, ignoring whether species sites   requested (regard bug feature, please).   Currently function seems work least isoMDS,   prcomp, princomp ade4 objects.    may work cases fail mysteriously.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Species or Site Scores from an Ordination — scores","text":"function returns matrix scores one type requested,   named list matrices display = \"\",  ggplot2 compatible data frame tidy = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Species or Site Scores from an Ordination — scores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Species or Site Scores from an Ordination — scores","text":"","code":"data(varespec) vare.pca <- prcomp(varespec) scores(vare.pca, choices=c(1,2)) #>            PC1         PC2 #> 18 -10.7847878  18.7094315 #> 15 -27.8036826 -11.7414745 #> 24 -25.6919559 -14.5399684 #> 27 -31.7820166 -31.2216800 #> 23 -19.6315869  -2.5541193 #> 19  -0.2413294 -11.4974077 #> 22 -26.6771373 -12.3140897 #> 16 -21.9230366   0.4449159 #> 28 -39.6083051 -41.8877392 #> 13  -4.0664328  20.4191153 #> 14 -18.4416245   5.4406988 #> 20 -17.3999191   2.3653380 #> 25 -25.1673547 -13.2508067 #> 7  -11.4065430  41.7356300 #> 5   -8.4243752  45.3805255 #> 6   -2.0759474  36.9311222 #> 3   39.8617580   8.0590041 #> 4   13.1065901  12.8377217 #> 2   57.6827011  -4.8983565 #> 9   63.3138332 -22.4481549 #> 12  44.1073111 -10.1653935 #> 10  64.9418975 -16.7633564 #> 11  11.5313633   3.9720890 #> 21  -3.4194194  -3.0130455"},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Screeplot methods plotting variances ordination axes/components   overlaying broken stick distributions. Also, provides alternative   screeplot methods princomp prcomp.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"","code":"# S3 method for cca screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, if (is.null(x$CCA) || x$CCA$rank == 0) x$CA$rank else x$CCA$rank),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for decorana screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = 4,          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for prcomp screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, length(x$sdev)),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for princomp screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, length(x$sdev)),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  bstick(n, ...)  # S3 method for default bstick(n, tot.var = 1, ...)  # S3 method for cca bstick(n, ...)  # S3 method for prcomp bstick(n, ...)  # S3 method for princomp bstick(n, ...)  # S3 method for decorana bstick(n, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"x object component variances can determined. bstick logical; broken stick distribution drawn? npcs number components plotted. type type plot. ptype type == \"lines\" bstick = TRUE,     character indicating type plotting used lines;     actually types plot.default. bst.col, bst.lty colour line type used draw     broken stick distribution. xlab, ylab, main graphics parameters. legend logical; draw legend? n object variances can extracted     number variances (components) case     bstick.default. tot.var total variance split. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"functions provide screeplots ordination methods   vegan enhanced versions broken stick   prcomp princomp. Function bstick gives brokenstick values ordered   random proportions, defined  \\(p_i = (tot/n) \\sum_{x=}^n      (1/x)\\) (Legendre & Legendre 2012),   \\(tot\\) total  \\(n\\) number brokenstick   components (cf. radfit).  Broken stick   recommended stopping rule principal component analysis   (Jackson 1993): principal components retained long   observed eigenvalues higher corresponding random broken stick   components. bstick function generic. default needs number   components total, specific methods extract   information ordination results.  also bstick   method cca.  However, broken stick model   strictly valid correspondence analysis (CA), eigenvalues   CA defined \\(\\leq 1\\), whereas brokenstick   components restrictions. brokenstick components   detrended correspondence analysis (DCA) assume input data   full rank, additive eigenvalues used screeplot (see   decorana).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Function screeplot draws plot currently active device,    returns invisibly xy.coords points   bars eigenvalues. Function bstick returns numeric vector broken stick   components.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Jackson, D. . (1993). Stopping rules principal components   analysis: comparison heuristical statistical   approaches. Ecology 74, 2204--2214. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Gavin L. Simpson","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"","code":"data(varespec) vare.pca <- rda(varespec, scale = TRUE) bstick(vare.pca) #>       PC1       PC2       PC3       PC4       PC5       PC6       PC7       PC8  #> 7.1438620 5.2308185 4.2742968 3.6366156 3.1583548 2.7757461 2.4569055 2.1836136  #>       PC9      PC10      PC11      PC12      PC13      PC14      PC15      PC16  #> 1.9444831 1.7319228 1.5406184 1.3667054 1.2072851 1.0601279 0.9234819 0.7959457  #>      PC17      PC18      PC19      PC20      PC21      PC22      PC23  #> 0.6763805 0.5638485 0.4575683 0.3568818 0.2612296 0.1701323 0.0831758  screeplot(vare.pca, bstick = TRUE, type = \"lines\")"},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity Percentages — simper","title":"Similarity Percentages — simper","text":"Discriminating species two groups using   Bray-Curtis dissimilarities","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity Percentages — simper","text":"","code":"simper(comm, group, permutations = 999, parallel = 1, ...) # S3 method for simper summary(object, ordered = TRUE,     digits = max(3,getOption(\"digits\") - 3), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity Percentages — simper","text":"comm Community data. group Factor describing group structure.     missing one level, contributions estimated     non-grouped data dissimilarities show overall     heterogeneity species abundances. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. object object returned simper. ordered Logical; species ordered     average contribution? digits Number digits output. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. (yet implemented). ... Parameters passed functions. simper     extra parameters passed shuffleSet     permutations used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Similarity Percentages — simper","text":"Similarity percentage, simper (Clarke 1993) based   decomposition Bray-Curtis dissimilarity index (see   vegdist, designdist). contribution   individual species \\(\\) overall Bray-Curtis dissimilarity   \\(d_{jk}\\) given $$d_{ijk} = \\frac{|x_{ij}-x_{ik}|}{\\sum_{=1}^S (x_{ij}+x_{ik})}$$ \\(x\\) abundance species \\(\\) sampling units   \\(j\\) \\(k\\). overall index sum individual   contributions \\(S\\) species    \\(d_{jk}=\\sum_{=1}^S d_{ijk}\\). simper functions performs pairwise comparisons groups   sampling units finds contribution species   average -group Bray-Curtis dissimilarity. Although method   called “Similarity Percentages”, really studied   dissimilarities instead similarities (Clarke 1993). function displays important species pair   groups.  species contribute least 70 %   differences groups.  function returns much   extensive results (including species) can accessed   directly result object (see section Value). Function   summary transforms result list data frames.   argument ordered = TRUE data frames also include   cumulative contributions ordered species contribution. results simper can difficult interpret   often misunderstood even publications. method gives   contribution species overall dissimilarities,   caused variation species abundances, partly   differences among groups.  Even make groups   copies , method single species high   contribution, contributions non-existing   -group differences random noise variation species   abundances. abundant species usually highest   variances, high contributions even   differ among groups. Permutation tests study differences among   groups, can used find species   differences among groups important component   contribution dissimilarities. Analysis without group   argument find species contributions average overall   dissimilarity among sampling units. non-grouped contributions   can compared grouped contributions see much added value   grouping species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Similarity Percentages — simper","text":"list class \"simper\" following items: species species names. average Species contribution average -group dissimilarity. overall average -group dissimilarity. sum     item average. sd Standard deviation contribution. ratio Average sd ratio. ava, avb Average abundances per group. ord index vector order vectors contribution     order cusum back original data order. cusum Ordered cumulative contribution. based item     average, sum total 1. p Permutation \\(p\\)-value. Probability getting larger     equal average contribution random permutation group     factor. area available permutations used     (default: calculated).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Similarity Percentages — simper","text":"Eduard Szöcs Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Similarity Percentages — simper","text":"Clarke, K.R. 1993. Non-parametric multivariate analyses changes     community structure. Australian Journal Ecology, 18,     117–143.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Similarity Percentages — simper","text":"","code":"data(dune) data(dune.env) (sim <- with(dune.env, simper(dune, Management, permutations = 99))) #> cumulative contributions of most influential species: #>  #> $SF_BF #>   Agrostol   Alopgeni   Lolipere   Trifrepe    Poatriv   Scorautu   Bromhord  #> 0.09824271 0.18254830 0.25956958 0.33367870 0.40734444 0.47729205 0.53120026  #>   Achimill   Planlanc   Elymrepe   Bracruta  #> 0.57946526 0.62522255 0.67016196 0.71098133  #>  #> $SF_HF #>   Agrostol   Alopgeni   Lolipere   Planlanc   Rumeacet   Elymrepe    Poatriv  #> 0.08350879 0.16534834 0.23934930 0.30843624 0.37716139 0.43334492 0.48351753  #>   Bracruta   Eleopalu    Poaprat   Anthodor   Sagiproc   Trifprat  #> 0.52804045 0.57205850 0.61423981 0.65549838 0.69628951 0.73696831  #>  #> $SF_NM #>   Poatriv  Alopgeni  Agrostol  Lolipere  Eleopalu   Poaprat  Bracruta  Elymrepe  #> 0.1013601 0.1935731 0.2667383 0.3377578 0.3999419 0.4526707 0.5044725 0.5505643  #>  Scorautu  Trifrepe  Sagiproc  Salirepe  #> 0.5926117 0.6320111 0.6712478 0.7091528  #>  #> $BF_HF #>   Rumeacet    Poatriv   Planlanc   Bromhord   Lolipere   Elymrepe   Trifrepe  #> 0.08163219 0.15193797 0.21918333 0.27967181 0.33969561 0.39843338 0.45298204  #>   Anthodor   Achimill   Bracruta   Alopgeni   Trifprat   Juncarti  #> 0.50276849 0.55222648 0.60021994 0.64584333 0.69126471 0.73366621  #>  #> $BF_NM #>  Lolipere   Poatriv   Poaprat  Trifrepe  Bromhord  Bracruta  Eleopalu  Agrostol  #> 0.1242718 0.1992126 0.2711756 0.3414609 0.3958520 0.4448077 0.4910724 0.5369083  #>  Achimill  Scorautu  Anthodor  Planlanc  #> 0.5823926 0.6253645 0.6638182 0.7012577  #>  #> $HF_NM #>    Poatriv   Lolipere   Rumeacet    Poaprat   Planlanc   Bracruta   Eleopalu  #> 0.09913221 0.17468460 0.23917190 0.29701331 0.35469313 0.40365488 0.44804851  #>   Agrostol   Trifrepe   Elymrepe   Anthodor   Juncarti   Trifprat   Salirepe  #> 0.49226546 0.53434466 0.57564661 0.61543243 0.65341300 0.68921695 0.72432408  #>  ## IGNORE_RDIFF_BEGIN summary(sim) #>  #> Contrast: SF_BF  #>  #>          average      sd   ratio     ava     avb cumsum    p   #> Agrostol 0.06137 0.03419 1.79490 4.66700 0.00000  0.098 0.05 * #> Alopgeni 0.05267 0.03648 1.44390 4.33300 0.66700  0.182 0.14   #> Lolipere 0.04812 0.03945 1.21980 3.00000 6.00000  0.260 0.39   #> Trifrepe 0.04630 0.02553 1.81380 1.33300 4.66700  0.334 0.09 . #> Poatriv  0.04602 0.03380 1.36150 4.66700 3.66700  0.407 0.46   #> Scorautu 0.04370 0.02492 1.75340 1.33300 4.33300  0.477 0.04 * #> Bromhord 0.03368 0.02586 1.30230 0.50000 2.66700  0.531 0.02 * #> Achimill 0.03015 0.02082 1.44820 0.16700 2.33300  0.580 0.04 * #> Planlanc 0.02859 0.02155 1.32650 0.00000 2.00000  0.625 0.49   #> Elymrepe 0.02807 0.02978 0.94280 2.00000 1.33300  0.670 0.52   #> Bracruta 0.02550 0.02390 1.06690 2.00000 2.00000  0.711 0.83   #> Poaprat  0.02513 0.02397 1.04850 2.50000 4.00000  0.751 0.82   #> Sagiproc 0.02433 0.02215 1.09830 1.83300 0.66700  0.790 0.39   #> Bellpere 0.01986 0.01709 1.16220 0.66700 1.66700  0.822 0.10 . #> Eleopalu 0.01861 0.04296 0.43330 1.33300 0.00000  0.852 0.82   #> Anthodor 0.01754 0.02580 0.67980 0.00000 1.33300  0.880 0.75   #> Juncbufo 0.01603 0.02371 0.67620 1.16700 0.00000  0.905 0.57   #> Vicilath 0.01467 0.01331 1.10260 0.00000 1.00000  0.929 0.04 * #> Hyporadi 0.01029 0.01520 0.67680 0.00000 0.66700  0.945 0.62   #> Ranuflam 0.00931 0.01360 0.68450 0.66700 0.00000  0.960 0.93   #> Juncarti 0.00698 0.01611 0.43330 0.50000 0.00000  0.972 0.95   #> Callcusp 0.00698 0.01611 0.43330 0.50000 0.00000  0.983 0.79   #> Rumeacet 0.00453 0.01044 0.43330 0.33300 0.00000  0.990 0.95   #> Cirsarve 0.00398 0.00918 0.43360 0.33300 0.00000  0.996 0.37   #> Chenalbu 0.00233 0.00537 0.43330 0.16700 0.00000  1.000 0.41   #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: SF_HF  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Agrostol 0.04738 0.03127 1.51510 4.66700 1.40000  0.084 0.35    #> Alopgeni 0.04643 0.03290 1.41150 4.33300 1.60000  0.165 0.20    #> Lolipere 0.04199 0.02701 1.55460 3.00000 4.00000  0.239 0.75    #> Planlanc 0.03920 0.03321 1.18040 0.00000 3.00000  0.308 0.02 *  #> Rumeacet 0.03899 0.02737 1.42470 0.33300 3.20000  0.377 0.01 ** #> Elymrepe 0.03188 0.02955 1.07870 2.00000 2.00000  0.433 0.30    #> Poatriv  0.02847 0.02152 1.32270 4.66700 4.80000  0.484 1.00    #> Bracruta 0.02526 0.02104 1.20040 2.00000 2.80000  0.528 0.92    #> Eleopalu 0.02497 0.03888 0.64240 1.33300 0.80000  0.572 0.77    #> Poaprat  0.02393 0.01918 1.24780 2.50000 3.40000  0.614 0.98    #> Anthodor 0.02341 0.02143 1.09230 0.00000 1.80000  0.655 0.67    #> Sagiproc 0.02314 0.02048 1.13010 1.83300 0.80000  0.696 0.40    #> Trifprat 0.02308 0.02343 0.98500 0.00000 1.80000  0.737 0.01 ** #> Juncarti 0.02285 0.02568 0.88990 0.50000 1.60000  0.777 0.51    #> Trifrepe 0.02238 0.01949 1.14860 1.33300 2.80000  0.817 0.94    #> Juncbufo 0.02164 0.02224 0.97330 1.16700 1.20000  0.855 0.24    #> Scorautu 0.02051 0.01642 1.24890 1.33300 2.80000  0.891 0.79    #> Achimill 0.01518 0.01139 1.33260 0.16700 1.20000  0.918 0.75    #> Bromhord 0.01338 0.01450 0.92220 0.50000 0.80000  0.941 0.79    #> Ranuflam 0.01066 0.01339 0.79640 0.66700 0.40000  0.960 0.86    #> Bellpere 0.00999 0.01257 0.79480 0.66700 0.40000  0.978 0.84    #> Callcusp 0.00662 0.01508 0.43930 0.50000 0.00000  0.989 0.92    #> Cirsarve 0.00381 0.00867 0.43940 0.33300 0.00000  0.996 0.54    #> Chenalbu 0.00221 0.00503 0.43930 0.16700 0.00000  1.000 0.51    #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Hyporadi 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Vicilath 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: SF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Poatriv  0.07828 0.04095 1.91180 4.66700 0.00000  0.101 0.01 ** #> Alopgeni 0.07122 0.04696 1.51670 4.33300 0.00000  0.194 0.01 ** #> Agrostol 0.05651 0.04418 1.27920 4.66700 2.16700  0.267 0.05 *  #> Lolipere 0.05485 0.05991 0.91550 3.00000 0.33300  0.338 0.15    #> Eleopalu 0.04803 0.04717 1.01820 1.33300 2.16700  0.400 0.04 *  #> Poaprat  0.04072 0.03179 1.28100 2.50000 0.66700  0.453 0.06 .  #> Bracruta 0.04001 0.03440 1.16310 2.00000 2.83300  0.504 0.08 .  #> Elymrepe 0.03560 0.03852 0.92430 2.00000 0.00000  0.551 0.12    #> Scorautu 0.03247 0.03481 0.93280 1.33300 3.16700  0.593 0.13    #> Trifrepe 0.03043 0.03163 0.96190 1.33300 1.83300  0.632 0.59    #> Sagiproc 0.03030 0.03048 0.99430 1.83300 0.50000  0.671 0.02 *  #> Salirepe 0.02928 0.03201 0.91440 0.00000 1.83300  0.709 0.02 *  #> Anthodor 0.02454 0.03669 0.66880 0.00000 1.33300  0.741 0.56    #> Callcusp 0.02276 0.02944 0.77310 0.50000 1.16700  0.770 0.08 .  #> Ranuflam 0.02257 0.02282 0.98890 0.66700 1.33300  0.800 0.08 .  #> Juncarti 0.02254 0.02860 0.78830 0.50000 1.16700  0.829 0.53    #> Hyporadi 0.02011 0.03129 0.64260 0.00000 1.16700  0.855 0.21    #> Juncbufo 0.01986 0.02903 0.68400 1.16700 0.00000  0.881 0.21    #> Planlanc 0.01542 0.02277 0.67720 0.00000 0.83300  0.900 0.98    #> Airaprae 0.01488 0.02188 0.68020 0.00000 0.83300  0.920 0.06 .  #> Bellpere 0.01232 0.01592 0.77370 0.66700 0.33300  0.936 0.72    #> Comapalu 0.01188 0.01741 0.68260 0.00000 0.66700  0.951 0.05 *  #> Achimill 0.00929 0.01493 0.62240 0.16700 0.33300  0.963 0.98    #> Bromhord 0.00717 0.01633 0.43910 0.50000 0.00000  0.972 0.98    #> Rumeacet 0.00559 0.01275 0.43840 0.33300 0.00000  0.980 0.98    #> Empenigr 0.00523 0.01200 0.43540 0.00000 0.33300  0.986 0.29    #> Cirsarve 0.00478 0.01089 0.43910 0.33300 0.00000  0.993 0.02 *  #> Chenalbu 0.00289 0.00660 0.43820 0.16700 0.00000  0.996 0.02 *  #> Vicilath 0.00279 0.00642 0.43450 0.00000 0.16700  1.000 0.81    #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: BF_HF  #>  #>          average      sd   ratio     ava     avb cumsum    p   #> Rumeacet 0.03867 0.02606 1.48380 0.00000 3.20000  0.082 0.03 * #> Poatriv  0.03330 0.02579 1.29110 3.66700 4.80000  0.152 0.96   #> Planlanc 0.03185 0.01830 1.74010 2.00000 3.00000  0.219 0.34   #> Bromhord 0.02865 0.01799 1.59260 2.66700 0.80000  0.280 0.07 . #> Lolipere 0.02843 0.02215 1.28340 6.00000 4.00000  0.340 1.00   #> Elymrepe 0.02782 0.02959 0.94040 1.33300 2.00000  0.398 0.56   #> Trifrepe 0.02584 0.01656 1.56030 4.66700 2.80000  0.453 0.78   #> Anthodor 0.02358 0.02042 1.15470 1.33300 1.80000  0.503 0.55   #> Achimill 0.02343 0.01474 1.58930 2.33300 1.20000  0.552 0.24   #> Bracruta 0.02273 0.01802 1.26170 2.00000 2.80000  0.600 0.89   #> Alopgeni 0.02161 0.02308 0.93630 0.66700 1.60000  0.646 0.91   #> Trifprat 0.02151 0.02207 0.97470 0.00000 1.80000  0.691 0.12   #> Juncarti 0.02008 0.02555 0.78600 0.00000 1.60000  0.734 0.59   #> Scorautu 0.01932 0.01357 1.42410 4.33300 2.80000  0.774 0.78   #> Bellpere 0.01829 0.01486 1.23050 1.66700 0.40000  0.813 0.22   #> Agrostol 0.01761 0.02284 0.77080 0.00000 1.40000  0.850 1.00   #> Juncbufo 0.01500 0.02066 0.72600 0.00000 1.20000  0.882 0.67   #> Vicilath 0.01285 0.01140 1.12740 1.00000 0.00000  0.909 0.04 * #> Sagiproc 0.01168 0.01297 0.90080 0.66700 0.80000  0.934 0.92   #> Eleopalu 0.01017 0.02111 0.48170 0.00000 0.80000  0.955 0.93   #> Hyporadi 0.00895 0.01312 0.68240 0.66700 0.00000  0.974 0.64   #> Poaprat  0.00720 0.01010 0.71330 4.00000 3.40000  0.989 1.00   #> Ranuflam 0.00508 0.01055 0.48170 0.00000 0.40000  1.000 0.97   #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Callcusp 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: BF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Lolipere 0.09068 0.02644 3.42900 6.00000 0.33300  0.124 0.04 *  #> Poatriv  0.05468 0.04465 1.22500 3.66700 0.00000  0.199 0.28    #> Poaprat  0.05251 0.01813 2.89700 4.00000 0.66700  0.271 0.02 *  #> Trifrepe 0.05129 0.02756 1.86100 4.66700 1.83300  0.342 0.04 *  #> Bromhord 0.03969 0.02920 1.35900 2.66700 0.00000  0.396 0.01 ** #> Bracruta 0.03572 0.02869 1.24500 2.00000 2.83300  0.445 0.40    #> Eleopalu 0.03376 0.03573 0.94500 0.00000 2.16700  0.491 0.43    #> Agrostol 0.03345 0.03473 0.96300 0.00000 2.16700  0.537 0.87    #> Achimill 0.03319 0.02338 1.42000 2.33300 0.33300  0.582 0.02 *  #> Scorautu 0.03136 0.02026 1.54800 4.33300 3.16700  0.625 0.29    #> Anthodor 0.02806 0.03295 0.85200 1.33300 1.33300  0.664 0.37    #> Planlanc 0.02732 0.02193 1.24600 2.00000 0.83300  0.701 0.62    #> Salirepe 0.02677 0.02927 0.91400 0.00000 1.83300  0.738 0.11    #> Bellpere 0.02353 0.01909 1.23200 1.66700 0.33300  0.770 0.04 *  #> Hyporadi 0.02172 0.02450 0.88600 0.66700 1.16700  0.800 0.26    #> Ranuflam 0.02031 0.02275 0.89300 0.00000 1.33300  0.828 0.27    #> Elymrepe 0.01999 0.02926 0.68300 1.33300 0.00000  0.855 0.79    #> Callcusp 0.01783 0.02681 0.66500 0.00000 1.16700  0.880 0.44    #> Juncarti 0.01769 0.02600 0.68100 0.00000 1.16700  0.904 0.73    #> Vicilath 0.01577 0.01447 1.09000 1.00000 0.16700  0.925 0.01 ** #> Sagiproc 0.01543 0.01857 0.83100 0.66700 0.50000  0.947 0.79    #> Airaprae 0.01341 0.01969 0.68100 0.00000 0.83300  0.965 0.30    #> Comapalu 0.01074 0.01571 0.68400 0.00000 0.66700  0.980 0.42    #> Alopgeni 0.01000 0.01463 0.68300 0.66700 0.00000  0.993 0.99    #> Empenigr 0.00479 0.01105 0.43300 0.00000 0.33300  1.000 0.41    #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Juncbufo 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Rumeacet 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: HF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Poatriv  0.07155 0.01368 5.23000 4.80000 0.00000  0.099 0.01 ** #> Lolipere 0.05453 0.02962 1.84100 4.00000 0.33300  0.175 0.22    #> Rumeacet 0.04655 0.03081 1.51100 3.20000 0.00000  0.239 0.01 ** #> Poaprat  0.04175 0.01885 2.21500 3.40000 0.66700  0.297 0.06 .  #> Planlanc 0.04163 0.02956 1.40800 3.00000 0.83300  0.355 0.03 *  #> Bracruta 0.03534 0.02010 1.75800 2.80000 2.83300  0.404 0.40    #> Eleopalu 0.03204 0.03231 0.99200 0.80000 2.16700  0.448 0.51    #> Agrostol 0.03192 0.02889 1.10500 1.40000 2.16700  0.492 0.99    #> Trifrepe 0.03037 0.02287 1.32800 2.80000 1.83300  0.534 0.71    #> Elymrepe 0.02981 0.03868 0.77100 2.00000 0.00000  0.576 0.53    #> Anthodor 0.02872 0.02480 1.15800 1.80000 1.33300  0.615 0.24    #> Juncarti 0.02741 0.02854 0.96100 1.60000 1.16700  0.653 0.19    #> Trifprat 0.02584 0.02597 0.99500 1.80000 0.00000  0.689 0.01 ** #> Salirepe 0.02534 0.02729 0.92900 0.00000 1.83300  0.724 0.18    #> Alopgeni 0.02446 0.03240 0.75500 1.60000 0.00000  0.758 0.92    #> Scorautu 0.02070 0.01412 1.46600 2.80000 3.16700  0.787 0.85    #> Ranuflam 0.01928 0.01994 0.96700 0.40000 1.33300  0.814 0.36    #> Juncbufo 0.01818 0.02465 0.73800 1.20000 0.00000  0.839 0.43    #> Hyporadi 0.01714 0.02655 0.64600 0.00000 1.16700  0.863 0.42    #> Callcusp 0.01683 0.02490 0.67600 0.00000 1.16700  0.886 0.42    #> Achimill 0.01656 0.01490 1.11100 1.20000 0.33300  0.909 0.59    #> Sagiproc 0.01528 0.01653 0.92400 0.80000 0.50000  0.930 0.89    #> Airaprae 0.01261 0.01824 0.69100 0.00000 0.83300  0.947 0.30    #> Bromhord 0.01209 0.01517 0.79700 0.80000 0.00000  0.964 0.84    #> Comapalu 0.01011 0.01456 0.69400 0.00000 0.66700  0.978 0.25    #> Bellpere 0.00880 0.01373 0.64100 0.40000 0.33300  0.990 0.94    #> Empenigr 0.00454 0.01033 0.43900 0.00000 0.33300  0.997 0.60    #> Vicilath 0.00240 0.00546 0.43900 0.00000 0.16700  1.000 0.86    #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 99 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"Function simulates response data frame adds  Gaussian error fitted responses Redundancy Analysis  (rda), Constrained Correspondence Analysis  (cca) distance-based RDA (capscale).  function special case generic simulate,  works similarly simulate.lm.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"","code":"# S3 method for rda simulate(object, nsim = 1, seed = NULL, indx = NULL,     rank = \"full\", correlated = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"object object representing fitted rda,     cca capscale model. nsim number response matrices simulated. one     dissimilarity matrix returned capscale,     larger nsim error. seed object specifying random number     generator initialized (‘seeded’). See      simulate details. indx Index residuals added fitted values,     produced shuffleSet     sample.  index can duplicate entries     bootstrapping allowed. nsim \\(>1\\), output     compliant shuffleSet     one line simulation.  nsim missing,     number rows indx used define number     simulations, nsim given, match number     rows indx. null, parametric simulation used     Gaussian error added fitted values. rank rank constrained component: passed     predict.rda predict.cca. correlated species regarded correlated parametric     simulation indx given?     correlated = TRUE, multivariate Gaussian random error     generated, FALSE, Gaussian random error generated     separately species. argument effect     capscale information species. ... additional optional arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"implementation follows \"lm\" method   simulate, adds Gaussian (Normal) error fitted   values (fitted.rda) using function rnorm   correlated = FALSE mvrnorm   correlated = TRUE. standard deviations (rnorm)   covariance matrices species (mvrnorm)   estimated residuals fitting constraints.   Alternatively, function can take permutation index used   add permuted residuals (unconstrained component) fitted   values. Raw data used rda. Internal Chi-square   transformed data used cca within function,   returned matrix similar original input data.   simulation performed internal metric scaling data   capscale, function returns Euclidean   distances calculated simulated data.  simulation uses   real components, imaginary dimensions ignored.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"nsim = 1, returns matrix dissimilarities ( capscale) similar additional arguments random   number seed simulate. nsim > 1, returns   similar array returned simulate.nullmodel   similar attributes.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"","code":"data(dune) data(dune.env) mod <- rda(dune ~  Moisture + Management, dune.env) ## One simulation update(mod, simulate(mod) ~  .) #> Call: rda(formula = simulate(mod) ~ Moisture + Management, data = #> dune.env) #>  #>               Inertia Proportion Rank #> Total         79.3906     1.0000      #> Constrained   52.2955     0.6587    6 #> Unconstrained 27.0951     0.3413   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 24.007 14.238  5.712  3.314  2.879  2.145  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 6.128 4.391 3.331 3.143 2.121 1.757 1.488 1.152 1.115 1.044 0.682 0.539 0.205  #>  ## An impression of confidence regions of site scores plot(mod, display=\"sites\") for (i in 1:5) lines(procrustes(mod, update(mod, simulate(mod) ~ .)), col=\"blue\")  ## Simulate a set of null communities with permutation of residuals simulate(mod, indx = shuffleSet(nrow(dune), 99)) #> An object of class “simulate.rda”  #> ‘simulate index’ method (abundance, non-sequential) #> 20 x 30 matrix #> Number of permuted matrices = 99  #>"},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":null,"dir":"Reference","previous_headings":"","what":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"Land birds islands covered  coniferous forest Sipoo Archipelago, southern Finland.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"","code":"data(sipoo)   data(sipoo.map)"},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"sipoo data frame contains data occurrences 50 land   bird species 18 islands Sipoo Archipelago (Simberloff &   Martin, 1991, Appendix 3). species referred 4+4 letter   abbreviation Latin names (using five letters two   species names make unique). sipoo.map data contains geographic coordinates   islands ETRS89-TM35FIN coordinate system (EPSG:3067)   areas islands hectares.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"Simberloff, D. & Martin, J.-L.  (1991).  Nestedness insular   avifaunas: simple summary statistics masking complex species patterns.   Ornis Fennica 68:178--192.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"","code":"data(sipoo) data(sipoo.map) plot(N ~ E, data=sipoo.map, asp = 1)"},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum Spanning Tree — spantree","title":"Minimum Spanning Tree — spantree","text":"Function spantree finds minimum spanning tree   connecting points, disregarding dissimilarities   threshold NA.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum Spanning Tree — spantree","text":"","code":"spantree(d, toolong = 0) # S3 method for spantree as.hclust(x, ...) # S3 method for spantree cophenetic(x) spandepth(x) # S3 method for spantree plot(x, ord, cex = 0.7, type = \"p\", labels, dlim,      FUN = sammon,  ...) # S3 method for spantree lines(x, ord, display=\"sites\", col = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum Spanning Tree — spantree","text":"d Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, .     toolong = 0 (negative), dissimilarity regarded     long. x spantree result object. ord ordination configuration, ordination result known     scores. cex Character expansion factor. type Observations plotted points     type=\"p\" type=\"b\", text label     type=\"t\". tree (lines) always plotted. labels Text used type=\"t\" node names     missing. dlim ceiling value used highest cophenetic dissimilarity. FUN Ordination function find configuration     cophenetic dissimilarities. supplied FUN work,     supply ordination result argument ord. display Type scores used ord. col Colour line segments. can vector     recycled points, line colour mixture two     joined points. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum Spanning Tree — spantree","text":"Function spantree finds minimum spanning tree   dissimilarities (may several minimum spanning trees,   function finds one). Dissimilarities threshold   toolong NAs disregarded, spanning tree   found dissimilarities. data disconnected,   function return disconnected tree (forest),   corresponding link NA. Connected subtrees can identified   using distconnected. Minimum spanning tree closely related single linkage   clustering, .k.. nearest neighbour clustering, genetics   neighbour joining tree available hclust   agnes functions. important practical   difference minimum spanning tree concept cluster   membership, always joins individual points . Function   .hclust can change spantree result   corresponding hclust object. Function cophenetic finds distances points along   tree segments. Function spandepth returns depth   node. nodes tree either leaves (one link)   internal nodes (one link). leaves recursively   removed tree, depth layer leaf   removed. disconnected spantree object (forest)   tree analysed separately disconnected nodes   tree depth zero. Function plot displays tree   supplied ordination configuration, lines adds spanning   tree ordination graph. configuration supplied plot,   function ordinates cophenetic dissimilarities   spanning tree overlays tree result. default   ordination function sammon (package MASS),   Sammon scaling emphasizes structure neighbourhood   nodes may able beautifully represent tree (may need   set dlim, sometimes results remain   twisted). ordination methods work disconnected   trees, must supply ordination configuration. Function   lines overlay tree existing plot. Function spantree uses Prim's method   implemented priority-first search dense graphs (Sedgewick   1990). Function cophenetic uses function   stepacross option path = \"extended\".   spantree fast, cophenetic slow   large data sets.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum Spanning Tree — spantree","text":"Function spantree returns object class spantree   list two vectors, length \\(n-1\\).   number links tree one less number observations,   first item omitted. items kid child node parent, starting parent number     two. link parent, value NA     tree disconnected node. dist Corresponding distance. kid = NA,     dist = 0. labels Names nodes found input dissimilarities. call function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum Spanning Tree — spantree","text":"Sedgewick, R. (1990). Algorithms C. Addison Wesley.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum Spanning Tree — spantree","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Minimum Spanning Tree — spantree","text":"principle, minimum spanning tree equivalent single linkage   clustering can performed using hclust   agnes. However, functions combine   clusters information actually connected points   (“single link”) recovered result.   graphical output single linkage clustering plotted   ordicluster look different equivalent   spanning tree plotted lines.spantree.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum Spanning Tree — spantree","text":"","code":"data(dune) dis <- vegdist(dune) tr <- spantree(dis) ## Add tree to a metric scaling plot(tr, cmdscale(dis), type = \"t\")  ## Find a configuration to display the tree neatly plot(tr, type = \"t\") #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500  ## Depths of nodes depths <- spandepth(tr) plot(tr, type = \"t\", label = depths) #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500  ## Plot as a dendrogram cl <- as.hclust(tr) plot(cl)  ## cut hclust tree to classes and show in colours in spantree plot(tr, col = cutree(cl, 5), pch=16) #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500"},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":null,"dir":"Reference","previous_headings":"","what":"Species Accumulation Curves — specaccum","title":"Species Accumulation Curves — specaccum","text":"Function specaccum finds species accumulation curves   number species certain number sampled sites   individuals.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Species Accumulation Curves — specaccum","text":"","code":"specaccum(comm, method = \"exact\", permutations = 100,           conditioned =TRUE, gamma = \"jack1\",  w = NULL, subset, ...) # S3 method for specaccum plot(x, add = FALSE, random = FALSE, ci = 2,      ci.type = c(\"bar\", \"line\", \"polygon\"), col = par(\"fg\"), lty = 1,     ci.col = col, ci.lty = 1, ci.length = 0, xlab, ylab = x$method, ylim,     xvar = c(\"sites\", \"individuals\", \"effort\"), ...) # S3 method for specaccum boxplot(x, add = FALSE, ...) fitspecaccum(object, model, method = \"random\", ...) # S3 method for fitspecaccum plot(x, col = par(\"fg\"), lty = 1, xlab = \"Sites\",      ylab = x$method, ...)  # S3 method for specaccum predict(object, newdata, interpolation = c(\"linear\", \"spline\"), ...) # S3 method for fitspecaccum predict(object, newdata, ...) specslope(object, at)"},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Species Accumulation Curves — specaccum","text":"comm Community data set. method Species accumulation method (partial match). Method     \"collector\"     adds sites order happen data,     \"random\" adds sites random order, \"exact\" finds     expected (mean) species richness, \"coleman\" finds     expected richness following     Coleman et al. 1982, \"rarefaction\" finds mean     accumulating individuals instead sites. permutations Number permutations method = \"random\".     Usually integer giving number permutations, can also     list control values permutations returned     function , permutation matrix     row gives permuted indices. conditioned Estimation standard deviation conditional     empirical dataset exact SAC gamma Method estimating total extrapolated number species     survey area function specpool w Weights giving sampling effort. subset logical expression indicating sites (rows) keep: missing     values taken FALSE. x specaccum result object add Add existing graph. random Draw random simulation separately instead     drawing average confidence intervals. ci Multiplier used get confidence intervals standard     deviation (standard error estimate). Value ci = 0     suppresses drawing confidence intervals. ci.type Type confidence intervals graph: \"bar\"     draws vertical bars, \"line\" draws lines,     \"polygon\" draws shaded area. col Colour drawing lines. lty line type (see par). ci.col Colour drawing lines filling     \"polygon\". ci.lty Line type confidence intervals border     \"polygon\". ci.length Length horizontal bars (inches) end     vertical bars ci.type = \"bar\". xlab,ylab Labels x (defaults xvar)     y axis. ylim y limits plot. xvar Variable used horizontal axis:     \"individuals\" can used     method = \"rarefaction\". object Either community data set fitted specaccum model. model Nonlinear regression model (nls). See Details. newdata Optional data used prediction interpreted     number sampling units (sites). missing, fitted values     returned. interpolation Interpolation method used newdata. Number plots slope evaluated. Can     real number. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Species Accumulation Curves — specaccum","text":"Species accumulation curves (SAC) used compare diversity   properties community data sets using different accumulator   functions. classic method \"random\" finds mean   SAC standard deviation random permutations data,   subsampling without replacement (Gotelli & Colwell 2001).    \"exact\" method finds expected SAC using sample-based   rarefaction method independently developed numerous   times (Chiarucci et al. 2008) often known Mao Tau   estimate (Colwell et al. 2012).  unconditional standard deviation   exact SAC represents moment-based estimation   conditioned empirical data set (sd samples > 0).   unconditional standard deviation based estimation   extrapolated number species survey area (.k.. gamma   diversity), estimated function specpool.   conditional standard deviation developed Jari Oksanen (  published, sd=0 samples). Method \"coleman\" finds   expected SAC standard deviation following Coleman et   al. (1982).  methods based sampling sites without   replacement. contrast, method = \"rarefaction\" finds   expected species richness standard deviation sampling   individuals instead sites.  achieves applying function   rarefy number individuals corresponding   average number individuals per site. Methods \"random\" \"collector\" can take weights   (w) give sampling effort site.  weights   w influence order sites accumulated,   value sampling effort sites   equal. summary results expressed sites even   accumulation uses weights (methods \"random\",   \"collector\"), based individuals   (\"rarefaction\").  actual sampling effort given item   Effort Individuals printed result.   weighted \"random\" method effort refers average   effort per site, sum weights per number sites.   weighted method = \"random\", averaged species richness   found linear interpolation single random permutations.   Therefore least first value (often several first)   NA richness, values interpolated   cases extrapolated.  plot function   defaults display results scaled sites, can   changed selecting xvar = \"effort\" (weighted methods)   xvar = \"individuals\" (method = \"rarefaction\"). summary boxplot methods available   method = \"random\". Function predict specaccum can return values   corresponding newdata. method \"exact\",   \"rarefaction\" \"coleman\" function uses analytic   equations interpolated non-integer values, methods   linear (approx) spline (spline)   interpolation. newdata given, function returns   values corresponding data. NB., fitted values   method=\"rarefaction\" based rounded integer counts,   predict can use fractional non-integer counts   newdata give slightly different results. Function fitspecaccum fits nonlinear (nls)   self-starting species accumulation model. input object   can result specaccum community data frame.   latter case function first fits specaccum model   proceeds fitting nonlinear model. function can   apply limited set nonlinear regression models suggested   species-area relationship (Dengler 2009).   selfStart models. permissible alternatives   \"arrhenius\" (SSarrhenius), \"gleason\"   (SSgleason), \"gitay\" (SSgitay),   \"lomolino\" (SSlomolino) vegan   package. addition following standard R models available:   \"asymp\" (SSasymp), \"gompertz\"   (SSgompertz), \"michaelis-menten\"   (SSmicmen), \"logis\" (SSlogis),   \"weibull\" (SSweibull). See functions   model specification details. weights w used fit based accumulated   effort model = \"rarefaction\" accumulated number   individuals.  plot still based sites, unless   alternative selected xvar. Function predict fitspecaccum uses   predict.nls, can pass arguments   function. addition, fitted, residuals, nobs,   coef, AIC, logLik deviance work   result object. Function specslope evaluates derivative species   accumulation curve given number sample plots, gives   rate increase number species. function works   specaccum result object based analytic models   \"exact\", \"rarefaction\" \"coleman\",   non-linear regression results fitspecaccum. Nonlinear regression may fail reason,   fitspecaccum models fragile may succeed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Species Accumulation Curves — specaccum","text":"Function specaccum returns object class  \"specaccum\", fitspecaccum model class  \"fitspecaccum\" adds items  \"specaccum\" (see end list ): call Function call. method Accumulator method. sites Number sites.  method = \"rarefaction\"     number sites corresponding certain number     individuals generally integer, average     number individuals also returned item individuals. effort Average sum weights corresponding number     sites model fitted argument w richness number species corresponding number     sites.  method = \"collector\" observed     richness, methods average expected richness. sd standard deviation SAC (standard error).     NULL method = \"collector\",     estimated permutations method = \"random\",     analytic equations methods. perm Permutation results method = \"random\"     NULL cases. column perm holds one     permutation. weights Matrix accumulated weights corresponding     columns perm matrix model fitted     argument w. fitted, residuals, coefficients fitspecacum:      fitted values, residuals nonlinear model coefficients.      method = \"random\" matrices column      random accumulation. models fitspecaccum: list fitted     nls models (see Examples accessing models).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Species Accumulation Curves — specaccum","text":"Chiarucci, ., Bacaro, G., Rocchini, D. & Fattorini,   L. (2008). Discovering rediscovering sample-based rarefaction   formula ecological literature. Commun. Ecol. 9:   121--123. Coleman, B.D, Mares, M.., Willis, M.R. & Hsieh,   Y. (1982). Randomness, area species richness. Ecology 63:   1121--1133. Colwell, R.K., Chao, ., Gotelli, N.J., Lin, S.Y., Mao, C.X., Chazdon,   R.L. & Longino, J.T. (2012). Models estimators linking   individual-based sample-based rarefaction, extrapolation   comparison assemblages. J. Plant Ecol. 5: 3--21. Dengler, J. (2009). function describes species-area   relationship best? review empirical evaluation.    Journal Biogeography 36, 728--744. Gotelli, N.J. & Colwell, R.K. (2001). Quantifying biodiversity:   procedures pitfalls measurement comparison species   richness. Ecol. Lett. 4, 379--391.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Species Accumulation Curves — specaccum","text":"Roeland Kindt r.kindt@cgiar.org Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Species Accumulation Curves — specaccum","text":"SAC method = \"exact\"   developed Roeland Kindt, standard deviation Jari   Oksanen (unpublished). method = \"coleman\"   underestimates SAC handle properly sampling   without replacement.  , standard deviation take   account species correlations, generally low.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Species Accumulation Curves — specaccum","text":"","code":"data(BCI) sp1 <- specaccum(BCI) #> Warning: the standard deviation is zero sp2 <- specaccum(BCI, \"random\") sp2 #> Species Accumulation Curve #> Accumulation method: random, with 100 permutations #> Call: specaccum(comm = BCI, method = \"random\")  #>  #>                                                                               #> Sites     1.00000   2.00000   3.00000   4.00000   5.00000   6.00000   7.00000 #> Richness 90.42000 121.29000 138.34000 150.46000 158.46000 165.38000 170.34000 #> sd        7.23931   7.43361   7.38305   6.80377   5.92959   5.07475   4.58196 #>                                                                              #> Sites      8.00000   9.00000  10.00000  11.0000  12.00000  13.00000  14.0000 #> Richness 175.02000 178.93000 182.15000 184.8500 187.47000 189.88000 191.9000 #> sd         4.43808   4.74662   4.58671   4.4093   4.23419   4.08565   4.1451 #>                                                                                #> Sites     15.00000  16.00000  17.00000  18.00000  19.00000  20.00000  21.00000 #> Richness 193.75000 195.50000 197.32000 198.94000 200.32000 201.68000 202.95000 #> sd         4.13503   4.01889   3.54447   3.53859   3.62617   3.62895   3.41528 #>                                                                              #> Sites     22.00000  23.00000  24.00000  25.00000  26.00000  27.000  28.00000 #> Richness 204.17000 205.39000 206.65000 207.73000 208.91000 209.880 210.90000 #> sd         3.47009   3.28417   3.22357   3.06448   3.06856   3.217   3.14787 #>                                                                                #> Sites     29.00000  30.00000  31.00000  32.00000  33.00000  34.00000  35.00000 #> Richness 211.64000 212.74000 213.57000 214.43000 215.15000 215.93000 216.75000 #> sd         3.12862   3.01719   3.01931   2.92069   2.76111   2.77163   2.69446 #>                                                                                #> Sites     36.00000  37.00000  38.00000  39.00000  40.00000  41.00000  42.00000 #> Richness 217.54000 218.20000 219.00000 219.61000 220.14000 220.77000 221.28000 #> sd         2.62629   2.64384   2.45361   2.22427   2.11307   1.93769   1.82618 #>                                                                               #> Sites     43.00000  44.00000  45.00000  46.00000  47.00000  48.0000  49.00000 #> Richness 221.86000 222.33000 222.85000 223.28000 223.69000 224.1400 224.60000 #> sd         1.79235   1.49784   1.45904   1.36389   1.07961   0.8764   0.58603 #>              #> Sites     50 #> Richness 225 #> sd         0 summary(sp2) #>  1 sites          2 sites         3 sites         4 sites         #>  Min.   : 77.00   Min.   :105.0   Min.   :119.0   Min.   :132.0   #>  1st Qu.: 85.00   1st Qu.:115.8   1st Qu.:134.0   1st Qu.:146.0   #>  Median : 88.00   Median :121.5   Median :139.0   Median :151.0   #>  Mean   : 90.42   Mean   :121.3   Mean   :138.3   Mean   :150.5   #>  3rd Qu.: 94.25   3rd Qu.:126.0   3rd Qu.:143.2   3rd Qu.:155.0   #>  Max.   :109.00   Max.   :144.0   Max.   :155.0   Max.   :166.0   #>  5 sites         6 sites         7 sites         8 sites       9 sites         #>  Min.   :140.0   Min.   :149.0   Min.   :157.0   Min.   :161   Min.   :166.0   #>  1st Qu.:155.0   1st Qu.:162.0   1st Qu.:168.0   1st Qu.:173   1st Qu.:176.0   #>  Median :159.0   Median :165.0   Median :171.0   Median :175   Median :179.0   #>  Mean   :158.5   Mean   :165.4   Mean   :170.3   Mean   :175   Mean   :178.9   #>  3rd Qu.:163.0   3rd Qu.:170.0   3rd Qu.:174.0   3rd Qu.:178   3rd Qu.:182.0   #>  Max.   :172.0   Max.   :176.0   Max.   :181.0   Max.   :186   Max.   :190.0   #>  10 sites        11 sites        12 sites        13 sites        #>  Min.   :170.0   Min.   :174.0   Min.   :174.0   Min.   :179.0   #>  1st Qu.:179.0   1st Qu.:182.0   1st Qu.:184.0   1st Qu.:187.0   #>  Median :183.0   Median :185.0   Median :188.0   Median :190.5   #>  Mean   :182.2   Mean   :184.8   Mean   :187.5   Mean   :189.9   #>  3rd Qu.:185.0   3rd Qu.:188.0   3rd Qu.:191.0   3rd Qu.:193.0   #>  Max.   :191.0   Max.   :193.0   Max.   :200.0   Max.   :202.0   #>  14 sites        15 sites        16 sites        17 sites        #>  Min.   :181.0   Min.   :183.0   Min.   :185.0   Min.   :188.0   #>  1st Qu.:189.0   1st Qu.:191.0   1st Qu.:193.0   1st Qu.:195.0   #>  Median :193.0   Median :194.0   Median :196.0   Median :197.5   #>  Mean   :191.9   Mean   :193.8   Mean   :195.5   Mean   :197.3   #>  3rd Qu.:194.0   3rd Qu.:196.0   3rd Qu.:198.0   3rd Qu.:200.0   #>  Max.   :203.0   Max.   :204.0   Max.   :205.0   Max.   :205.0   #>  18 sites        19 sites        20 sites        21 sites        #>  Min.   :188.0   Min.   :188.0   Min.   :190.0   Min.   :195.0   #>  1st Qu.:196.8   1st Qu.:198.0   1st Qu.:199.0   1st Qu.:201.0   #>  Median :199.0   Median :200.0   Median :202.0   Median :203.0   #>  Mean   :198.9   Mean   :200.3   Mean   :201.7   Mean   :202.9   #>  3rd Qu.:201.0   3rd Qu.:203.0   3rd Qu.:204.0   3rd Qu.:205.0   #>  Max.   :208.0   Max.   :209.0   Max.   :210.0   Max.   :211.0   #>  22 sites        23 sites        24 sites        25 sites        #>  Min.   :195.0   Min.   :199.0   Min.   :199.0   Min.   :200.0   #>  1st Qu.:202.0   1st Qu.:203.0   1st Qu.:204.0   1st Qu.:206.0   #>  Median :204.0   Median :205.0   Median :207.0   Median :207.5   #>  Mean   :204.2   Mean   :205.4   Mean   :206.7   Mean   :207.7   #>  3rd Qu.:206.2   3rd Qu.:207.0   3rd Qu.:209.0   3rd Qu.:210.0   #>  Max.   :214.0   Max.   :214.0   Max.   :214.0   Max.   :215.0   #>  26 sites        27 sites        28 sites        29 sites        #>  Min.   :203.0   Min.   :203.0   Min.   :204.0   Min.   :204.0   #>  1st Qu.:207.0   1st Qu.:208.0   1st Qu.:209.0   1st Qu.:210.0   #>  Median :209.0   Median :210.0   Median :211.0   Median :212.0   #>  Mean   :208.9   Mean   :209.9   Mean   :210.9   Mean   :211.6   #>  3rd Qu.:211.0   3rd Qu.:212.0   3rd Qu.:213.0   3rd Qu.:214.0   #>  Max.   :217.0   Max.   :218.0   Max.   :220.0   Max.   :220.0   #>  30 sites        31 sites        32 sites        33 sites        #>  Min.   :206.0   Min.   :206.0   Min.   :206.0   Min.   :207.0   #>  1st Qu.:211.0   1st Qu.:212.0   1st Qu.:213.0   1st Qu.:214.0   #>  Median :212.5   Median :213.0   Median :214.0   Median :215.0   #>  Mean   :212.7   Mean   :213.6   Mean   :214.4   Mean   :215.2   #>  3rd Qu.:215.0   3rd Qu.:215.0   3rd Qu.:216.0   3rd Qu.:216.0   #>  Max.   :221.0   Max.   :221.0   Max.   :222.0   Max.   :222.0   #>  34 sites        35 sites        36 sites        37 sites        #>  Min.   :208.0   Min.   :208.0   Min.   :208.0   Min.   :208.0   #>  1st Qu.:214.0   1st Qu.:215.0   1st Qu.:216.0   1st Qu.:217.0   #>  Median :216.0   Median :217.0   Median :218.0   Median :218.0   #>  Mean   :215.9   Mean   :216.8   Mean   :217.5   Mean   :218.2   #>  3rd Qu.:218.0   3rd Qu.:219.0   3rd Qu.:219.0   3rd Qu.:220.0   #>  Max.   :222.0   Max.   :222.0   Max.   :223.0   Max.   :224.0   #>  38 sites        39 sites        40 sites        41 sites        #>  Min.   :212.0   Min.   :212.0   Min.   :212.0   Min.   :212.0   #>  1st Qu.:217.0   1st Qu.:218.0   1st Qu.:219.0   1st Qu.:220.0   #>  Median :219.0   Median :220.0   Median :220.0   Median :221.0   #>  Mean   :219.0   Mean   :219.6   Mean   :220.1   Mean   :220.8   #>  3rd Qu.:220.2   3rd Qu.:221.0   3rd Qu.:221.0   3rd Qu.:222.0   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   #>  42 sites        43 sites        44 sites        45 sites        #>  Min.   :215.0   Min.   :215.0   Min.   :218.0   Min.   :219.0   #>  1st Qu.:220.0   1st Qu.:221.0   1st Qu.:221.0   1st Qu.:222.0   #>  Median :221.0   Median :222.0   Median :222.0   Median :223.0   #>  Mean   :221.3   Mean   :221.9   Mean   :222.3   Mean   :222.8   #>  3rd Qu.:222.2   3rd Qu.:223.0   3rd Qu.:223.2   3rd Qu.:224.0   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   #>  46 sites        47 sites        48 sites        49 sites        50 sites      #>  Min.   :220.0   Min.   :221.0   Min.   :222.0   Min.   :223.0   Min.   :225   #>  1st Qu.:222.8   1st Qu.:223.0   1st Qu.:224.0   1st Qu.:224.0   1st Qu.:225   #>  Median :223.0   Median :224.0   Median :224.0   Median :225.0   Median :225   #>  Mean   :223.3   Mean   :223.7   Mean   :224.1   Mean   :224.6   Mean   :225   #>  3rd Qu.:224.0   3rd Qu.:225.0   3rd Qu.:225.0   3rd Qu.:225.0   3rd Qu.:225   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225   plot(sp1, ci.type=\"poly\", col=\"blue\", lwd=2, ci.lty=0, ci.col=\"lightblue\") boxplot(sp2, col=\"yellow\", add=TRUE, pch=\"+\")  ## Fit Lomolino model to the exact accumulation mod1 <- fitspecaccum(sp1, \"lomolino\") coef(mod1) #>       Asym       xmid      slope  #> 258.440682   2.442061   1.858694  fitted(mod1) #>  [1]  94.34749 121.23271 137.45031 148.83053 157.45735 164.31866 169.95946 #>  [8] 174.71115 178.78954 182.34254 185.47566 188.26658 190.77402 193.04337 #> [15] 195.11033 197.00350 198.74606 200.35705 201.85227 203.24499 204.54643 #> [22] 205.76612 206.91229 207.99203 209.01150 209.97609 210.89054 211.75903 #> [29] 212.58527 213.37256 214.12386 214.84180 215.52877 216.18692 216.81820 #> [36] 217.42437 218.00703 218.56767 219.10762 219.62811 220.13027 220.61514 #> [43] 221.08369 221.53679 221.97528 222.39991 222.81138 223.21037 223.59747 #> [50] 223.97327 plot(sp1) ## Add Lomolino model using argument 'add' plot(mod1, add = TRUE, col=2, lwd=2)  ## Fit Arrhenius models to all random accumulations mods <- fitspecaccum(sp2, \"arrh\") plot(mods, col=\"hotpink\") boxplot(sp2, col = \"yellow\", border = \"blue\", lty=1, cex=0.3, add= TRUE)  ## Use nls() methods to the list of models sapply(mods$models, AIC) #>   [1] 329.2456 321.8614 331.1568 352.1309 354.8606 323.3767 322.0897 347.7218 #>   [9] 327.6283 327.3510 335.4843 308.5300 373.4959 334.3691 320.6975 338.1084 #>  [17] 330.2018 343.5560 348.5827 300.2513 315.7909 310.7837 305.5217 295.1005 #>  [25] 359.2639 342.7111 339.7456 328.4175 338.4335 368.4988 354.7097 328.8704 #>  [33] 342.1528 292.9875 328.3752 299.7201 336.5796 364.3153 336.4822 339.6666 #>  [41] 354.7445 320.7841 304.1628 314.9640 349.6753 350.7169 307.6840 296.7971 #>  [49] 359.6018 302.9863 319.6832 339.5021 328.8450 329.0553 298.0970 334.0182 #>  [57] 291.9027 349.7161 325.1376 347.7797 340.6111 338.6148 352.0292 308.8538 #>  [65] 315.1890 289.7947 351.6732 339.3587 320.3515 300.9377 323.3054 290.9419 #>  [73] 350.8587 322.6970 340.7948 334.1965 358.2890 300.7034 338.5079 338.8941 #>  [81] 341.7687 331.4553 337.5975 349.7867 331.8581 270.3068 354.5083 326.0026 #>  [89] 337.8555 322.7217 302.5019 324.7469 322.1415 324.6922 324.5427 347.2050 #>  [97] 309.1766 316.1194 343.9958 350.5935"},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":null,"dir":"Reference","previous_headings":"","what":"Extrapolated Species Richness in a Species Pool — specpool","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"functions estimate extrapolated species richness species   pool, number unobserved species. Function specpool   based incidences sample sites, gives single estimate   collection sample sites (matrix).  Function estimateR   based abundances (counts) single sample site.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"","code":"specpool(x, pool, smallsample = TRUE) estimateR(x, ...) specpool2vect(X, index = c(\"jack1\",\"jack2\", \"chao\", \"boot\",\"Species\")) poolaccum(x, permutations = 100, minsize = 3) estaccumR(x, permutations = 100, parallel = getOption(\"mc.cores\")) # S3 method for poolaccum summary(object, display, alpha = 0.05, ...) # S3 method for poolaccum plot(x, alpha = 0.05, type = c(\"l\",\"g\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"x Data frame matrix species data analysis result      plot function. pool vector giving classification pooling sites     species data. missing, sites pooled together. smallsample Use small sample correction \\((N-1)/N\\),     \\(N\\) number sites within pool. X, object specpool result object. index selected index extrapolated richness. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,      permutation matrix row gives permuted indices. minsize Smallest number sampling units reported. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. display Indices displayed. alpha Level quantiles shown. proportion left outside     symmetric limits. type Type graph produced xyplot. ... parameters (used).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Many species always remain unseen undetected collection   sample plots.  function uses popular ways estimating   number unseen species adding observed   species richness (Palmer 1990, Colwell & Coddington 1994). incidence-based estimates specpool use frequencies   species collection sites.   following, \\(S_P\\) extrapolated richness pool,   \\(S_0\\) observed number species   collection, \\(a_1\\) \\(a_2\\) number species   occurring one two sites collection, \\(p_i\\)   frequency species \\(\\), \\(N\\) number   sites collection.  variants extrapolated richness   specpool : specpool normally uses basic Chao equation,     doubletons (\\(a2=0\\)) switches bias-corrected     version. case Chao equation simplifies     \\(S_0 + \\frac{1}{2} a_1 (a_1-1) \\frac{N-1}{N}\\). abundance-based estimates estimateR use counts     (numbers individuals) species single site. called     matrix data frame, function give separate estimates     site.  two variants extrapolated richness     estimateR bias-corrected Chao ACE (O'Hara 2005, Chiu     et al. 2014).  Chao estimate similar bias corrected     one , \\(a_i\\) refers number species     abundance \\(\\) instead number sites, small-sample     correction used. ACE estimate defined :  \\(a_i\\) refers number species abundance \\(\\)      \\(S_{rare}\\) number rare     species,      \\(S_{abund}\\) number abundant species,     arbitrary      threshold abundance 10 rare species, \\(N_{rare}\\)     number      individuals rare species. Functions estimate standard errors estimates.     concern number added species, assume     variance observed richness.  equations standard errors     complicated reproduced help page, can     studied R source code function discussed     vignette can read     browseVignettes(\"vegan\"). standard error based     following sources: Chiu et al. (2014) Chao estimates     Smith van Belle (1984) first-order Jackknife     bootstrap (second-order jackknife still missing).      variance estimator \\(S_{ace}\\) see O'Hara (2005). Functions poolaccum estaccumR similar   specaccum, estimate extrapolated richness indices   specpool estimateR addition number   species random ordering sampling units. Function   specpool uses presence data estaccumR count   data. functions share summary plot   methods. summary returns quantile envelopes   permutations corresponding given level alpha   standard deviation permutations sample size. NB.,   based standard deviations estimated within specpool   estimateR, based permutations.   plot function shows mean envelope permutations   given alpha models. selection models can   restricted order changes using display argument   summary plot. configuration plot   command, see xyplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Function specpool returns data frame entries   observed richness indices class  pool vector.  utility function specpool2vect maps   pooled values vector giving value selected  index original site. Function estimateR returns estimates standard errors   site. Functions poolaccum estimateR return   matrices permutation results richness estimator,   vector sample sizes table means permutations   estimator.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Chao, . (1987). Estimating population size capture-recapture   data unequal catchability. Biometrics 43, 783--791. Chiu, C.H., Wang, Y.T., Walther, B.. & Chao, . (2014). Improved   nonparametric lower bound species richness via modified   Good-Turing frequency formula. Biometrics 70, 671--682. Colwell, R.K. & Coddington, J.. (1994). Estimating terrestrial   biodiversity   extrapolation. Phil. Trans. Roy. Soc. London B 345, 101--118. O'Hara, R.B. (2005). Species richness estimators: many species   can dance head pin? J. Anim. Ecol. 74, 375--386. Palmer, M.W. (1990). estimation species richness   extrapolation. Ecology 71, 1195--1198. Smith, E.P & van Belle, G. (1984). Nonparametric estimation   species richness. Biometrics 40, 119--129.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Bob O'Hara (estimateR) Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"functions based assumption species   pool: community closed fixed pool size   \\(S_P\\).  general, functions give lower limit   species richness: real richness \\(S >= S_P\\),   consistent bias estimates. Even bias-correction Chao   reduces bias, remove completely (Chiu et   al. 2014). Optional small sample correction added specpool   vegan 2.2-0. used older literature (Chao   1987), recommended recently (Chiu et al. 2014).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"","code":"data(dune) data(dune.env) pool <- with(dune.env, specpool(dune, Management)) pool #>    Species     chao   chao.se    jack1 jack1.se    jack2     boot  boot.se n #> BF      16 17.19048 1.5895675 19.33333 2.211083 19.83333 17.74074 1.646379 3 #> HF      21 21.51429 0.9511693 23.40000 1.876166 22.05000 22.56864 1.821518 5 #> NM      21 22.87500 2.1582871 26.00000 3.291403 25.73333 23.77696 2.300982 6 #> SF      21 29.88889 8.6447967 27.66667 3.496029 31.40000 23.99496 1.850288 6 op <- par(mfrow=c(1,2)) boxplot(specnumber(dune) ~ Management, data = dune.env,         col = \"hotpink\", border = \"cyan3\") boxplot(specnumber(dune)/specpool2vect(pool) ~ Management,         data = dune.env, col = \"hotpink\", border = \"cyan3\")  par(op) data(BCI) ## Accumulation model pool <- poolaccum(BCI) summary(pool, display = \"chao\") #> $chao #>        N     Chao     2.5%    97.5%   Std.Dev #>  [1,]  3 162.3374 142.5272 186.2227 11.217082 #>  [2,]  4 176.1243 156.4704 206.3243 12.158304 #>  [3,]  5 183.8507 162.9868 209.2821 12.488675 #>  [4,]  6 188.9018 165.6732 214.2779 12.888148 #>  [5,]  7 193.8679 175.8712 216.1384 11.602711 #>  [6,]  8 199.0315 180.2949 227.8918 12.604562 #>  [7,]  9 202.0946 183.3317 228.8381 11.958432 #>  [8,] 10 204.9843 185.3556 227.5898 12.637762 #>  [9,] 11 206.6160 186.7205 234.5167 11.679759 #> [10,] 12 209.1286 189.2824 232.6359 12.351073 #> [11,] 13 211.3655 191.7918 232.0423 11.991967 #> [12,] 14 212.8128 195.8592 239.3318 11.537817 #> [13,] 15 215.5275 198.2739 239.7978 11.422201 #> [14,] 16 218.7094 198.3891 243.3826 12.165145 #> [15,] 17 221.6814 197.6029 256.5328 14.464302 #> [16,] 18 222.7418 201.4964 257.9494 13.227892 #> [17,] 19 224.8619 206.6236 251.9979 13.165360 #> [18,] 20 226.3324 210.2832 249.5616 12.858116 #> [19,] 21 228.4284 210.9920 257.9636 13.784663 #> [20,] 22 228.8425 211.1903 254.3500 11.629250 #> [21,] 23 230.6429 214.1737 251.1681 10.510649 #> [22,] 24 231.9109 213.0874 252.7553 10.925851 #> [23,] 25 232.9972 214.3610 258.4917 11.207306 #> [24,] 26 233.8067 216.9697 263.2733 11.546339 #> [25,] 27 235.6347 217.3831 266.9230 12.800245 #> [26,] 28 235.8942 218.6913 261.4115 11.761873 #> [27,] 29 235.9612 218.6591 258.5682 11.133700 #> [28,] 30 236.6706 219.4315 259.9315 10.291499 #> [29,] 31 236.8530 220.2338 259.2903  9.810390 #> [30,] 32 237.6018 221.4868 262.0864 10.195825 #> [31,] 33 237.4291 222.2990 256.2778  9.227891 #> [32,] 34 237.6712 222.7844 258.2268  8.979536 #> [33,] 35 237.7856 222.2750 257.2540  8.537867 #> [34,] 36 238.4325 223.6473 255.5610  8.566487 #> [35,] 37 238.1834 224.9892 253.5811  7.776992 #> [36,] 38 238.4685 225.2802 254.0155  7.626532 #> [37,] 39 238.2082 226.0390 252.7975  7.642443 #> [38,] 40 238.7991 227.1971 254.1619  7.155802 #> [39,] 41 239.2246 227.3368 258.5178  7.926574 #> [40,] 42 238.4935 228.5195 256.2137  7.287824 #> [41,] 43 238.3856 227.8327 255.8470  7.300153 #> [42,] 44 238.0092 228.5279 252.9488  6.520961 #> [43,] 45 238.1537 228.7980 253.3757  6.443894 #> [44,] 46 238.0532 230.5990 250.9539  5.466587 #> [45,] 47 237.7542 231.3089 251.0192  4.821564 #> [46,] 48 237.2842 231.9015 248.6399  4.038862 #> [47,] 49 236.8407 233.3115 245.4082  2.803888 #> [48,] 50 236.3732 236.3732 236.3732  0.000000 #>  #> attr(,\"class\") #> [1] \"summary.poolaccum\" plot(pool)  ## Quantitative model estimateR(BCI[1:5,]) #>                   1          2          3          4          5 #> S.obs     93.000000  84.000000  90.000000  94.000000 101.000000 #> S.chao1  117.473684 117.214286 141.230769 111.550000 136.000000 #> se.chao1  11.583785  15.918953  23.001405   8.919663  15.467344 #> S.ACE    122.848959 117.317307 134.669844 118.729941 137.114088 #> se.ACE     5.736054   5.571998   6.191618   5.367571   5.848474"},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":null,"dir":"Reference","previous_headings":"","what":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Distance-based ordination (dbrda,   capscale, metaMDS) information   species, methods may add species scores community   data available. However, species scores may missing (  always dbrda), may   close relation used dissimilarity index. function add   species scores replace existing species scores   distance-based methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"","code":"sppscores(object) <- value"},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"object Ordination result. value Community data find species scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Distances information species (columns, variables),   hence distance-based ordination information species   scores. However, species scores can added supplementary   information analysis help interpretation   results. ordination methods (capscale,   metaMDS) can supplement species scores   analysis community data available analysis. capscale species scores found projecting   community data site ordination (linear combination scores),   scores accurate analysis used Euclidean   distances. dissimilarity index can expressed Euclidean   distances transformed data (instance, Chord Hellinger   Distances), species scores based transformed data   accurate, function still finds dissimilarities   untransformed data. Usually community dissimilarities differ two   significant ways Euclidean distances: bound maximum   1, use absolute differences instead squared   differences. cases, may better use species scores   transformed Euclidean distances good   linear relation used dissimilarities. often useful   standardize data row unit total, perform   squareroot transformation damp effect squared   differences (see Examples). Function dbrda never finds species scores,   mathematically similar capscale, similar   rules followed supplementing species scores. Function metaMDS uses weighted averages   (wascores) find species scores.   better relationship dissimilarities projection   scores used metric ordination, similar transformation   community data used dissimilarities species   scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Replacement function adds species scores replaces old   scores ordination object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"","code":"data(BCI, BCI.env) mod <- dbrda(vegdist(BCI) ~ Habitat, BCI.env) ## add species scores sppscores(mod) <- BCI ## Euclidean distances of BCI differ from used dissimilarity plot(vegdist(BCI), dist(BCI))  ## more linear relationship plot(vegdist(BCI), dist(sqrt(decostand(BCI, \"total\"))))  ## better species scores sppscores(mod) <- sqrt(decostand(BCI, \"total\"))"},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":null,"dir":"Reference","previous_headings":"","what":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Function stepacross tries replace dissimilarities   shortest paths stepping across intermediate    sites regarding dissimilarities threshold missing   data (NA). path = \"shortest\" flexible shortest   path (Williamson 1978, Bradfield & Kenkel 1987),   path = \"extended\"   approximation known extended dissimilarities (De'ath 1999).   use stepacross improve ordination high   beta diversity, many sites species common.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"","code":"stepacross(dis, path = \"shortest\", toolong = 1, trace = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"dis Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. path method stepping across (partial match)     Alternative \"shortest\" finds shortest paths,     \"extended\"  approximation known extended     dissimilarities. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, . trace Trace calculations. ... parameters (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Williamson (1978) suggested using flexible shortest paths estimate   dissimilarities sites nothing common, shared   species. path = \"shortest\" function stepacross   replaces dissimilarities   toolong longer NA, tries find shortest   paths sites using remaining dissimilarities. Several   dissimilarity indices semi-metric means   obey triangle inequality \\(d_{ij} \\leq d_{ik} + d_{kj}\\), shortest path algorithm can replace   dissimilarities well, even shorter   toolong. De'ath (1999) suggested simplified method known extended   dissimilarities, calculated path = \"extended\".    method, dissimilarities   toolong longer first made NA, function   tries replace NA dissimilarities path   single stepping stone points. NA    replaced one pass, function make new passes updated   dissimilarities long   NA replaced extended dissimilarities. mean   second passes, remaining NA   dissimilarities allowed one stepping stone site,   previously replaced dissimilarities updated. ,   function consider dissimilarities shorter toolong,   although replaced shorter path   semi-metric indices, used part paths. optimal   cases, extended dissimilarities equal shortest paths,   may longer. alternative defining long dissimilarities parameter   toolong, input dissimilarities can contain NAs.   toolong zero negative, function make   dissimilarities NA. NAs   input  toolong = 0, path = \"shortest\"   find shorter paths semi-metric indices, path = \"extended\"    nothing. Function .shared can   used set dissimilarities NA. data disconnected path points,   result   contain NAs warning issued. Several methods   handle NA dissimilarities, warning taken   seriously. Function distconnected can used find   connected groups remove rare outlier observations groups   observations. Alternative path = \"shortest\" uses Dijkstra's method   finding flexible shortest paths, implemented priority-first search   dense graphs (Sedgewick 1990). Alternative path = \"extended\"    follows De'ath (1999), implementation simpler   code.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Function returns object class dist extended   dissimilarities (see functions vegdist  dist).    value path appended method attribute.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Bradfield, G.E. & Kenkel, N.C. (1987). Nonlinear ordination using   flexible shortest path adjustment ecological   distances. Ecology 68, 750--753. De'ath, G. (1999). Extended dissimilarity: method robust   estimation ecological distances high beta diversity   data. Plant Ecol. 144, 191--199. Sedgewick, R. (1990). Algorithms C. Addison Wesley. Williamson, M.H. (1978). ordination incidence   data. J. Ecol. 66, 911-920.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"function changes original dissimilarities,   like . may best  use    function really must:  extremely high   beta diversity large proportion dissimilarities   upper limit (species common). Semi-metric indices vary degree violating triangle   inequality. Morisita Horn--Morisita indices   vegdist may strongly semi-metric, shortest   paths can change indices much. Mountford index violates   basic rules dissimilarities: non-identical sites zero   dissimilarity species composition poorer site subset   richer. Mountford index, can find three sites \\(, j,     k\\) \\(d_{ik} = 0\\) \\(d_{jk} = 0\\), \\(d_{ij} > 0\\). results stepacross   Mountford index can weird. stepacross needed,   best try use metric indices .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"","code":"# There are no data sets with high beta diversity in vegan, but this # should give an idea. data(dune) dis <- vegdist(dune) edis <- stepacross(dis) #> Too long or NA distances: 5 out of 190 (2.6%) #> Stepping across 190 dissimilarities... plot(edis, dis, xlab = \"Shortest path\", ylab = \"Original\")  ## Manhattan distance have no fixed upper limit. dis <- vegdist(dune, \"manhattan\") is.na(dis) <- no.shared(dune) dis <- stepacross(dis, toolong=0) #> Too long or NA distances: 5 out of 190 (2.6%) #> Stepping across 190 dissimilarities..."},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Functions plot ordination distances given number dimensions   observed distances distances full space eigenvector   methods. display similar Shepard diagram   (stressplot non-metric multidimensional scaling   metaMDS monoMDS), shows   linear relationship eigenvector ordinations.   stressplot methods available wcmdscale,   rda, cca, capscale,   dbrda, prcomp princomp.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"","code":"# S3 method for wcmdscale stressplot(object, k = 2, pch, p.col = \"blue\", l.col = \"red\",     lwd = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"object Result object eigenvector ordination (wcmdscale,     rda, cca, capscale) k Number dimensions ordination distances displayed. pch, p.col, l.col, lwd Plotting character, point colour line colour like     default stressplot ... parameters functions, e.g. graphical parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"functions offer similar display eigenvector   ordinations standard Shepard diagram (stressplot)   non-metric multidimensional scaling. ordination distances   given number dimensions plotted observed   distances. metric distances, ordination distances full   space (ordination axes) equal observed distances,   fit line shows equality. general, fit line go   points, points observed distances approach   fit line . However, non-Euclidean distances (  wcmdscale capscale) negative   eigenvalues ordination distances can exceed observed distances   real dimensions; imaginary dimensions negative eigenvalues   correct excess distances. used   capscale wcmdscale argument   add avoid negative eigenvalues, ordination distances   exceed observed dissimilarities. partial ordination (cca, rda   capscale Condition formula),   distances partial component included observed   distances ordination distances.  k=0,   ordination distances refer partial ordination.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Functions draw graph return invisibly ordination distances   ordination distances.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"","code":"data(dune, dune.env) mod <- rda(dune) stressplot(mod)  mod <- rda(dune ~ Management, dune.env) stressplot(mod, k=3)"},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":null,"dir":"Reference","previous_headings":"","what":"Indices of Taxonomic Diversity and Distinctness — taxondive","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Function finds indices taxonomic diversity distinctness,   averaged taxonomic distances among species individuals   community (Clarke & Warwick 1998, 2001)","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"","code":"taxondive(comm, dis, match.force = FALSE) taxa2dist(x, varstep = FALSE, check = TRUE, labels)"},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"comm Community data. dis Taxonomic distances among taxa comm.     dist object symmetric square matrix. match.force Force matching column names comm     labels dis. FALSE, matching happens     dimensions differ, case species must identical     order . x Classification table row species     basic taxon, columns     identifiers classification higher levels. varstep Vary step lengths successive levels     relative proportional loss number distinct classes. check TRUE, remove redundant levels     different rows constant rows regard row     different basal taxon (species). FALSE     levels retained basal taxa (species) also must coded     variables (columns). get warning species     coded, can ignore intention. labels labels attribute taxonomic distances. Row     names used given. Species matched     labels comm dis taxondive     different dimensions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Clarke & Warwick (1998, 2001) suggested several alternative indices   taxonomic diversity distinctness. Two basic indices called   taxonomic diversity (\\(\\Delta\\)) distinctness (\\(\\Delta^*\\)): equations give index value single site, summation   goes species \\(\\) \\(j\\). \\(\\omega\\) taxonomic   distances among taxa, \\(x\\) species abundances, \\(n\\)   total abundance site.    presence/absence  data indices reduce index   \\(\\Delta^+\\), index Clarke & Warwick (1998) also   estimate standard deviation. Clarke & Warwick (2001)    presented two new indices: \\(s\\Delta^+\\) product species   richness \\(\\Delta^+\\), index variation   taxonomic distinctness (\\(\\Lambda^+\\)) defined dis argument must species dissimilarities. must   similar dissimilarities produced dist.   customary integer steps taxonomic hierarchies,   kind dissimilarities can used, phylogenetic   trees genetic differences.  , dis need   taxonomic, species classifications can used. Function taxa2dist can produce suitable dist object   classification table. species (basic taxon) corresponds   row classification table, columns give   classification different levels. varstep = FALSE   successive levels separated equal steps,   varstep = TRUE step length relative proportional   decrease number classes (Clarke & Warwick 1999).   check = TRUE, function removes classes distinct   species combine species one class, assumes   row presents distinct basic taxon. function scales   distances longest path length   taxa 100 (necessarily check = FALSE). Function plot.taxondive plots \\(\\Delta^+\\) Number   species, together expectation approximate 2*sd   limits. Function summary.taxondive finds \\(z\\) values   significances Normal distribution \\(\\Delta^+\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Function returns object class taxondive following items: Species Number species site. D, Dstar, Dplus, SDplus, Lambda \\(\\Delta\\), \\(\\Delta^*\\),     \\(\\Delta^+\\),  \\(s\\Delta^+\\) \\(\\Lambda^+\\)      site. sd.Dplus Standard deviation \\(\\Delta^+\\). ED, EDstar, EDplus Expected values corresponding     statistics. Function taxa2dist returns object class \"dist\",   attribute \"steps\" step lengths successive levels.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Clarke, K.R & Warwick, R.M. (1998) taxonomic distinctness index  statistical properties. Journal Applied Ecology 35,  523--531. Clarke, K.R. & Warwick, R.M. (1999) taxonomic distinctness measure  biodiversity: weighting step lengths hierarchical  levels. Marine Ecology Progress Series 184: 21--29. Clarke, K.R. & Warwick, R.M. (2001) biodiversity index  applicable species lists: variation taxonomic  distinctness. Marine Ecology Progress Series 216, 265--278.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"function still preliminary may change. scaling   taxonomic dissimilarities influences results. multiply   taxonomic distances (step lengths) constant, values   Deltas multiplied constant, value   \\(\\Lambda^+\\) square constant.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"","code":"## Preliminary: needs better data and some support functions data(dune) data(dune.taxon) # Taxonomic distances from a classification table with variable step lengths. taxdis <- taxa2dist(dune.taxon, varstep=TRUE) plot(hclust(taxdis), hang = -1)  # Indices mod <- taxondive(dune, taxdis) mod #>           Species    Delta   Delta*  Lambda+   Delta+ S Delta+ #> 1           5.000   22.736   29.232  900.298   43.364   216.82 #> 2          10.000   51.046   55.988  822.191   56.232   562.32 #> 3          10.000   41.633   46.194 1025.471   62.869   628.69 #> 4          13.000   50.795   55.140  888.244   64.837   842.88 #> 5          14.000   63.498   67.856  715.393   69.211   968.95 #> 6          11.000   70.201   76.361  628.743   73.281   806.09 #> 7          13.000   61.605   66.187  679.337   69.918   908.94 #> 8          12.000   52.544   56.374  756.375   66.729   800.74 #> 9          13.000   50.526   54.108  849.448   63.205   821.67 #> 10         12.000   60.068   64.960  730.736   69.291   831.49 #> 11          9.000   69.589   77.740  404.609   77.803   700.23 #> 12          9.000   62.405   69.795  552.129   74.470   670.23 #> 13         10.000   47.316   53.842  536.429   66.657   666.57 #> 14          7.000   71.383   82.091  239.543   82.013   574.09 #> 15          8.000   68.564   77.097  334.889   79.010   632.08 #> 16          8.000   55.984   64.400  978.014   69.708   557.66 #> 17          7.000   53.913   60.222  632.990   59.286   415.00 #> 18          9.000   73.235   81.865  438.355   76.288   686.59 #> 19          9.000   68.727   76.091  336.364   78.636   707.73 #> 20          8.000   72.343   80.670  444.915   82.078   656.62 #> Expected            65.330   62.560            71.031          summary(mod) #>            Delta  Delta*  Delta+ sd(Delta+) z(Delta+) Pr(>|z|)    #> 1        22.7362 29.2322 43.3636    10.0499   -2.7530 0.005905 ** #> 2        51.0458 55.9878 56.2323     5.7727   -2.5636 0.010359 *  #> 3        41.6334 46.1936 62.8687     5.7727   -1.4140 0.157360    #> 4        50.7952 55.1396 64.8368     4.5677   -1.3562 0.175047    #> 5        63.4979 67.8564 69.2108     4.2482   -0.4285 0.668251    #> 6        70.2011 76.3614 73.2810     5.3189    0.4229 0.672332    #> 7        61.6049 66.1871 69.9184     4.5677   -0.2437 0.807499    #> 8        52.5437 56.3743 66.7287     4.9215   -0.8743 0.381975    #> 9        50.5258 54.1079 63.2051     4.5677   -1.7134 0.086640 .  #> 10       60.0680 64.9597 69.2906     4.9215   -0.3537 0.723567    #> 11       69.5894 77.7396 77.8030     6.3011    1.0747 0.282517    #> 12       62.4049 69.7949 74.4697     6.3011    0.5457 0.585290    #> 13       47.3158 53.8421 66.6566     5.7727   -0.7578 0.448548    #> 14       71.3834 82.0909 82.0130     7.7069    1.4249 0.154186    #> 15       68.5645 77.0970 79.0097     6.9314    1.1510 0.249714    #> 16       55.9840 64.3999 69.7078     6.9314   -0.1909 0.848565    #> 17       53.9134 60.2224 59.2857     7.7069   -1.5240 0.127501    #> 18       73.2349 81.8645 76.2879     6.3011    0.8342 0.404155    #> 19       68.7273 76.0909 78.6364     6.3011    1.2069 0.227457    #> 20       72.3431 80.6704 82.0779     6.9314    1.5937 0.111005    #> Expected 65.3302 62.5603 71.0313                                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod)"},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":null,"dir":"Reference","previous_headings":"","what":"Species tolerances and sample heterogeneities — tolerance","title":"Species tolerances and sample heterogeneities — tolerance","text":"Species tolerances sample heterogeneities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Species tolerances and sample heterogeneities — tolerance","text":"","code":"tolerance(x, ...)  # S3 method for cca tolerance(x, choices = 1:2, which = c(\"species\",\"sites\"),           scaling = \"species\", useN2 = TRUE, hill = FALSE, ...)  # S3 method for decorana tolerance(x, data, choices = 1:4,           which = c(\"sites\", \"species\"), useN2 = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Species tolerances and sample heterogeneities — tolerance","text":"Function compute species tolerances site heterogeneity measures   unimodal ordinations (CCA & CA). Implements Eq 6.47 6.48   Canoco 4.5 Reference Manual (pages 178--179).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Species tolerances and sample heterogeneities — tolerance","text":"Matrix tolerances/heterogeneities additional   attributes: , scaling, N2, latter   NA useN2 = FALSE N2   estimated.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Species tolerances and sample heterogeneities — tolerance","text":"Gavin L. Simpson Jari Oksanen (decorana method).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Species tolerances and sample heterogeneities — tolerance","text":"x object class \"cca\". choices numeric; ordination axes compute     tolerances heterogeneities . Defaults axes 1 2. character; one \"species\" \"sites\",     indicating whether species tolerances sample heterogeneities     respectively computed. scaling character numeric; ordination scaling     use. See scores.cca details. hill logical; scaling character,     control whether Hill's scaling used (C)CA     respectively. See scores.cca details. useN2 logical; bias tolerances /     heterogeneities reduced via scaling Hill's N2? data Original input data used decorana.      missing, function tries get data used     decorana call. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Species tolerances and sample heterogeneities — tolerance","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ ., data = dune.env)  ## defaults to species tolerances tolerance(mod) #>  #> Species Tolerance #>  #> Scaling: 2 #>  #>                CCA1      CCA2 #> Achimill 0.32968099 0.9241988 #> Agrostol 0.93670069 0.9238455 #> Airaprae 1.04694096 0.5889849 #> Alopgeni 0.72227472 0.3760138 #> Anthodor 1.00596787 0.8338212 #> Bellpere 0.32891011 0.9962790 #> Bromhord 0.27740999 0.6236199 #> Chenalbu 0.00000000 0.0000000 #> Cirsarve 0.00000000 0.0000000 #> Comapalu 0.47185632 0.8029414 #> Eleopalu 0.50344134 0.9384960 #> Elymrepe 0.35119963 0.5642491 #> Empenigr 0.00000000 0.0000000 #> Hyporadi 1.05840696 0.7523003 #> Juncarti 0.78397702 1.0686743 #> Juncbufo 0.69275956 0.6180830 #> Lolipere 0.51006235 0.8278177 #> Planlanc 0.36040676 0.6962294 #> Poaprat  0.58184277 0.9547104 #> Poatriv  0.78695928 0.7433503 #> Ranuflam 0.56576326 1.1725628 #> Rumeacet 0.58715663 0.8751491 #> Sagiproc 0.70922180 1.1153129 #> Salirepe 0.98530179 0.1077917 #> Scorautu 1.04355761 1.0724439 #> Trifprat 0.03045846 0.3651949 #> Trifrepe 1.21543364 0.9115613 #> Vicilath 0.24853962 0.6194084 #> Bracruta 1.03787313 1.0958331 #> Callcusp 0.57882025 1.0418623 #>   ## sample heterogeneities for CCA axes 1:6 tolerance(mod, which = \"sites\", choices = 1:6) #>  #> Sample Heterogeneity #>  #> Scaling: 2 #>  #>         CCA1      CCA2      CCA3      CCA4      CCA5      CCA6 #> 1  0.2350112 0.8611530 1.7964571 0.4445499 2.4235732 0.5496289 #> 2  0.7100754 0.4136311 0.8151643 0.6311751 1.0467901 0.2514646 #> 3  0.5076492 0.7279717 0.8306874 0.5590739 0.3904998 0.9162012 #> 4  0.5955037 0.6901907 0.7931255 0.4873638 0.3966068 0.8700581 #> 5  0.6001048 0.5614830 1.1481560 0.3569604 0.4423909 1.9420043 #> 6  0.7272637 0.6867342 1.6068628 0.7778498 0.9187843 0.4938865 #> 7  0.6478967 0.4993262 0.7207318 0.3817131 0.4130713 0.7228173 #> 8  0.8563491 0.5498552 0.4217718 0.3370226 0.3013276 0.9535190 #> 9  0.5599722 0.7399384 0.4170304 1.0535541 1.4612437 0.7626183 #> 10 0.5210280 0.5806978 0.5856634 0.4174860 1.8559344 0.8890262 #> 11 0.4489323 0.6016877 0.3317371 1.8780211 1.2965939 2.1953737 #> 12 0.4948094 1.1084494 0.5226746 1.5064446 0.5703077 1.1561020 #> 13 0.6998985 0.8859365 0.4215474 0.8582272 0.5673698 0.5186678 #> 14 1.5925779 0.6747926 0.8927360 1.6798300 0.3480218 0.1575892 #> 15 1.0107648 0.5294221 1.0975629 1.7632888 0.2240900 0.3727240 #> 16 0.8031479 0.6058313 0.4871527 0.4227451 0.5341256 0.6990815 #> 17 0.5936276 1.5142792 0.5137979 1.0224938 1.7931775 0.6261853 #> 18 0.5689409 1.4067575 0.6398557 0.4983399 0.4364791 0.6590394 #> 19 1.1330387 0.9816332 1.1242398 0.7238920 0.5577662 0.7036044 #> 20 0.6737757 1.4458326 1.4380928 1.0959027 0.4142423 0.5332460 #>  ## average should be 1 with scaling = \"sites\", hill = TRUE tol <- tolerance(mod, which = \"sites\", scaling = \"sites\", hill = TRUE,    choices = 1:4) colMeans(tol) #>     CCA1     CCA2     CCA3     CCA4  #> 1.059199 1.048823 1.000551 1.077612  apply(tol, 2, sd) #>      CCA1      CCA2      CCA3      CCA4  #> 0.3174462 0.2793521 0.3714540 0.2681931  ## Rescaling tries to set all tolerances to 1 tol <- tolerance(decorana(dune)) colMeans(tol) #>      DCA1      DCA2      DCA3      DCA4  #> 0.9817657 0.9249544 0.9444811 0.9821666  apply(tol, 2, sd) #>      DCA1      DCA2      DCA3      DCA4  #> 0.1977777 0.3204058 0.2646872 0.1210543"},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":null,"dir":"Reference","previous_headings":"","what":"Functional Diversity and Community Distances from Species Trees — treedive","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Functional diversity defined total branch   length trait dendrogram connecting species, excluding   unnecessary root segments tree (Petchey Gaston   2006). Tree distance increase total branch length   combining two sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"","code":"treedive(comm, tree, match.force = TRUE, verbose = TRUE) treeheight(tree) treedist(x, tree, relative = TRUE, match.force = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"comm, x Community data frame matrix. tree dendrogram treedive must species     (columns). match.force Force matching column names data     (comm, x) labels tree. FALSE,     matching happens dimensions differ (warning     message). order data must match order tree     matching names done. verbose Print diagnostic messages warnings. relative Use distances relative height combined tree. ... arguments passed functions (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Function treeheight finds sum lengths connecting   segments dendrogram produced hclust,   dendrogram can coerced correct type using   .hclust. applied clustering species   traits, measure functional diversity (Petchey Gaston   2002, 2006), applied phylogenetic trees   phylogenetic diversity. Function treedive finds treeheight site   (row) community matrix. function uses subset   dendrogram species occur site, excludes   tree root needed connect species (Petchey   Gaston 2006). subset dendrogram found first   calculating cophenetic distances input   dendrogram, reconstructing dendrogram subset   cophenetic distance matrix species occurring   site. Diversity 0 one species, NA empty   communities. Function treedist finds dissimilarities among   trees. Pairwise dissimilarity two trees found combining   species common tree seeing much tree height   shared much unique. relative = FALSE   dissimilarity defined \\(2 (\\cup B) - - B\\),   \\(\\) \\(B\\) heights component trees   \\(\\cup B\\) height combined tree. relative = TRUE   dissimilarity \\((2(\\cup B)--B)/(\\cup B)\\).    Although latter formula similar   Jaccard dissimilarity (see vegdist,   designdist), range \\(0 \\ldots 1\\), since combined tree can add new root. two zero-height   trees combined tree zero height, relative   index attains maximum value \\(2\\). dissimilarity zero   combined zero-height tree. functions need dendrogram species traits phylogenies   input. species traits contain factor   ordered factor variables, recommended use Gower   distances mixed data (function daisy   package cluster), usually recommended clustering method   UPGMA (method = \"average\" function hclust)   (Podani Schmera 2006). Phylogenetic trees can changed   dendrograms using function .hclust.phylo   ape package. possible analyse non-randomness tree diversity   using oecosimu. needs specifying adequate Null   model, results change choice.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"vector diversity values single tree height,   dissimilarity structure inherits dist   can used similarly.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Lozupone, C. Knight, R. 2005. UniFrac: new phylogenetic method   comparing microbial communities. Applied Environmental   Microbiology 71, 8228--8235. Petchey, O.L. Gaston, K.J. 2002. Functional diversity (FD), species   richness community composition. Ecology Letters 5,   402--411. Petchey, O.L. Gaston, K.J. 2006. Functional diversity: back   basics looking forward. Ecology Letters 9, 741--758. Podani J. Schmera, D. 2006. dendrogram-based methods   functional diversity. Oikos 115, 179--185.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"","code":"## There is no data set on species properties yet, and we demonstrate ## the methods using phylogenetic trees data(dune) data(dune.phylodis) cl <- hclust(dune.phylodis) treedive(dune, cl) #> forced matching of 'tree' labels and 'comm' names #>         1         2         3         4         5         6         7         8  #>  384.0913  568.8791 1172.9455 1327.9317 1426.9067 1391.1628 1479.5062 1523.0792  #>         9        10        11        12        13        14        15        16  #> 1460.0423 1316.4832 1366.9960 1423.5582  895.1120 1457.2705 1505.9501 1187.5165  #>        17        18        19        20  #>  517.6920 1394.5162 1470.4671 1439.5571  ## Significance test using Null model communities. ## The current choice fixes numbers of species and picks species ## proportionally to their overall frequency oecosimu(dune, treedive, \"r1\", tree = cl, verbose = FALSE) #> Warning: nullmodel transformed 'comm' to binary data #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = treedive, method = \"r1\", tree = #> cl, verbose = FALSE) #>  #> nullmodel method ‘r1’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>    statistic       SES    mean    2.5%     50%  97.5% Pr(sim.)    #> 1     384.09 -1.238698  773.72  383.47  628.63 1237.7     0.11    #> 2     568.88 -2.353877 1222.61  663.93 1337.50 1561.4     0.01 ** #> 3    1172.95 -0.136353 1210.76  679.53 1327.94 1581.5     0.63    #> 4    1327.93 -0.418624 1427.25  886.63 1505.15 1733.1     0.45    #> 5    1426.91 -0.322462 1496.97  926.98 1559.25 1734.4     0.43    #> 6    1391.16  0.254066 1326.70  753.19 1408.30 1634.7     0.87    #> 7    1479.51  0.280433 1407.90  880.79 1476.23 1735.1     0.99    #> 8    1523.08  0.567886 1389.63  792.74 1428.01 1655.3     0.65    #> 9    1460.04  0.065245 1448.21  899.67 1472.92 1654.4     0.87    #> 10   1316.48 -0.192836 1362.43  708.60 1441.63 1608.0     0.47    #> 11   1367.00  0.768160 1150.05  621.65 1266.73 1486.4     0.43    #> 12   1423.56  1.101039 1088.13  622.24 1208.95 1474.2     0.25    #> 13    895.11 -0.972053 1188.10  656.34 1325.53 1558.5     0.61    #> 14   1457.27  1.477151  980.91  491.11 1101.65 1459.3     0.07 .  #> 15   1505.95  1.532058 1052.35  575.91 1171.88 1460.7     0.03 *  #> 16   1187.52  0.306608 1089.58  543.75 1238.26 1490.7     0.89    #> 17    517.69 -1.446211  959.50  504.26 1101.16 1367.8     0.09 .  #> 18   1394.52  0.961778 1099.50  618.22 1249.49 1493.8     0.33    #> 19   1470.47  1.134795 1121.18  564.70 1240.26 1562.8     0.15    #> 20   1439.56  1.160566 1104.59  629.08 1244.20 1467.4     0.17    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Phylogenetically ordered community table dtree <- treedist(dune, cl) tabasco(dune, hclust(dtree), cl)  ## Use tree distances  in capscale capscale(dtree ~ 1, comm=dune) #> Call: capscale(formula = dtree ~ 1, comm = dune) #>  #>                 Inertia Rank #> Total          2.335836      #> Unconstrained  2.343860   10 #> Imaginary     -0.008024    9 #> Inertia is squared Treedist distance  #> Species scores projected from ‘dune’  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  #> 1.1971 0.4546 0.2967 0.1346 0.1067 0.0912 0.0391 0.0190 0.0045 0.0004  #>"},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":null,"dir":"Reference","previous_headings":"","what":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Function tsallis find Tsallis diversities scale corresponding evenness measures. Function tsallisaccum finds statistics accumulating sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"","code":"tsallis(x, scales = seq(0, 2, 0.2), norm = FALSE, hill = FALSE) tsallisaccum(x, scales = seq(0, 2, 0.2), permutations = 100,     raw = FALSE, subset, ...) # S3 method for tsallisaccum persp(x, theta = 220, phi = 15, col = heat.colors(100), zlim, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"x Community data matrix plotting object. scales Scales Tsallis diversity. norm Logical, TRUE diversity values normalized     maximum (diversity value equiprobability conditions). hill Calculate Hill numbers. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,      permutation matrix row gives permuted indices. raw FALSE return summary statistics     permutations, TRUE returns individual     permutations. subset logical expression indicating sites (rows) keep:     missing values taken FALSE. theta, phi angles defining viewing     direction. theta gives azimuthal direction     phi colatitude. col Colours used surface. zlim Limits   vertical axis. ... arguments passed tsallis     graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Tsallis diversity (also equivalent Patil Taillie diversity) one-parametric generalised entropy function, defined : $$H_q = \\frac{1}{q-1} (1-\\sum_{=1}^S p_i^q)$$ \\(q\\) scale parameter, \\(S\\) number species sample (Tsallis 1988, Tothmeresz 1995). diversity concave \\(q>0\\), non-additive (Keylock 2005). \\(q=0\\) gives number species minus one, \\(q\\) tends 1 gives Shannon diversity, \\(q=2\\) gives Simpson index (see function diversity). norm = TRUE, tsallis gives values normalized maximum: $$H_q(max) = \\frac{S^{1-q}-1}{1-q}$$ \\(S\\) number species. \\(q\\) tends 1, maximum defined \\(ln(S)\\). hill = TRUE, tsallis gives Hill numbers (numbers equivalents, see Jost 2007): $$D_q = (1-(q-1) H)^{1/(1-q)}$$ Details plotting methods accumulating values can found help pages functions renyi renyiaccum.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Function tsallis returns data frame selected indices. Function tsallisaccum argument raw = FALSE returns three-dimensional array, first dimension accumulated sites, second dimension diversity scales, third dimension summary statistics mean, stdev, min, max, Qnt 0.025 Qnt 0.975. argument raw = TRUE statistics third dimension replaced individual permutation results.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Tsallis, C. (1988) Possible generalization Boltzmann-Gibbs   statistics.  J. Stat. Phis. 52, 479--487. Tothmeresz, B. (1995) Comparison different methods diversity   ordering. Journal Vegetation Science 6, 283--290. Patil, G. P. Taillie, C. (1982) Diversity concept   measurement.  J. . Stat. Ass. 77, 548--567. Keylock, C. J. (2005) Simpson diversity Shannon-Wiener index   special cases generalized entropy.  Oikos 109,   203--207. Jost, L (2007) Partitioning diversity independent alpha beta   components.  Ecology 88, 2427--2439.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Péter Sólymos, solymos@ualberta.ca, based code Roeland Kindt Jari Oksanen written renyi","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"","code":"data(BCI) i <- sample(nrow(BCI), 12) x1 <- tsallis(BCI[i,]) x1 #>      0      0.2      0.4      0.6      0.8        1      1.2      1.4      1.6 #> 8   87 39.98200 19.77567 10.60391 6.181934 3.908381 2.659907 1.928610 1.473408 #> 10  93 41.50369 20.10059 10.63988 6.164157 3.889803 2.648176 1.922207 1.470121 #> 5  100 44.20598 21.17686 11.08126 6.350040 3.969940 2.683412 1.937940 1.477217 #> 17  92 40.88788 19.62643 10.29183 5.926929 3.736897 2.553271 1.864739 1.435868 #> 19 108 47.27018 22.32602 11.49839 6.492802 4.013094 2.692466 1.936696 1.473828 #> 13  92 41.98171 20.60707 10.96297 6.342501 3.982373 2.694847 1.945425 1.481616 #> 46  85 38.71044 19.06049 10.22455 5.987209 3.810489 2.611431 1.904913 1.461976 #> 16  92 41.45601 20.19256 10.71573 6.210870 3.916821 2.663870 1.931567 1.475861 #> 36  91 40.76595 19.77916 10.48193 6.081803 3.846109 2.625076 1.910150 1.463936 #> 7   81 37.47840 18.73414 10.17269 6.004908 3.836811 2.631757 1.918091 1.469869 #> 24  94 42.55654 20.75558 10.99284 6.343926 3.979427 2.692702 1.944478 1.481404 #> 22  90 40.16368 19.41416 10.25630 5.939677 3.755413 2.566788 1.872586 1.439722 #>         1.8         2 #> 8  1.173986 0.9671998 #> 10 1.172341 0.9663808 #> 5  1.175553 0.9678267 #> 17 1.152122 0.9545126 #> 19 1.172481 0.9655820 #> 13 1.178033 0.9692075 #> 46 1.168556 0.9646728 #> 16 1.175935 0.9686598 #> 36 1.169232 0.9648567 #> 7  1.173083 0.9672014 #> 24 1.178152 0.9694268 #> 22 1.153640 0.9548316 diversity(BCI[i,],\"simpson\") == x1[[\"2\"]] #>    8   10    5   17   19   13   46   16   36    7   24   22  #> TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE  plot(x1)  x2 <- tsallis(BCI[i,],norm=TRUE) x2 #>    0       0.2       0.4       0.6       0.8         1       1.2       1.4 #> 8  1 0.9154260 0.8674322 0.8491531 0.8535754 0.8729254 0.8992501 0.9258854 #> 10 1 0.9001004 0.8450759 0.8255446 0.8324355 0.8561634 0.8872568 0.9180261 #> 5  1 0.9038026 0.8502581 0.8308757 0.8372445 0.8602030 0.8904867 0.9204832 #> 17 1 0.8945733 0.8308281 0.8026305 0.8032747 0.8244489 0.8566981 0.8913214 #> 19 1 0.9079031 0.8537683 0.8315799 0.8347890 0.8554245 0.8846675 0.9147428 #> 13 1 0.9185048 0.8723405 0.8549707 0.8595970 0.8786069 0.9042012 0.9298883 #> 46 1 0.9032439 0.8485357 0.8278693 0.8331492 0.8554539 0.8856795 0.9162035 #> 16 1 0.9070033 0.8547937 0.8356888 0.8417570 0.8641446 0.8938075 0.9232641 #> 36 1 0.8998669 0.8431295 0.8216927 0.8272622 0.8505725 0.8820846 0.9137994 #> 7  1 0.9094899 0.8600339 0.8427936 0.8492653 0.8706729 0.8985570 0.9261475 #> 24 1 0.9149445 0.8667059 0.8486326 0.8536824 0.8738548 0.9008891 0.9279024 #> 22 1 0.8945746 0.8334045 0.8082215 0.8109045 0.8325271 0.8637842 0.8965990 #>          1.6       1.8         2 #> 8  0.9486740 0.9660687 0.9783170 #> 10 0.9438798 0.9632975 0.9767719 #> 5  0.9456409 0.9644767 0.9775050 #> 17 0.9223038 0.9469046 0.9648877 #> 19 0.9406572 0.9605041 0.9745226 #> 13 0.9516896 0.9681999 0.9797424 #> 46 0.9422698 0.9621112 0.9760219 #> 16 0.9479928 0.9664763 0.9791887 #> 36 0.9407648 0.9611954 0.9754595 #> 7  0.9493990 0.9669335 0.9791421 #> 24 0.9507028 0.9678509 0.9797399 #> 22 0.9256369 0.9486075 0.9654409 plot(x2)  mod1 <- tsallisaccum(BCI[i,]) plot(mod1, as.table=TRUE, col = c(1, 2, 2))  persp(mod1)  mod2 <- tsallisaccum(BCI[i,], norm=TRUE) persp(mod2,theta=100,phi=30)"},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":null,"dir":"Reference","previous_headings":"","what":"Vegetation and environment in lichen pastures — varespec","title":"Vegetation and environment in lichen pastures — varespec","text":"varespec data frame 24 rows 44 columns.  Columns   estimated cover values 44 species.  variable names   formed scientific names, self explanatory anybody   familiar vegetation type. varechem data frame 24 rows 14 columns, giving soil characteristics sites varespec data frame. chemical measurements obvious names. Baresoil gives estimated cover bare soil, Humdepth thickness humus layer.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vegetation and environment in lichen pastures — varespec","text":"","code":"data(varechem)        data(varespec)"},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vegetation and environment in lichen pastures — varespec","text":"Väre, H., Ohtonen, R. Oksanen, J. (1995) Effects reindeer grazing understorey vegetation dry Pinus sylvestris forests. Journal Vegetation Science 6, 523--530.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vegetation and environment in lichen pastures — varespec","text":"","code":"data(varespec) data(varechem)"},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":null,"dir":"Reference","previous_headings":"","what":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"function partitions variation community data community   dissimilarities respect two, three, four explanatory   tables, using adjusted \\(R^2\\) redundancy analysis   ordination (RDA) distance-based redundancy analysis. response   single vector, partitioning partial regression. Collinear   variables explanatory tables removed prior   partitioning.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"","code":"varpart(Y, X, ..., data, chisquare = FALSE, transfo, scale = FALSE,     add = FALSE, sqrt.dist = FALSE, permutations) # S3 method for varpart summary(object, ...) showvarparts(parts, labels, bg = NULL, alpha = 63, Xnames,     id.size = 1.2,  ...) # S3 method for varpart234 plot(x, cutoff = 0, digits = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Y Data frame matrix containing response data table   dissimilarity structure inheriting dist.   community ecology, table often site--species table   dissimilarity object. X Two four explanatory models, variables tables.  can   defined three alternative ways: (1) one-sided model formulae   beginning ~ defining model, (2) name   single numeric factor variable, (3) name matrix numeric   data frame numeric factor variables.  model formulae   can factors, interaction terms transformations   variables. names variables model formula found   data frame given data argument, found ,   user environment.  Single variables, data frames matrices   found user environment.  entries till next argument   (data transfo) interpreted explanatory models,   names extra arguments abbreviated   omitted. ... parameters passed functions. NB, arguments   dots abbreviated must spelt completely. data data frame variables used formulae   X. chisquare Partition Chi-square inertia Correspondence   Analysis (cca). transfo Transformation Y (community data) using   decostand.  alternatives decostand can   used, preserving Euclidean metric include   \"hellinger\", \"chi.square\", \"total\",   \"norm\". Ignored Y dissimilarities. scale columns Y standardized unit   variance. Ignored Y dissimilarities. add Add constant non-diagonal values euclidify   dissimilarities (see wcmdscale details). Choice   \"lingoes\" (TRUE) use recommended method   Legendre & Anderson (1999: “method 1”) \"cailliez\"   uses “method 2”. argument effect   Y dissimilarities. sqrt.dist Take square root dissimilarities. often   euclidifies dissimilarities. NB., argument name   abbreviated. argument effect Y   dissimilarities. permutations chisquare = TRUE, adjusted     \\(R^2\\) estimated permutations,     paramater can list control values permutations     returned function , number     permutations required, permutation matrix row     gives permuted indices. parts Number explanatory tables (circles) displayed. labels Labels used displayed fractions. Default use   letters printed output. bg Fill colours circles ellipses. alpha Transparency fill colour.  argument takes     precedence possible transparency definitions     colour. value must range \\(0...255\\), low values     transparent.  Transparency available     graphics devices file formats. Xnames Names sources variation. Default names X1,   X2, X3 X4. Xnames=NA,   Xnames=NULL Xnames=\"\" produce names. names   can changed names. often best use short names. id.size numerical value giving character expansion factor   names circles ellipses. x, object varpart result. cutoff values cutoff displayed. digits number significant digits; number decimal   places least one higher.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"functions partition variation Y components   accounted two four explanatory tables combined   effects. Y multicolumn data frame matrix,   partitioning based redundancy analysis (RDA, see   rda) constrained correspondence analysis   chisquare = TRUE (CCA, see cca).  Y   single variable, partitioning based linear   regression.  Y dissimilarities, decomposition   based distance-based redundancy analysis (db-RDA, see   capscale) following McArdle & Anderson (2001).   input dissimilarities must compatible results   dist. Vegan functions vegdist,   designdist, raupcrick   betadiver produce objects, many   dissimilarity functions R packages. Partitioning made   squared dissimilarities analogously using variance   rectangular data -- unless sqrt.dist = TRUE specified. function primarily uses adjusted \\(R^2\\) assess   partitions explained explanatory tables   combinations (see RsquareAdj),   unbiased method (Peres-Neto et al., 2006). raw   \\(R^2\\) basic fractions also displayed,   biased estimates variation explained explanatory   table. correspondence analysis (chisquare = TRUE),   adjusted \\(R^2\\) found permutation vary   repeated analyses. identifiable fractions designated lower case alphabets.   meaning symbols can found separate document (use   browseVignettes(\"vegan\")), can displayed graphically   using function showvarparts. fraction testable can directly expressed RDA   db-RDA model.  cases printed output also displays   corresponding RDA model using notation explanatory tables   | conditions (partialled ; see rda   details). Although single fractions can testable,   mean fractions simultaneously can tested, since   number testable fractions higher number estimated   models. non-testable components found differences   testable components. testable components permutation   variance correspondence analysis (chisquare = TRUE),   non-testable components even higher variance. abridged explanation alphabetic symbols individual   fractions follows, computational details checked   vignette (readable browseVignettes(\"vegan\"))   source code. two explanatory tables, fractions explained    uniquely two tables []   [b], joint effect    [c]. three explanatory tables, fractions explained uniquely   three tables     [] [c], joint fractions two tables   [d] [f], joint fraction three   tables [g]. four explanatory tables, fractions explained uniquely   four tables []   [d], joint fractions two tables [e]   [j], joint fractions three variables [k]   [n], joint fraction four tables   [o]. summary give overview unique overall   contribution group variables. overall contribution   (labelled “Contributed”) consists unique contribution   variable equal shares fraction variable   contributes. summary tabulates fraction divided   variables, contributed component sum   divided fractions. summary based idea Lai et   al. (2022), similar output rdacca.hp   package. plot function displays Venn diagram   labels intersection (individual fraction) adjusted R   squared higher cutoff.  helper function   showvarpart displays fraction labels. circles   ellipses labelled short default names names defined   user argument Xnames. Longer explanatory file names can   written varpart output plot follows: use option   Xnames=NA, add new names using text function.   bit fiddling coordinates (see locator)   character size allow users place names reasonably short   lengths varpart plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Function varpart returns   object class \"varpart\" items scale  transfo (can missing) hold information   standardizations, tables contains names explanatory   tables, call function call.   function varpart calls function varpart2,  varpart3 varpart4 return object class  \"varpart234\" saves result item part.   items object : SS.Y Sum squares matrix Y. n Number observations (rows). nsets Number explanatory tables bigwarning Warnings collinearity. fract Basic fractions estimated constrained models. indfract Individual fractions possible subsections     Venn diagram (see showvarparts). contr1 Fractions can found conditioning single     explanatory table models three four explanatory tables. contr2 Fractions can found conditioning two     explanatory tables models four explanatory tables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"fraction-data-frames","dir":"Reference","previous_headings":"","what":"Fraction Data Frames","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Items fract,   indfract, contr1 contr2 data frames   items: Df: Degrees freedom numerator \\(F\\)-statistic     fraction. R.square: Raw \\(R^2\\). calculated     fract NA items. Adj.R.square: Adjusted \\(R^2\\). Testable: fraction can expressed (partial) RDA     model, directly Testable, field     TRUE.  case fraction label also gives     specification testable RDA model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"() References variation partitioning Borcard, D., P. Legendre & P. Drapeau. 1992. Partialling spatial component ecological variation. Ecology 73: 1045--1055. Lai J., Y. Zou, J. Zhang & P. Peres-Neto. 2022. Generalizing hierarchical variation partitioning multiple regression canonical analysis using rdacca.hp R package. Methods Ecology Evolution, 13: 782--788. Legendre, P. & L. Legendre. 2012. Numerical ecology, 3rd English edition. Elsevier Science BV, Amsterdam. (b) Reference transformations species data Legendre, P. E. D. Gallagher. 2001. Ecologically meaningful transformations ordination species data. Oecologia 129: 271--280. (c) Reference adjustment bimultivariate redundancy statistic Peres-Neto, P., P. Legendre, S. Dray D. Borcard. 2006. Variation partitioning species data matrices: estimation comparison fractions. Ecology 87: 2614--2625. (d) References partitioning dissimilarities Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy analysis: testing multispecies responses multifactorial ecological experiments. Ecological Monographs 69, 1--24. McArdle, B.H. & Anderson, M.J. (2001). Fitting multivariate models community data: comment distance-based redundancy analysis. Ecology 82, 290-297.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Pierre Legendre, Departement de Sciences Biologiques, Universite de Montreal, Canada.  developed Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"can use command browseVignettes(\"vegan\") display   document presents Venn diagrams showing fraction names   partitioning variation Y respect 2, 3, 4 tables   explanatory variables, well equations used variation   partitioning. functions frequently give negative estimates variation.   Adjusted \\(R^2\\) can negative fraction;   unadjusted \\(R^2\\) testable fractions variances   non-negative.  Non-testable fractions found   directly, subtracting different models, subtraction   results can negative.  fractions orthogonal, linearly   independent, complicated nonlinear dependencies can   cause negative non-testable fractions. fraction can negative   non-Euclidean dissimilarities underlying db-RDA model   can yield negative eigenvalues (see capscale,   dbrda). negative eigenvalues underlying   analysis can avoided arguments sqrt.dist add   similar effect capscale: square   roots several dissimilarities negative eigenvalues,   negative eigenvalues produced Lingoes Cailliez   adjustment, effect add random variation   dissimilarities. simplified, fast version RDA, CCA adn dbRDA used (functions   simpleRDA2, simpleCCA simpleDBRDA).    actual calculations done functions varpart2   varpart4, intended called directly   user.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"","code":"data(mite) data(mite.env) data(mite.pcnm)  # Two explanatory data frames -- Hellinger-transform Y mod <- varpart(mite, mite.env, mite.pcnm, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = mite.env, mite.pcnm, transfo = \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  mite.env #> X2:  mite.pcnm  #>  #> No. of explanatory tables: 2  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                      Df R.squared Adj.R.squared Testable #> [a+c] = X1           11   0.52650       0.43670     TRUE #> [b+c] = X2           22   0.62300       0.44653     TRUE #> [a+b+c] = X1+X2      33   0.75893       0.53794     TRUE #> Individual fractions                                     #> [a] = X1|X2          11                 0.09141     TRUE #> [b] = X2|X1          22                 0.10124     TRUE #> [c]                   0                 0.34530    FALSE #> [d] = Residuals                         0.46206    FALSE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed Component #> X1 0.0914       0.264  mite.env #> X2 0.1012       0.274 mite.pcnm #>  #> Contributions of fractions to sets: #>  #>         X1     X2 #> [a] 0.0914        #> [b]        0.1012 #> [c] 0.1726 0.1726  ## Use fill colours showvarparts(2, bg = c(\"hotpink\",\"skyblue\"))  plot(mod, bg = c(\"hotpink\",\"skyblue\"))  ## Test fraction [a] using partial RDA, '~ .' in formula tells to use ## all variables of data mite.env. aFrac <- rda(decostand(mite, \"hel\"), mite.env, mite.pcnm) anova(aFrac) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(X = decostand(mite, \"hel\"), Y = mite.env, Z = mite.pcnm) #>          Df Variance      F Pr(>F)     #> Model    11 0.053592 1.8453  0.001 *** #> Residual 36 0.095050                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## RsquareAdj gives the same result as component [a] of varpart RsquareAdj(aFrac) #> $r.squared #> [1] 0.1359251 #>  #> $adj.r.squared #> [1] 0.09140797 #>   ## Partition Bray-Curtis dissimilarities varpart(vegdist(mite), mite.env, mite.pcnm) #>  #> Partition of squared Bray distance in dbRDA  #>  #> Call: varpart(Y = vegdist(mite), X = mite.env, mite.pcnm) #>  #> Explanatory tables: #> X1:  mite.env #> X2:  mite.pcnm  #>  #> No. of explanatory tables: 2  #> Total variation (SS): 14.696  #> No. of observations: 70  #>  #> Partition table: #>                      Df R.squared Adj.R.squared Testable #> [a+c] = X1           11   0.50512       0.41127     TRUE #> [b+c] = X2           22   0.60144       0.41489     TRUE #> [a+b+c] = X1+X2      33   0.74631       0.51375     TRUE #> Individual fractions                                     #> [a] = X1|X2          11                 0.09887     TRUE #> [b] = X2|X1          22                 0.10249     TRUE #> [c]                   0                 0.31240    FALSE #> [d] = Residuals                         0.48625    FALSE #> --- #> Use function ‘dbrda’ to test significance of fractions of interest ## Three explanatory tables with formula interface mod <- varpart(mite, ~ SubsDens + WatrCont, ~ Substrate + Shrub + Topo,    mite.pcnm, data=mite.env, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub + #> Topo, mite.pcnm, data = mite.env, transfo = \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  ~SubsDens + WatrCont #> X2:  ~Substrate + Shrub + Topo #> X3:  mite.pcnm  #>  #> No. of explanatory tables: 3  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                       Df R.square Adj.R.square Testable #> [a+d+f+g] = X1         2  0.32677      0.30667     TRUE #> [b+d+e+g] = X2         9  0.40395      0.31454     TRUE #> [c+e+f+g] = X3        22  0.62300      0.44653     TRUE #> [a+b+d+e+f+g] = X1+X2 11  0.52650      0.43670     TRUE #> [a+c+d+e+f+g] = X1+X3 24  0.67372      0.49970     TRUE #> [b+c+d+e+f+g] = X2+X3 31  0.72400      0.49884     TRUE #> [a+b+c+d+e+f+g] = All 33  0.75893      0.53794     TRUE #> Individual fractions                                    #> [a] = X1 | X2+X3       2               0.03910     TRUE #> [b] = X2 | X1+X3       9               0.03824     TRUE #> [c] = X3 | X1+X2      22               0.10124     TRUE #> [d]                    0               0.01407    FALSE #> [e]                    0               0.09179    FALSE #> [f]                    0               0.08306    FALSE #> [g]                    0               0.17045    FALSE #> [h] = Residuals                        0.46206    FALSE #> Controlling 1 table X                                   #> [a+d] = X1 | X3        2               0.05317     TRUE #> [a+f] = X1 | X2        2               0.12216     TRUE #> [b+d] = X2 | X3        9               0.05231     TRUE #> [b+e] = X2 | X1        9               0.13003     TRUE #> [c+e] = X3 | X1       22               0.19303     TRUE #> [c+f] = X3 | X2       22               0.18429     TRUE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed                 Component #> X1 0.0391       0.144      ~SubsDens + WatrCont #> X2 0.0382       0.148 ~Substrate + Shrub + Topo #> X3 0.1012       0.245                 mite.pcnm #>  #> Contributions of fractions to sets: #>  #>          X1      X2      X3 #> [a] 0.03910                 #> [b]         0.03824         #> [c]                 0.10124 #> [d] 0.00703 0.00703         #> [e]         0.04590 0.04590 #> [f] 0.04153         0.04153 #> [g] 0.05682 0.05682 0.05682 showvarparts(3, bg=2:4)  plot(mod, bg=2:4)   ## Use RDA to test fraction [a] ## Matrix can be an argument in formula rda.result <- rda(decostand(mite, \"hell\") ~ SubsDens + WatrCont +    Condition(Substrate + Shrub + Topo) +    Condition(as.matrix(mite.pcnm)), data = mite.env) anova(rda.result) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = decostand(mite, \"hell\") ~ SubsDens + WatrCont + Condition(Substrate + Shrub + Topo) + Condition(as.matrix(mite.pcnm)), data = mite.env) #>          Df Variance      F Pr(>F)    #> Model     2 0.013771 2.6079  0.005 ** #> Residual 36 0.095050                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Four explanatory tables mod <- varpart(mite, ~ SubsDens + WatrCont, ~Substrate + Shrub + Topo,   mite.pcnm[,1:11], mite.pcnm[,12:22], data=mite.env, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub + #> Topo, mite.pcnm[, 1:11], mite.pcnm[, 12:22], data = mite.env, transfo = #> \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  ~SubsDens + WatrCont #> X2:  ~Substrate + Shrub + Topo #> X3:  mite.pcnm[, 1:11] #> X4:  mite.pcnm[, 12:22]  #>  #> No. of explanatory tables: 4  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                             Df R.square Adj.R.square Testable #> [aeghklno] = X1              2  0.32677      0.30667     TRUE #> [befiklmo] = X2              9  0.40395      0.31454     TRUE #> [cfgjlmno] = X3             11  0.53231      0.44361     TRUE #> [dhijkmno] = X4             11  0.09069     -0.08176     TRUE #> [abefghiklmno] = X1+X2      11  0.52650      0.43670     TRUE #> [acefghjklmno] = X1+X3      13  0.59150      0.49667     TRUE #> [adeghijklmno] = X1+X4      13  0.40374      0.26533     TRUE #> [bcefgijklmno] = X2+X3      20  0.63650      0.48813     TRUE #> [bdefhijklmno] = X2+X4      20  0.53338      0.34292     TRUE #> [cdfghijklmno] = X3+X4      22  0.62300      0.44653     TRUE #> [abcefghijklmno] = X1+X2+X3 22  0.67947      0.52944     TRUE #> [abdefghijklmno] = X1+X2+X4 22  0.61553      0.43557     TRUE #> [acdefghijklmno] = X1+X3+X4 24  0.67372      0.49970     TRUE #> [bcdefghijklmno] = X2+X3+X4 31  0.72400      0.49884     TRUE #> [abcdefghijklmno] = All     33  0.75893      0.53794     TRUE #> Individual fractions                                          #> [a] = X1 | X2+X3+X4          2               0.03910     TRUE #> [b] = X2 | X1+X3+X4          9               0.03824     TRUE #> [c] = X3 | X1+X2+X4         11               0.10237     TRUE #> [d] = X4 | X1+X2+X3         11               0.00850     TRUE #> [e]                          0               0.01407    FALSE #> [f]                          0               0.13200    FALSE #> [g]                          0               0.05355    FALSE #> [h]                          0               0.00220    FALSE #> [i]                          0              -0.00547    FALSE #> [j]                          0              -0.00963    FALSE #> [k]                          0              -0.00231    FALSE #> [l]                          0               0.24037    FALSE #> [m]                          0              -0.03474    FALSE #> [n]                          0               0.02730    FALSE #> [o]                          0              -0.06761    FALSE #> [p] = Residuals              0               0.46206    FALSE #> Controlling 2 tables X                                        #> [ae] = X1 | X3+X4            2               0.05317     TRUE #> [ag] = X1 | X2+X4            2               0.09265     TRUE #> [ah] = X1 | X2+X3            2               0.04131     TRUE #> [be] = X2 | X3+X4            9               0.05231     TRUE #> [bf] = X2 | X1+X4            9               0.17024     TRUE #> [bi] = X2 | X1+X3            9               0.03277     TRUE #> [cf] = X3 | X1+X4           11               0.23437     TRUE #> [cg] = X3 | X2+X4           11               0.15592     TRUE #> [cj] = X3 | X1+X2           11               0.09274     TRUE #> [dh] = X4 | X2+X3           11               0.01071     TRUE #> [di] = X4 | X1+X3           11               0.00303     TRUE #> [dj] = X4 | X1+X2           11              -0.00113     TRUE #> Controlling 1 table X                                         #> [aghn] = X1 | X2             2               0.12216     TRUE #> [aehk] = X1 | X3             2               0.05306     TRUE #> [aegl] = X1 | X4             2               0.34709     TRUE #> [bfim] = X2 | X1             9               0.13003     TRUE #> [beik] = X2 | X3             9               0.04452     TRUE #> [befl] = X2 | X4             9               0.42468     TRUE #> [cfjm] = X3 | X1            11               0.19000     TRUE #> [cgjn] = X3 | X2            11               0.17359     TRUE #> [cfgl] = X3 | X4            11               0.52830     TRUE #> [dijm] = X4 | X1            11              -0.04134     TRUE #> [dhjn] = X4 | X2            11               0.02837     TRUE #> [dhik] = X4 | X3            11               0.00292     TRUE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed                 Component #> X1 0.0391      0.1456      ~SubsDens + WatrCont #> X2 0.0382      0.1594 ~Substrate + Shrub + Topo #> X3 0.1024      0.2511         mite.pcnm[, 1:11] #> X4 0.0085     -0.0181        mite.pcnm[, 12:22] #>  #> Contributions of fractions to sets: #>  #>           X1       X2       X3       X4 #> [a]  0.03910                            #> [b]           0.03824                   #> [c]                    0.10237          #> [d]                             0.00850 #> [e]  0.00703  0.00703                   #> [f]           0.06600  0.06600          #> [g]  0.02678           0.02678          #> [h]  0.00110                    0.00110 #> [i]          -0.00274          -0.00274 #> [j]                   -0.00482 -0.00482 #> [k] -0.00077 -0.00077          -0.00077 #> [l]  0.08012  0.08012  0.08012          #> [m]          -0.01158 -0.01158 -0.01158 #> [n]  0.00910           0.00910  0.00910 #> [o] -0.01690 -0.01690 -0.01690 -0.01690 plot(mod, bg=2:5)  ## Show values for all partitions by putting 'cutoff' low enough: plot(mod, cutoff = -Inf, cex = 0.7, bg=2:5)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":null,"dir":"Reference","previous_headings":"","what":"Defunct Functions in Package vegan — vegan-defunct","title":"Defunct Functions in Package vegan — vegan-defunct","text":"functions variables listed longer part   vegan longer needed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defunct Functions in Package vegan — vegan-defunct","text":"","code":"## defunct in vegan 2.6-0 as.mlm(x) humpfit(mass, spno, family = poisson, start) vegandocs(doc = c(\"NEWS\", \"ONEWS\", \"FAQ-vegan\", \"intro-vegan\",     \"diversity-vegan\", \"decision-vegan\", \"partitioning\", \"permutations\"))  ## defunct in vegan 2.5-0 commsimulator(x, method, thin=1)  ## defunct in vegan 2.4-0 # S3 method for adonis density(x, ...) # S3 method for vegandensity plot(x, main = NULL, xlab = NULL, ylab = \"Density\",     type = \"l\", zero.line = TRUE, obs.line = TRUE, ...) # S3 method for adonis densityplot(x, data, xlab = \"Null\", ...)  ## defunct in vegan 2.2-0 metaMDSrotate(object, vec, na.rm = FALSE, ...)  ## defunct in vegan 2.0-0 getNumObs(object, ...) permuted.index2(n, control = permControl())"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Defunct Functions in Package vegan — vegan-defunct","text":".mlm function replaced set functions can   find statistics directly ordination result object:   see hatvalues.cca, rstandard.cca,   rstudent.cca, cooks.distance.cca,   vcov.cca. Function humpfit transferred natto package   still available https://github.com/jarioksa/natto/. R functions news used read vegan   NEWS (news(package = \"vegan\")),   browseVignettes better tool reading vignettes   vegandocs. Function commsimulator replaced   make.commsim defines Null models,   functions nullmodel   simulate.nullmodel check input data   generate Null model communities. deprecated density densityplot methods   replaced similar methods permustats.   permustats offers powerful analysis tools   permutations, including summary.permustats giving   \\(z\\) values (.k.. standardized effect sizes, SES), Q-Q   plots (qqnorm.permustats,   qqmath.permustats). Function metaMDSrotate replaced   MDSrotate can handle monoMDS   results addition metaMDS. permutation functions moved permute package,   documented .  permute package replaces   permuted.index permuted.index2   shuffle getNumObs   specific nobs-methods.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated Functions in vegan package — vegan-deprecated","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"functions provided compatibility older versions   vegan , may defunct soon next release.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"","code":"## use adonis2 instead adonis(formula, data, permutations = 999, method = \"bray\",     strata = NULL, contr.unordered = \"contr.sum\",     contr.ordered = \"contr.poly\", parallel = getOption(\"mc.cores\"), ...)     orditkplot(x, display = \"species\", choices = 1:2, width, xlim, ylim,     tcex = 0.8, tcol, pch = 1,  pcol, pbg, pcex = 0.7, labels,  ...) ## moved to vegan3d package: install from CRAN orditkplot(x, display = \"species\", choices = 1:2, width, xlim, ylim,     tcex = 0.8, tcol, pch = 1,  pcol, pbg, pcex = 0.7, labels,  ...) # S3 method for orditkplot plot(x, ...) # S3 method for orditkplot points(x, pch = x$args$pch, cex = x$args$pcex,        col = x$args$pcol, bg = x$args$pbg, ...) # S3 method for orditkplot text(x, cex = x$args$tcex, col = x$args$tcol,      font = attr(x$labels, \"font\"), ...) # S3 method for orditkplot scores(x, display, ...) ## use toCoda instead as.mcmc.oecosimu(x) as.mcmc.permat(x)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"formula, data, permutations, method, parallel, ... See     adonis2. strata groups (strata) within constrain permutations. contr.unordered, contr.ordered contrasts used design matrix. x ordination result orditkplot object      tranformed .mcmc. display, choices kind scores number axes. width size Tcl/Tk window inches. xlim, ylim, tcex, tcol, pch, pcol, pbg, pcex, labels, cex,      col, bg, font graphical parameters similar standard      plot functions; applied points preceded      p, text t.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"adonis2 replaces adonis extended   functionality completely new internal design. shared arguments   adonis similar adonis2,   arguments contr.unordered contr.ordered can set   contrasts within adonis. orditkplot moved vegan3d (version   1.3-0). Install package CRAN use old way.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal vegan functions — vegan-internal","title":"Internal vegan functions — vegan-internal","text":"Internal vegan functions intended called directly,   within functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal vegan functions — vegan-internal","text":"","code":"ordiParseFormula(formula, data, xlev = NULL,  na.action = na.fail,     subset = NULL, X) ordiTerminfo(d, data) ordiNAexclude(x, excluded) ordiNApredict(omit, x) ordiArgAbsorber(..., shrink, origin, scaling, triangular,                 display, choices, const, truemean, FUN) centroids.cca(x, mf, wt) getPermuteMatrix(perm, N, strata = NULL) howHead(x, ...) pasteCall(call, prefix = \"Call:\") veganCovEllipse(cov, center = c(0, 0), scale = 1, npoints = 100) veganMahatrans(x, s2, tol = sqrt(.Machine$double.eps)) hierParseFormula(formula, data) GowerDblcen(x, na.rm = TRUE) addLingoes(d) addCailliez(d)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Internal vegan functions — vegan-internal","text":"description intended vegan   developers: functions intended users,   used within functions.  general, functions   exported namespace, must use   get ::: directly call   functions. ordiParseFormula returns list three matrices (dependent   variables, model.matrix constraints   conditions, possibly NULL) needed constrained   ordination. Argument xlev passed   model.frame. left-hand-side already   evaluated calling code, can given argument X   re-evaluated. ordiTermInfo finds term   information constrained ordination described   cca.object. ordiNAexclude implements   na.action = na.exclude constrained ordination finding WA   scores CCA components site scores unconstrained component   excluded rows observations. Function   ordiNApredict pads result object WA   scores similarly napredict. ordiArgAbsorber absorbs arguments scores   function vegan cause superfluous   warnings graphical function FUN. implement   scores functions new arguments, update   ordiArgAbsorber. centroids.cca finds weighted centroids variables. getPermuteMatrix interprets user input returns   permutation matrix row gives indices observations   permutation. input perm can single number   number simple permutations, result   defining permutation scheme   permutation matrix. howHead formats permutation scheme   display. formatting   compact one used print permute   package, shows non-default choices. output normally   used printing results vegan permutations. pasteCall prints function call nicely wrapped   Sweave output. veganCovEllipse finds coordinates drawing   covariance ellipse. veganMahatrans transforms data matrix Euclidean   distances Mahalanobis distances. input data x must   matrix centred columns, s2 covariance matrix.   s2 given, covariance matrix found x   within function. hierParseFormula returns list one matrix (left hand side)   model frame factors representing hierarchy levels    (right hand side) used adipart,    multipart hiersimu. GowerDblcen performs Gower double centring matrix   dissimilarities. Similar function earlier available compiled   code stats, part official API,   therefore poorer replacement. addLingoes addCailliez find constant added   non-diagonal (squared) dissimilarities make eigenvalues   non-negative Principal Co-ordinates Analysis   (wcmdscale, capscale). Function   cmdscale implements Cailliez method. argument   matrix dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"vegan package provides tools descriptive community ecology. basic functions diversity analysis, community ordination dissimilarity analysis. multivariate tools can used data types well.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"functions vegan package contain tools diversity analysis, ordination methods tools analysis dissimilarities. Together labdsv package, vegan package provides standard tools descriptive community analysis. Package ade4 provides alternative comprehensive package, several packages complement vegan provide tools deeper analysis specific fields. Package BiodiversityR provides GUI large subset vegan functionality. vegan package developed GitHub (https://github.com/vegandevs/vegan/).  GitHub provides --date information forums bug reports. important changes vegan documents can read news(package=\"vegan\") vignettes can browsed browseVignettes(\"vegan\"). vignettes include vegan FAQ, discussion design decisions, short introduction ordination discussion diversity methods. see preferable citation package, type citation(\"vegan\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"vegan development team Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, Helene Wagner.  Many people contributed individual functions: see credits function help pages.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"","code":"### Example 1: Unconstrained ordination ## NMDS data(varespec) data(varechem) ord <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.184583  #> ... Procrustes: rmse 0.04902295  max resid 0.1551746  #> Run 2 stress 0.1948413  #> Run 3 stress 0.2136761  #> Run 4 stress 0.2079056  #> Run 5 stress 0.2087937  #> Run 6 stress 0.196245  #> Run 7 stress 0.2069725  #> Run 8 stress 0.1948413  #> Run 9 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04165046  max resid 0.1519318  #> Run 10 stress 0.1843196  #> Run 11 stress 0.2109853  #> Run 12 stress 0.2177543  #> Run 13 stress 0.2224267  #> Run 14 stress 0.2044974  #> Run 15 stress 0.195049  #> Run 16 stress 0.1969805  #> Run 17 stress 0.22911  #> Run 18 stress 0.2397062  #> Run 19 stress 0.18584  #> Run 20 stress 0.2295494  #> *** Best solution was not repeated -- monoMDS stopping criteria: #>      1: no. of iterations >= maxit #>     19: stress ratio > sratmax plot(ord, type = \"t\") ## Fit environmental variables ef <- envfit(ord, varechem) ef #>  #> ***VECTORS #>  #>             NMDS1    NMDS2     r2 Pr(>r)     #> N        -0.05721 -0.99836 0.2537  0.038 *   #> P         0.61964  0.78489 0.1938  0.102     #> K         0.76634  0.64244 0.1809  0.127     #> Ca        0.68509  0.72846 0.4119  0.005 **  #> Mg        0.63243  0.77462 0.4271  0.003 **  #> S         0.19127  0.98154 0.1752  0.110     #> Al       -0.87166  0.49011 0.5269  0.001 *** #> Fe       -0.93612  0.35169 0.4451  0.001 *** #> Mn        0.79870 -0.60173 0.5231  0.001 *** #> Zn        0.61752  0.78655 0.1879  0.102     #> Mo       -0.90302  0.42960 0.0609  0.521     #> Baresoil  0.92500 -0.37996 0.2508  0.050 *   #> Humdepth  0.93288 -0.36018 0.5200  0.002 **  #> pH       -0.64804  0.76161 0.2308  0.074 .   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 999 #>  #>  plot(ef, p.max = 0.05)  ### Example 2: Constrained ordination (RDA) ## The example uses formula interface to define the model data(dune) data(dune.env) ## No constraints: PCA mod0 <- rda(dune ~ 1, dune.env) mod0 #> Call: rda(formula = dune ~ 1, data = dune.env) #>  #>               Inertia Rank #> Total           84.12      #> Unconstrained   84.12   19 #> Inertia is variance  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8  #> 24.795 18.147  7.629  7.153  5.695  4.333  3.199  2.782  #> (Showing 8 of 19 unconstrained eigenvalues) #>  plot(mod0)  ## All environmental variables: Full model mod1 <- rda(dune ~ ., dune.env) mod1 #> Call: rda(formula = dune ~ A1 + Moisture + Management + Use + Manure, #> data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   63.2062     0.7513   12 #> Unconstrained 20.9175     0.2487    7 #> Inertia is variance  #> Some constraints or conditions were aliased because they were redundant #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11  #> 22.396 16.208  7.039  4.038  3.760  2.609  2.167  1.803  1.404  0.917  0.582  #>  RDA12  #>  0.284  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7  #> 6.627 4.309 3.549 2.546 2.340 0.934 0.612  #>  plot(mod1)  ## Automatic selection of variables by permutation P-values mod <- ordistep(mod0, scope=formula(mod1)) #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.015 *  #> + A1          1 89.591 1.9217  0.065 .  #> + Use         2 91.032 1.1741  0.240    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>              Df   AIC    F Pr(>F)    #> - Management  3 89.62 2.84  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.005 ** #> + Manure    3 87.517 1.3902  0.095 .  #> + A1        1 87.424 1.2965  0.200    #> + Use       2 88.284 1.0510  0.360    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>              Df    AIC      F Pr(>F)    #> - Moisture    3 87.082 1.9764  0.015 *  #> - Management  3 87.707 2.1769  0.010 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225  0.325 #> + A1      1 86.220 0.8359  0.585 #> + Use     2 86.842 0.8027  0.770 #>  mod #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>  plot(mod)  ## Permutation test for all variables anova(mod) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = dune ~ Management + Moisture, data = dune.env) #>          Df Variance      F Pr(>F)     #> Model     6   46.425 2.6682  0.001 *** #> Residual 13   37.699                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Permutation test of \"type III\" effects, or significance when a term ## is added to the model after all other terms anova(mod, by = \"margin\") #> Permutation test for rda under reduced model #> Marginal effects of terms #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = dune ~ Management + Moisture, data = dune.env) #>            Df Variance      F Pr(>F)    #> Management  3   18.938 2.1769  0.005 ** #> Moisture    3   17.194 1.9764  0.008 ** #> Residual   13   37.699                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Plot only sample plots, use different symbols and draw SD ellipses  ## for Managemenet classes plot(mod, display = \"sites\", type = \"n\") with(dune.env, points(mod, disp = \"si\", pch = as.numeric(Management))) with(dune.env, legend(\"topleft\", levels(Management), pch = 1:4,   title = \"Management\")) with(dune.env, ordiellipse(mod, Management, label = TRUE)) ## add fitted surface of diversity to the model ordisurf(mod, diversity(dune), add = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 1.28  total = 2.28  #>  #> REML score: 3.00623      ### Example 3: analysis of dissimilarites a.k.a. non-parametric ### permutational anova adonis2(dune ~ ., dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ ., data = dune.env) #>            Df SumOfSqs      R2      F Pr(>F)    #> A1          1   0.7230 0.16817 5.2038  0.002 ** #> Moisture    3   1.1871 0.27613 2.8482  0.006 ** #> Management  3   0.9036 0.21019 2.1681  0.028 *  #> Use         2   0.0921 0.02143 0.3315  0.983    #> Manure      3   0.4208 0.09787 1.0096  0.439    #> Residual    7   0.9725 0.22621                  #> Total      19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 adonis2(dune ~ Management + Moisture, dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management + Moisture, data = dune.env) #>            Df SumOfSqs      R2      F Pr(>F)     #> Management  3   1.4686 0.34161 3.7907  0.001 *** #> Moisture    3   1.1516 0.26788 2.9726  0.002 **  #> Residual   13   1.6788 0.39051                   #> Total      19   4.2990 1.00000                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Dissimilarity Indices for Community Ecologists — vegdist","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"function computes dissimilarity indices useful   popular community ecologists. indices use quantitative data,   although named corresponding binary index,   can calculate binary index using appropriate argument.    find favourite index , can see can   implemented using designdist.  Gower, Bray--Curtis,   Jaccard Kulczynski indices good detecting underlying   ecological gradients (Faith et al. 1987). Morisita, Horn--Morisita,   Binomial, Cao Chao indices able handle different   sample sizes (Wolda 1981, Krebs 1999, Anderson & Millar 2004),   Mountford (1962) Raup-Crick indices presence--absence data   able handle unknown (variable) sample sizes.   indices discussed Krebs (1999) Legendre & Legendre   (2012), properties compared Wolda (1981)   Legendre & De Cáceres (2012). Aitchison (1986) distance    equivalent Euclidean distance CLR-transformed samples   (\"clr\") deals positive compositional data.   Robust Aitchison distance Martino et al. (2019) uses robust   CLR (\"rlcr\"), making applicable non-negative data   including zeroes (unlike standard Aitchison).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"","code":"vegdist(x, method=\"bray\", binary=FALSE, diag=FALSE, upper=FALSE,         na.rm = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"x Community data matrix. method Dissimilarity index, partial match     \"manhattan\", \"euclidean\", \"canberra\",     \"clark\", \"bray\", \"kulczynski\",     \"jaccard\", \"gower\", \"altGower\",     \"morisita\", \"horn\", \"mountford\", \"raup\",     \"binomial\", \"chao\", \"cao\", \"mahalanobis\",     \"chisq\", \"chord\", \"hellinger\",     \"aitchison\", \"robust.aitchison\". binary Perform presence/absence standardization analysis     using decostand. diag Compute diagonals. upper Return upper diagonal. na.rm Pairwise deletion missing observations     computing dissimilarities. ... parameters.  ignored, except     method =\"gower\" accepts range.global parameter     decostand, method=\"aitchison\",     accepts pseudocount parameter decostand used     clr transformation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Jaccard (\"jaccard\"), Mountford (\"mountford\"),   Raup--Crick (\"raup\"), Binomial Chao indices discussed   later section.  function also finds indices presence/   absence data setting binary = TRUE. following overview   gives first quantitative version, \\(x_{ij}\\)   \\(x_{ik}\\) refer quantity species (column) \\(\\)   sites (rows) \\(j\\) \\(k\\). binary versions \\(\\)   \\(B\\) numbers species compared sites, \\(J\\)   number species occur compared sites similarly   designdist (many indices produce identical binary   versions):  Jaccard index computed \\(2B/(1+B)\\), \\(B\\)   Bray--Curtis dissimilarity. Binomial index derived Binomial deviance null hypothesis   two compared communities equal. able   handle variable sample sizes. index fixed upper   limit, can vary among sites shared species.   discussion, see Anderson & Millar (2004). Cao index CYd index (Cao et al. 1997) suggested minimally   biased index high beta diversity variable sampling intensity.   Cao index fixed upper limit, can vary among sites   shared species.  index intended count (integer)   data, undefined zero abundances; replaced   arbitrary value \\(0.1\\) following Cao et al. (1997).  Cao et   al. (1997) used \\(\\log_{10}\\), current function uses   natural logarithms values approximately \\(2.30\\)   times higher 10-based logarithms. Anderson & Thompson (2004)   give alternative formulation Cao index highlight   relationship Binomial index (). Mountford index defined \\(M = 1/\\alpha\\) \\(\\alpha\\)   parameter Fisher's logseries assuming compared   communities samples community   (cf. fisherfit, fisher.alpha). index   \\(M\\) found positive root equation \\(\\exp() +   \\exp(bM) = 1 + \\exp[(+b-j)M]\\), \\(j\\) number species occurring   communities, \\(\\) \\(b\\) number species   separate community (index uses presence--absence   information). Mountford index usually misrepresented   literature: indeed Mountford (1962) suggested approximation   used starting value iterations, proper index   defined root equation . function   vegdist solves \\(M\\) Newton method. Please note   either \\(\\) \\(b\\) equal \\(j\\), one   communities subset , dissimilarity   \\(0\\) meaning non-identical objects may regarded   similar index non-metric. Mountford index   range \\(0 \\dots \\log(2)\\). Raup--Crick dissimilarity (method = \"raup\") probabilistic   index based presence/absence data.  defined \\(1 -   prob(j)\\), based probability observing least \\(j\\)   species shared compared communities.  current function uses   analytic result hypergeometric distribution   (phyper) find probabilities.  probability   (index) dependent number species missing   sites, adding -zero species data removing missing   species data influence index.  probability (  index) may almost zero almost one wide range   parameter values.  index nonmetric: two communities   shared species may dissimilarity slightly one, two   identical communities may dissimilarity slightly zero.   index uses equal occurrence probabilities species, Raup   Crick originally suggested sampling probabilities   proportional species frequencies (Chase et al. 2011). simulation   approach unequal species sampling probabilities implemented   raupcrick function following Chase et al. (2011).    index can also used transposed data give probabilistic   dissimilarity index species co-occurrence (identical Veech   2013). Chao index tries take account number unseen species   pairs, similarly method = \"chao\"   specpool. Function vegdist implements   Jaccard, index defined   \\(1-\\frac{U \\times V}{U + V - U \\times V}\\);   types can defined function chaodist. Chao   equation, \\(U = C_j/N_j + (N_k - 1)/N_k \\times a_1/(2 a_2) \\times   S_j/N_j\\),   \\(V\\) similar except site index   \\(k\\). \\(C_j\\) total number individuals   species site \\(j\\) shared site \\(k\\),   \\(N_j\\) total number individuals site \\(j\\),   \\(a_1\\) (\\(a_2\\)) number species   occurring site \\(j\\) one (two) individuals   site \\(k\\), \\(S_j\\) total number individuals   species present site \\(j\\) occur one   individual site \\(k\\) (Chao et al. 2005). Morisita index can used genuine count data (integers) .   Horn--Morisita variant able handle abundance data. Mahalanobis distances Euclidean distances matrix   columns centred, unit variance, uncorrelated.    index commonly used community data, sometimes   used environmental variables. calculation based   transforming data matrix using Euclidean distances   following Mardia et al. (1979). Mahalanobis transformation   usually fails number columns larger number   rows (sampling units). transformation fails,   distances nearly constant except small numeric noise. Users   must check returned Mahalanobis distances meaningful. Euclidean Manhattan dissimilarities good gradient   separation without proper standardization still included   comparison special needs. Chi-square distances (\"chisq\") Euclidean distances   Chi-square transformed data (see decostand).   internal standardization used correspondence analysis   (cca, decorana). Weighted principal   coordinates analysis distances row sums weights   equal correspondence analysis (see Example   wcmdscale). Chi-square distance intended   non-negative data, typical community data. However, can   calculated long margin sums positive, warning   issued negative data entries. Chord distances (\"chord\") Euclidean distance matrix   rows standardized unit norm (sums squares 1)   using decostand. Geometrically standardization   moves row points surface multidimensional unit sphere,   distances chords across hypersphere. Hellinger distances   (\"hellinger\") related Chord distances, data   standardized unit total (row sums 1) using   decostand, square root transformed.   distances upper limit \\(\\sqrt{2}\\). Bray--Curtis Jaccard indices rank-order similar,   indices become identical rank-order similar    standardizations, especially presence/absence transformation   equalizing site totals decostand. Jaccard index   metric, probably preferred instead default   Bray-Curtis semimetric. Aitchison distance (1986) robust Aitchison distance   (Martino et al. 2019) metrics deal   compositional data. Aitchison distance said   outperform Jensen-Shannon divergence Bray-Curtis dissimilarity,   due better stability subsetting aggregation,   proper distance (Aitchison et al., 2000). naming conventions vary. one adopted traditional   rather truthful priority. function finds either   quantitative binary variants indices name,   correctly may refer one alternatives   instance, Bray   index known also Steinhaus, Czekanowski   Sørensen index.   quantitative version Jaccard probably called   Ružička index.   abbreviation \"horn\" Horn--Morisita index   misleading, since separate Horn index. abbreviation   changed index implemented vegan.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Function drop-replacement dist function   returns distance object type. result object adds   attribute maxdist gives theoretical maximum   index sampling units share species, NA   maximum.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Aitchison, J. Statistical Analysis Compositional Data (1986).   London, UK: Chapman & Hall. Aitchison, J., Barceló-Vidal, C.,   Martín-Fernández, J.., Pawlowsky-Glahn, V. (2000).   Logratio analysis compositional distance.   Math. Geol. 32, 271–275. Anderson, M.J. Millar, R.B. (2004). Spatial variation effects   habitat temperate reef fish assemblages northeastern New   Zealand.  Journal Experimental Marine Biology Ecology   305, 191--221. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006). Multivariate   dispersion measure beta diversity. Ecology Letters    9, 683--693. Anderson, M.J & Thompson, .. (2004). Multivariate control charts   ecological environmental monitoring. Ecological     Applications 14, 1921--1935. Cao, Y., Williams, W.P. & Bark, .W. (1997). Similarity measure bias   river benthic Auswuchs community analysis. Water   Environment Research 69, 95--106. Chao, ., Chazdon, R. L., Colwell, R. K. Shen, T. (2005). new   statistical approach assessing similarity species composition   incidence abundance data. Ecology Letters 8, 148--159. Chase, J.M., Kraft, N.J.B., Smith, K.G., Vellend, M. Inouye,   B.D. (2011). Using null models disentangle variation community   dissimilarity variation \\(\\alpha\\)-diversity.   Ecosphere 2:art24 doi:10.1890/ES10-00117.1 Faith, D. P, Minchin, P. R. Belbin, L. (1987).   Compositional dissimilarity robust measure ecological   distance. Vegetatio 69, 57--68. Gower, J. C. (1971). general coefficient similarity   properties. Biometrics 27, 623--637. Krebs, C. J. (1999). Ecological Methodology. Addison Wesley   Longman. Legendre, P. & De Cáceres, M. (2012). Beta diversity   variance community data: dissimilarity coefficients   partitioning. Ecology Letters 16, 951--963.   doi:10.1111/ele.12141 Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier. Mardia, K.V., Kent, J.T. Bibby, J.M. (1979). Multivariate analysis.   Academic Press. Martino, C., Morton, J.T., Marotz, C.., Thompson, L.R., Tripathi, .,   Knight, R. & Zengler, K. (2019) novel sparse compositional technique   reveals microbial perturbations. mSystems 4, 1. Mountford, M. D. (1962). index similarity application   classification problems. : P.W.Murphy (ed.),   Progress Soil Zoology, 43--50. Butterworths. Veech, J. . (2013). probabilistic model analysing species   co-occurrence. Global Ecology Biogeography 22, 252--260. Wolda, H. (1981). Similarity indices, sample size   diversity. Oecologia 50, 296--302.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Jari Oksanen, contributions Tyler Smith (Gower index),   Michael Bedward (Raup--Crick index),   Leo Lahti (Aitchison robust Aitchison distance).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"function alternative dist adding   ecologically meaningful indices.  methods produce similar   types objects can interchanged method accepting   either.  Manhattan Euclidean dissimilarities identical   methods. Canberra index divided number variables   vegdist, dist.  differ   constant multiplier, alternative vegdist   range (0,1).  Function daisy (package   cluster) provides alternative implementation Gower index   also can handle mixed data numeric class variables.    two versions Gower distance (\"gower\", \"altGower\")   differ scaling: \"gower\" divides distances   number observations (rows) scales column unit range,   \"altGower\" omits double-zeros divides number   pairs least one -zero value, scale columns   (Anderson et al. 2006).  can use decostand add   range standardization \"altGower\" (see Examples). Gower   (1971) suggested omitting double zeros presences, often   taken general feature Gower distances. See Examples   implementing Anderson et al. (2006) variant Gower index. dissimilarity indices vegdist designed   community data, give misleading values   negative data entries.  results may also misleading   NA NaN empty sites.  principle,   study species composition without species remove   empty sites community data.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"","code":"data(varespec) vare.dist <- vegdist(varespec) # Orlóci's Chord distance: range 0 .. sqrt(2) vare.dist <- vegdist(decostand(varespec, \"norm\"), \"euclidean\") # Anderson et al.  (2006) version of Gower vare.dist <- vegdist(decostand(varespec, \"log\"), \"altGower\") #> Warning: non-integer data: divided by smallest positive value # Range standardization with \"altGower\" (that excludes double-zeros) vare.dist <- vegdist(decostand(varespec, \"range\"), \"altGower\")"},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Compact Ordered Community Tables — vegemite","title":"Display Compact Ordered Community Tables — vegemite","text":"Functions vegemite tabasco display compact   community tables.  Function vegemite prints text tables   species rows, site takes one column without   spaces.  Function tabasco provides interface   heatmap colour image   data. community table can ordered explicit indexing,   environmental variables results ordination cluster   analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Compact Ordered Community Tables — vegemite","text":"","code":"vegemite(x, use, scale, sp.ind, site.ind, zero=\".\", select ,...) tabasco(x, use, sp.ind = NULL, site.ind = NULL, select,     Rowv = TRUE, Colv = TRUE, labRow = NULL, labCol = NULL,     scale, col = heat.colors(12), ...) coverscale(x, scale=c(\"Braun.Blanquet\", \"Domin\", \"Hult\", \"Hill\", \"fix\",\"log\"),            maxabund, character = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Compact Ordered Community Tables — vegemite","text":"x Community data. use Either vector, object cca,     decorana etc. hclust     dendrogram ordering sites species. sp.ind, site.ind Species site indices. tabasco,     can also hclust tree,     agnes clusterings     dendrograms. zero Character used zeros. select Select subset sites.  can logical vector     (TRUE selected sites), vector indices selected     sites.  order indices influence results,     must specify use site.ind reorder sites. Rowv, Colv Re-order dendrograms rows (sites)     columns (species) x.  Rowv = TRUE, row     dendrograms ordered first axis correspondence     analysis, Colv = TRUE column dendrograms     weighted average (wascores) row order.     Alternatively, arguments can vectors used     reorder dendrogram. labRow, labCol character vectors row column labels     used heatmap instead default. NB.,     input matrix transposed row labels used data     columns. scale vegemite coverscale: cover scale     used (can abbreviated). tabasco: scaling colours     heatmap. alternatives coverscale     can used tabasco, addition \"column\"     \"row\" scale columns rows equal maxima (NB.,     refer transposed data heatmap),     \"none\" uses original values. col vector colours used -zero abundance values. maxabund Maximum abundance used scale = \"log\".     Data maximum selected subset used     missing. character Return character codes suitable     vegemite. FALSE, returns corresponding     integers. ... Arguments passed coverscale (.e., maxabund)     vegemite heatmap tabasco.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Compact Ordered Community Tables — vegemite","text":"function vegemite prints traditional community table.   display transposed, species rows sites   columns.  table printed compact form: one character   can used abundance, spaces   columns. Species occurrences dropped table. Function tabasco produces similar table vegemite   using heatmap, abundances coded   colours. function scales abundances equal intervals   colour palette, either rows columns can scaled equal   maxima, coverscale class systems can used.   function can also display dendrograms sites (columns) species   given argument (use sites,   sp.ind species). parameter use used re-order output.   use can vector object hclust   agnes, dendrogram   ordination result recognized scores (ordination   methods vegan vegan).   hclust, agnes   dendrogram must sites. dendrogram   displayed sites tabasco, shown   vegemite.  dendrogram species displayed, except   given sp.ind. use vector, used ordering sites.    use object ordination, sites species   arranged first axis (provided results available   also species).  use object   hclust, agnes   dendrogram, sites ordered similarly   cluster dendrogram.  Function tabasco re-orders dendrogram   Rowv = TRUE Rowv vector. re-ordering   available vegemite, can done hand using   reorder.dendrogram reorder.hclust.   Please note dendrogram hclust   reordering can differ: unweighted means merged branches used   dendrogram, weighted means (= means leaves   cluster) used reorder.hclust.  cases   species scores missing, species ordered weighted   averages (wascores) site order. Species sites can ordered explicitly giving indices   names parameters sp.ind site.ind.    given, take precedence use. subset sites can   displayed using argument select, used   order sites, still must give use   site.ind.  However, tabasco makes two exceptions:   site.ind select used use   dendrogram (clustering result). addition, sp.ind can   hclust tree, agnes   clustering dendrogram, case   dendrogram plotted left side   heatmap. Phylogenetic trees directly used,   package ape tools transform   hclust trees. scale given, vegemite calls coverscale   transform percent cover scale scales traditional   class scales used vegetation science (coverscale can   called directly, ). Function tabasco can also use   traditional class scales, treats transformed values   corresponding integers.  Braun-Blanquet Domin scales   actually strict cover scales, limits used codes   r + arbitrary.  Scale Hill may   inappropriately named, since Mark O. Hill probably never intended   cover scale.  However, used default “cut levels”   TWINSPAN, surprisingly many users stick   default, de facto standard publications.   traditional scales assume values cover percentages   maximum 100.  However, non-traditional alternative log can   used scale range.  class limits integer powers   1/2 maximum (argument maxabund), + used   non-zero entries less 1/512 maximum (log   stands alternatively logarithmic logical).  Scale fix   intended “fixing” 10-point scales: truncates scale values   integers, replaces 10 X positive values   1 +.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Compact Ordered Community Tables — vegemite","text":"functions used mainly display table, return   (invisibly) list items species ordered species   index, sites ordered site index, table   final ordered community table. items can used arguments sp.ind site.ind reproduce table, table can edited.   addition table, vegemite prints numbers species   sites name used cover scale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Display Compact Ordered Community Tables — vegemite","text":"cover scales presented many textbooks vegetation   science; used: Shimwell, D.W. (1971) Description Classification   Vegetation. Sidgwick & Jackson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Compact Ordered Community Tables — vegemite","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Display Compact Ordered Community Tables — vegemite","text":"name vegemite chosen output   compact, tabasco just compact,   uses heat colours.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Compact Ordered Community Tables — vegemite","text":"","code":"data(varespec) ## Print only more common species freq <- apply(varespec > 0, 2, sum) vegemite(varespec, scale=\"Hult\", sp.ind = freq > 10) #>                                    #>           1122212121122       1112 #>           854739268340575634292011 #>  Callvulg 111...11.311...1111.111. #>  Empenigr 211332121112211111212213 #>  Vaccviti 323332212113221211233234 #>  Pinusylv 111.111111111.11.1111111 #>  Dicrfusc 12.111441121211111111111 #>  Dicrpoly .11.11.11..1.11....1.111 #>  Pleuschr 144533435123411111111131 #>  Polyjuni 111.11.111112111.111.111 #>  Pohlnuta 111111111111.1..11.11111 #>  Ptilcili 1111111111..1..11.11..12 #>  Cladarbu 321122121332143423111121 #>  Cladrang 321221131312145443313241 #>  Cladstel 11111311.211.11254555542 #>  Cladunci 112111111131111111111111 #>  Cladcocc 11..11111111111111.1.11. #>  Cladcorn 111111111111111111111111 #>  Cladgrac 111111111111111111111.11 #>  Cladfimb 11.1111111111111111111.1 #>  Cladcris 111111111111111111111111 #>  Cladchlo ..1.111..1...1.11.11.1.1 #>  Cetreric 111...11.111111111.1.1.. #>  Cetrisla .11....1111.1....1.11111 #>  Stersp   111.11.1111.112111...11. #>  Claddefo 1111111111111111111111.1 #> 24 sites, 24 species #> scale:  Hult  ## Order by correspondence analysis, use Hill scaling and layout: dca <- decorana(varespec) vegemite(varespec, dca, \"Hill\", zero=\"-\") #>                                    #>            1   1  1 11122211122222 #>           203942561738913046572458 #>  Flavniva -1114-11-1-11-1--------- #>  Cladstel 5555551451425411111211-- #>  Cladphyl -1-1----1-------1------- #>  Cladcerv 1---1-----------------1- #>  Cladsp   ---11--1--11---1-1-11-1- #>  Cladamau --1---1----1------------ #>  Cladchlo 1111---1-11-111-----11-- #>  Cladrang 535254555555223414332321 #>  Diphcomp --11-----112----------1- #>  Stersp   -11-1-4111111-1-111--111 #>  Pinusylv 11-111111-111111111-1111 #>  Polypili ------111--11-11--1----- #>  Cetrisla -1-111--1-1--1--111--111 #>  Cladcocc -1111-1111111-11111-1-11 #>  Cladarbu 113142453555313343413231 #>  Vacculig --1-1----3-1---1---12-11 #>  Pohlnuta -11111--11111111111111-1 #>  Cladfimb 11111111-111111111111-11 #>  Callvulg 111-21-12-51---1221-21-- #>  Icmaeric ------1--1------11------ #>  Empenigr 342214131314344333143131 #>  Vaccviti 342514244334455432444443 #>  Cladgrac 1-1111111111111111111111 #>  Cetreric -1111-11-111---1111-111- #>  Cladcorn 111111111111111111111111 #>  Cladcris 111111111111111111111111 #>  Peltapht --------1-11--1----1--1- #>  Ptilcili 1-11---11-11141--1111111 #>  Barbhatc ----------1-121----1---- #>  Claddefo 11111111-111111111111111 #>  Cladbotr ----------1-1111---1-1-1 #>  Betupube -------------1------1-1- #>  Dicrpoly -1-1--1-11--1211-11--1-1 #>  Cladunci 111111122111111251212311 #>  Polycomm ------------11--1--1--1- #>  Polyjuni 11-11-1111111121111--131 #>  Rhodtome ----------1--2-----21--1 #>  Dicrfusc 111111111121112145425-41 #>  Pleuschr 111213114132524434555555 #>  Vaccmyrt ---1------1-24--12133--4 #>  Descflex ----1----1--11-----21-11 #>  Nepharct --1------1-1---1------2- #>  Dicrsp   -----1----1--1-1-11-1541 #>  Hylosple ---------------1---3--13 #> 24 sites, 44 species #> scale:  Hill  ## Show one class from cluster analysis, but retain the ordering above clus <- hclust(vegdist(varespec)) cl <- cutree(clus, 3) sel <- vegemite(varespec, use=dca, select = cl == 3, scale=\"Br\") #>                 #>            1 12 #>           20921 #>  Flavniva .++.. #>  Cladstel 55542 #>  Cladphyl .++.. #>  Cladcerv r.... #>  Cladsp   ..+.. #>  Cladchlo r++.+ #>  Cladrang 22121 #>  Diphcomp ..+.. #>  Stersp   .+... #>  Pinusylv r++1+ #>  Cetrisla .++++ #>  Cladcocc .++.. #>  Cladarbu +1+1+ #>  Pohlnuta .++++ #>  Cladfimb r++++ #>  Callvulg r+.+. #>  Empenigr 22122 #>  Vaccviti 22223 #>  Cladgrac r.+++ #>  Cetreric .++.. #>  Cladcorn r+++r #>  Cladcris r++++ #>  Ptilcili r.+.2 #>  Barbhatc ....1 #>  Claddefo r++++ #>  Cladbotr ....+ #>  Betupube ....+ #>  Dicrpoly .++.1 #>  Cladunci +++1+ #>  Polycomm ....+ #>  Polyjuni r++.+ #>  Rhodtome ....1 #>  Dicrfusc r++++ #>  Pleuschr ++121 #>  Vaccmyrt ..+.2 #>  Descflex ....+ #>  Dicrsp   ...++ #> 5 sites, 37 species #> scale:  Braun.Blanquet  ## Re-create previous vegemite(varespec, sp=sel$sp, site=sel$site, scale=\"Hult\") #>                 #>            1 12 #>           20921 #>  Flavniva .11.. #>  Cladstel 55552 #>  Cladphyl .11.. #>  Cladcerv 1.... #>  Cladsp   ..1.. #>  Cladchlo 111.1 #>  Cladrang 32131 #>  Diphcomp ..1.. #>  Stersp   .1... #>  Pinusylv 11111 #>  Cetrisla .1111 #>  Cladcocc .11.. #>  Cladarbu 11111 #>  Pohlnuta .1111 #>  Cladfimb 11111 #>  Callvulg 11.1. #>  Empenigr 22123 #>  Vaccviti 22334 #>  Cladgrac 1.111 #>  Cetreric .11.. #>  Cladcorn 11111 #>  Cladcris 11111 #>  Ptilcili 1.1.2 #>  Barbhatc ....1 #>  Claddefo 11111 #>  Cladbotr ....1 #>  Betupube ....1 #>  Dicrpoly .11.1 #>  Cladunci 11111 #>  Polycomm ....1 #>  Polyjuni 111.1 #>  Rhodtome ....1 #>  Dicrfusc 11111 #>  Pleuschr 11111 #>  Vaccmyrt ..1.3 #>  Descflex ....1 #>  Dicrsp   ...11 #> 5 sites, 37 species #> scale:  Hult  ## Re-order clusters by ordination clus <- as.dendrogram(clus) clus <- reorder(clus, scores(dca, choices=1, display=\"sites\"), agglo.FUN = mean) vegemite(varespec, clus, scale = \"Hult\") #>                                    #>             1   111  1211221212222 #>           431567380922149306254578 #>  Flavniva 21.111.111....11........ #>  Cladamau .1.1...1................ #>  Stersp   111211111....111.1.111.1 #>  Polypili ..111..1......111..1.... #>  Diphcomp .1...111.1...........1.. #>  Cladphyl ..1.....11...1.......... #>  Cladrang 344544332133111223121121 #>  Cladcerv 1.........1..........1.. #>  Cladstel 454121215555213111111.1. #>  Cladarbu 322344331111132222121111 #>  Vacculig 11...2.1........1.1..111 #>  Callvulg 111.1.311.11.1..11111... #>  Icmaeric ...1.1.......1...1...... #>  Cladsp   1...1.11.1......111..11. #>  Cladcocc 1111111111...1111111.1.1 #>  Pinusylv 1.111.1111111111111111.1 #>  Cladchlo .1..111.111.1.11..1.1... #>  Cetrisla 1.1...1.11.111...1.111.1 #>  Cladfimb 11.11111111111111111.111 #>  Peltapht ..1...11.......1.....11. #>  Cetreric 11.1111111...1..111111.. #>  Cladgrac 11111111.111111111111111 #>  Pohlnuta 111..11111.1111111111.11 #>  Ptilcili .11.1.11.11.2.11.1111111 #>  Barbhatc ......1.....1.11......1. #>  Cladcorn 111111111111111111111111 #>  Vaccviti 113122132323412331223232 #>  Cladcris 111111111111111111111111 #>  Empenigr 111111122122312322111231 #>  Cladbotr ......1.....1.111...1.11 #>  Betupube ............1.....1..1.. #>  Cladunci 111111111111131111112111 #>  Claddefo 11.111111111111111111111 #>  Dicrpoly ..11.1..11..1.1111.11..1 #>  Polycomm ............111......11. #>  Rhodtome ......1.....1.....1...11 #>  Polyjuni 1.111111111.111111.112.1 #>  Dicrfusc 11111111111112111442.211 #>  Pleuschr 113111111111123333444455 #>  Vaccmyrt ......1..1..311..111..13 #>  Nepharct .1...1.1........1....1.. #>  Dicrsp   ......1....11...111133.1 #>  Descflex 1....1......1.1...1..111 #>  Hylosple ................1....122 #> 24 sites, 44 species #> scale:  Hult   ## Abundance values have such a wide range that they must be rescaled tabasco(varespec, dca, scale=\"Braun\")   ## Classification trees for species data(dune, dune.taxon) taxontree <- hclust(taxa2dist(dune.taxon)) plotree <- hclust(vegdist(dune), \"average\") ## Automatic reordering of clusters tabasco(dune, plotree, sp.ind = taxontree)  ## No reordering of taxonomy tabasco(dune, plotree, sp.ind = taxontree, Colv = FALSE)  ## Species cluster: most dissimilarity indices do a bad job when ## comparing rare and common species, but Raup-Crick makes sense sptree <- hclust(vegdist(t(dune), \"raup\"), \"average\") tabasco(dune, plotree, sptree)"},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted Averages Scores for Species — wascores","title":"Weighted Averages Scores for Species — wascores","text":"Computes Weighted Averages scores species ordination   configuration environmental variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted Averages Scores for Species — wascores","text":"","code":"wascores(x, w, expand=FALSE) eigengrad(x, w)"},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted Averages Scores for Species — wascores","text":"x Environmental variables ordination scores. w Weights: species abundances. expand Expand weighted averages     weighted variance corresponding environmental variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted Averages Scores for Species — wascores","text":"Function wascores computes weighted averages. Weighted averages   “shrink”: extreme values used   calculating averages. expand = TRUE, function   “deshrinks” weighted averages making biased   weighted variance equal biased weighted variance   corresponding environmental variable.  Function eigengrad   returns inverses squared expansion factors attribute   shrinkage wascores result environmental   gradient.  equal constrained eigenvalue   cca one gradient used   constraint, describes strength gradient.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted Averages Scores for Species — wascores","text":"Function wascores returns matrix species define rows   ordination axes environmental variables define columns.  expand = TRUE, attribute shrinkage inverses   squared expansion factors cca eigenvalues   variable.  Function eigengrad returns shrinkage attribute.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Weighted Averages Scores for Species — wascores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted Averages Scores for Species — wascores","text":"","code":"data(varespec) data(varechem) vare.dist <- vegdist(wisconsin(varespec)) vare.mds <- monoMDS(vare.dist) vare.points <- postMDS(vare.mds$points, vare.dist) vare.wa <- wascores(vare.points, varespec) plot(scores(vare.points), pch=\"+\", asp=1) text(vare.wa, rownames(vare.wa), cex=0.8, col=\"blue\")  ## Omit rare species (frequency <= 4) freq <- apply(varespec>0, 2, sum) plot(scores(vare.points), pch=\"+\", asp=1) text(vare.wa[freq > 4,], rownames(vare.wa)[freq > 4],cex=0.8,col=\"blue\")  ## Works for environmental variables, too. wascores(varechem, varespec) #>                 N        P         K       Ca        Mg        S        Al #> Callvulg 25.12401 41.66188 246.92383 572.3431  99.40828 49.10552 245.15751 #> Empenigr 21.61371 44.17350 158.92517 580.8403  89.20628 35.75327 107.05670 #> Rhodtome 22.34553 40.35530 162.31108 643.8819  95.07712 30.84303  28.83159 #> Vaccmyrt 24.96352 49.80649 189.70177 656.4179  96.75529 34.55190  32.75705 #> Vaccviti 21.14028 45.86984 162.12372 613.2126  94.30084 37.26975 116.14656 #> Pinusylv 18.37299 44.24818 163.60195 670.9387  93.52214 37.02238 150.45523 #> Descflex 22.24089 54.74804 212.20357 771.0159 114.15179 38.00000  24.64143 #> Betupube 21.51034 28.86552 112.28276 513.5586  75.15172 23.55172  33.12414 #> Vacculig 28.00729 33.48758 114.90230 372.9653  70.89954 29.32378 202.89008 #> Diphcomp 22.34228 39.71049 127.44259 446.1565  80.16173 32.32963 122.31574 #> Dicrsp   21.33007 60.03758 185.04563 828.0544 148.67509 46.75427  90.42294 #> Dicrfusc 23.45681 39.14575 162.91954 578.2309  77.81648 33.48086  60.66890 #> Dicrpoly 20.65446 43.87409 150.51485 665.5845 115.22112 36.17079  90.16733 #> Hylosple 26.10599 67.88980 245.78681 779.6520 111.96685 42.27433  24.92738 #> Pleuschr 22.60476 54.22534 199.96241 712.6278 109.23425 40.01132  70.43900 #> Polypili 23.17377 43.75902 144.82623 724.9738  85.42623 30.58525 145.73115 #> Polyjuni 22.89480 47.98022 154.81906 643.3864  87.27819 33.63863  53.24888 #> Polycomm 21.73521 41.17042 154.91549 631.8704 101.84789 32.17324  46.80986 #> Pohlnuta 19.99885 48.59198 169.68855 678.3813 104.31641 39.94427 132.05458 #> Ptilcili 21.27880 33.44211 127.08522 564.5652  85.96417 27.11720  56.60692 #> Barbhatc 21.17461 27.93323 113.13542 497.9138  77.50564 23.72288  42.09749 #> Cladarbu 23.56127 38.04952 142.03073 454.9019  74.00779 33.81002 173.12698 #> Cladrang 24.28421 38.60534 135.31177 463.2750  70.54209 32.53349 183.79979 #> Cladstel 19.28049 46.71060 158.00576 540.4904  80.19153 40.29106 225.89526 #> Cladunci 21.41240 45.49844 163.40402 621.9100  98.35538 40.00734 119.59481 #> Cladcocc 21.72473 42.80681 156.32330 557.9007  80.95448 36.25161 149.82616 #> Cladcorn 22.11640 47.06656 160.36881 623.5185  95.17781 36.75273 104.71463 #> Cladgrac 22.51887 44.06576 156.50214 583.1558  94.10292 36.93930 134.13424 #> Cladfimb 21.77980 41.82652 153.29444 512.4646  78.28232 35.62323 128.96061 #> Cladcris 20.88795 44.12262 171.04016 574.5672  92.52169 38.24003 116.03507 #> Cladchlo 19.51207 45.39655 150.93190 571.0233  95.77586 39.50862 156.81983 #> Cladbotr 22.97660 38.89574 167.20000 590.8021  99.57234 34.79362  87.75957 #> Cladamau 25.07143 35.84286 105.07857 395.2214  68.18571 27.11429  95.91429 #> Cladsp   19.21923 47.37308 168.49231 526.7654  79.54423 45.15385 215.33846 #> Cetreric 21.00944 47.76972 165.07972 579.6322  99.14944 42.25472 163.46000 #> Cetrisla 18.36552 42.73695 151.78374 626.2813  89.77833 35.33498 132.68227 #> Flavniva 18.56110 61.18194 207.67705 502.9203  60.91755 50.22532 396.82405 #> Nepharct 23.33099 49.10019 146.84715 618.1601  64.27319 29.95760  31.72300 #> Stersp   28.19743 32.84800  94.33459 389.5143  53.25377 24.22175  95.39326 #> Peltapht 21.08553 54.45395 193.38816 886.5487 119.35132 37.92500 106.16447 #> Icmaeric 28.88636 27.00000  87.86818 307.0500  40.48182 22.17273  89.94091 #> Cladcerv 20.25000 56.79000 192.36000 519.2300  62.10000 45.18000 314.92000 #> Claddefo 22.19198 45.22981 167.73069 583.7983  92.01320 38.51369 100.46139 #> Cladphyl 15.73750 54.56875 180.39375 775.4500  99.65625 43.35000 208.55000 #>                  Fe        Mn        Zn        Mo  Baresoil Humdepth       pH #> Callvulg  75.457843  52.38247  8.281074 0.4734635 27.241036 2.187819 2.845108 #> Empenigr  38.146102  53.49357  7.159938 0.3289657 27.324317 2.367439 2.888078 #> Rhodtome   5.560906  70.48260  7.444100 0.2251490 37.325030 2.689154 2.895352 #> Vaccmyrt   5.589213  75.17221  7.838533 0.2666732 31.404171 2.798935 2.855216 #> Vaccviti  37.586067  51.81515  7.617213 0.3680289 26.307701 2.307879 2.923128 #> Pinusylv  39.121898  35.22311  7.733333 0.3485401 17.762968 1.996350 3.049148 #> Descflex   6.066429 110.87232  9.526607 0.2316071 22.740179 2.834821 2.822857 #> Betupube   5.417241  37.53448  5.637931 0.2068966 51.496552 2.527586 2.979310 #> Vacculig  93.963929  37.73062  4.593824 0.3780552 21.410710 2.041196 3.006965 #> Diphcomp  73.281173  46.88025  4.593827 0.3725309 31.836574 2.103704 2.856790 #> Dicrsp    22.504617  65.35020 13.060765 0.5610370 23.182889 2.232247 2.954272 #> Dicrfusc  13.922252  61.40958  6.922859 0.3218816 26.918674 2.484399 2.806431 #> Dicrpoly  20.973927  33.28779  9.110561 0.3892739 37.304043 2.228713 3.015842 #> Hylosple   4.729157 115.14606  9.885976 0.2851996 20.956264 2.925000 2.807594 #> Pleuschr  19.113811  77.12277  9.007860 0.3405945 24.584979 2.596881 2.858446 #> Polypili  51.993443  36.74754  8.045902 0.2204918 17.368852 1.493443 3.227869 #> Polyjuni  12.885704  82.56274  7.945126 0.2760289 28.116303 2.615523 2.874729 #> Polycomm   7.895775  68.22535  7.843662 0.2591549 38.687324 2.926761 2.860563 #> Pohlnuta  33.089313  42.02290  8.452290 0.3935115 24.709351 2.147328 2.985496 #> Ptilcili  14.036188  33.93547  5.906924 0.2303712 48.941884 2.502498 2.973376 #> Barbhatc   8.199687  31.11379  5.550784 0.2084639 54.331975 2.514734 2.986834 #> Cladarbu  65.470394  38.28429  6.387500 0.4464046 22.592997 2.048540 2.937879 #> Cladrang  76.612752  34.86010  6.616452 0.3903501 17.270158 1.799128 3.022346 #> Cladstel  84.639467  33.27903  7.287216 0.4054879  9.854042 1.851973 3.052167 #> Cladunci  27.463504  40.10322  9.108102 0.5120114 28.312376 2.362687 2.858564 #> Cladcocc  46.653763  43.53584  7.269176 0.3698925 19.972222 2.025090 2.974194 #> Cladcorn  32.916238  53.38441  7.518489 0.3639871 26.620868 2.399518 2.890997 #> Cladgrac  45.758366  44.63911  7.702724 0.4244163 25.546654 2.230350 2.933658 #> Cladfimb  41.710354  47.83687  6.815152 0.3887626 24.763889 2.239394 2.902778 #> Cladcris  34.729585  44.75984  6.933735 0.3746988 29.711352 2.400000 2.841633 #> Cladchlo  42.089655  35.13276  7.908621 0.3814655 22.319655 2.075000 3.022414 #> Cladbotr  23.374468  46.54255  7.263830 0.3106383 45.725532 2.580851 2.904255 #> Cladamau  68.971429  41.98571  4.928571 0.3214286 27.592857 1.857143 2.914286 #> Cladsp    47.913462  49.61923  8.421154 0.6173077 16.864423 2.213462 2.921154 #> Cetreric  42.614167  36.96694  9.516389 0.5687500 21.452639 2.058056 2.923889 #> Cetrisla  29.617734  33.24138  7.518227 0.3192118 26.417980 2.027586 3.065025 #> Flavniva  94.339916  37.03232  9.116371 0.9987764 19.692312 1.799241 2.923629 #> Nepharct  12.910837 115.15684  7.743536 0.2180608 23.135932 2.541065 2.918251 #> Stersp    30.226998  31.97061  7.635502 0.2828767 15.844007 1.477740 3.038756 #> Peltapht  37.598684  56.64079  7.652632 0.2046053 28.321053 2.286842 3.026316 #> Icmaeric  24.236364  23.95909  6.618182 0.2863636 18.727273 1.568182 2.968182 #> Cladcerv 111.090000  52.04000  8.530000 0.6800000 15.393000 1.870000 2.900000 #> Claddefo  25.116325  48.81105  7.599609 0.4096285 33.814545 2.468133 2.823656 #> Cladphyl  50.475000  35.28125  8.568750 0.2812500  7.728125 1.575000 3.231250 ## And the strengths of these variables are: eigengrad(varechem, varespec) #>          N          P          K         Ca         Mg          S         Al  #> 0.13000842 0.18880078 0.16246365 0.15722067 0.16359171 0.13391967 0.29817406  #>         Fe         Mn         Zn         Mo   Baresoil   Humdepth         pH  #> 0.20766831 0.27254480 0.16783834 0.09542514 0.20931501 0.25051326 0.14583161"},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Weighted classical multidimensional scaling,   also known weighted principal coordinates analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"","code":"wcmdscale(d, k, eig = FALSE, add = FALSE, x.ret = FALSE, w) # S3 method for wcmdscale plot(x, choices = c(1, 2), type = \"t\", ...) # S3 method for wcmdscale scores(x, choices = NA, tidy = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"d distance structure returned dist     full symmetric matrix containing dissimilarities. k dimension space data     represented ; must \\(\\{1,2,\\ldots,n-1\\}\\).     missing, dimensions zero eigenvalue. eig indicates whether eigenvalues returned. add additive constant \\(c\\) added non-diagonal     dissimilarities \\(n-1\\) eigenvalues     non-negative. Alternatives \"lingoes\" (default, also     used TRUE) \"cailliez\" (    alternative cmdscale). See Legendre & Anderson     (1999). x.ret indicates whether doubly centred symmetric distance     matrix returned. w Weights points. x wcmdscale result object function     called options eig = TRUE x.ret = TRUE (See     Details). choices Axes returned; NA returns real axes. type Type graph may \"t\"ext, \"p\"oints     \"n\"one. tidy Return scores compatible ggplot2:     scores data.frame, score type     variable score labelled \"sites\", weights     variable weigth, names variable label. ... arguments passed graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Function wcmdscale based function   cmdscale (package stats base R), uses   point weights. Points high weights stronger   influence result low weights. Setting equal   weights w = 1 give ordinary multidimensional scaling. default options, function returns matrix scores   scaled eigenvalues real axes. function called   eig = TRUE x.ret = TRUE, function returns   object class \"wcmdscale\" print,   plot, scores, eigenvals   stressplot methods, described section Value. method Euclidean, non-Euclidean dissimilarities   eigenvalues can negative. disturbs , can   avoided adding constant non-diagonal dissimilarities making   eigenvalues non-negative. function implements methods   discussed Legendre & Anderson (1999): method Lingoes   (add=\"lingoes\") adds constant \\(c\\) squared   dissimilarities \\(d\\) using \\(\\sqrt{d^2 + 2 c}\\)   method Cailliez (add=\"cailliez\")   dissimilarities using \\(d + c\\). Legendre & Anderson (1999)   recommend method Lingoes, base R function   cmdscale implements method Cailliez.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"eig = FALSE x.ret = FALSE (default),   matrix k columns whose rows give coordinates   points corresponding positive eigenvalues.  Otherwise, object   class wcmdscale containing components mostly   similar cmdscale: points matrix k columns whose rows give     coordinates points chosen represent     dissimilarities. eig \\(n-1\\) eigenvalues computed scaling     process eig true. x doubly centred weighted distance matrix     x.ret true. ac, add additive constant adjustment method used avoid     negative eigenvalues. NA FALSE     adjustment done. GOF Goodness fit statistics k axes. first     value based sum absolute values eigenvalues,     second value based sum positive eigenvalues weights Weights. negaxes matrix scores axes negative eigenvalues      scaled absolute eigenvalues similarly      points. NULL negative      eigenvalues k specified, include      negative eigenvalues. call Function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Gower, J. C. (1966)   distance properties latent root vector   methods used multivariate analysis.   Biometrika 53, 325--328. Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy     analysis: testing multispecies responses multifactorial     ecological experiments. Ecology 69, 1--24. Mardia, K. V., Kent, J. T. Bibby, J. M. (1979).  Chapter 14   Multivariate Analysis, London: Academic Press.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"","code":"## Correspondence analysis as a weighted principal coordinates ## analysis of Euclidean distances of Chi-square transformed data data(dune) rs <- rowSums(dune)/sum(dune) d <- dist(decostand(dune, \"chi\")) ord <- wcmdscale(d, w = rs, eig = TRUE) ## Ordinary CA ca <- cca(dune)  ## IGNORE_RDIFF_BEGIN ## Eigevalues are numerically similar ca$CA$eig - ord$eig #>           CA1           CA2           CA3           CA4           CA5  #>  4.440892e-16  4.996004e-16  5.551115e-17  1.665335e-16  3.608225e-16  #>           CA6           CA7           CA8           CA9          CA10  #> -2.636780e-16 -1.942890e-16  8.326673e-17 -2.775558e-17 -6.938894e-18  #>          CA11          CA12          CA13          CA14          CA15  #>  9.020562e-17  1.387779e-17  1.387779e-17  2.081668e-17 -3.469447e-18  #>          CA16          CA17          CA18          CA19  #>  1.561251e-17  3.295975e-17  9.540979e-18  2.038300e-17  ## Configurations are similar when site scores are scaled by ## eigenvalues in CA procrustes(ord, ca, choices=1:19, scaling = \"sites\") #>  #> Call: #> procrustes(X = ord, Y = ca, choices = 1:19, scaling = \"sites\")  #>  #> Procrustes sum of squares: #> -5.684e-14  #>  ## IGNORE_RDIFF_END  plot(procrustes(ord, ca, choices=1:2, scaling=\"sites\"))  ## Reconstruction of non-Euclidean distances with negative eigenvalues d <- vegdist(dune) ord <- wcmdscale(d, eig = TRUE) ## Only positive eigenvalues: cor(d, dist(ord$points)) #> [1] 0.9975185 ## Correction with negative eigenvalues: cor(d, sqrt(dist(ord$points)^2 - dist(ord$negaxes)^2)) #> [1] 1"}]
+[{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"vegan-faq","dir":"Articles","previous_headings":"","what":"vegan FAQ","title":"","text":"document contains answers frequently asked questions R package vegan. work licensed Creative Commons Attribution 3.0 License. view copy license, visit https://creativecommons.org/licenses//3.0/ send letter Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA. Copyright © 2008-2016 vegan development team","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-is-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What is vegan?","title":"","text":"Vegan R package community ecologists. contains popular methods multivariate analysis needed analysing ecological communities, tools diversity analysis, potentially useful functions. Vegan self-contained must run R statistical environment, also depends many R packages. Vegan free software distributed GPL2 license.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-is-r","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What is R?","title":"","text":"R system statistical computation graphics. consists language plus run-time environment graphics, debugger, access certain system functions, ability run programs stored script files. R home page https://www.R-project.org/. free software distributed GNU-style copyleft, official part GNU project (“GNU S”).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-obtain-vegan-and-r","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to obtain vegan and R?","title":"","text":"R latest release version vegan can obtained CRAN. Unstable development version vegan can obtained GitHub. Formerly vegan developed R-Forge, moving GitHub R-Forge repository date.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-r-packages-vegan-depends-on","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What R packages vegan depends on?","title":"","text":"Vegan depends permute package provide advanced flexible permutation routines vegan. permute package developed together vegan GitHub. individual vegan functions depend packages MASS, mgcv, parallel, cluster, lattice tcltk. base recommended R packages available every R installation. Vegan declares suggested imported packages, can install vegan use functions without packages. Vegan accompanied supporting package vegan3d three-dimensional dynamic plotting. vegan3d package needs non-standard packages rgl scatterplot3d.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-other-packages-are-available-for-ecologists","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What other packages are available for ecologists?","title":"","text":"CRAN Task Views include entries like Environmetrics, Multivariate Spatial describe several useful packages functions. install R package ctv, can inspect Task Views R session, automatically install sets important packages.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-other-documentation-is-available-for-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"What other documentation is available for vegan?","title":"","text":"Vegan fully documented R package standard help pages. authoritative sources documentation (last resource can use force read source, vegan open source). Vegan package ships documents can read browseVignettes(\"vegan\") command. documents included vegan package Vegan NEWS document (FAQ-vegan). Short introduction basic ordination methods vegan (intro-vegan). Introduction diversity methods vegan (diversity-vegan). Discussion design decisions vegan (decision-vegan). Description variance partition procedures function varpart (partitioning). Web documents outside package include: https://github.com/vegandevs/vegan: vegan homepage.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-there-a-graphical-user-interface-gui-for-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Is there a Graphical User Interface (GUI) for vegan?","title":"","text":"Roeland Kindt made package BiodiversityR provides GUI vegan. package available CRAN. mere GUI vegan, adds new functions complements vegan functions order provide workbench biodiversity analysis. can install BiodiversityR using install.packages(\"BiodiversityR\") graphical package management menu R. GUI works Windows, MacOS X Linux.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-cite-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to cite vegan?","title":"","text":"Use command citation(\"vegan\") R see recommended citation used publications.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-build-vegan-from-sources","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to build vegan from sources?","title":"","text":"general, need build vegan sources, binary builds release versions available CRAN Windows MacOS X. use operating systems, may use source packages. Vegan standard R package, can built like instructed R documentation. Vegan contains source files C FORTRAN, need appropriate compilers (may need work Windows MacOS X).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"are-there-binaries-for-devel-versions","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Are there binaries for devel versions?","title":"","text":"currently. need tools build C Fortran programs install vegan. , can use devtools::install_github(\"vegan\") install recent devel version.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-report-a-bug-in-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"How to report a bug in vegan?","title":"","text":"think found bug vegan, report vegan maintainers developers. preferred forum report bugs GitHub. bug report detailed bug can replicated corrected. Preferably, send example causes bug. needs data set available R, send minimal data set well. also paste output error message message. also specify version vegan used. Bug reports welcome: way make vegan non-buggy. Please note shall send bug reports R mailing lists, since vegan standard R package.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-it-a-bug-or-a-feature","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Is it a bug or a feature?","title":"","text":"necessarily bug function gives different results expect: may deliberate design decision. may useful check documentation function see intended behaviour. may also happen function argument switch behaviour match expectation. instance, function vegdist always calculates quantitative indices (possible). expect calculate binary index, use argument binary = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-contribute-to-vegan","dir":"Articles","previous_headings":"vegan FAQ > Introduction","what":"Can I contribute to vegan?","title":"","text":"Vegan dependent user contribution. feedback welcome. problems vegan, may simple incomplete documentation, shall best improve documents. Feature requests also welcome, necessarily fulfilled. new feature added easy looks useful, submit code. can write code , best forum contribute vegan GitHub.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-have-only-numeric-and-positive-data-but-vegan-still-complains","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I have only numeric and positive data but vegan still complains","title":"","text":"wrong! Computers painfully pedantic, find non-numeric negative data entries, really . Check data. common reasons non-numeric data row names read non-numeric variable instead used row names (check argument row.names reading data), column names interpreted data (check argument header = TRUE reading data). Another common reason empty cells input data, interpreted missing values.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-analyse-binary-or-cover-class-data","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I analyse binary or cover class data?","title":"","text":"Yes. vegan methods can handle binary data cover abundance data. statistical tests based permutation, make distributional assumptions. methods (mainly diversity analysis) need count data. methods check input data integers, may fooled cover class data.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-dissimilarities-in-vegan-differ-from-other-sources","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Why dissimilarities in vegan differ from other sources?","title":"","text":"commonly reason software use presence–absence data whereas vegan used quantitative data. Usually vegan indices quantitative, can use argument binary = TRUE make presence–absence. However, index name cases, although different names usually occur literature. instance, Jaccard index actually refers binary index, vegan uses name \"jaccard\" quantitative index, . Another reason may indices indeed defined differently, people use names different indices.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-nmds-stress-is-sometimes-0-1-and-sometimes-10","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Why NMDS stress is sometimes 0.1 and sometimes 10?","title":"","text":"Stress proportional measure badness fit. proportions can expressed either parts one percents. Function isoMDS (MASS package) uses percents, function monoMDS (vegan package) uses proportions, therefore stress 100 times higher isoMDS. results goodness function also depend definition stress, goodness 100 times higher isoMDS monoMDS. conventions equally correct.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-get-zero-stress-but-no-repeated-solutions-in-metamds","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I get zero stress but no repeated solutions in metaMDS","title":"","text":"first (try 0) run metaMDS starts metric scaling solution usually good, sofware return solution. However, metaMDS tries see standard solution can repeated, improved improved solution still repeated. cases, return best solution found, burning need anything get message tha solution repeated. keen know solution really global optimum, may follow instructions metaMDS help section “Results Repeated” try . common reason observations NMDS. n observations (points) k dimensions need estimate n*k parameters (ordination scores) using n*(n-1)/2 dissimilarities. k dimensions must n > 2*k + 1, two dimensions least six points. degenerate situations may need even larger number points. lower number points, can find undefined number perfect (stress zero) different solutions. Conventional wisdom due Kruskal n > 4*k + 1 points k dimensions. typical symptom insufficient data (nearly) zero stress two convergent solutions. cases reduce number dimensions (k) small data sets use NMDS, rely metric methods. seems local hybrid scaling monoMDS similar lower limits practice (although theoretically differ). However, higher number dimensions can used metric scaling, monoMDS principal coordinates analysis (cmdscale stats, wcmdscale vegan).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"zero-dissimilarities-in-isomds","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Zero dissimilarities in isoMDS","title":"","text":"Function metaMDS uses function monoMDS default method NMDS, function can handle zero dissimilarities. Alternative function isoMDS handle zero dissimilarities. want use isoMDS, can use argument zerodist = \"add\" metaMDS handle zero dissimilarities. argument, zero dissimilarities replaced small positive value, can handled isoMDS. kluge, people like . principal solution remove duplicate sites using R command unique. However, standardizations dissimilarity indices, originally non-unique sites can zero dissimilarity, resort kluge (work harder data). Usually better use monoMDS.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-have-heard-that-you-cannot-fit-environmental-vectors-or-surfaces-to-nmds-results-which-only-have-rank-order-scores","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores","title":"","text":"Claims like indeed large Internet, based grave misunderstanding plainly wrong. NMDS ordination results strictly metric, vegan metaMDS monoMDS even strictly Euclidean. method called “non-metric” Euclidean distances ordination space non-metric rank-order relationship community dissimilarities. can inspect non-linear step curve using function stressplot vegan. ordination scores strictly Euclidean, correct use vegan functions envfit ordisurf NMDS results.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"where-can-i-find-numerical-scores-of-ordination-axes","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Where can I find numerical scores of ordination axes?","title":"","text":"Normally can use function scores extract ordination scores ordination method. scores function can also find ordination scores many non-vegan functions prcomp princomp ade4 functions. cases ordination result object stores raw scores, axes also scaled appropriate access scores. instance, cca rda ordination object -called normalized scores, scaled ordination plots use accessed scores.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-the-rda-results-are-scaled","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How the RDA results are scaled?","title":"","text":"scaling RDA results indeed differ software packages. scaling RDA complicated issue explained FAQ, explained separate pdf document “Design decision implementation details vegan” can read command browseVignettes(\"vegan\").","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"variance-explained-by-ordination-axes-","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Variance explained by ordination axes.","title":"","text":"general, vegan directly give statistics “variance explained” ordination axes constrained axes. design decision: think information normally useless often misleading. community ordination, goal typically explain variance, find “gradients” main trends data. “total variation” often meaningless, proportions meaningless values also meaningless. Often better solution explains smaller part “total variation”. instance, unstandardized principal components analysis variance generated small number abundant species, easy “explain” data really multivariate. standardize data, species equally important. first axes explains much less “total variation”, now explain species equally, results typically much useful whole community. Correspondence analysis uses another measure variation (variance), typically explains “smaller proportion” principal components better result. Detrended correspondence analysis nonmetric multidimensional scaling even try “explain” variation, use criteria. methods incommensurable, impossible compare methods using “explanation variation”. still want get “explanation variation” (deranged editor requests ), possible get information methods: Eigenvector methods: Functions rda, cca capscale give variation conditional (partialled), constrained (canonical) residual components, must calculate proportions hand. Function eigenvals extracts eigenvalues, summary(eigenvals(ord)) reports proportions explained result object ord. Function RsquareAdj gives R-squared adjusted R-squared (available) constrained components. Function goodness gives statistics individual species sites (species unavailable capscale). addition, special function varpart unbiased partitioning variance four separate components redundancy analysis. Detrended correspondence analysis (function decorana). total amount variation undefined detrended correspondence analysis, therefore proportions total unknown undefined. DCA method decomposition variation, therefore proportions make sense either. Nonmetric multidimensional scaling. NMDS method nonlinear mapping, concept variation explained make sense. However, 1 - stress^2 transforms nonlinear stress quantity analogous squared correlation coefficient. Function stressplot displays nonlinear fit gives statistic.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-have-random-effects-in-constrained-ordination-or-in-adonis","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I have random effects in constrained ordination or in adonis?","title":"","text":". Strictly speaking, impossible. However, can define models respond similar goals random effects models, although strictly speaking use fixed effects. Constrained ordination functions cca, rda capscale can Condition() terms formula. Condition() define partial terms fitted constraints can used remove effects background variables, contribution decomposing inertia (variance) reported separately. partial terms often regarded similar random effects, still fitted way terms strictly speaking fixed terms. Function adonis2 can evaluate terms sequentially. model right-hand-side ~ + B effects evaluated first, effects B removing effects . Sequential tests also available anova function constrained ordination results setting argument = \"term\". way, first terms can serve similar role random effects, although fitted way terms, strictly speaking fixed terms. permutation tests vegan based permute package allows constructing various restricted permutation schemes. instance, can set levels plots blocks factor regarded random term. major reason real random effects models impossible vegan functions tests based permutation data. data given, fixed, therefore permutation tests basically tests fixed terms fixed data. Random effect terms require permutations data random component instead given, fixed data, tests available vegan.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-it-possible-to-have-passive-points-in-ordination","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Is it possible to have passive points in ordination?","title":"","text":"Vegan concept passive points, point little influence ordination results. However, can add points eigenvector methods using predict functions newdata. can first perform ordination without species sites, can find scores points using complete data newdata. predict functions available basic eigenvector methods vegan (cca, rda, decorana, --date list, use command methods(\"predict\")). also can simulate passive points R using low weights row columns (method used software passive points). instance, following command makes row 3 “passive”: dune[3,] <- 0.001*dune[3,].","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"class-variables-and-dummies","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Class variables and dummies","title":"","text":"define class variable R factor, vegan automatically handle formula interface. also can define constrained ordination without formula interface, must code class variables hand. R (vegan) knows unordered ordered factors. Unordered factors internally coded dummy variables, one redundant level removed aliased. default contrasts, removed level first one. Ordered factors expressed polynomial contrasts. contrasts explained standard R documentation.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-are-environmental-arrows-scaled","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How are environmental arrows scaled?","title":"","text":"printed output envfit gives direction cosines coordinates unit length arrows. plotting, scaled correlation (square roots column r2). can see scaled lengths envfit arrows using command scores. scaled environmental vectors envfit arrows continuous environmental variables constrained ordination (cca, rda, capscale) adjusted fill current graph. lengths arrows fixed meaning respect points (species, sites), can compared , therefore relative lengths important. want change scaling arrows, can use text (plotting arrows text) points (plotting arrows) functions constrained ordination. functions argument arrow.mul sets multiplier. plot function envfit also arrow.mul argument set arrow multiplier. save invisible result constrained ordination plot command, can see value currently used arrow.mul saved attribute biplot scores. Function ordiArrowMul used find scaling current plot. can use function see arrows scaled:","code":"sol <- cca(varespec) ef <- envfit(sol ~ ., varechem) plot(sol) ordiArrowMul(scores(ef, display=\"vectors\"))"},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"i-want-to-use-helmert-or-sum-contrasts","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"I want to use Helmert or sum contrasts","title":"","text":"vegan uses standard R utilities defining contrasts. default standard installations use treatment contrasts, can change behaviour globally setting options locally using keyword contrasts. Please check R help pages user manuals details.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"what-are-aliased-variables-and-how-to-see-them","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"What are aliased variables and how to see them?","title":"","text":"Aliased variable information can expressed help variables. variables automatically removed constrained ordination vegan. aliased variables can redundant levels factors whole variables. Vegan function alias gives defining equations aliased variables. want see names aliased variables levels solution sol, use alias(sol, names.=TRUE).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"plotting-aliased-variables","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Plotting aliased variables","title":"","text":"can fit vectors class centroids aliased variables using envfit function. envfit function uses weighted fitting, fitted vectors identical vectors correspondence analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"restricted-permutations-in-vegan","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Restricted permutations in vegan","title":"","text":"Vegan uses permute package permutation tests. permute package allow restricted permutation designs time series, line transects, spatial grids blocking factors. construction restricted permutation schemes explained manual page permutations vegan documentation permute package.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-use-different-plotting-symbols-in-ordination-graphics","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How to use different plotting symbols in ordination graphics?","title":"","text":"default ordination plot function intended fast plotting configurable. use different plotting symbols, first create empty ordination plot plot(..., type=\"n\"), add points text created empty frame (... means arguments want give plot command). points text commands fully configurable, allow different plotting symbols characters.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-to-avoid-cluttered-ordination-graphs","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"How to avoid cluttered ordination graphs?","title":"","text":"really high number species sites, graphs often congested many labels overwritten. may impossible complete readable graphics data sets. give brief overview tricks can use. Gavin Simpson’s blog bottom heap series articles “decluttering ordination plots” detailed discussion examples. Use points, possibly different types need see labels. may need first create empty plot using plot(..., type=\"n\"), satisfied default graph. (... means arguments want give plot command.) Use points add labels desired points using interactive identify command need see labels. Add labels using function ordilabel uses non-transparent background text. labels still shadow , uppermost labels readable. Argument priority help displaying interesting labels (see Decluttering blog, part 1). Use orditorp function uses labels can added graph without overwriting labels, points otherwise, need see labels. must first create empty plot using plot(..., type=\"n\"), add labels points orditorp (see Decluttering blog). Use ordipointlabel uses points text labels points, tries optimize location text minimize overlap (see Decluttering blog). Ordination text points functions argument select can used full control selecting items plotted text points. Use interactive orditkplot function lets drag labels points better positions need see labels. one set points can used (see Decluttering blog). plot functions allow zoom part graph using xlim ylim arguments reduce clutter congested areas.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-flip-an-axis-in-ordination-diagram","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I flip an axis in ordination diagram?","title":"","text":"Use xlim ylim flipped limits. model mod <- cca(dune) can flip first axis plot(mod, xlim = c(3, -2)).","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"can-i-zoom-into-an-ordination-plot","dir":"Articles","previous_headings":"vegan FAQ > Ordination","what":"Can I zoom into an ordination plot?","title":"","text":"can use xlim ylim arguments plot ordiplot zoom ordination diagrams. Normally must set xlim ylim ordination plots keep equal aspect ratio axes, fill graph longer axis fit. Dynamic zooming can done function orditkplot CRAN package vegan3d. can directly save edited orditkplot graph various graphic formats, can export graph object back R session use plot display results.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"is-there-twinspan","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"Is there TWINSPAN?","title":"","text":". may possible port TWINSPAN vegan, among vegan top priorities. anybody wants try porting, happy help. TWINSPAN permissive license, completely legal port function R.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"why-restricted-permutation-does-not-influence-adonis-results","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"Why restricted permutation does not influence adonis results?","title":"","text":"permutation scheme influences permutation distribution statistics probably significance levels, influence calculation statistics.","code":""},{"path":"https://vegandevs.github.io/vegan/articles/FAQ-vegan.html","id":"how-is-deviance-calculated","dir":"Articles","previous_headings":"vegan FAQ > Other analysis methods","what":"How is deviance calculated?","title":"","text":"vegan functions, radfit use base R facility family maximum likelihood estimation. allows use several alternative error distributions, among \"poisson\" \"gaussian\". R family also defines deviance. can see equations deviance commands like poisson()$dev gaussian()$dev. general, deviance 2 times log.likelihood shifted models exact fit zero deviance.","code":""},{"path":"https://vegandevs.github.io/vegan/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Jari Oksanen. Author, maintainer. Gavin L. Simpson. Author. F. Guillaume Blanchet. Author. Roeland Kindt. Author. Pierre Legendre. Author. Peter R. Minchin. Author. R.B. O'Hara. Author. Peter Solymos. Author. M. Henry H. Stevens. Author. Eduard Szoecs. Author. Helene Wagner. Author. Matt Barbour. Author. Michael Bedward. Author. Ben Bolker. Author. Daniel Borcard. Author. Gustavo Carvalho. Author. Michael Chirico. Author. Miquel De Caceres. Author. Sebastien Durand. Author. Heloisa Beatriz Antoniazi Evangelista. Author. Rich FitzJohn. Author. Michael Friendly. Author. Brendan Furneaux. Author. Geoffrey Hannigan. Author. Mark O. Hill. Author. Leo Lahti. Author. Dan McGlinn. Author. Marie-Helene Ouellette. Author. Eduardo Ribeiro Cunha. Author. Tyler Smith. Author. Adrian Stier. Author. Cajo J.F. Ter Braak. Author. James Weedon. Author.","code":""},{"path":"https://vegandevs.github.io/vegan/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Oksanen J, Simpson G, Blanchet F, Kindt R, Legendre P, Minchin P, O'Hara R, Solymos P, Stevens M, Szoecs E, Wagner H, Barbour M, Bedward M, Bolker B, Borcard D, Carvalho G, Chirico M, De Caceres M, Durand S, Evangelista H, FitzJohn R, Friendly M, Furneaux B, Hannigan G, Hill M, Lahti L, McGlinn D, Ouellette M, Ribeiro Cunha E, Smith T, Stier , Ter Braak C, Weedon J (2024). vegan: Community Ecology Package. R package version 2.6-5, https://github.com/vegandevs/vegan.","code":"@Manual{,   title = {vegan: Community Ecology Package},   author = {Jari Oksanen and Gavin L. Simpson and F. Guillaume Blanchet and Roeland Kindt and Pierre Legendre and Peter R. Minchin and R.B. O'Hara and Peter Solymos and M. Henry H. Stevens and Eduard Szoecs and Helene Wagner and Matt Barbour and Michael Bedward and Ben Bolker and Daniel Borcard and Gustavo Carvalho and Michael Chirico and Miquel {De Caceres} and Sebastien Durand and Heloisa Beatriz Antoniazi Evangelista and Rich FitzJohn and Michael Friendly and Brendan Furneaux and Geoffrey Hannigan and Mark O. Hill and Leo Lahti and Dan McGlinn and Marie-Helene Ouellette and Eduardo {Ribeiro Cunha} and Tyler Smith and Adrian Stier and Cajo J.F. {Ter Braak} and James Weedon},   year = {2024},   note = {R package version 2.6-5},   url = {https://github.com/vegandevs/vegan}, }"},{"path":"https://vegandevs.github.io/vegan/index.html","id":"vegan-an-r-package-for-community-ecologists","dir":"","previous_headings":"","what":"vegan: an R package for community ecologists","title":"vegan: an R package for community ecologists","text":"Ordination methods, diversity analysis functions community vegetation ecologists. Website development version vegan package.","code":""},{"path":"https://vegandevs.github.io/vegan/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"vegan: an R package for community ecologists","text":"install development version vegan can use usual git R CMD build -> R CMD INSTALL dance cloned repo (downloaded sources). ’ll need able install packages source work; don’t relevant developer tools, won’t able install vegan way.","code":""},{"path":"https://vegandevs.github.io/vegan/index.html","id":"using-remotes","dir":"","previous_headings":"","what":"Using remotes","title":"vegan: an R package for community ecologists","text":"developer tools installed don’t want hassle keeping local source code tree --date, use remotes package:","code":"install.packages(\"remotes\") remotes::install_github(\"vegandevs/vegan\")"},{"path":"https://vegandevs.github.io/vegan/index.html","id":"installing-binaries-from-r-universe","dir":"","previous_headings":"","what":"Installing binaries from R Universe","title":"vegan: an R package for community ecologists","text":"just want install binary version packages, just CRAN, can install R Universe repository. Run following R session: make permanent, ’ll need include options() part person R settings file, typically .Rprofile profile home drive. See ?Startup.","code":"# Enable repository from vegandevs options(repos = c(   vegandevs = 'https://vegandevs.r-universe.dev',   CRAN = 'https://cloud.r-project.org')) # Download and install vegan in R install.packages('vegan')"},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":null,"dir":"Reference","previous_headings":"","what":"Barro Colorado Island Tree Counts — BCI","title":"Barro Colorado Island Tree Counts — BCI","text":"Tree counts 1-hectare plots Barro Colorado Island   associated site information.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Barro Colorado Island Tree Counts — BCI","text":"","code":"data(BCI) data(BCI.env)"},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Barro Colorado Island Tree Counts — BCI","text":"data frame 50 plots (rows) 1 hectare counts trees   plot total 225 species (columns). Full Latin names   used tree species. names updated   http://www.theplantlist.org Kress et al. (2009) allows   matching 207 species doi:10.5061/dryad.63q27  (Zanne et   al., 2014). original species names available attribute   original.names BCI. See Examples changed names. BCI.env, data frame 50 plots (rows) nine site   variables derived Pyke et al. (2001) Harms et al. (2001):  UTM.EW: UTM coordinates (zone 17N) East-West. UTM.NS: UTM coordinates (zone 17N) North-South. Precipitation: Precipitation mm per year. Elevation: Elevation m sea level. Age.cat: Forest age category. Geology: Underlying geological formation. Habitat: Dominant habitat type based map     habitat types 25 grid cells plot (Harms et al. 2001,     excluding streamside habitat). habitat types Young     forests (ca. 100 years), old forests > 7 degree slopes     (OldSlope), old forests 152 m elevation     (OldLow) higher elevation (OldHigh)     Swamp forests. River: \"Yes\" streamside habitat     plot. EnvHet: Environmental Heterogeneity assessed     Simpson diversity frequencies Habitat types 25     grid cells plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Barro Colorado Island Tree Counts — BCI","text":"Data give numbers trees least 10 cm diameter breast   height (DBH) one hectare quadrat 1982 BCI   plot. Within plot, individuals tallied   recorded table. full survey included smaller trees   DBH 1 cm larger, BCI dataset subset larger   trees compiled Condit et al. (2002). full data   thinner trees densities 4000 stems per hectare,   ten times stems data. dataset BCI   provided (2003) illustrate analysis methods   vegan. scientific research ecological issues   strongly recommend access complete modern data (Condit   et al. 2019) updated taxonomy (Condit et al. 2020). data frame contains Barro Colorado Island subset   full data table Condit et al. (2002). quadrats located regular grid. See BCI.env   coordinates. full description site information BCI.env   given Pyke et al. (2001) Harms et al. (2001). N.B.   Pyke et al. (2001) Harms et al. (2001) give conflicting   information forest age categories elevation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Barro Colorado Island Tree Counts — BCI","text":"https://www.science.org/doi/10.1126/science.1066854   community data References environmental data. updated   complete data (incl. thinner trees 1 cm), see Condit et   al. (2019).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Barro Colorado Island Tree Counts — BCI","text":"Condit, R, Pitman, N, Leigh, E.G., Chave, J., Terborgh, J., Foster,   R.B., Nuñez, P., Aguilar, S., Valencia, R., Villa, G.,   Muller-Landau, H.C., Losos, E. & Hubbell, S.P. (2002).   Beta-diversity tropical forest trees. Science 295,   666--669. Condit R., Pérez, R., Aguilar, S., Lao, S., Foster, R. & Hubbell,   S. (2019). Complete data Barro Colorado 50-ha plot: 423617   trees, 35 years [Dataset].  Dryad.   doi:10.15146/5xcp-0d46 Condit, R., Aguilar, S., Lao, S., Foster, R., Hubbell,   S. (2020). BCI 50-ha Plot Taxonomy [Dataset].  Dryad.   doi:10.15146/R3FH61 Harms K.E., Condit R., Hubbell S.P. & Foster R.B. (2001) Habitat   associations trees shrubs 50-ha neotropical forest   plot. J. Ecol. 89, 947--959. Kress W.J., Erickson D.L, Jones F.., Swenson N.G, Perez R., Sanjur   O. & Bermingham E. (2009) Plant DNA barcodes community   phylogeny tropical forest dynamics plot Panama. PNAS   106, 18621--18626. Pyke, C. R., Condit, R., Aguilar, S., & Lao, S. (2001). Floristic   composition across climatic gradient neotropical lowland   forest. Journal Vegetation Science 12, 553--566.   doi:10.2307/3237007 Zanne .E., Tank D.C., Cornwell, W.K., Eastman J.M., Smith, S..,   FitzJohn, R.G., McGlinn, D.J., O’Meara, B.C., Moles, .T., Reich,   P.B., Royer, D.L., Soltis, D.E., Stevens, P.F., Westoby, M., Wright,   .J., Aarssen, L., Bertin, R.., Calaminus, ., Govaerts, R.,   Hemmings, F., Leishman, M.R., Oleksyn, J., Soltis, P.S., Swenson,   N.G., Warman, L. & Beaulieu, J.M. (2014) Three keys radiation   angiosperms freezing environments. Nature 506,   89--92.  doi:10.1038/nature12872  (published online Dec 22, 2013).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/BCI.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Barro Colorado Island Tree Counts — BCI","text":"","code":"data(BCI, BCI.env) head(BCI.env) #>   UTM.EW  UTM.NS Precipitation Elevation Age.cat Geology  Habitat Stream EnvHet #> 1 625754 1011569          2530       120      c3      Tb OldSlope    Yes 0.6272 #> 2 625754 1011669          2530       120      c3      Tb   OldLow    Yes 0.3936 #> 3 625754 1011769          2530       120      c3      Tb   OldLow     No 0.0000 #> 4 625754 1011869          2530       120      c3      Tb   OldLow     No 0.0000 #> 5 625754 1011969          2530       120      c3      Tb OldSlope     No 0.4608 #> 6 625854 1011569          2530       120      c3      Tb   OldLow     No 0.0768 ## see changed species names oldnames <- attr(BCI, \"original.names\") taxa <- cbind(\"Old Names\" = oldnames, \"Current Names\" = names(BCI)) noquote(taxa[taxa[,1] != taxa[,2], ]) #>       Old Names                     Current Names                  #>  [1,] Abarema.macradenium           Abarema.macradenia             #>  [2,] Acacia.melanoceras            Vachellia.melanoceras          #>  [3,] Apeiba.aspera                 Apeiba.glabra                  #>  [4,] Aspidosperma.cruenta          Aspidosperma.desmanthum        #>  [5,] Cassipourea.elliptica         Cassipourea.guianensis         #>  [6,] Cespedezia.macrophylla        Cespedesia.spathulata          #>  [7,] Chlorophora.tinctoria         Maclura.tinctoria              #>  [8,] Coccoloba.manzanillensis      Coccoloba.manzinellensis       #>  [9,] Coussarea.curvigemmia         Coussarea.curvigemma           #> [10,] Cupania.sylvatica             Cupania.seemannii              #> [11,] Dipteryx.panamensis           Dipteryx.oleifera              #> [12,] Eugenia.coloradensis          Eugenia.florida                #> [13,] Eugenia.oerstedeana           Eugenia.oerstediana            #> [14,] Guapira.standleyana           Guapira.myrtiflora             #> [15,] Hyeronima.alchorneoides       Hieronyma.alchorneoides        #> [16,] Inga.marginata                Inga.semialata                 #> [17,] Lonchocarpus.latifolius       Lonchocarpus.heptaphyllus      #> [18,] Maquira.costaricana           Maquira.guianensis.costaricana #> [19,] Phoebe.cinnamomifolia         Cinnamomum.triplinerve         #> [20,] Swartzia.simplex.var.ochnacea Swartzia.simplex.continentalis #> [21,] Tabebuia.guayacan             Handroanthus.guayacan"},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":null,"dir":"Reference","previous_headings":"","what":"Canonical Correlation Analysis — CCorA","title":"Canonical Correlation Analysis — CCorA","text":"Canonical correlation analysis, following Brian McArdle's unpublished graduate course notes, plus improvements allow calculations case sparse collinear matrices,  permutation test Pillai's trace statistic.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Canonical Correlation Analysis — CCorA","text":"","code":"CCorA(Y, X, stand.Y=FALSE, stand.X=FALSE, permutations = 0, ...)  # S3 method for CCorA biplot(x, plot.type=\"ov\", xlabs, plot.axes = 1:2, int=0.5,     col.Y=\"red\", col.X=\"blue\", cex=c(0.7,0.9), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Canonical Correlation Analysis — CCorA","text":"Y Left matrix (object class: matrix data.frame). X Right matrix (object class: matrix data.frame). stand.Y Logical; Y standardized? stand.X Logical; X standardized? permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. x CCoaR result object. plot.type character string indicating following      plots produced: \"objects\", \"variables\", \"ov\"      (separate graphs objects variables), \"biplots\".      unambiguous subset containing first letters names can used      instead full names. xlabs Row labels. default use row names, NULL     uses row numbers instead, NA suppresses plotting row names     completely. plot.axes vector 2 values containing order numbers      canonical axes plotted. Default: first two axes. int Radius inner circles plotted visual references      plots variables. Default: int=0.5. int=0,      inner circle plotted. col.Y Color used objects variables first data      table (Y) plots. biplots, objects black. col.X Color used objects variables second data      table (X) plots. cex vector 2 values containing size reduction factors      object variable names, respectively, plots.      Default values: cex=c(0.7,0.9). ... arguments passed functions. function      biplot.CCorA passes graphical arguments biplot      biplot.default. CCorA currently ignores extra      arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Canonical Correlation Analysis — CCorA","text":"Canonical correlation analysis (Hotelling 1936) seeks linear   combinations variables Y maximally   correlated linear combinations variables X.   analysis estimates relationships displays graphs.   Pillai's trace statistic computed tested parametrically (F-test);   permutation test also available. Algorithmic note --    blunt approach read two matrices, compute   covariance matrices, matrix   S12 %*% inv(S22) %*% t(S12) %*% inv(S11).   trace Pillai's trace statistic.    approach may fail, however, heavy multicollinearity   sparse data matrices. safe approach replace data   matrices PCA object scores. function can produce different types plots depending option  chosen:  \"objects\" produces two plots objects, one space  Y, second space X;  \"variables\" produces two plots variables, one variables  Y space Y, second variables X space X;  \"ov\" produces four plots, two objects two variables;  \"biplots\" produces two biplots, one first matrix (Y)  one second matrix (X) solutions. biplots, function passes arguments  biplot.default; consult help page configuring biplots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Canonical Correlation Analysis — CCorA","text":"Function CCorA returns list containing following elements: Pillai Pillai's trace statistic = sum canonical     eigenvalues. Eigenvalues Canonical eigenvalues. squares     canonical correlations. CanCorr Canonical correlations. Mat.ranks Ranks matrices Y X. RDA.Rsquares Bimultivariate redundancy coefficients     (R-squares) RDAs Y|X X|Y. RDA.adj.Rsq RDA.Rsquares adjusted n number      explanatory variables. nperm Number permutations. p.Pillai Parametric probability value associated Pillai's trace. p.perm Permutational probability associated Pillai's trace. Cy Object scores Y biplot. Cx Object scores X biplot. corr.Y.Cy Scores Y variables Y biplot, computed cor(Y,Cy). corr.X.Cx Scores X variables X biplot, computed cor(X,Cx). corr.Y.Cx cor(Y,Cy) available plotting variables Y space X manually. corr.X.Cy cor(X,Cx) available plotting variables X space Y manually. control list control values permutations     returned function . call Call CCorA function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Canonical Correlation Analysis — CCorA","text":"Hotelling, H. 1936. Relations two sets   variates. Biometrika 28: 321-377. Legendre, P. 2005. Species associations: Kendall coefficient    concordance revisited. Journal Agricultural, Biological,    Environmental Statistics 10: 226-245.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Canonical Correlation Analysis — CCorA","text":"Pierre Legendre, Departement de Sciences Biologiques,   Universite de Montreal. Implemented vegan help   Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/CCorA.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Canonical Correlation Analysis — CCorA","text":"","code":"# Example using two mite groups. The mite data are available in vegan data(mite) # Two mite species associations (Legendre 2005, Fig. 4) group.1 <- c(1,2,4:8,10:15,17,19:22,24,26:30) group.2 <- c(3,9,16,18,23,25,31:35) # Separate Hellinger transformations of the two groups of species  mite.hel.1 <- decostand(mite[,group.1], \"hel\") mite.hel.2 <- decostand(mite[,group.2], \"hel\") rownames(mite.hel.1) = paste(\"S\",1:nrow(mite),sep=\"\") rownames(mite.hel.2) = paste(\"S\",1:nrow(mite),sep=\"\") out <- CCorA(mite.hel.1, mite.hel.2) out #>  #> Canonical Correlation Analysis #>  #> Call: #> CCorA(Y = mite.hel.1, X = mite.hel.2)  #>  #>               Y  X #> Matrix Ranks 24 11 #>  #> Pillai's trace:  4.573009  #>  #> Significance of Pillai's trace: #> from F-distribution:   0.0032737  #>                        CanAxis1 CanAxis2 CanAxis3 CanAxis4 CanAxis5 CanAxis6 #> Canonical Correlations  0.92810  0.82431  0.81209  0.74981  0.70795  0.65950 #>                        CanAxis7 CanAxis8 CanAxis9 CanAxis10 CanAxis11 #> Canonical Correlations  0.50189  0.48179  0.41089   0.37823      0.28 #>  #>                      Y | X  X | Y #> RDA R squares      0.33224 0.5376 #> adj. RDA R squares 0.20560 0.2910 #>  biplot(out, \"ob\")                 # Two plots of objects  biplot(out, \"v\", cex=c(0.7,0.6))  # Two plots of variables  biplot(out, \"ov\", cex=c(0.7,0.6)) # Four plots (2 for objects, 2 for variables)  biplot(out, \"b\", cex=c(0.7,0.6))  # Two biplots  biplot(out, xlabs = NA, plot.axes = c(3,5))    # Plot axes 3, 5. No object names  biplot(out, plot.type=\"biplots\", xlabs = NULL) # Replace object names by numbers   # Example using random numbers. No significant relationship is expected mat1 <- matrix(rnorm(60),20,3) mat2 <- matrix(rnorm(100),20,5) out2 = CCorA(mat1, mat2, permutations=99) out2 #>  #> Canonical Correlation Analysis #>  #> Call: #> CCorA(Y = mat1, X = mat2, permutations = 99)  #>  #>              Y X #> Matrix Ranks 3 5 #>  #> Pillai's trace:  0.480458  #>  #> Significance of Pillai's trace: #> from F-distribution:   0.90606  #> based on permutations: 0.94  #> Permutation: free #> Number of permutations: 99 #>   #>                        CanAxis1 CanAxis2 CanAxis3 #> Canonical Correlations  0.64421  0.23458   0.1021 #>  #>                        Y | X   X | Y #> RDA R squares       0.214302  0.0839 #> adj. RDA R squares -0.066305 -0.0879 #>  biplot(out2, \"b\")"},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":null,"dir":"Reference","previous_headings":"","what":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Function rotates multidimensional scaling result   first dimension parallel external (environmental   variable). function can handle results   metaMDS monoMDS functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"","code":"MDSrotate(object, vec, na.rm = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"object result object metaMDS     monoMDS. vec environmental variable matrix     variables. number variables must lower number     dimensions, solution rotated variables     order appear matrix. Alternatively vec can     factor, solution rotated optimal separation     factor levels using lda. na.rm Remove missing values continuous variable     vec. ... arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"orientation rotation undefined multidimensional   scaling.  Functions metaMDS metaMDS   can rotate solutions principal components   dispersion points highest first dimension. Sometimes   different rotation intuitive, MDSrotate allows   rotation result first axis parallel given   external variable two first variables completely   two-dimensional plane etc. several external variables supplied,   applied order matrix. First axis   rotated first supplied variable, second axis   second variable. variables usually correlated, second   variable usually aligned second axis,   uncorrelated later dimensions. must least one free   dimension: number external variables must lower   number dimensions, used environmental variables   uncorrelated free dimension. Alternatively method can rotate discriminate levels   factor using linear discriminant analysis   (lda). hardly meaningful   two-dimensional solutions, since rotations two dimensions   separation cluster levels. However, function   can useful finding two-dimensional projection clusters   two dimensions. last dimension always show   residual variation, \\(k\\) dimensions, \\(k-1\\)   discrimination vectors used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Function returns original ordination result,   rotated scores (site species available),  pc attribute scores set FALSE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Rotation factor variable experimental feature may   removed. discriminant analysis weights dimensions   discriminating power, MDSrotate performs rigid   rotation. Therefore solution may optimal.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/MDSrotate.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rotate First MDS Dimension Parallel to an External Variable — MDSrotate","text":"","code":"data(varespec) data(varechem) mod <- monoMDS(vegdist(varespec)) mod <- with(varechem, MDSrotate(mod, pH)) plot(mod) ef <- envfit(mod ~ pH, varechem, permutations = 0) plot(ef) ordisurf(mod ~ pH, varechem, knots = 1, add = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ poly(x1, 1) + poly(x2, 1) #> Total model degrees of freedom 3  #>  #> REML score: -2.736051"},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":null,"dir":"Reference","previous_headings":"","what":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Mitchell-Olds & Shaw test concerns location highest (hump)   lowest (pit) value quadratic curve given points. Typically,   used study whether quadratic hump pit located   within studied interval. current test generalized   applies generalized linear models (glm) link   function instead simple quadratic curve.  test popularized   ecology analysis humped species richness patterns   (Mittelbach et al. 2001), general. logarithmic   link function, quadratic response defines Gaussian response   model ecological gradients (ter Braak & Looman 1986), test   can used inspecting location Gaussian optimum within   given range gradient. can also used replace Tokeshi's   test “bimodal” species frequency distribution.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"","code":"MOStest(x, y, interval, ...) # S3 method for MOStest plot(x, which = c(1,2,3,6), ...) fieller.MOStest(object, level = 0.95) # S3 method for MOStest profile(fitted, alpha = 0.01, maxsteps = 10, del = zmax/5, ...) # S3 method for MOStest confint(object, parm = 1, level = 0.95, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"x independent variable plotting object plot. y dependent variable. interval two points test statistic     evaluated. missing, extremes x used. Subset plots produced. Values =1     2 define plots specific MOStest (see Details),     larger values select graphs plot.lm (minus 2). object, fitted result object MOStest. level confidence level required. alpha Maximum significance level allowed. maxsteps Maximum number steps profile. del step length parameter profile (see code). parm Ignored. ... variables passed functions. Function     MOStest passes glm     can include family. functions pass     underlying graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"function fits quadratic curve \\(\\mu = b_0 + b_1 x + b_2   x^2\\) given family link function.  \\(b_2   < 0\\), defines unimodal curve highest point \\(u =   -b_1/(2 b_2)\\) (ter Braak & Looman 1986). \\(b_2 > 0\\),   parabola minimum \\(u\\) response sometimes   called “bimodal”.  null hypothesis extreme   point \\(u\\) located within interval given points   \\(p_1\\) \\(p_2\\). extreme point \\(u\\) exactly   \\(p_1\\), \\(b_1 = 0\\) shifted axis \\(x - p_1\\).    test, origin x shifted values \\(p_1\\)   \\(p_2\\), test statistic based differences   deviances original model model origin   forced given location using standard   anova.glm function (Oksanen et al. 2001).   Mitchell-Olds & Shaw (1987) used first degree coefficient   significance estimated summary.glm   function.  give identical results Normal error,   error distributions preferable use test based   differences deviances fitted models. test often presented general test location   hump, really dependent quadratic fitted curve.   hump different form quadratic, test may   insignificant. strong assumptions test, use support   functions inspect fit. Function plot(..., =1)   displays data points, fitted quadratic model, approximate   95% confidence intervals (2 times SE). Function plot   = 2 displays approximate confidence interval   polynomial coefficients, together two lines indicating   combinations coefficients produce evaluated points   x. Moreover, cross-hair shows approximate confidence   intervals polynomial coefficients ignoring   correlations. Higher values produce corresponding   graphs plot.lm. , must add 2   value plot.lm. Function fieller.MOStest approximates confidence limits   location extreme point (hump pit) using Fieller's   theorem following ter Braak & Looman (1986). test based   quasideviance except family poisson   binomial. Function profile evaluates profile   deviance fitted model, confint finds profile   based confidence limits following Oksanen et al. (2001). test typically used assessing significance diversity   hump productivity gradient (Mittelbach et al. 2001). also   can used location pit (deepest points) instead   Tokeshi test. , can used test location   Gaussian optimum ecological gradient analysis (ter Braak &   Looman 1986, Oksanen et al. 2001).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"function based glm, returns result   object glm amended result test. new   items MOStest : isHump TRUE response     hump. isBracketed TRUE hump pit bracketed     evaluated points. hump Sorted vector location hump pit     points test evaluated. coefficients Table test statistics significances.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Mitchell-Olds, T. & Shaw, R.G. 1987. Regression analysis natural selection: statistical inference biological interpretation. Evolution 41, 1149--1161. Mittelbach, G.C. Steiner, C.F., Scheiner, S.M., Gross, K.L., Reynolds, H.L., Waide, R.B., Willig, R.M., Dodson, S.. & Gough, L. 2001. observed relationship species richness productivity? Ecology 82, 2381--2396. Oksanen, J., Läärä, E., Tolonen, K. & Warner, B.G. 2001. Confidence intervals optimum Gaussian response function. Ecology 82, 1191--1197. ter Braak, C.J.F & Looman, C.W.N 1986. Weighted averaging, logistic regression Gaussian response model. Vegetatio 65, 3--11.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"Function fieller.MOStest based package optgrad Ecological Archives (https://figshare.com/articles/dataset/Full_Archive/3521975) accompanying Oksanen et al. (2001). Ecological Archive package optgrad also contains profile deviance method location hump pit, current implementation profile confint rather follow example profile.glm confint.glm MASS package.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/MOStest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mitchell-Olds and Shaw Test for the Location of Quadratic Extreme — MOStest","text":"","code":"## The Al-Mufti data analysed in humpfit(): mass <- c(140,230,310,310,400,510,610,670,860,900,1050,1160,1900,2480) spno <- c(1,  4,  3,  9, 18, 30, 20, 14,  3,  2,  3,  2,  5,  2) mod <- MOStest(mass, spno) ## Insignificant mod #>  #> Mitchell-Olds and Shaw test #> Null: hump of a quadratic linear predictor is at min or max #>  #> Family: gaussian  #> Link function: identity  #>  #>       hump        min        max  #>   46.89749  140.00000 2480.00000  #> ***** Caution: hump/pit not bracketed by the data ****** #>  #>             min/max      F Pr(>F) #> hump at min     140 0.0006 0.9816 #> hump at max    2480 0.3161 0.5852 #> Combined                   0.9924 ## ... but inadequate shape of the curve op <- par(mfrow=c(2,2), mar=c(4,4,1,1)+.1) plot(mod)  ## Looks rather like log-link with Poisson error and logarithmic biomass mod <- MOStest(log(mass), spno, family=quasipoisson) mod #>  #> Mitchell-Olds and Shaw test #> Null: hump of a quadratic linear predictor is at min or max #>  #> Family: quasipoisson  #> Link function: log  #>  #>      min     hump      max  #> 4.941642 6.243371 7.816014  #>  #>             min/max      F  Pr(>F)   #> hump at min  4.9416 7.1367 0.02174 * #> hump at max  7.8160 9.0487 0.01191 * #> Combined                   0.03338 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod)  par(op) ## Confidence Limits fieller.MOStest(mod) #>    2.5 %   97.5 %  #> 5.255827 6.782979  confint(mod) #>    2.5 %   97.5 %  #> 5.816021 6.574378  plot(profile(mod))"},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":null,"dir":"Reference","previous_headings":"","what":"Adjusted R-square — RsquareAdj","title":"Adjusted R-square — RsquareAdj","text":"functions finds adjusted R-square.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Adjusted R-square — RsquareAdj","text":"","code":"# S3 method for default RsquareAdj(x, n, m, ...) # S3 method for rda RsquareAdj(x, ...) # S3 method for cca RsquareAdj(x, permutations = 1000, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Adjusted R-square — RsquareAdj","text":"x Unadjusted R-squared object terms   evaluation adjusted R-squared can found. n, m Number observations number degrees freedom   fitted model. permutations Number permutations use computing adjusted    R-squared cca. permutations can calculated parallel   specifying number cores passed permutest ... arguments (ignored) except case cca    arguments passed permutest.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Adjusted R-square — RsquareAdj","text":"default method finds adjusted \\(R^2\\)   unadjusted \\(R^2\\), number observations,   number degrees freedom fitted model. specific methods   find information fitted result object.   specific methods rda, cca,   lm glm. Adjusted, even unadjusted,   \\(R^2\\) may available cases,   functions return NA. adjusted   \\(R^2\\) partial ordination, \\(R^2\\)   values available gaussian models   glm. adjusted, \\(R^2\\) cca computed using   permutation approach developed Peres-Neto et al. (2006).   default 1000 permutations used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Adjusted R-square — RsquareAdj","text":"functions return list items r.squared adj.r.squared.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Adjusted R-square — RsquareAdj","text":"Legendre, P., Oksanen, J. ter Braak, C.J.F. (2011). Testing   significance canonical axes redundancy analysis.    Methods Ecology Evolution 2, 269--277. Peres-Neto, P., P. Legendre, S. Dray D. Borcard. 2006. Variation   partitioning species data matrices: estimation comparison   fractions. Ecology 87, 2614--2625.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/RsquareAdj.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Adjusted R-square — RsquareAdj","text":"","code":"data(mite) data(mite.env) ## rda m <- rda(decostand(mite, \"hell\") ~  ., mite.env) RsquareAdj(m) #> $r.squared #> [1] 0.5265047 #>  #> $adj.r.squared #> [1] 0.4367038 #>  ## cca m <- cca(decostand(mite, \"hell\") ~  ., mite.env) RsquareAdj(m) #> $r.squared #> [1] 0.4471676 #>  #> $adj.r.squared #> [1] 0.3448054 #>  ## default method RsquareAdj(0.8, 20, 5) #> [1] 0.7285714"},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":null,"dir":"Reference","previous_headings":"","what":"Self-Starting nls Species-Area Models — SSarrhenius","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"functions provide self-starting species-area models   non-linear regression (nls). can also used   fitting species accumulation models   fitspecaccum. models (many ) reviewed   Dengler (2009).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"","code":"SSarrhenius(area, k, z) SSgleason(area, k, slope) SSgitay(area, k, slope) SSlomolino(area, Asym, xmid, slope)"},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"area Area size sample: independent variable. k, z, slope, Asym, xmid Estimated model parameters: see Details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"functions assumed used species richness   (number species) independent variable, area sample   size independent variable. Basically, define least   squares models untransformed data, differ models   transformed species richness models non-Gaussian error. Arrhenius model (SSarrhenius) expression   k*area^z. classical model can found   textbook ecology (also Dengler 2009). Parameter z   steepness species-area curve, k   expected number species unit area. Gleason model (SSgleason) linear expression    k + slope*log(area) (Dengler 200). linear model,     starting values give final estimates; provided    ease comparison models. Gitay model (SSgitay) quadratic logarithmic expression   (k + slope*log(area))^2 (Gitay et al. 1991, Dengler   2009). Parameter slope steepness species-area   curve, k square root expected richness unit   area. Lomolino model (SSlomolino)   Asym/(1 + slope^log(xmid/area)) (Lomolino 2000, Dengler 2009).   Parameter Asym asymptotic maximum number species,   slope maximum slope increase richness,   xmid  area half maximum richness   achieved. addition models, several models studied Dengler   (2009) available standard R self-starting models:   Michaelis-Menten (SSmicmen), Gompertz   (SSgompertz), logistic (SSlogis), Weibull   (SSweibull), others may useful.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Numeric vector length area. value   expression model. arguments names objects   gradient matrix respect names attached   attribute named gradient.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Dengler, J. (2009) function describes species-area   relationship best? review empirical evaluation. Journal     Biogeography 36, 728--744. Gitay, H., Roxburgh, S.H. & Wilson, J.B. (1991) Species-area   relationship New Zealand tussock grassland, implications   nature reserve design community structure. Journal   Vegetation Science 2, 113--118. Lomolino, M. V. (2000) Ecology's general, yet protean pattern:   species-area relationship. Journal Biogeography 27,   17--26.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/SSarrhenius.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Self-Starting nls Species-Area Models — SSarrhenius","text":"","code":"## Get species area data: sipoo.map gives the areas of islands data(sipoo, sipoo.map) S <- specnumber(sipoo) plot(S ~ area, sipoo.map,  xlab = \"Island Area (ha)\",   ylab = \"Number of Species\", ylim = c(1, max(S))) ## The Arrhenius model marr <- nls(S ~ SSarrhenius(area, k, z), data=sipoo.map) marr #> Nonlinear regression model #>   model: S ~ SSarrhenius(area, k, z) #>    data: sipoo.map #>      k      z  #> 3.4062 0.4364  #>  residual sum-of-squares: 78.1 #>  #> Number of iterations to convergence: 5  #> Achieved convergence tolerance: 1.056e-06 ## confidence limits from profile likelihood confint(marr) #> Waiting for profiling to be done... #>        2.5%     97.5% #> k 2.6220312 4.3033906 #> z 0.3813576 0.4944693 ## draw a line xtmp <- with(sipoo.map, seq(min(area), max(area), len=51)) lines(xtmp, predict(marr, newdata=data.frame(area = xtmp)), lwd=2) ## The normal way is to use linear regression on log-log data, ## but this will be different from the previous: mloglog <- lm(log(S) ~ log(area), data=sipoo.map) mloglog #>  #> Call: #> lm(formula = log(S) ~ log(area), data = sipoo.map) #>  #> Coefficients: #> (Intercept)    log(area)   #>      1.0111       0.4925   #>  lines(xtmp, exp(predict(mloglog, newdata=data.frame(area=xtmp))),    lty=2) ## Gleason: log-linear mgle <- nls(S ~ SSgleason(area, k, slope), sipoo.map) lines(xtmp, predict(mgle, newdata=data.frame(area=xtmp)),   lwd=2, col=2) ## Gitay: quadratic of log-linear mgit <- nls(S ~ SSgitay(area, k, slope), sipoo.map) lines(xtmp, predict(mgit, newdata=data.frame(area=xtmp)),   lwd=2, col = 3) ## Lomolino: using original names of the parameters (Lomolino 2000): mlom <- nls(S ~ SSlomolino(area, Smax, A50, Hill), sipoo.map) mlom #> Nonlinear regression model #>   model: S ~ SSlomolino(area, Smax, A50, Hill) #>    data: sipoo.map #>   Smax    A50   Hill  #> 53.493 94.697  2.018  #>  residual sum-of-squares: 55.37 #>  #> Number of iterations to convergence: 6  #> Achieved convergence tolerance: 9.715e-07 lines(xtmp, predict(mlom, newdata=data.frame(area=xtmp)),   lwd=2, col = 4) ## One canned model of standard R: mmic <- nls(S ~ SSmicmen(area, Asym, slope), sipoo.map) lines(xtmp, predict(mmic, newdata = data.frame(area=xtmp)),   lwd =2, col = 5) legend(\"bottomright\", c(\"Arrhenius\", \"log-log linear\", \"Gleason\", \"Gitay\",    \"Lomolino\", \"Michaelis-Menten\"), col=c(1,1,2,3,4,5), lwd=c(2,1,2,2,2,2),     lty=c(1,2,1,1,1,1))  ## compare models (AIC) allmods <- list(Arrhenius = marr, Gleason = mgle, Gitay = mgit,     Lomolino = mlom, MicMen= mmic) sapply(allmods, AIC) #> Arrhenius   Gleason     Gitay  Lomolino    MicMen  #>  83.49847  96.94018  80.54984  79.30718  83.02003"},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Compute single terms can added dropped constrained ordination model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"","code":"# S3 method for cca add1(object, scope, test = c(\"none\", \"permutation\"),     permutations = how(nperm=199), ...) # S3 method for cca drop1(object, scope, test = c(\"none\", \"permutation\"),      permutations = how(nperm=199), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"object constrained ordination object   cca, rda capscale. scope formula giving terms considered adding   dropping; see add1 details. test permutation test added using anova.cca. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. ... arguments passed add1.default,   drop1.default, anova.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"argument test = \"none\" functions call   add1.default drop1.default.   argument test = \"permutation\" functions add test   results anova.cca. Function drop1.cca   call anova.cca argument = \"margin\".   Function add1.cca implement test single term   additions directly available anova.cca. Functions used implicitly step,   ordiR2step ordistep.   deviance.cca deviance.rda used   step firm basis, setting argument test   = \"permutation\" may help getting useful insight validity   model building. Function ordistep calls alternately   drop1.cca add1.cca argument    test = \"permutation\" selects variables permutation   \\(P\\)-values.  Meticulous use add1.cca   drop1.cca allow judicious model building. default number permutations set low value,   permutation tests can take long time. sufficient   give impression significances terms, higher   values permutations used \\(P\\) values really   important.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Returns similar object add1 drop1.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/add1.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add or Drop  Single Terms to a Constrained Ordination Model — add1.cca","text":"","code":"data(dune) data(dune.env) ## Automatic model building based on AIC but with permutation tests step(cca(dune ~  1, dune.env), reformulate(names(dune.env)), test=\"perm\") #> Start:  AIC=87.66 #> dune ~ 1 #>  #>              Df    AIC      F Pr(>F)    #> + Moisture    3 86.608 2.2536  0.005 ** #> + Management  3 86.935 2.1307  0.005 ** #> + A1          1 87.411 2.1400  0.040 *  #>           87.657                  #> + Manure      4 88.832 1.5251  0.040 *  #> + Use         2 89.134 1.1431  0.205    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step:  AIC=86.61 #> dune ~ Moisture #>  #>              Df    AIC      F Pr(>F)    #>           86.608                  #> + Management  3 86.813 1.4565  0.055 .  #> + A1          1 86.992 1.2624  0.175    #> + Use         2 87.259 1.2760  0.075 .  #> + Manure      4 87.342 1.3143  0.050 *  #> - Moisture    3 87.657 2.2536  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Call: cca(formula = dune ~ Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    0.6283     0.2970    3 #> Unconstrained  1.4870     0.7030   16 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3  #> 0.4187 0.1330 0.0766  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11  #> 0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419  #>   CA12   CA13   CA14   CA15   CA16  #> 0.0201 0.0143 0.0099 0.0085 0.0080  #>  ## see ?ordistep to do the same, but based on permutation P-values if (FALSE) { ordistep(cca(dune ~  1, dune.env), reformulate(names(dune.env))) } ## Manual model building ## -- define the maximal model for scope mbig <- rda(dune ~  ., dune.env) ## -- define an empty model to start with m0 <- rda(dune ~ 1, dune.env) ## -- manual selection and updating add1(m0, scope=formula(mbig), test=\"perm\") #>            Df    AIC      F Pr(>F)    #>         89.620                  #> A1          1 89.591 1.9217  0.020 *  #> Moisture    3 87.707 2.5883  0.005 ** #> Management  3 87.082 2.8400  0.005 ** #> Use         2 91.032 1.1741  0.215    #> Manure      4 89.232 1.9539  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 m0 <- update(m0, . ~ . + Management) add1(m0, scope=formula(mbig), test=\"perm\") #>          Df    AIC      F Pr(>F)   #>       87.082                 #> A1        1 87.424 1.2965  0.180   #> Moisture  3 85.567 1.9764  0.015 * #> Use       2 88.284 1.0510  0.400   #> Manure    3 87.517 1.3902  0.100 . #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 m0 <- update(m0, . ~ . + Moisture) ## -- included variables still significant? drop1(m0, test=\"perm\") #>            Df    AIC      F Pr(>F)    #>         85.567                  #> Management  3 87.707 2.1769   0.01 ** #> Moisture    3 87.082 1.9764   0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 add1(m0, scope=formula(mbig), test=\"perm\") #>        Df    AIC      F Pr(>F) #>     85.567               #> A1      1 86.220 0.8359  0.635 #> Use     2 86.842 0.8027  0.790 #> Manure  3 85.762 1.1225  0.375"},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":null,"dir":"Reference","previous_headings":"","what":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"additive diversity partitioning, mean values alpha diversity lower levels sampling hierarchy compared total diversity entire data set (gamma diversity). hierarchical null model testing, statistic returned function evaluated according nested hierarchical sampling design (hiersimu).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"","code":"adipart(...) # S3 method for default adipart(y, x, index=c(\"richness\", \"shannon\", \"simpson\"),     weights=c(\"unif\", \"prop\"), relative = FALSE, nsimul=99,     method = \"r2dtable\", ...) # S3 method for formula adipart(formula, data, index=c(\"richness\", \"shannon\", \"simpson\"),     weights=c(\"unif\", \"prop\"), relative = FALSE, nsimul=99,     method = \"r2dtable\", ...)  hiersimu(...) # S3 method for default hiersimu(y, x, FUN, location = c(\"mean\", \"median\"),     relative = FALSE, drop.highest = FALSE, nsimul=99,     method = \"r2dtable\", ...) # S3 method for formula hiersimu(formula, data, FUN, location = c(\"mean\", \"median\"),     relative = FALSE, drop.highest = FALSE, nsimul=99,     method = \"r2dtable\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"y community matrix. x matrix number rows y, columns     coding levels sampling hierarchy. number groups within     hierarchy must decrease left right. x missing,     function performs overall decomposition alpha, beta     gamma diversities. formula two sided model formula form y ~ x,     y community data matrix samples rows     species column. Right hand side (x) must grouping variables     referring levels sampling hierarchy, terms right left     treated nested (first column lowest, last     highest level). formula add unique indentifier rows     constant rows always produce estimates row-level alpha     overall gamma diversities. must use non-formula     interface avoid behaviour. Interaction terms     allowed. data data frame look variables defined     right hand side formula. missing, variables looked     global environment. index Character, diversity index calculated (see Details). weights Character, \"unif\" uniform weights,     \"prop\" weighting proportional sample abundances use     weighted averaging individual alpha values within strata     given level sampling hierarchy. relative Logical, TRUE alpha beta diversity     values given relative value gamma function     adipart. nsimul Number permutations use.  nsimul = 0,     FUN argument evaluated.     thus possible reuse statistic values     without null model. method Null model method: either name (character string)     method defined make.commsim     commsim function.     default \"r2dtable\" keeps row sums column sums fixed.     See oecosimu Details Examples. FUN function used hiersimu. must     fully specified, currently arguments passed     function via .... location Character, identifies function (mean median)     used calculate location samples. drop.highest Logical, drop highest level .     FUN evaluates arrays least 2 dimensions, highest     level dropped, selected . ... arguments passed functions, e.g. base     logarithm Shannon diversity, method, thin     burnin arguments oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Additive diversity partitioning means mean alpha beta   diversities add gamma diversity, thus beta diversity measured   dimensions alpha gamma (Lande 1996). additive   procedure extended across multiple scales hierarchical   sampling design \\(= 1, 2, 3, \\ldots, m\\) levels sampling   (Crist et al. 2003). Samples lower hierarchical levels nested   within higher level units, thus \\(=1\\) \\(=m\\) grain size   increasing constant survey extent. level \\(\\),   \\(\\alpha_i\\) denotes average diversity found within samples. highest sampling level, diversity components calculated   $$\\beta_m  = \\gamma -  \\alpha_m$$    lower   sampling  level    $$\\beta_i  =   \\alpha_{+1}  -   \\alpha_i$$ ,  additive partition   diversity $$\\gamma  = \\alpha_1 + \\sum_{=1}^m \\beta_i$$ Average alpha components can weighted uniformly   (weight=\"unif\") calculate simple average,   proportionally sample abundances (weight=\"prop\")   calculate weighted average follows $$\\alpha_i =   \\sum_{j=1}^{n_i} D_{ij} w_{ij}$$   \\(D_{ij}\\) diversity index \\(w_{ij}\\) weight   calculated \\(j\\)th sample \\(\\)th sampling level. implementation additive diversity partitioning   adipart follows Crist et al. 2003. based species   richness (\\(S\\), \\(S-1\\)), Shannon's Simpson's diversity   indices stated index argument. expected diversity components calculated nsimul times   individual based randomisation community data matrix.   done \"r2dtable\" method oecosimu   default. hiersimu works almost way adipart,   without comparing actual statistic values returned FUN   highest possible value (cf. gamma diversity).  ,   cases, difficult ensure additive   properties mean statistic values along hierarchy.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"object class \"adipart\" \"hiersimu\"   structure oecosimu objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Crist,   T.O.,   Veech,    J..,   Gering,   J.C.     Summerville,   K.S.  (2003).  Partitioning species  diversity  across landscapes    regions:  hierarchical  analysis  \\(\\alpha\\),  \\(\\beta\\),   \\(\\gamma\\)-diversity.  . Nat., 162, 734--743. Lande, R.  (1996). Statistics partitioning species diversity,   similarity among multiple communities.  Oikos, 76,   5--13.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/adipart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Additive Diversity Partitioning and Hierarchical Null Model Testing — adipart","text":"","code":"## NOTE: 'nsimul' argument usually needs to be >= 99 ## here much lower value is used for demonstration  data(mite) data(mite.xy) data(mite.env) ## Function to get equal area partitions of the mite data cutter <- function (x, cut = seq(0, 10, by = 2.5)) {     out <- rep(1, length(x))     for (i in 2:(length(cut) - 1))         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i     return(out)} ## The hierarchy of sample aggregation levsm <- with(mite.xy, data.frame(     l1=1:nrow(mite),     l2=cutter(y, cut = seq(0, 10, by = 2.5)),     l3=cutter(y, cut = seq(0, 10, by = 5)),     l4=rep(1, nrow(mite)))) ## Let's see in a map par(mfrow=c(1,3)) plot(mite.xy, main=\"l1\", col=as.numeric(levsm$l1)+1, asp = 1) plot(mite.xy, main=\"l2\", col=as.numeric(levsm$l2)+1, asp = 1) plot(mite.xy, main=\"l3\", col=as.numeric(levsm$l3)+1, asp = 1)  par(mfrow=c(1,1)) ## Additive diversity partitioning adipart(mite, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(y = mite, index = \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.377 22.374 22.088 22.343 22.834     0.05 * #> gamma      35.000   0.000 35.000 35.000 35.000 35.000     1.00   #> beta.1     19.886  36.377 12.626 12.166 12.657 12.912     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## the next two define identical models adipart(mite, levsm, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(y = mite, x = levsm, index = \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES     mean     2.5%      50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.4611 22.34060 22.03214 22.35714 22.639     0.05 * #> alpha.2    29.750 -24.5197 34.84211 34.50000 35.00000 35.000     0.05 * #> alpha.3    33.000   0.0000 35.00000 35.00000 35.00000 35.000     0.05 * #> gamma      35.000   0.0000 35.00000 35.00000 35.00000 35.000     1.00   #> beta.1     14.636   6.9804 12.50150 11.95571 12.50714 12.942     0.05 * #> beta.2      3.250  14.8892  0.15789  0.00000  0.00000  0.500     0.05 * #> beta.3      2.000   0.0000  0.00000  0.00000  0.00000  0.000     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 adipart(mite ~ l2 + l3, levsm, index=\"richness\", nsimul=19) #> adipart object #>  #> Call: adipart(formula = mite ~ l2 + l3, data = levsm, index = #> \"richness\", nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index richness, weights unif #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES      mean      2.5%       50%  97.5% Pr(sim.)   #> alpha.1    15.114 -36.257 22.410526 22.140000 22.371429 22.826     0.05 * #> alpha.2    29.750 -41.630 34.907895 34.750000 35.000000 35.000     0.05 * #> alpha.3    33.000   0.000 35.000000 35.000000 35.000000 35.000     0.05 * #> gamma      35.000   0.000 35.000000 35.000000 35.000000 35.000     1.00   #> beta.1     14.636  10.117 12.497368 12.059643 12.578571 12.744     0.05 * #> beta.2      3.250  25.488  0.092105  0.000000  0.000000  0.250     0.05 * #> beta.3      2.000   0.000  0.000000  0.000000  0.000000  0.000     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Hierarchical null model testing ## diversity analysis (similar to adipart) hiersimu(mite, FUN=diversity, relative=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(y = mite, FUN = diversity, relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic     SES    mean    2.5%     50%  97.5% Pr(sim.)   #> level_1   0.76064 -70.226 0.93931 0.93495 0.93987 0.9438     0.05 * #> leve_2    1.00000   0.000 1.00000 1.00000 1.00000 1.0000     1.00   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 hiersimu(mite ~ l2 + l3, levsm, FUN=diversity, relative=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(formula = mite ~ l2 + l3, data = levsm, FUN = diversity, #> relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>      statistic      SES    mean    2.5%     50%  97.5% Pr(sim.)   #> unit   0.76064  -50.582 0.93874 0.93298 0.93896 0.9448     0.05 * #> l2     0.89736 -141.137 0.99789 0.99686 0.99782 0.9994     0.05 * #> l3     0.92791 -554.665 0.99941 0.99918 0.99944 0.9996     0.05 * #> all    1.00000    0.000 1.00000 1.00000 1.00000 1.0000     1.00   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Hierarchical testing with the Morisita index morfun <- function(x) dispindmorisita(x)$imst hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=19) #> hiersimu object #>  #> Call: hiersimu(formula = mite ~ ., data = levsm, FUN = morfun, #> drop.highest = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>    statistic     SES      mean      2.5%       50%   97.5% Pr(sim.)   #> l1   0.52070  6.2932  0.365366  0.318366  0.375193  0.4017     0.05 * #> l2   0.60234 11.1528  0.147892  0.093067  0.144796  0.2192     0.05 * #> l3   0.67509 16.5827 -0.195434 -0.272390 -0.210802 -0.0911     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Analysis variance using distance matrices ---   partitioning distance matrices among sources variation fitting   linear models (e.g., factors, polynomial regression) distance    matrices; uses permutation test pseudo-\\(F\\) ratios.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"","code":"adonis2(formula, data, permutations = 999, method = \"bray\",     sqrt.dist = FALSE, add = FALSE, by = \"terms\",     parallel = getOption(\"mc.cores\"), na.action = na.fail,     strata = NULL, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"formula Model formula. left-hand side (LHS) formula     must either community data matrix dissimilarity matrix,     e.g., vegdist dist.  LHS     data matrix, function vegdist used     find dissimilarities. right-hand side (RHS) formula     defines independent variables. can continuous variables     factors, can transformed within formula, can     interactions typical formula. data data frame independent variables, rows     order community data matrix dissimilarity     matrix named LHS formula. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. method name method used vegdist     calculate pairwise distances left hand side     formula data frame matrix. sqrt.dist Take square root dissimilarities. often     euclidifies dissimilarities. add Add constant non-diagonal dissimilarities     eigenvalues non-negative underlying Principal     Co-ordinates Analysis (see wcmdscale     details). Choice \"lingoes\" (TRUE) use     recommended method Legendre & Anderson (1999: “method     1”) \"cailliez\" uses “method 2”. = \"terms\" assess significance term     (sequentially first last), setting = \"margin\"     assess marginal effects terms (marginal term     analysed model variables), = \"onedf\"     analyse one-degree--freedom contrasts sequentially, =     NULL assess overall significance terms     together. arguments passed anova.cca. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. na.action Handling missing values right-hand-side     formula (see na.fail explanation     alternatives). Missing values allowed     left-hand-side. NB, argument subset implemented. strata Groups within constrain permutations.     traditional non-movable strata set Blocks     permute package, flexible alternatives may     appropriate. ... arguments passed vegdist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"adonis2 function analysis partitioning sums squares using dissimilarities. function based principles McArdle & Anderson (2001) can perform sequential, marginal overall tests. function also allows using additive constants squareroot dissimilarities avoid negative eigenvalues, can also handle semimetric indices (Bray-Curtis) produce negative eigenvalues. adonis2 tests identical anova.cca dbrda. Euclidean distances, tests also identical anova.cca rda. function partitions sums squares multivariate data set, directly analogous MANOVA (multivariate analysis variance). McArdle Anderson (2001) Anderson (2001) refer method “permutational MANOVA” (formerly “nonparametric MANOVA”). , inputs linear predictors, response matrix arbitrary number columns, robust alternative parametric MANOVA ordination methods describing variation attributed different experimental treatments uncontrolled covariates. method also analogous distance-based redundancy analysis functions dbrda capscale (Legendre Anderson 1999), provides alternative AMOVA (nested analysis molecular variance, Excoffier, Smouse, Quattro, 1992; amova ade4 package) crossed nested factors.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"function returns anova.cca result object   new column partial \\(R^2\\): proportion   sum squares total, marginal models   (= \"margin\") \\(R^2\\) terms add   1.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Anderson (2001, Fig. 4) warns method may confound   location dispersion effects: significant differences may caused   different within-group variation (dispersion) instead different   mean values groups (see Warton et al. 2012 general   analysis). However, seems adonis2 less sensitive   dispersion effects alternatives (anosim,   mrpp). Function betadisper sister   function adonis2 study differences dispersion   within geometric framework.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Anderson, M.J. 2001. new method non-parametric multivariate analysis variance. Austral Ecology, 26: 32--46. Excoffier, L., P.E. Smouse, J.M. Quattro. 1992. Analysis molecular variance inferred metric distances among DNA haplotypes: Application human mitochondrial DNA restriction data. Genetics, 131:479--491. Legendre, P. M.J. Anderson. 1999. Distance-based redundancy analysis: Testing multispecies responses multifactorial ecological experiments. Ecological Monographs, 69:1--24. McArdle, B.H.  M.J. Anderson. 2001. Fitting multivariate models community data: comment distance-based redundancy analysis. Ecology, 82: 290--297. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate analyses confound location dispersion effects. Methods Ecology Evolution, 3, 89--101.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"Martin Henry H. Stevens Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/adonis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutational Multivariate Analysis of Variance Using Distance\n  Matrices — adonis","text":"","code":"data(dune) data(dune.env) ## default test by terms adonis2(dune ~ Management*A1, data = dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management * A1, data = dune.env) #>               Df SumOfSqs      R2      F Pr(>F)    #> Management     3   1.4686 0.34161 3.2629  0.002 ** #> A1             1   0.4409 0.10256 2.9387  0.010 ** #> Management:A1  3   0.5892 0.13705 1.3090  0.215    #> Residual      12   1.8004 0.41878                  #> Total         19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## overall tests adonis2(dune ~ Management*A1, data = dune.env, by = NULL) #> Permutation test for adonis under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management * A1, data = dune.env, by = NULL) #>          Df SumOfSqs      R2      F Pr(>F)    #> Model     7   2.4987 0.58122 2.3792  0.004 ** #> Residual 12   1.8004 0.41878                  #> Total    19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ### Example of use with strata, for nested (e.g., block) designs. dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) ) dat #>    rep NO3 field #> 1    1   0     1 #> 2    2   0     1 #> 3    1  10     1 #> 4    2  10     1 #> 5    1   0     2 #> 6    2   0     2 #> 7    1  10     2 #> 8    2  10     2 #> 9    1   0     3 #> 10   2   0     3 #> 11   1  10     3 #> 12   2  10     3 Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2 Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2 total <- Agropyron + Schizachyrium dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,         type=c('p','a'), xlab=\"NO3\", auto.key=list(columns=3, lines=TRUE) )   Y <- data.frame(Agropyron, Schizachyrium) mod <- metaMDS(Y, trace = FALSE) plot(mod) ### Ellipsoid hulls show treatment with(dat, ordiellipse(mod, NO3, kind = \"ehull\", label = TRUE)) ### Spider shows fields with(dat, ordispider(mod, field, lty=3, col=\"red\", label = TRUE))   ### Incorrect (no strata) adonis2(Y ~ NO3, data = dat, permutations = 199) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 199 #>  #> adonis2(formula = Y ~ NO3, data = dat, permutations = 199) #>          Df SumOfSqs      R2      F Pr(>F) #> NO3       1  0.02681 0.13438 1.5524   0.23 #> Residual 10  0.17270 0.86562               #> Total    11  0.19951 1.00000               ## Correct with strata with(dat, adonis2(Y ~ NO3, data = dat, permutations = 199, strata = field)) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Blocks:  strata  #> Permutation: free #> Number of permutations: 199 #>  #> adonis2(formula = Y ~ NO3, data = dat, permutations = 199, strata = field) #>          Df SumOfSqs      R2      F Pr(>F)   #> NO3       1  0.02681 0.13438 1.5524   0.03 * #> Residual 10  0.17270 0.86562                 #> Total    11  0.19951 1.00000                 #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":null,"dir":"Reference","previous_headings":"","what":"Analysis of Similarities — anosim","title":"Analysis of Similarities — anosim","text":"Analysis similarities (ANOSIM) provides way test statistically   whether significant difference two groups   sampling units.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Analysis of Similarities — anosim","text":"","code":"anosim(x, grouping, permutations = 999, distance = \"bray\", strata = NULL,     parallel = getOption(\"mc.cores\"))"},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Analysis of Similarities — anosim","text":"x Data matrix data frame rows samples     columns response variable(s), dissimilarity object     symmetric square matrix dissimilarities. grouping Factor grouping observations. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. distance Choice distance metric measures     dissimilarity two observations. See vegdist     options.  used x dissimilarity     structure symmetric square matrix. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Analysis of Similarities — anosim","text":"Analysis similarities (ANOSIM) provides way test statistically   whether significant difference two groups   sampling units.  Function anosim operates directly   dissimilarity matrix.  suitable dissimilarity matrix produced   functions dist vegdist.    method philosophically allied NMDS ordination   (monoMDS), uses rank order   dissimilarity values. two groups sampling units really different species   composition, compositional dissimilarities groups   greater within groups.  anosim   statistic \\(R\\) based difference mean ranks   groups (\\(r_B\\)) within groups (\\(r_W\\)): $$R = (r_B - r_W)/(N (N-1) / 4)$$ divisor chosen \\(R\\) interval   \\(-1 \\dots +1\\), value \\(0\\) indicating completely random   grouping. statistical significance observed \\(R\\) assessed   permuting grouping vector obtain empirical distribution   \\(R\\) null-model.  See permutations   additional details permutation tests Vegan. distribution   simulated values can inspected permustats   function. function summary plot methods.    show valuable information assess validity method:    function assumes ranked dissimilarities within groups    equal median range.  plot method uses   boxplot options notch=TRUE   varwidth=TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Analysis of Similarities — anosim","text":"function returns list class \"anosim\" following   items: call Function call. statistic value ANOSIM statistic \\(R\\) signif Significance permutation. perm Permutation values \\(R\\). distribution     permutation values can inspected function permustats. class.vec Factor value dissimilarities     classes class name corresponding dissimilarity     within class. dis.rank Rank dissimilarity entry. dissimilarity name dissimilarity index:     \"method\" entry dist object. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Analysis of Similarities — anosim","text":"Clarke, K. R. (1993). Non-parametric multivariate analysis changes   community structure. Australian Journal Ecology 18,   117--143. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate   analyses confound location dispersion effects. Methods   Ecology Evolution, 3, 89--101","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Analysis of Similarities — anosim","text":"Jari Oksanen, help Peter R. Minchin.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Analysis of Similarities — anosim","text":"anosim function can confound differences groups   dispersion within groups results can difficult   interpret (cf. Warton et al. 2012).  function returns lot   information ease studying performance. anosim   models analysed adonis2 seems   robust alternative.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/anosim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Analysis of Similarities — anosim","text":"","code":"data(dune) data(dune.env) dune.dist <- vegdist(dune) dune.ano <- with(dune.env, anosim(dune.dist, Management)) summary(dune.ano) #>  #> Call: #> anosim(x = dune.dist, grouping = Management)  #> Dissimilarity: bray  #>  #> ANOSIM statistic R: 0.2579  #>       Significance: 0.008  #>  #> Permutation: free #> Number of permutations: 999 #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.122 0.170 0.209 0.245  #>  #> Dissimilarity ranks between and within classes: #>         0%   25%    50%     75%  100%   N #> Between  4 58.50 104.00 145.500 188.0 147 #> BF       5 15.25  25.50  41.250  57.0   3 #> HF       1  7.25  46.25  68.125  89.5  10 #> NM       6 64.75 124.50 156.250 181.0  15 #> SF       3 32.75  53.50  99.250 184.0  15 #>  plot(dune.ano) #> Warning: some notches went outside hinges ('box'): maybe set notch=FALSE"},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"function performs ANOVA like permutation test Constrained   Correspondence Analysis (cca), Redundancy Analysis   (rda) distance-based Redundancy Analysis (dbRDA,   capscale) assess significance constraints.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"","code":"# S3 method for cca anova(object, ..., permutations = how(nperm=999),      by = NULL, model = c(\"reduced\", \"direct\", \"full\"),      parallel = getOption(\"mc.cores\"), strata = NULL,      cutoff = 1, scope = NULL) # S3 method for cca permutest(x, permutations = how(nperm = 99),      model = c(\"reduced\", \"direct\", \"full\"), by = NULL, first = FALSE,      strata = NULL, parallel = getOption(\"mc.cores\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"object One several result objects cca,     rda, dbrda capscale.     several result objects, compared     order supplied. single object, test     specified overall test given. x single ordination result object. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. Setting = \"axis\" assess significance     constrained axis, setting = \"terms\" assess     significance term (sequentially first last),     setting = \"margin\" assess marginal effects     terms (marginal term analysed model     variables), = \"onedf\" assess sequentially     one-degree--freedom contrasts split factors. model Permutation model: model=\"direct\" permutes     community data, model=\"reduced\" permutes residuals     community data Conditions (partial model),     model = \"full\" permutes residuals Conditions     Constraints. parallel Use parallel processing given number     cores. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. error use     permutations matrix,     defines blocks. legacy argument     deprecated future: use     permutations = (..., blocks) instead. cutoff effective =\"axis\" stops     permutations axis equals exceeds cutoff     \\(p\\)-value. scope effective =\"margin\" can     used select marginal terms testing. default     test marginal terms drop.scope. first Analyse significance first axis. ... Parameters passed functions.  anova.cca     passes arguments permutest.cca. anova     = \"axis\" can use argument cutoff (defaults     1) stops permutations exceeding given     level.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Functions anova.cca permutest.cca implement ANOVA   like permutation tests joint effect constraints   cca, rda, dbrda   capscale. Function anova intended   user-friendly alternative permutest (real   workhorse). Function anova can analyse sequence constrained   ordination models. analysis based differences   residual deviance permutations nested models. default test sum constrained eigenvalues.   Setting first = TRUE perform test first   constrained eigenvalue.  Argument first can set either   anova.cca permutest.cca.  also possible   perform significance tests axis term   (constraining variable) using argument anova.cca.   Setting = \"axis\" perform separate significance tests   constrained axis.  previous constrained axes used   conditions (“partialled ”) test first   constrained eigenvalues performed (Legendre et al. 2011).  can   stop permutation tests exceeding given significance level   argument cutoff speed calculations large   models. Setting = \"terms\" perform separate significance   test term (constraining variable). terms assessed   sequentially first last, order terms   influence significances. Setting = \"onedf\"   perform similar sequential test one-degree--freedom effects,   multi-level factors split contrasts. Setting   = \"margin\" perform separate significance test   marginal term model terms. marginal test also   accepts scope argument drop.scope   can character vector term labels analysed,   fitted model lower scope.  marginal effects also known   “Type III” effects, current function evaluates   marginal terms. , instance, ignore main effects   included interaction terms. calculating pseudo-\\(F\\),   terms compared residual full model. Community data permuted choice model=\"direct\",   residuals partial CCA/ RDA/ dbRDA choice   model=\"reduced\" (default).  partial CCA/ RDA/   dbRDA stage, model=\"reduced\" simply permutes data   equivalent model=\"direct\".  test statistic   “pseudo-\\(F\\)”, ratio constrained   unconstrained total Inertia (Chi-squares, variances something   similar), divided respective degrees freedom.    conditions (“partial” terms), sum   eigenvalues remains constant, pseudo-\\(F\\) eigenvalues   give equal results.  partial CCA/ RDA/ dbRDA, effect   conditioning variables (“covariables”) removed   permutation, total Chi-square fixed, test based   pseudo-\\(F\\) differ test based plain   eigenvalues.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"function anova.cca calls permutest.cca fills  anova table. Additional attributes  Random.seed (random seeds used),  control (permutation design, see )  F.perm (permuted test statistics).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Legendre, P. Legendre, L. (2012). Numerical Ecology. 3rd   English ed. Elsevier. Legendre, P., Oksanen, J. ter Braak, C.J.F. (2011). Testing   significance canonical axes redundancy analysis.   Methods Ecology Evolution 2, 269--277.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/anova.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutation Test for Constrained Correspondence Analysis,\n  Redundancy Analysis and Constrained Analysis of Principal Coordinates — anova.cca","text":"","code":"data(dune, dune.env) mod <- cca(dune ~ Moisture + Management, dune.env) ## overall test anova(mod) #> Permutation test for cca under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>          Df ChiSquare      F Pr(>F)    #> Model     6    1.0024 1.9515  0.003 ** #> Residual 13    1.1129                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## tests for individual terms anova(mod, by=\"term\") #> Permutation test for cca under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>            Df ChiSquare      F Pr(>F)     #> Moisture    3   0.62831 2.4465  0.001 *** #> Management  3   0.37407 1.4565  0.051 .   #> Residual   13   1.11289                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 anova(mod, by=\"margin\") #> Permutation test for cca under reduced model #> Marginal effects of terms #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>            Df ChiSquare      F Pr(>F)   #> Moisture    3   0.39854 1.5518  0.036 * #> Management  3   0.37407 1.4565  0.052 . #> Residual   13   1.11289                 #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## sequential test for contrasts anova(mod, by = \"onedf\") #> Permutation test for cca under reduced model #> Sequential test for contrasts #> Permutation: free #> Number of permutations: 999 #>  #> Model: cca(formula = dune ~ Moisture + Management, data = dune.env) #>              Df ChiSquare      F Pr(>F)     #> Moisture.L    1   0.41081 4.7988  0.001 *** #> Moisture.Q    1   0.11261 1.3154  0.163     #> Moisture.C    1   0.10489 1.2253  0.224     #> ManagementHF  1   0.08849 1.0337  0.353     #> ManagementNM  1   0.20326 2.3744  0.011 *   #> ManagementSF  1   0.08231 0.9615  0.457     #> Residual     13   1.11289                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## test for adding all environmental variables anova(mod, cca(dune ~ ., dune.env)) #> Permutation tests for cca under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model 1: dune ~ Moisture + Management #> Model 2: dune ~ A1 + Moisture + Management + Use + Manure #>   ResDf ResChiSquare Df ChiSquare      F Pr(>F) #> 1    13       1.1129                            #> 2     7       0.6121  6   0.50079 0.9545  0.534"},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Averaged Subsampled Dissimilarity Matrices — avgdist","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"function computes dissimilarity matrix dataset multiple   times using vegdist randomly subsampling   dataset time. subsampled iterations averaged   (mean) provide distance matrix represents average   multiple subsampling iterations. emulates behavior   distance matrix calculator within Mothur microbial ecology toolkit.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"","code":"avgdist(x, sample, distfun = vegdist, meanfun = mean,     transf = NULL, iterations = 100, dmethod = \"bray\",     diag = TRUE, upper = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"x Community data matrix. sample subsampling depth used iteration. Samples   meet threshold removed analysis,   identity returned user stdout. distfun dissimilarity matrix function used. Default   vegan vegdist meanfun calculation use average (mean median). transf Option transforming count data calculating   distance matrix. base transformation option can used (e.g.   sqrt) iterations number random iterations perform averaging.   Default 100 iterations. dmethod Dissimilarity index used specified dissimilarity     matrix function. Default Bray-Curtis diag, upper Return dissimilarities diagonal upper     triangle. NB. default differs vegdist     returns symmetric \"dist\" structure instead lower     diagonal. However, object accessed matrix     indices unless cast matrix .matrix. ... additional arguments add distance function   mean/median function specified.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"Geoffrey Hannigan, minor tweaks Gavin L. Simpson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"function builds function rrarefy   additional distance matrix function (e.g. vegdist)   add meaningful representations distances among randomly   subsampled datasets presenting average multiple random   iterations. function runs using vegdist.   functionality utilized Mothur standalone microbial   ecology toolkit .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/avgdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Averaged Subsampled Dissimilarity Matrices — avgdist","text":"","code":"# Import an example count dataset data(BCI) # Test the base functionality mean.avg.dist <- avgdist(BCI, sample = 50, iterations = 10) # Test the transformation function mean.avg.dist.t <- avgdist(BCI, sample = 50, iterations = 10, transf = sqrt) # Test the median functionality median.avg.dist <- avgdist(BCI, sample = 50, iterations = 10, meanfun = median) # Print the resulting tables head(as.matrix(mean.avg.dist)) #>       1     2     3     4     5     6     7     8     9    10    11    12    13 #> 1 0.000 0.560 0.590 0.606 0.634 0.576 0.588 0.554 0.620 0.596 0.622 0.636 0.704 #> 2 0.560 0.000 0.546 0.596 0.604 0.576 0.584 0.546 0.622 0.570 0.584 0.584 0.712 #> 3 0.590 0.546 0.000 0.572 0.606 0.586 0.572 0.578 0.612 0.580 0.570 0.602 0.696 #> 4 0.606 0.596 0.572 0.000 0.636 0.612 0.620 0.582 0.620 0.616 0.618 0.620 0.656 #> 5 0.634 0.604 0.606 0.636 0.000 0.574 0.656 0.598 0.642 0.646 0.658 0.696 0.768 #> 6 0.576 0.576 0.586 0.612 0.574 0.000 0.554 0.578 0.592 0.622 0.570 0.550 0.730 #>      14    15    16    17    18    19    20    21    22    23    24    25    26 #> 1 0.578 0.590 0.582 0.648 0.694 0.636 0.616 0.584 0.630 0.670 0.614 0.602 0.622 #> 2 0.576 0.610 0.604 0.622 0.686 0.596 0.616 0.610 0.608 0.650 0.618 0.622 0.614 #> 3 0.592 0.602 0.590 0.606 0.714 0.624 0.594 0.628 0.618 0.658 0.600 0.622 0.674 #> 4 0.552 0.620 0.614 0.614 0.672 0.618 0.608 0.696 0.632 0.658 0.606 0.628 0.674 #> 5 0.624 0.648 0.632 0.726 0.764 0.692 0.630 0.656 0.718 0.668 0.672 0.700 0.656 #> 6 0.606 0.654 0.596 0.606 0.704 0.600 0.648 0.650 0.612 0.658 0.588 0.672 0.650 #>      27    28    29    30    31    32    33    34    35    36    37    38    39 #> 1 0.604 0.622 0.634 0.650 0.656 0.666 0.634 0.688 0.732 0.620 0.670 0.656 0.684 #> 2 0.622 0.598 0.600 0.622 0.630 0.632 0.608 0.652 0.740 0.632 0.624 0.650 0.656 #> 3 0.606 0.606 0.580 0.636 0.640 0.632 0.640 0.712 0.786 0.622 0.626 0.644 0.658 #> 4 0.654 0.634 0.632 0.620 0.678 0.636 0.664 0.666 0.750 0.664 0.626 0.604 0.650 #> 5 0.692 0.692 0.712 0.680 0.642 0.688 0.702 0.756 0.808 0.674 0.692 0.770 0.742 #> 6 0.634 0.648 0.604 0.654 0.642 0.656 0.646 0.704 0.788 0.652 0.678 0.666 0.686 #>      40    41    42    43    44    45    46    47    48    49    50 #> 1 0.698 0.642 0.590 0.660 0.644 0.678 0.676 0.636 0.666 0.674 0.630 #> 2 0.684 0.682 0.594 0.618 0.636 0.660 0.690 0.662 0.646 0.670 0.636 #> 3 0.696 0.672 0.586 0.662 0.656 0.658 0.724 0.684 0.700 0.702 0.684 #> 4 0.700 0.680 0.608 0.702 0.690 0.694 0.708 0.664 0.680 0.720 0.694 #> 5 0.756 0.704 0.630 0.648 0.686 0.646 0.768 0.712 0.704 0.708 0.680 #> 6 0.724 0.694 0.632 0.634 0.642 0.694 0.736 0.690 0.680 0.752 0.706 head(as.matrix(mean.avg.dist.t)) #>           1         2         3         4         5         6         7 #> 1 0.0000000 0.5268968 0.5620440 0.5696610 0.5820783 0.5444163 0.5553357 #> 2 0.5268968 0.0000000 0.5231558 0.5661217 0.5895083 0.5429080 0.5426203 #> 3 0.5620440 0.5231558 0.0000000 0.5765061 0.5632985 0.5521514 0.5433304 #> 4 0.5696610 0.5661217 0.5765061 0.0000000 0.5784547 0.6162528 0.5972188 #> 5 0.5820783 0.5895083 0.5632985 0.5784547 0.0000000 0.5890160 0.5951278 #> 6 0.5444163 0.5429080 0.5521514 0.6162528 0.5890160 0.0000000 0.5363121 #>           8         9        10        11        12        13        14 #> 1 0.5481342 0.5763266 0.5565242 0.5208834 0.5792824 0.7233669 0.5783466 #> 2 0.5492997 0.5919429 0.5660376 0.5565312 0.5914100 0.7081848 0.5240721 #> 3 0.5519472 0.5981912 0.5435356 0.5392289 0.6171389 0.7414530 0.5774538 #> 4 0.5864288 0.6078229 0.5934628 0.5793152 0.6164131 0.6862465 0.5665645 #> 5 0.5894296 0.6214780 0.5581239 0.5880497 0.6364689 0.7340127 0.5810336 #> 6 0.5572307 0.5971669 0.5743313 0.5415518 0.5562000 0.6873159 0.5863322 #>          15        16        17        18        19        20        21 #> 1 0.5824582 0.5234016 0.6012084 0.7112125 0.6081972 0.5911810 0.5748855 #> 2 0.5566883 0.5683752 0.6022449 0.6550937 0.6157338 0.5764770 0.6063296 #> 3 0.5286757 0.5847647 0.6480015 0.7194586 0.6660791 0.5832531 0.5984046 #> 4 0.6039668 0.5858720 0.6263681 0.7134266 0.6495067 0.6000595 0.6374900 #> 5 0.5668771 0.5778012 0.7044070 0.7332902 0.6922094 0.5900939 0.6086957 #> 6 0.6189022 0.5648166 0.5901326 0.7026368 0.6265100 0.6231745 0.6118081 #>          22        23        24        25        26        27        28 #> 1 0.5893717 0.6570786 0.5945312 0.5800553 0.5732476 0.6215276 0.5698842 #> 2 0.5726973 0.6318162 0.5639718 0.5684514 0.6193121 0.6188404 0.6153326 #> 3 0.5901773 0.6883715 0.5775550 0.6075926 0.6092110 0.6468993 0.6017035 #> 4 0.6331275 0.6635780 0.6246361 0.6109623 0.6606577 0.6335330 0.6522391 #> 5 0.6811363 0.6760639 0.6272387 0.6117049 0.6288427 0.6496847 0.6482938 #> 6 0.5811463 0.6736980 0.5518961 0.6255046 0.6187408 0.5980509 0.5991158 #>          29        30        31        32        33        34        35 #> 1 0.5519379 0.6331717 0.6006298 0.6252171 0.5878636 0.6478391 0.7054672 #> 2 0.5769426 0.6229656 0.6119081 0.6301772 0.5946151 0.6555905 0.7142283 #> 3 0.6160943 0.6478473 0.6243928 0.6691710 0.6095707 0.6873894 0.7402791 #> 4 0.6052120 0.6428681 0.6556406 0.6185793 0.5890710 0.6736501 0.7336138 #> 5 0.6575286 0.6478300 0.6382081 0.6792574 0.6399911 0.7148628 0.7624773 #> 6 0.5726824 0.6344051 0.6396196 0.6532725 0.5916023 0.6757439 0.7200817 #>          36        37        38        39        40        41        42 #> 1 0.6141493 0.5995374 0.6405334 0.6408850 0.6730988 0.5886016 0.5890594 #> 2 0.6263918 0.5781594 0.5806176 0.6458974 0.6582624 0.6195075 0.5961146 #> 3 0.6501176 0.6165860 0.6331925 0.6552591 0.6967709 0.6343656 0.5886630 #> 4 0.6394976 0.6012571 0.6004420 0.6105758 0.6690110 0.6368002 0.5856839 #> 5 0.6317201 0.6219215 0.6746107 0.7038395 0.7655108 0.6472494 0.6274799 #> 6 0.6581813 0.6476376 0.6245934 0.6663549 0.6848553 0.6554716 0.6298667 #>          43        44        45        46        47        48        49 #> 1 0.6013101 0.5657035 0.5873284 0.6604213 0.6153730 0.6231741 0.6063657 #> 2 0.5839441 0.5837217 0.6133105 0.6618699 0.6309012 0.6394069 0.6465829 #> 3 0.6244589 0.6024821 0.5897860 0.6894637 0.6737664 0.6588514 0.6521608 #> 4 0.6373528 0.6408041 0.6295238 0.6488169 0.6412288 0.6391066 0.6492971 #> 5 0.6333439 0.6022037 0.6287792 0.7514575 0.7009842 0.6600222 0.6664620 #> 6 0.6101755 0.6404842 0.6278262 0.6936596 0.6778087 0.6801127 0.6850128 #>          50 #> 1 0.5938890 #> 2 0.5970938 #> 3 0.6283012 #> 4 0.6412174 #> 5 0.6438284 #> 6 0.6537170 head(as.matrix(median.avg.dist)) #>      1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 #> 1 0.00 0.56 0.60 0.61 0.64 0.56 0.58 0.61 0.59 0.62 0.62 0.62 0.71 0.62 0.63 #> 2 0.56 0.00 0.55 0.58 0.64 0.58 0.52 0.54 0.55 0.60 0.55 0.57 0.67 0.57 0.59 #> 3 0.60 0.55 0.00 0.59 0.58 0.55 0.56 0.54 0.55 0.58 0.59 0.62 0.68 0.62 0.60 #> 4 0.61 0.58 0.59 0.00 0.64 0.60 0.59 0.59 0.58 0.60 0.61 0.63 0.66 0.60 0.61 #> 5 0.64 0.64 0.58 0.64 0.00 0.62 0.61 0.65 0.66 0.63 0.73 0.67 0.75 0.68 0.60 #> 6 0.56 0.58 0.55 0.60 0.62 0.00 0.54 0.60 0.61 0.64 0.56 0.54 0.69 0.60 0.67 #>     16   17   18   19   20   21   22   23   24   25   26   27   28   29   30 #> 1 0.61 0.66 0.71 0.66 0.64 0.64 0.67 0.70 0.65 0.57 0.62 0.71 0.64 0.66 0.63 #> 2 0.58 0.63 0.66 0.61 0.60 0.64 0.60 0.66 0.61 0.58 0.64 0.62 0.62 0.56 0.63 #> 3 0.59 0.64 0.73 0.62 0.64 0.64 0.65 0.69 0.68 0.64 0.67 0.66 0.65 0.63 0.66 #> 4 0.62 0.66 0.68 0.64 0.60 0.65 0.63 0.64 0.61 0.62 0.68 0.65 0.64 0.60 0.66 #> 5 0.68 0.75 0.77 0.71 0.66 0.69 0.76 0.73 0.67 0.70 0.69 0.70 0.72 0.69 0.71 #> 6 0.61 0.58 0.67 0.64 0.63 0.65 0.65 0.67 0.61 0.64 0.61 0.62 0.67 0.63 0.71 #>     31   32   33   34   35   36   37   38   39   40   41   42   43   44   45 #> 1 0.65 0.69 0.66 0.70 0.80 0.66 0.69 0.66 0.68 0.74 0.66 0.58 0.67 0.65 0.69 #> 2 0.62 0.64 0.63 0.66 0.73 0.62 0.61 0.58 0.66 0.68 0.65 0.59 0.63 0.59 0.68 #> 3 0.69 0.67 0.68 0.69 0.79 0.64 0.68 0.62 0.70 0.71 0.67 0.65 0.66 0.66 0.70 #> 4 0.65 0.64 0.65 0.68 0.78 0.64 0.63 0.59 0.66 0.73 0.65 0.65 0.64 0.63 0.67 #> 5 0.66 0.72 0.70 0.75 0.84 0.66 0.74 0.72 0.77 0.79 0.68 0.66 0.68 0.67 0.68 #> 6 0.67 0.68 0.67 0.71 0.82 0.68 0.70 0.65 0.71 0.75 0.75 0.67 0.68 0.66 0.72 #>     46   47   48   49   50 #> 1 0.68 0.65 0.66 0.67 0.64 #> 2 0.66 0.65 0.67 0.66 0.65 #> 3 0.75 0.72 0.73 0.70 0.71 #> 4 0.68 0.68 0.68 0.70 0.64 #> 5 0.76 0.76 0.70 0.74 0.71 #> 6 0.65 0.70 0.68 0.70 0.67 # Run example to illustrate low variance of mean, median, and stdev results # Mean and median std dev are around 0.05 sdd <- avgdist(BCI, sample = 50, iterations = 100, meanfun = sd) summary(mean.avg.dist) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.4820  0.6120  0.6500  0.6515  0.6880  0.8380  summary(median.avg.dist) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.4400  0.6200  0.6500  0.6519  0.6900  0.8700  summary(sdd) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #> 0.04484 0.05631 0.05939 0.05939 0.06231 0.07700  # Test for when subsampling depth excludes some samples # Return samples that are removed for not meeting depth filter depth.avg.dist <- avgdist(BCI, sample = 450, iterations = 10) #> Warning: The following sampling units were removed because they were below sampling depth: 1, 2, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 # Print the result depth.avg.dist #>            3         4         5        10        15        30        32 #> 3  0.0000000 0.3313333 0.3653333 0.2968889 0.3586667 0.4568889 0.4764444 #> 4  0.3313333 0.0000000 0.3806667 0.3262222 0.3535556 0.3902222 0.4357778 #> 5  0.3653333 0.3806667 0.0000000 0.3904444 0.3973333 0.4964444 0.5213333 #> 10 0.2968889 0.3262222 0.3904444 0.0000000 0.3137778 0.4306667 0.4215556 #> 15 0.3586667 0.3535556 0.3973333 0.3137778 0.0000000 0.4566667 0.4675556 #> 30 0.4568889 0.3902222 0.4964444 0.4306667 0.4566667 0.0000000 0.3846667 #> 32 0.4764444 0.4357778 0.5213333 0.4215556 0.4675556 0.3846667 0.0000000 #> 35 0.6628889 0.6346667 0.6980000 0.6851111 0.6588889 0.5262222 0.5957778 #> 40 0.5635556 0.5286667 0.6360000 0.5231111 0.5600000 0.4537778 0.4033333 #>           35        40 #> 3  0.6628889 0.5635556 #> 4  0.6346667 0.5286667 #> 5  0.6980000 0.6360000 #> 10 0.6851111 0.5231111 #> 15 0.6588889 0.5600000 #> 30 0.5262222 0.4537778 #> 32 0.5957778 0.4033333 #> 35 0.0000000 0.4260000 #> 40 0.4260000 0.0000000"},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":null,"dir":"Reference","previous_headings":"","what":"Beals Smoothing and Degree of Absence — beals","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals smoothing replaces entry community data   probability target species occurring particular site, based   joint occurrences target species species   actually occur site. Swan's (1970) degree absence applies   Beals smoothing zero items long zeros replaced   smoothed values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Beals Smoothing and Degree of Absence — beals","text":"","code":"beals(x, species = NA, reference = x, type = 0, include = TRUE) swan(x, maxit = Inf, type = 0)"},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Beals Smoothing and Degree of Absence — beals","text":"x Community data frame matrix. species Column index used compute Beals function single species.    default (NA) indicates function computed species. reference Community data frame matrix used compute   joint occurrences. default, x used reference   compute joint occurrences. type Numeric. Specifies abundance values    used function beals. See details explanation. include logical flag indicates whether target species   included computing mean conditioned probabilities.   original Beals (1984) definition equivalent include=TRUE,   formulation Münzbergová Herben   equal include=FALSE. maxit Maximum number iterations. default Inf     means iterations continued zeros     number zeros change. Probably      maxit = 1 makes sense addition default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals smoothing estimated probability \\(p_{ij}\\)   species \\(j\\) occurs site \\(\\). defined \\(p_{ij}   = \\frac{1}{S_i} \\sum_k \\frac{N_{jk} I_{ik}}{N_k}\\), \\(S_i\\) number   species site \\(\\), \\(N_{jk}\\) number joint   occurrences species \\(j\\) \\(k\\), \\(N_k\\)   number occurrences species \\(k\\), \\(\\) incidence   (0 1) species (last term usually omitted   equation, necessary). \\(N_{jk}\\) can   interpreted mean conditional probability, beals   function can interpreted mean conditioned probabilities (De   Cáceres & Legendre 2008). present function   generalized abundance values (De Cáceres & Legendre   2008). type argument specifies abundance values   used. type = 0 presence/absence mode. type = 1   abundances reference (x) used compute   conditioned probabilities. type = 2 abundances x   used compute weighted averages conditioned   probabilities. type = 3 abundances used compute   conditioned probabilities weighted averages. Beals smoothing originally suggested method data   transformation remove excessive zeros (Beals 1984, McCune 1994).   However, suitable method purpose since   maintain information species presences: species may   higher probability occurrence site occur   sites occurs. Moreover, regularizes data   strongly. method may useful identifying species belong   species pool (Ewald 2002) identify suitable unoccupied   patches metapopulation analysis (Münzbergová &   Herben 2004). case, function called   include=FALSE cross-validation smoothing species;   argument species can used one species studied. Swan (1970) suggested replacing zero values degrees absence   species community data matrix. Swan expressed method   terms similarity matrix, equivalent applying Beals   smoothing zero values, step shifting smallest initially   non-zero item value one, repeating many times   zeros left data. actually similar   extended dissimilarities (implemented function   stepacross), rarely used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Beals Smoothing and Degree of Absence — beals","text":"function returns transformed data matrix vector Beals smoothing    requested single species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Beals Smoothing and Degree of Absence — beals","text":"Beals, E.W. 1984. Bray-Curtis ordination: effective strategy analysis multivariate ecological data. Pp. 1--55 : MacFadyen, . & E.D. Ford [eds.] Advances Ecological Research, 14. Academic Press, London. De Cáceres, M. & Legendre, P. 2008. Beals smoothing revisited. Oecologia 156: 657--669. Ewald, J. 2002. probabilistic approach estimating species pools large compositional matrices. J. Veg. Sci. 13: 191--198. McCune, B. 1994. Improving community ordination Beals smoothing function. Ecoscience 1: 82--86. Münzbergová, Z. & Herben, T. 2004. Identification suitable unoccupied  habitats metapopulation studies using co-occurrence species. Oikos 105: 408--414. Swan, J.M.. 1970. examination ordination problems use simulated vegetational data. Ecology 51: 89--102.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Beals Smoothing and Degree of Absence — beals","text":"Miquel De Cáceres Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/beals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Beals Smoothing and Degree of Absence — beals","text":"","code":"data(dune) ## Default x <- beals(dune) ## Remove target species x <- beals(dune, include = FALSE) ## Smoothed values against presence or absence of species pa <- decostand(dune, \"pa\") boxplot(as.vector(x) ~ unlist(pa), xlab=\"Presence\", ylab=\"Beals\")  ## Remove the bias of tarbet species: Yields lower values. beals(dune, type =3, include = FALSE) #>      Achimill   Agrostol   Airaprae  Alopgeni   Anthodor  Bellpere   Bromhord #> 1  0.49590853 0.38333415 0.01157407 0.4923280 0.30827883 0.4935662 0.43263047 #> 2  0.47083676 0.39501120 0.03361524 0.4718807 0.34723984 0.4917791 0.42000984 #> 3  0.34063019 0.52738394 0.01520046 0.5309152 0.21609954 0.4033301 0.33010938 #> 4  0.30816435 0.51198853 0.02876960 0.5971801 0.21542662 0.4398775 0.35732610 #> 5  0.59949785 0.27622698 0.06632771 0.3349203 0.48876285 0.4322142 0.44309579 #> 6  0.58819821 0.26299306 0.05967771 0.2700508 0.53154426 0.3696613 0.39760652 #> 7  0.56496165 0.29412293 0.05329633 0.3403047 0.48010987 0.4051777 0.40471531 #> 8  0.21230502 0.66906674 0.02588333 0.5187956 0.16247716 0.2720122 0.21219877 #> 9  0.30323659 0.59744543 0.02213662 0.5792855 0.21896113 0.3292320 0.28613526 #> 10 0.54083871 0.26902092 0.07349127 0.3372958 0.42671693 0.4705094 0.42934344 #> 11 0.40509331 0.31656550 0.10259239 0.3185489 0.38766111 0.3713794 0.31413659 #> 12 0.21008725 0.66278454 0.03625297 0.5753377 0.20078932 0.2802946 0.22974415 #> 13 0.21850759 0.68239707 0.02191119 0.6404427 0.16737280 0.2939740 0.24942466 #> 14 0.13570397 0.76284476 0.02298398 0.4107645 0.12128973 0.1682755 0.13757552 #> 15 0.09168815 0.79412733 0.02538032 0.4505613 0.10117099 0.1420251 0.09794548 #> 16 0.06335463 0.87877202 0.00742115 0.5232448 0.05538377 0.1516354 0.09458531 #> 17 0.55254140 0.07330247 0.29233391 0.1013889 0.69331132 0.3129358 0.34982363 #> 18 0.37751017 0.34451209 0.08535723 0.2838834 0.36918166 0.3676424 0.30478244 #> 19 0.29826049 0.25952255 0.35137675 0.1934048 0.51929869 0.2237843 0.18074796 #> 20 0.05429986 0.76675441 0.06144615 0.4063662 0.10738280 0.1450721 0.06706410 #>       Chenalbu   Cirsarve    Comapalu   Eleopalu  Elymrepe   Empenigr #> 1  0.025132275 0.09504980 0.000000000 0.05592045 0.4667439 0.00000000 #> 2  0.043866562 0.08570299 0.026548839 0.08656209 0.4407282 0.01829337 #> 3  0.065338638 0.08967477 0.031898812 0.16099072 0.4137888 0.01074444 #> 4  0.057970906 0.12920228 0.039859621 0.16112450 0.4399661 0.02527165 #> 5  0.026434737 0.05520104 0.015892090 0.05419613 0.3575948 0.03029752 #> 6  0.021256367 0.03223112 0.030347896 0.08784329 0.3138879 0.03093489 #> 7  0.038467708 0.04706743 0.017083997 0.06694311 0.3586644 0.02304603 #> 8  0.063278453 0.06688407 0.100703044 0.29777644 0.3046956 0.02102222 #> 9  0.069879277 0.07647268 0.045830682 0.19018562 0.3523460 0.01838883 #> 10 0.025686639 0.06037513 0.029746617 0.07787078 0.3736128 0.03425596 #> 11 0.021234732 0.05778318 0.035740922 0.11146095 0.2884798 0.07310076 #> 12 0.103543341 0.07799259 0.045375827 0.19518888 0.3354080 0.03413656 #> 13 0.122547745 0.07905124 0.056084315 0.22437598 0.3511708 0.01840390 #> 14 0.042990591 0.03618335 0.241811837 0.55982776 0.1428372 0.01989756 #> 15 0.035609053 0.04022968 0.198176675 0.53973883 0.1462975 0.02215971 #> 16 0.056246994 0.05184498 0.201352298 0.51523810 0.1832397 0.00742115 #> 17 0.007716049 0.01049383 0.009876543 0.02777778 0.1929470 0.21968254 #> 18 0.014640428 0.04454602 0.042890320 0.17341352 0.2651538 0.06763669 #> 19 0.019591245 0.03668466 0.031845637 0.12592768 0.1422725 0.26011417 #> 20 0.037623741 0.03453783 0.185726965 0.58476297 0.1168700 0.05905666 #>      Hyporadi   Juncarti  Juncbufo  Lolipere   Planlanc   Poaprat   Poatriv #> 1  0.07702746 0.14794933 0.1987270 0.9226190 0.40103107 0.9863946 0.8826329 #> 2  0.07454127 0.13017869 0.2070478 0.8272395 0.40700777 0.8972046 0.8288385 #> 3  0.05562332 0.22291082 0.2544828 0.7205525 0.27933493 0.8083020 0.8383185 #> 4  0.06985986 0.21320122 0.2318440 0.7197924 0.25797285 0.7940926 0.8197302 #> 5  0.10245961 0.10406655 0.2164230 0.8380779 0.52628928 0.9035899 0.8094632 #> 6  0.11463153 0.11631772 0.2166255 0.8000021 0.58765018 0.8666677 0.7782619 #> 7  0.10837376 0.11293676 0.2110045 0.8053380 0.51905808 0.8925059 0.8018775 #> 8  0.06550319 0.33219882 0.2323566 0.5403355 0.20596764 0.6160461 0.7101299 #> 9  0.05343787 0.23134366 0.2675624 0.6874068 0.25274756 0.7523318 0.8247374 #> 10 0.13692492 0.09080902 0.1678040 0.8102783 0.52588347 0.8915882 0.7543592 #> 11 0.18108995 0.13478872 0.1656396 0.7180948 0.47012501 0.8062720 0.6404351 #> 12 0.06777311 0.27306206 0.3231724 0.5875943 0.22110550 0.6932541 0.8199960 #> 13 0.04250245 0.28204736 0.3339728 0.5714581 0.18153869 0.7063028 0.7993754 #> 14 0.04665747 0.46685537 0.1206518 0.3356311 0.14342002 0.3817081 0.5090703 #> 15 0.05040404 0.51561767 0.1370235 0.3689922 0.13523214 0.4078219 0.5263520 #> 16 0.01731602 0.54304667 0.1776781 0.3561752 0.07269979 0.4124222 0.6071083 #> 17 0.36492870 0.03333333 0.1038156 0.5858415 0.59641331 0.7434618 0.5036834 #> 18 0.17491099 0.18956922 0.1376386 0.7124388 0.45087176 0.7368632 0.5859071 #> 19 0.39145281 0.13543701 0.1127832 0.4289185 0.40784415 0.5548077 0.3605827 #> 20 0.07795311 0.53056145 0.1192488 0.3262685 0.13059496 0.3662817 0.4523029 #>      Ranuflam  Rumeacet  Sagiproc   Salirepe  Scorautu   Trifprat  Trifrepe #> 1  0.08105273 0.3160963 0.3371121 0.02729885 0.8898317 0.21701279 0.8782576 #> 2  0.13042865 0.3031318 0.3302063 0.05983781 0.9349640 0.20673650 0.9125666 #> 3  0.22632936 0.2909068 0.4204104 0.06065155 0.9036443 0.14654749 0.8817430 #> 4  0.21909541 0.2610006 0.4191908 0.07579199 0.9204237 0.12896524 0.8943213 #> 5  0.08063087 0.3979230 0.2612828 0.07589611 0.9576838 0.34808957 0.9142360 #> 6  0.10909966 0.4330705 0.2539380 0.08921540 0.9590466 0.35423465 0.9110822 #> 7  0.10541081 0.4113622 0.2954682 0.07094548 0.9550487 0.32489503 0.9171688 #> 8  0.40134447 0.2331043 0.4009544 0.11569906 0.8755515 0.09897600 0.8002526 #> 9  0.26006489 0.3464870 0.4531178 0.07351827 0.9145996 0.16269563 0.8714833 #> 10 0.10355742 0.3226025 0.2732735 0.09037489 0.9568824 0.26807372 0.9003730 #> 11 0.13269569 0.2753878 0.3673397 0.16465286 0.9442707 0.19982976 0.8979262 #> 12 0.29873222 0.3507140 0.5122033 0.08041977 0.9377963 0.13849854 0.9079979 #> 13 0.33309468 0.3107471 0.5131337 0.06572594 0.9255312 0.11199114 0.8841739 #> 14 0.64674225 0.1241545 0.2528665 0.15917563 0.8477706 0.06176123 0.6485949 #> 15 0.64449081 0.1459458 0.3151199 0.17750323 0.8430677 0.05831084 0.7170446 #> 16 0.66893881 0.1508409 0.3480368 0.15783292 0.8131968 0.03916718 0.6776273 #> 17 0.03549383 0.2913631 0.3292030 0.25651777 0.9839744 0.27593101 0.8141660 #> 18 0.18805395 0.2668100 0.3154533 0.17191937 0.9554011 0.20461193 0.8600701 #> 19 0.14551892 0.1831168 0.4798245 0.36429493 0.9902041 0.11966159 0.8147968 #> 20 0.62796060 0.1098600 0.3105433 0.21674174 0.8457313 0.03708580 0.6350394 #>      Vicilath  Bracruta    Callcusp #> 1  0.17244420 0.7476589 0.003527337 #> 2  0.18494940 0.7415172 0.034597921 #> 3  0.12833142 0.7666969 0.075789630 #> 4  0.12550967 0.7919786 0.081110164 #> 5  0.16693075 0.8079786 0.023129027 #> 6  0.18035860 0.8387650 0.040981168 #> 7  0.19027523 0.8089116 0.024070054 #> 8  0.10213052 0.8109194 0.201958942 #> 9  0.08630413 0.7972178 0.092982775 #> 10 0.23383453 0.7660374 0.033527777 #> 11 0.24317802 0.8182692 0.043950322 #> 12 0.08049055 0.8061715 0.100954127 #> 13 0.06604026 0.7465509 0.122856392 #> 14 0.07857237 0.7238162 0.347514804 #> 15 0.07370069 0.7997141 0.381379395 #> 16 0.03353260 0.8029953 0.364128496 #> 17 0.20728700 0.7635487 0.009876543 #> 18 0.26222869 0.8397471 0.109959916 #> 19 0.18188455 0.8161275 0.082361157 #> 20 0.09111967 0.8397124 0.397924041 ## Uses abundance information. ## Vector with beals smoothing values corresponding to the first species ## in dune. beals(dune, species=1, include=TRUE)  #>         1         2         3         4         5         6         7         8  #> 0.5923077 0.5032372 0.3499038 0.3306953 0.5944041 0.5928780 0.5824352 0.2082532  #>         9        10        11        12        13        14        15        16  #> 0.2960799 0.5462492 0.3659392 0.2610043 0.1982372 0.0922619 0.1140625 0.1066506  #>        17        18        19        20  #> 0.6020408 0.3844577 0.2865741 0.0750000"},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":null,"dir":"Reference","previous_headings":"","what":"Multivariate homogeneity of groups dispersions (variances) — betadisper","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Implements Marti Anderson's PERMDISP2 procedure analysis   multivariate homogeneity group dispersions (variances).   betadisper multivariate analogue Levene's test   homogeneity variances. Non-euclidean distances objects   group centres (centroids medians) handled reducing   original distances principal coordinates. procedure   latterly used means assessing beta diversity.   anova, scores, plot boxplot methods. TukeyHSD.betadisper creates set confidence intervals   differences mean distance--centroid levels   grouping factor specified family-wise probability   coverage.  intervals based Studentized range statistic,   Tukey's 'Honest Significant Difference' method.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"","code":"betadisper(d, group, type = c(\"median\",\"centroid\"), bias.adjust = FALSE,        sqrt.dist = FALSE, add = FALSE)  # S3 method for betadisper anova(object, ...)  # S3 method for betadisper scores(x, display = c(\"sites\", \"centroids\"),        choices = c(1,2), ...)  # S3 method for betadisper eigenvals(x, ...)  # S3 method for betadisper plot(x, axes = c(1,2), cex = 0.7,      pch = seq_len(ng), col = NULL, lty = \"solid\", lwd = 1, hull = TRUE,      ellipse = FALSE, conf,      segments = TRUE, seg.col = \"grey\", seg.lty = lty, seg.lwd = lwd,      label = TRUE, label.cex = 1,      ylab, xlab, main, sub, ...)  # S3 method for betadisper boxplot(x, ylab = \"Distance to centroid\", ...)  # S3 method for betadisper TukeyHSD(x, which = \"group\", ordered = FALSE,          conf.level = 0.95, ...)  # S3 method for betadisper print(x, digits = max(3, getOption(\"digits\") - 3),                            neigen = 8, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"d distance structure returned      dist, betadiver     vegdist. group vector describing group structure, usually factor     object can coerced factor using     .factor. Can consist factor single     level (.e., one group). type type analysis perform. Use spatial median     group centroid? spatial median now default. bias.adjust logical: adjust small sample bias beta     diversity estimates? sqrt.dist Take square root dissimilarities. often     euclidifies dissimilarities. add Add constant non-diagonal dissimilarities     eigenvalues non-negative underlying Principal     Co-ordinates Analysis (see wcmdscale     details). Choice \"lingoes\" (TRUE) use     recommended method Legendre & Anderson (1999: “method     1”) \"cailliez\" uses “method 2”. display character; partial match access scores     \"sites\" \"species\". object, x object class \"betadisper\", result     call betadisper. choices, axes principal coordinate axes wanted. hull logical; convex hull group plotted? ellipse logical; standard deviation data ellipse     group plotted? conf Expected fractions data coverage data ellipses,     e.g. 0.95. default draw 1 standard deviation data     ellipse, supplied, conf multiplied     corresponding value found Chi-squared distribution 2df     provide requested coverage (probability contour). pch plot symbols groups, vector length equal     number groups. col colors plot symbols centroid labels groups,     vector length equal number groups. lty, lwd linetype, linewidth convex hulls confidence     ellipses. segments logical; segments joining points     centroid drawn? seg.col colour draw segments points     centroid. Can vector, case one colour per group. seg.lty, seg.lwd linetype line width segments. label logical; centroids labelled     respective factor label? label.cex numeric; character expansion centroid labels. cex, ylab, xlab, main, sub graphical parameters. details,     see plot.default. character vector listing terms fitted model     intervals calculated. Defaults grouping     factor. ordered logical; see TukeyHSD. conf.level numeric value zero one giving     family-wise confidence level use. digits, neigen numeric; print method, sets   number digits use (per print.default)   maximum number axes display eigenvalues , repsectively. ... arguments, including graphical parameters (    plot.betadisper boxplot.betadisper), passed     methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"One measure multivariate dispersion (variance) group   samples calculate average distance group members   group centroid spatial median (referred 'centroid'   now unless stated otherwise) multivariate space. test   dispersions (variances) one groups different,   distances group members group centroid subject   ANOVA. multivariate analogue Levene's test   homogeneity variances distances group members   group centroids Euclidean distance. However, better measures distance Euclidean distance   available ecological data. can accommodated reducing   distances produced using dissimilarity coefficient   principal coordinates, embeds within Euclidean space.   analysis proceeds calculating Euclidean distances   group members group centroid basis principal   coordinate axes rather original distances. Non-metric dissimilarity coefficients can produce principal coordinate   axes negative Eigenvalues. correspond   imaginary, non-metric part distance objects.   negative Eigenvalues produced, must correct imaginary   distances. distance centroid point $$z_{ij}^c =   \\sqrt{\\Delta^2(u_{ij}^+, c_i^+) - \\Delta^2(u_{ij}^-, c_i^-)},$$   \\(\\Delta^2\\) squared Euclidean distance   \\(u_{ij}\\), principal coordinate \\(j\\)th   point \\(\\)th group, \\(c_i\\),   coordinate centroid \\(\\)th group.   super-scripted ‘\\(+\\)’ ‘\\(-\\)’ indicate   real imaginary parts respectively. equation (3)   Anderson (2006). imaginary part greater magnitude   real part, taking square root negative   value, resulting NaN, cases changed zero distances   (warning). line behaviour Marti Anderson's   PERMDISP2 programme. test one groups variable others, ANOVA   distances group centroids can performed parametric   theory used interpret significance \\(F\\). alternative   use permutation test. permutest.betadisper permutes model   residuals generate permutation distribution \\(F\\) Null   hypothesis difference dispersion groups. Pairwise comparisons group mean dispersions can also performed   using permutest.betadisper. alternative classical   comparison group dispersions, calculate Tukey's Honest   Significant Differences groups, via   TukeyHSD.betadisper. simple wrapper   TukeyHSD. user directed read help file   TukeyHSD using function. particular,   note statement using function    unbalanced designs. results analysis can visualised using plot   boxplot methods. One additional use functions assessing beta diversity   (Anderson et al 2006). Function betadiver   provides popular dissimilarity measures purpose. noted passing Anderson (2006) related   context O'Neill (2000), estimates dispersion around   central location (median centroid) calculated data   biased downward. bias matters comparing diversity   among treatments small, unequal numbers samples.  Setting   bias.adjust=TRUE using betadisper imposes    \\(\\sqrt{n/(n-1)}\\) correction (Stier et al. 2013).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"anova method returns object class \"anova\" inheriting class \"data.frame\". scores method returns list one   components \"sites\" \"centroids\". plot function invisibly returns object class  \"ordiplot\", plotting structure can used  identify.ordiplot (identify points)   functions ordiplot family. boxplot function invisibly returns list whose components   documented boxplot.  eigenvals.betadisper returns named vector eigenvalues.  TukeyHSD.betadisper returns list. See TukeyHSD details.  betadisper returns list class \"betadisper\"   following components: eig numeric; eigenvalues principal coordinates     analysis. vectors matrix; eigenvectors principal coordinates     analysis. distances numeric; Euclidean distances principal     coordinate space samples respective group     centroid median. group factor; vector describing group structure centroids matrix; locations group centroids     medians principal coordinates. group.distances numeric; mean distance group     centroid median. call matched function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"group consists single level group,   anova permutest methods appropriate   used data stop error. Missing values either d group removed   prior performing analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Stewart Schultz noticed permutation test   type=\"centroid\" wrong type error   anti-conservative. , default type   changed \"median\", uses spatial median group   centroid. Tests suggests permutation test type   analysis gives correct error rates.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Anderson, M.J. (2006) Distance-based tests homogeneity   multivariate dispersions. Biometrics 62, 245--253. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters   9, 683--693. O'Neill, M.E. (2000) Weighted Least Squares Approach Levene's    Test Homogeneity Variance. Australian & New Zealand Journal    Statistics 42, 81-–100. Stier, .C., Geange, S.W., Hanson, K.M., & Bolker, B.M. (2013) Predator    density timing arrival affect reef fish community   assembly. Ecology 94, 1057--1068.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"Gavin L. Simpson; bias correction Adrian Stier Ben Bolker.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/betadisper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multivariate homogeneity of groups dispersions (variances) — betadisper","text":"","code":"data(varespec)  ## Bray-Curtis distances between samples dis <- vegdist(varespec)  ## First 16 sites grazed, remaining 8 sites ungrazed groups <- factor(c(rep(1,16), rep(2,8)), labels = c(\"grazed\",\"ungrazed\"))  ## Calculate multivariate dispersions mod <- betadisper(dis, groups) mod #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3926   0.2706  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## Perform test anova(mod) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07931 0.079306  4.6156 0.04295 * #> Residuals 22 0.37801 0.017182                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Permutation test for F permutest(mod, pairwise = TRUE, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq      F N.Perm Pr(>F)   #> Groups     1 0.07931 0.079306 4.6156     99   0.06 . #> Residuals 22 0.37801 0.017182                        #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Pairwise comparisons: #> (Observed p-value below diagonal, permuted p-value above diagonal) #>           grazed ungrazed #> grazed               0.08 #> ungrazed 0.04295           ## Tukey's Honest Significant Differences (mod.HSD <- TukeyHSD(mod)) #>   Tukey multiple comparisons of means #>     95% family-wise confidence level #>  #> Fit: aov(formula = distances ~ group, data = df) #>  #> $group #>                       diff        lwr          upr     p adj #> ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502 #>  plot(mod.HSD)   ## Plot the groups and distances to centroids on the ## first two PCoA axes plot(mod)   ## with data ellipses instead of hulls plot(mod, ellipse = TRUE, hull = FALSE) # 1 sd data ellipse  plot(mod, ellipse = TRUE, hull = FALSE, conf = 0.90) # 90% data ellipse   # plot with manual colour specification my_cols <- c(\"#1b9e77\", \"#7570b3\") plot(mod, col = my_cols, pch = c(16,17), cex = 1.1)   ## can also specify which axes to plot, ordering respected plot(mod, axes = c(3,1), seg.col = \"forestgreen\", seg.lty = \"dashed\")   ## Draw a boxplot of the distances to centroid for each group boxplot(mod)   ## `scores` and `eigenvals` also work scrs <- scores(mod) str(scrs) #> List of 2 #>  $ sites    : num [1:24, 1:2] 0.0946 -0.3125 -0.3511 -0.3291 -0.1926 ... #>   ..- attr(*, \"dimnames\")=List of 2 #>   .. ..$ : chr [1:24] \"18\" \"15\" \"24\" \"27\" ... #>   .. ..$ : chr [1:2] \"PCoA1\" \"PCoA2\" #>  $ centroids: num [1:2, 1:2] -0.1455 0.2786 0.0758 -0.2111 #>   ..- attr(*, \"dimnames\")=List of 2 #>   .. ..$ : chr [1:2] \"grazed\" \"ungrazed\" #>   .. ..$ : chr [1:2] \"PCoA1\" \"PCoA2\" head(scores(mod, 1:4, display = \"sites\")) #>          PCoA1       PCoA2        PCoA3        PCoA4 #> 18  0.09459373  0.15914576  0.074400844 -0.202466025 #> 15 -0.31248809  0.10032751 -0.062243360  0.110844864 #> 24 -0.35106507 -0.05954096 -0.038079447  0.095060928 #> 27 -0.32914546 -0.17019348  0.231623720  0.019110623 #> 23 -0.19259443 -0.01459250 -0.005679372 -0.209718312 #> 19 -0.06794575 -0.14501690 -0.085645653  0.002431355 # group centroids/medians  scores(mod, 1:4, display = \"centroids\") #>               PCoA1       PCoA2       PCoA3      PCoA4 #> grazed   -0.1455200  0.07584572 -0.01366220 -0.0178990 #> ungrazed  0.2786095 -0.21114993 -0.03475586  0.0220129 # eigenvalues from the underlying principal coordinates analysis eigenvals(mod)  #>      PCoA1      PCoA2      PCoA3      PCoA4      PCoA5      PCoA6      PCoA7  #>  1.7552165  1.1334455  0.4429018  0.3698054  0.2453532  0.1960921  0.1751131  #>      PCoA8      PCoA9     PCoA10     PCoA11     PCoA12     PCoA13     PCoA14  #>  0.1284467  0.0971594  0.0759601  0.0637178  0.0583225  0.0394934  0.0172699  #>     PCoA15     PCoA16     PCoA17     PCoA18     PCoA19     PCoA20     PCoA21  #>  0.0051011 -0.0004131 -0.0064654 -0.0133147 -0.0253944 -0.0375105 -0.0480069  #>     PCoA22     PCoA23  #> -0.0537146 -0.0741390   ## try out bias correction; compare with mod3 (mod3B <- betadisper(dis, groups, type = \"median\", bias.adjust=TRUE)) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups, type = \"median\", bias.adjust #> = TRUE) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.4055   0.2893  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284  anova(mod3B) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07193 0.071927  3.7826 0.06468 . #> Residuals 22 0.41834 0.019015                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 permutest(mod3B, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq      F N.Perm Pr(>F)   #> Groups     1 0.07193 0.071927 3.7826     99   0.05 * #> Residuals 22 0.41834 0.019015                        #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## should always work for a single group group <- factor(rep(\"grazed\", NROW(varespec))) (tmp <- betadisper(dis, group, type = \"median\")) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = group, type = \"median\") #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #> grazed  #> 0.4255  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284  (tmp <- betadisper(dis, group, type = \"centroid\")) #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = group, type = \"centroid\") #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to centroid: #> grazed  #> 0.4261  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## simulate missing values in 'd' and 'group' ## using spatial medians groups[c(2,20)] <- NA dis[c(2, 20)] <- NA mod2 <- betadisper(dis, groups) ## messages #> missing observations due to 'group' removed #> missing observations due to 'd' removed mod2 #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 14 #> No. of Negative Eigenvalues: 5 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3984   0.3008  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 19 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060  permutest(mod2, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq      F N.Perm Pr(>F) #> Groups     1 0.039979 0.039979 2.4237     99   0.15 #> Residuals 18 0.296910 0.016495                      anova(mod2) #> Analysis of Variance Table #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq F value Pr(>F) #> Groups     1 0.039979 0.039979  2.4237 0.1369 #> Residuals 18 0.296910 0.016495                plot(mod2)  boxplot(mod2)  plot(TukeyHSD(mod2))   ## Using group centroids mod3 <- betadisper(dis, groups, type = \"centroid\") #> missing observations due to 'group' removed #> missing observations due to 'd' removed mod3 #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups, type = \"centroid\") #>  #> No. of Positive Eigenvalues: 14 #> No. of Negative Eigenvalues: 5 #>  #> Average distance to centroid: #>   grazed ungrazed  #>   0.4001   0.3108  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 19 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060  permutest(mod3, permutations = 99) #>  #> Permutation test for homogeneity of multivariate dispersions #> Permutation: free #> Number of permutations: 99 #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq      F N.Perm Pr(>F) #> Groups     1 0.033468 0.033468 3.1749     99   0.12 #> Residuals 18 0.189749 0.010542                      anova(mod3) #> Analysis of Variance Table #>  #> Response: Distances #>           Df   Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.033468 0.033468  3.1749 0.09166 . #> Residuals 18 0.189749 0.010542                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod3)  boxplot(mod3)  plot(TukeyHSD(mod3))"},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":null,"dir":"Reference","previous_headings":"","what":"Indices of beta Diversity — betadiver","title":"Indices of beta Diversity — betadiver","text":"function estimates 24 indices beta diversity   reviewed Koleff et al. (2003). Alternatively, finds   co-occurrence frequencies triangular plots (Koleff et   al. 2003).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indices of beta Diversity — betadiver","text":"","code":"betadiver(x, method = NA, order = FALSE, help = FALSE, ...) # S3 method for betadiver plot(x, ...) # S3 method for betadiver scores(x, triangular = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indices of beta Diversity — betadiver","text":"x Community data matrix, betadiver result   plot scores functions. method index beta diversity defined Koleff et al.   (2003), Table 1. can use either subscript \\(\\beta\\)   number index. See argument help . order Order sites increasing number species.   influence configuration triangular plot non-symmetric   indices. help Show numbers, subscript names defining     equations indices exit. triangular Return scores suitable triangular plotting   proportions. FALSE, returns 3-column matrix raw counts. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indices of beta Diversity — betadiver","text":"commonly used index beta diversity   \\(\\beta_w = S/\\alpha - 1\\), \\(S\\) total number   species, \\(\\alpha\\) average number species per site   (Whittaker 1960). drawback model \\(S\\) increases   sample size, expectation \\(\\alpha\\) remains   constant, beta diversity increases sample size.   solution problem study beta diversity pairs   sites (Marion et al. 2017). denote number species   shared two sites \\(\\) numbers unique   species (shared) \\(b\\) \\(c\\), \\(S = + b +   c\\) \\(\\alpha = (2 + b + c)/2\\) \\(\\beta_w =   (b+c)/(2 + b + c)\\). Sørensen   dissimilarity defined vegan function   vegdist argument binary = TRUE. Many   indices dissimilarity indices well. Function betadiver finds indices reviewed Koleff et   al. (2003). indices found function   designdist, current function provides   conventional shortcut. function finds indices. proper   analysis must done functions betadisper,   adonis2 mantel. indices directly taken Table 1 Koleff et al. (2003),   can selected either index number subscript   name used Koleff et al. numbers, names defining equations   can seen using betadiver(help = TRUE). cases   two alternative forms, one term \\(-1\\)   used. several duplicate indices, number distinct   alternatives much lower 24 formally provided. formulations   used functions differ occasionally Koleff et   al. (2003), still mathematically equivalent.   method = NA, index calculated, instead object   class betadiver returned. list elements   , b c. Function plot can used   display proportions elements triangular plot   suggested Koleff et al. (2003), scores extracts   triangular coordinates raw scores. Function plot returns   invisibly triangular coordinates \"ordiplot\"   object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indices of beta Diversity — betadiver","text":"method = NA, function returns object class  \"betadisper\" elements , b, c.  method specified, function returns \"dist\" object can used function analysing   dissimilarities. beta diversity, particularly useful functions  betadisper study betadiversity groups,  adonis2 model, mantel   compare beta diversities dissimilarities distances   (including geographical distances). Although betadiver returns   \"dist\" object, indices similarities   used place dissimilarities, user   error. Functions 10 (\"j\"), 11 (\"sor\") 21   (\"rlb\") similarity indices. Function sets argument  \"maxdist\" similarly vegdist, using NA fixed upper limit, 0 similarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indices of beta Diversity — betadiver","text":"Baselga, . (2010) Partitioning turnover nestedness   components beta diversity. Global Ecology Biogeography   19, 134--143. Koleff, P., Gaston, K.J. Lennon, J.J. (2003) Measuring beta   diversity presence-absence data. Journal Animal   Ecology 72, 367--382. Marion, Z.H., Fordyce, J.. Fitzpatrick, B.M. (2017) Pairwise   beta diversity resolves underappreciated source confusion   calculating species turnover. Ecology 98, 933--939. Whittaker, R.H. (1960) Vegetation Siskiyou mountains, Oregon   California. Ecological Monographs 30, 279--338.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indices of beta Diversity — betadiver","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Indices of beta Diversity — betadiver","text":"indices return similarities instead dissimilarities.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/betadiver.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indices of beta Diversity — betadiver","text":"","code":"## Raw data and plotting data(sipoo) m <- betadiver(sipoo) plot(m)  ## The indices betadiver(help=TRUE) #> 1 \"w\" = (b+c)/(2*a+b+c) #> 2 \"-1\" = (b+c)/(2*a+b+c) #> 3 \"c\" = (b+c)/2 #> 4 \"wb\" = b+c #> 5 \"r\" = 2*b*c/((a+b+c)^2-2*b*c) #> 6 \"I\" = log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) + #> (a+c)*log(a+c)) / (2*a+b+c) #> 7 \"e\" = exp(log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) + #> (a+c)*log(a+c)) / (2*a+b+c))-1 #> 8 \"t\" = (b+c)/(2*a+b+c) #> 9 \"me\" = (b+c)/(2*a+b+c) #> 10 \"j\" = a/(a+b+c) #> 11 \"sor\" = 2*a/(2*a+b+c) #> 12 \"m\" = (2*a+b+c)*(b+c)/(a+b+c) #> 13 \"-2\" = pmin.int(b,c)/(pmax.int(b,c)+a) #> 14 \"co\" = (a*c+a*b+2*b*c)/(2*(a+b)*(a+c)) #> 15 \"cc\" = (b+c)/(a+b+c) #> 16 \"g\" = (b+c)/(a+b+c) #> 17 \"-3\" = pmin.int(b,c)/(a+b+c) #> 18 \"l\" = (b+c)/2 #> 19 \"19\" = 2*(b*c+1)/(a+b+c)/(a+b+c-1) #> 20 \"hk\" = (b+c)/(2*a+b+c) #> 21 \"rlb\" = a/(a+c) #> 22 \"sim\" = pmin.int(b,c)/(pmin.int(b,c)+a) #> 23 \"gl\" = 2*abs(b-c)/(2*a+b+c) #> 24 \"z\" = (log(2)-log(2*a+b+c)+log(a+b+c))/log(2) ## The basic Whittaker index d <- betadiver(sipoo, \"w\") ## This should be equal to Sorensen index (binary Bray-Curtis in ## vegan) range(d - vegdist(sipoo, binary=TRUE)) #> [1] 0 0"},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":null,"dir":"Reference","previous_headings":"","what":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"function computes coefficients dispersal direction geographically connected areas, defined Legendre Legendre (1984), also described Legendre Legendre (2012, section 13.3.4).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"","code":"bgdispersal(mat, PAonly = FALSE, abc = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"mat Data frame matrix containing community composition     data table (species presence-absence abundance data). PAonly FALSE four types coefficients, DD1     DD4, requested; TRUE DD1 DD2     sought (see Details). abc TRUE, return tables , b c     used DD1 DD2.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"signs DD coefficients indicate  direction dispersal, provided  asymmetry significant. positive sign  indicates dispersal first (row DD  tables) second region (column); negative  sign indicates opposite. McNemar test  asymmetry computed presence-absence  data test hypothesis significant  asymmetry two areas comparison. input data table, rows sites  areas, columns taxa. often, taxa  species, coefficients can computed  genera families well. DD1 DD2  computed presence-absence data. four  types coefficients computed  quantitative data, converted  presence-absence computation DD1  DD2. PAonly = FALSE indicates four types  coefficients requested. PAonly = TRUE DD1  DD2 sought.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Function bgdispersal returns list containing following matrices: DD1 \\(DD1_{j,k} = ((b - c))/((+ b + c)^2)\\) DD2 \\(DD2_{j,k} = (2 (b - c))/((2a + b + c)  (+ b +     c))\\)   \\(\\), \\(b\\), \\(c\\)  meaning computation binary  similarity coefficients. DD3 \\(DD3_{j,k} = {W(-B) / (+B-W)^2} \\) DD4 \\(DD4_{j,k} = 2W(-B) / ((+B)(+B-W))\\) W = sum(pmin(vector1, vector2)), = sum(vector1), B = sum(vector2) McNemar McNemar chi-square statistic asymmetry (Sokal   Rohlf 1995):   \\(2(b \\log(b) + c \\log(c) - (b+c) \\log((b+c)/2)) / q\\),   \\(q = 1 + 1/(2(b+c))\\)   (Williams correction continuity) prob.McNemar probabilities associated  McNemar statistics, chi-square test. H0:  asymmetry \\((b-c)\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Legendre, P. V. Legendre. 1984. Postglacial dispersal   freshwater fishes Québec   peninsula. Can. J. Fish. Aquat. Sci. 41: 1781-1802. Legendre, P. L. Legendre. 2012. Numerical ecology, 3rd   English edition. Elsevier Science BV, Amsterdam. Sokal, R. R. F. J. Rohlf. 1995. Biometry. principles   practice statistics biological research. 3rd   edn. W. H. Freeman, New York.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"Pierre Legendre, Departement de Sciences Biologiques,   Universite de Montreal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"function uses powerful alternative McNemar test   classical formula. classical formula constructed   spirit Pearson's Chi-square, formula function   constructed spirit Wilks Chi-square \\(G\\)   statistic. Function mcnemar.test uses classical   formula. new formula introduced vegan version   1.10-11, older implementations bgdispersal used   classical formula.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bgdispersal.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coefficients of Biogeographical Dispersal Direction — bgdispersal","text":"","code":"mat <- matrix(c(32,15,14,10,70,30,100,4,10,30,25,0,18,0,40,   0,0,20,0,0,0,0,4,0,30,20,0,0,0,0,25,74,42,1,45,89,5,16,16,20),   4, 10, byrow=TRUE) bgdispersal(mat) #> $DD1 #>       [,1]  [,2] [,3]  [,4] #> [1,]  0.00  0.24 0.21  0.00 #> [2,] -0.24  0.00 0.08 -0.24 #> [3,] -0.21 -0.08 0.00 -0.21 #> [4,]  0.00  0.24 0.21  0.00 #>  #> $DD2 #>            [,1]       [,2]      [,3]       [,4] #> [1,]  0.0000000  0.3428571 0.3230769  0.0000000 #> [2,] -0.3428571  0.0000000 0.1142857 -0.3428571 #> [3,] -0.3230769 -0.1142857 0.0000000 -0.3230769 #> [4,]  0.0000000  0.3428571 0.3230769  0.0000000 #>  #> $DD3 #>             [,1]       [,2]      [,3]        [,4] #> [1,]  0.00000000  0.1567922 0.1420408 -0.01325831 #> [2,] -0.15679216  0.0000000 0.1101196 -0.20049485 #> [3,] -0.14204082 -0.1101196 0.0000000 -0.13586560 #> [4,]  0.01325831  0.2004949 0.1358656  0.00000000 #>  #> $DD4 #>             [,1]       [,2]      [,3]        [,4] #> [1,]  0.00000000  0.2513176 0.2425087 -0.01960102 #> [2,] -0.25131757  0.0000000 0.1725441 -0.30993929 #> [3,] -0.24250871 -0.1725441 0.0000000 -0.23381521 #> [4,]  0.01960102  0.3099393 0.2338152  0.00000000 #>  #> $McNemar #>      [,1]     [,2]      [,3]     [,4] #> [1,]   NA 7.677938 9.0571232 0.000000 #> [2,]   NA       NA 0.2912555 7.677938 #> [3,]   NA       NA        NA 9.057123 #> [4,]   NA       NA        NA       NA #>  #> $prob.McNemar #>      [,1]        [,2]        [,3]        [,4] #> [1,]   NA 0.005590001 0.002616734 1.000000000 #> [2,]   NA          NA 0.589417103 0.005590001 #> [3,]   NA          NA          NA 0.002616734 #> [4,]   NA          NA          NA          NA #>"},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":null,"dir":"Reference","previous_headings":"","what":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Function finds best subset environmental variables,   Euclidean distances scaled environmental variables   maximum (rank) correlation community dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"","code":"# S3 method for default bioenv(comm, env, method = \"spearman\", index = \"bray\",        upto = ncol(env), trace = FALSE, partial = NULL,         metric = c(\"euclidean\", \"mahalanobis\", \"manhattan\", \"gower\"),        parallel = getOption(\"mc.cores\"), ...) # S3 method for formula bioenv(formula, data, ...) bioenvdist(x, which = \"best\")"},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"comm Community data frame dissimilarity object square     matrix can interpreted dissimilarities. env Data frame continuous environmental variables. method correlation method used cor. index dissimilarity index used community data (comm)      vegdist. ignored comm dissimilarities. upto Maximum number parameters studied subsets. formula, data Model formula data. trace Trace calculations partial Dissimilarities partialled inspecting     variables env. metric Metric used distances environmental distances. See      Details. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. x bioenv result object. number model environmental     distances evaluated, \"best\" model. ... arguments passed vegdist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"function calculates community dissimilarity matrix using   vegdist.  selects possible subsets   environmental variables, scales variables,   calculates Euclidean distances subset using   dist.  function finds correlation   community dissimilarities environmental distances,   size subsets, saves best result.  \\(2^p-1\\)   subsets \\(p\\) variables, exhaustive search may take   , , long time (parameter upto offers partial   relief). argument metric defines distances given set   environmental variables.  metric = \"euclidean\",   variables scaled unit variance Euclidean distances   calculated. metric = \"mahalanobis\", Mahalanobis   distances calculated: addition scaling unit variance,   matrix current set environmental variables also   made orthogonal (uncorrelated). metric = \"manhattan\",   variables scaled unit range Manhattan distances   calculated, distances sums differences   environmental variables.  metric = \"gower\", Gower   distances calculated using function   daisy. allows also using factor   variables, continuous variables results equal   metric = \"manhattan\". function can called model formula   LHS data matrix RHS lists environmental variables.   formula interface practical selecting transforming   environmental variables. argument partial can perform “partial”   analysis. partializing item must dissimilarity object   class dist.   partial item can used correlation method,   strictly correct Pearson. Function bioenvdist recalculates environmental distances   used within function. default calculate distances   best model, number model can given. Clarke & Ainsworth (1993) suggested method used   selecting best subset environmental variables interpreting   results nonmetric multidimensional scaling (NMDS). recommended   parallel display NMDS community dissimilarities NMDS   Euclidean distances best subset scaled environmental   variables.  warned use Procrustes analysis,   looks like good way comparing two ordinations. Clarke & Ainsworth wrote computer program BIO-ENV giving name   current function. Presumably BIO-ENV   later incorporated Clarke's PRIMER software (available   Windows).  addition, Clarke & Ainsworth suggested novel method   rank correlation available current function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"function returns object class bioenv  summary method.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Clarke, K. R & Ainsworth, M. 1993. method linking multivariate   community structure environmental variables. Marine Ecology     Progress Series, 92, 205--219.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"want study ‘significance’ bioenv   results, can use function mantel   mantel.partial use definition   correlation.  However, bioenv standardizes environmental   variables depending used metric, must   mantel comparable results (standardized data   returned item x result object). safest use   bioenvdist extract environmental distances really   used within bioenv. NB., bioenv selects variables   maximize Mantel correlation, significance tests based   priori selection variables biased.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/bioenv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Best Subset of Environmental Variables with\n  Maximum (Rank) Correlation with Community Dissimilarities — bioenv","text":"","code":"# The method is very slow for large number of possible subsets. # Therefore only 6 variables in this example. data(varespec) data(varechem) sol <- bioenv(wisconsin(varespec) ~ log(N) + P + K + Ca + pH + Al, varechem) sol #>  #> Call: #> bioenv(formula = wisconsin(varespec) ~ log(N) + P + K + Ca +      pH + Al, data = varechem)  #>  #> Subset of environmental variables with best correlation to community data. #>  #> Correlations:    spearman  #> Dissimilarities: bray  #> Metric:          euclidean  #>  #> Best model has 3 parameters (max. 6 allowed): #> P Ca Al #> with correlation  0.4004806  #>  ## IGNORE_RDIFF_BEGIN summary(sol) #>                     size correlation #> P                      1      0.2513 #> P Al                   2      0.4004 #> P Ca Al                3      0.4005 #> P Ca pH Al             4      0.3619 #> log(N) P Ca pH Al      5      0.3216 #> log(N) P K Ca pH Al    6      0.2822 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":null,"dir":"Reference","previous_headings":"","what":"PCA biplot — biplot.rda","title":"PCA biplot — biplot.rda","text":"Draws PCA biplot species scores indicated biplot arrows","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"PCA biplot — biplot.rda","text":"","code":"# S3 method for rda biplot(x, choices = c(1, 2), scaling = \"species\",        display = c(\"sites\", \"species\"), type, xlim, ylim, col = c(1,2),         const, correlation = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"PCA biplot — biplot.rda","text":"x rda result object. choices Axes show. scaling Scaling species site scores. Either species     (2) site (1) scores scaled eigenvalues,     set scores left unscaled, 3     scaled symmetrically square root eigenvalues. negative     scaling values rda, species scores divided standard     deviation species multiplied equalizing     constant. Unscaled raw scores stored result can accessed     scaling = 0. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Argument correlation can used combination     character descriptions get corresponding negative     value. correlation logical; scaling character     description scaling type, correlation can used     select correlation-like scores PCA. See argument scaling     details. display Scores shown.  must alternatives     \"species\" species scores, /\"sites\" site     scores. type Type plot: partial match text     text labels, points points, none     setting frames . omitted, text selected     smaller data sets, points larger. Can length 2     (e.g. type = c(\"text\", \"points\")), case first     element describes species scores handled, second     site scores drawn. xlim, ylim x y limits (min, max) plot. col Colours used sites species (order).     one colour given, used . const General scaling constant scores.rda. ... parameters plotting functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"PCA biplot — biplot.rda","text":"Produces plot biplot results call   rda. common \"species\" scores PCA   drawn biplot arrows point direction increasing   values variable. biplot.rda function provides   wrapper plot.cca allow easy production   plot. biplot.rda suitable unconstrained models.   used ordination object constraints, error issued. species scores drawn using \"text\", arrows drawn   origin 0.85 * species score, whilst labels   drawn species score. type used \"points\",   labels drawn therefore arrows drawn origin   actual species score.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"PCA biplot — biplot.rda","text":"plot function returns invisibly plotting structure   can used identify.ordiplot identify   points functions ordiplot family.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"PCA biplot — biplot.rda","text":"Gavin Simpson, based plot.cca Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/biplot.rda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"PCA biplot — biplot.rda","text":"","code":"data(dune) mod <- rda(dune, scale = TRUE) biplot(mod, scaling = \"symmetric\")   ## different type for species and site scores biplot(mod, scaling = \"symmetric\", type = c(\"text\", \"points\"))   ## We can use ordiplot pipes in R 4.1 to build similar plots with ## flexible control if (FALSE) { if (getRversion() >= \"4.1\") { plot(mod, scaling = \"symmetric\", type=\"n\") |>    text(\"sites\", cex=0.8) |>    text(\"species\", arrows=TRUE, length=0.02, col=\"red\", cex=0.6) } }"},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":null,"dir":"Reference","previous_headings":"","what":"[Partial] Distance-based Redundancy Analysis — capscale","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Distance-based redundancy analysis (dbRDA) ordination method   similar Redundancy Analysis (rda), allows   non-Euclidean dissimilarity indices, Manhattan   Bray--Curtis distance. Despite non-Euclidean feature, analysis   strictly linear metric. called Euclidean distance,   results identical rda, dbRDA   less efficient. Functions capscale dbrda   constrained versions metric scaling, .k.. principal coordinates   analysis, based Euclidean distance can used,   useful, dissimilarity measures. functions   can also perform unconstrained principal coordinates analysis,   optionally using extended dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"","code":"capscale(formula, data, distance = \"euclidean\", sqrt.dist = FALSE,     comm = NULL, add = FALSE,  dfun = vegdist, metaMDSdist = FALSE,     na.action = na.fail, subset = NULL, ...) dbrda(formula, data, distance = \"euclidean\", sqrt.dist = FALSE,     add = FALSE, dfun = vegdist, metaMDSdist = FALSE,     na.action = na.fail, subset = NULL, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"formula Model formula. function can called     formula interface. usual features formula hold,     especially defined cca rda.     LHS must either community data matrix dissimilarity matrix,     e.g.,     vegdist dist.     LHS data matrix, function vegdist     function given dfun     used find dissimilarities. RHS defines     constraints. constraints can continuous variables factors,     can transformed within formula, can     interactions typical formula. RHS can     special term Condition defines variables     “partialled ” constraints, just like rda     cca. allows use partial dbRDA. data Data frame containing variables right hand side     model formula. distance name dissimilarity (distance) index     LHS formula data frame instead     dissimilarity matrix. sqrt.dist Take square roots dissimilarities. See section     Details . comm Community data frame used finding     species scores LHS formula     dissimilarity matrix. used LHS data     frame. supplied, “species scores”     unavailable dissimilarities supplied. N.B.,     available capscale: dbrda return     species scores. Function sppscores can used add     species scores missing. add Add constant non-diagonal dissimilarities      eigenvalues non-negative underlying Principal      Co-ordinates Analysis (see wcmdscale      details). \"lingoes\" (TRUE) uses      recommended method Legendre & Anderson (1999: “method      1”) \"cailliez\" uses “method 2”.      latter one cmdscale. dfun Distance dissimilarity function used. function      returning standard \"dist\" taking index name      first argument can used. metaMDSdist Use metaMDSdist similarly      metaMDS. means automatic data transformation      using extended flexible shortest path dissimilarities (function      stepacross) many dissimilarities based      shared species. na.action Handling missing values constraints      conditions. default (na.fail) stop      missing values. Choices na.omit      na.exclude delete rows missing values,      differ representation results. na.omit      non-missing site scores shown, na.exclude gives      NA scores missing observations. Unlike      rda, WA scores available missing      constraints conditions. subset Subset data rows. can logical vector      TRUE kept observations, logical      expression can contain variables working      environment, data species names community data      (given formula comm argument). ... parameters passed underlying functions (e.g.,      metaMDSdist).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Functions capscale dbrda provide two alternative   implementations dbRDA. Function capscale based   Legendre & Anderson (1999): dissimilarity data first   ordinated using metric scaling, ordination results   analysed rda. Function dbrda based   McArdle & Anderson (2001) directly decomposes   dissimilarities. use rda parallel   implementation adapted analysing dissimilarities returns   subset rda items. Euclidean distances   results identical rda.  dissimilarities   may give negative eigenvalues associated imaginary   axes. Negative eigenvalues handled differently: capscale   ignores imaginary axes analyses real axes positive   eigenvalues, dbrda directly analyses dissimilarities   can give negative eigenvalues component. user supplied community data frame instead   dissimilarities, functions find dissimilarities using   vegdist distance function given dfun   specified distance. functions accept distance   objects vegdist, dist,   method producing compatible objects. constraining variables can   continuous factors , can interaction terms,   can transformed call. Moreover, can   special term Condition just like rda   cca “partial” analysis can performed. Function dbrda return species scores, can   also missing capscale, can added   analysis using function sppscores. Non-Euclidean dissimilarities can produce negative eigenvalues   (Legendre & Anderson 1999, McArdle & Anderson 2001).    negative eigenvalues, printed output capscale add   column sums positive eigenvalues item sum   negative eigenvalues, dbrda add column giving   number real dimensions positive eigenvalues.  negative   eigenvalues disturbing, functions let distort   dissimilarities non-negative eigenvalues   produced argument add = TRUE. Alternatively,   sqrt.dist = TRUE, square roots dissimilarities   used may help avoiding negative eigenvalues (Legendre &   Anderson 1999). functions can also used perform ordinary metric scaling   .k.. principal coordinates analysis using formula   constant left hand side, comm ~ 1.   metaMDSdist = TRUE, function can automatic data   standardization use extended dissimilarities using function   stepacross similarly non-metric multidimensional   scaling metaMDS.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"functions return object class capscale  dbrda inherits rda. See  cca.object description result object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Anderson, M.J. & Willis, T.J. (2003). Canonical analysis principal   coordinates: useful method constrained ordination   ecology. Ecology 84, 511--525. Gower, J.C. (1985). Properties Euclidean non-Euclidean   distance matrices. Linear Algebra Applications 67, 81--97. Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy   analysis: testing multispecies responses multifactorial ecological   experiments. Ecological Monographs 69, 1--24. Legendre, P. & Legendre, L. (2012).  Numerical Ecology. 3rd English   Edition. Elsevier. McArdle, B.H. & Anderson, M.J. (2001). Fitting multivariate models   community data: comment distance-based redundancy   analysis. Ecology 82, 290--297.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"function capscale originally developed   variant constrained analysis proximities (Anderson & Willis   2003), developments made similar dbRDA. However,   discards imaginary dimensions negative eigenvalues   ordination significance tests area based real dimensions   positive eigenvalues. inertia named dissimilarity index defined   dissimilarity data, unknown distance   information missing. largest original dissimilarity   larger 4, capscale handles input similarly rda   bases analysis variance instead sum   squares. Keyword mean added inertia cases,   e.g. Euclidean Manhattan distances.  Inertia based   squared index, keyword squared added name   distance, unless data square root transformed (argument   sqrt.dist=TRUE). additive constant used   argument add, Lingoes Cailliez adjusted   added name inertia, value constant   printed.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/capscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"[Partial] Distance-based Redundancy Analysis — capscale","text":"","code":"data(varespec) data(varechem) ## Basic Analysis vare.cap <- capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\") vare.cap #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\") #>  #>                 Inertia Proportion Rank #> Total          4.792609   1.000000      #> Conditional    0.977190   0.203895    1 #> Constrained    0.997170   0.208064    3 #> Unconstrained  2.829038   0.590292   15 #> Imaginary     -0.010790  -0.002251    8 #> Inertia is squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.5413 0.3265 0.1293  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11  #> 0.9065 0.5127 0.3379 0.2626 0.2032 0.1618 0.1242 0.0856 0.0689 0.0583 0.0501  #>  MDS12  MDS13  MDS14  MDS15  #> 0.0277 0.0208 0.0073 0.0013  #>  plot(vare.cap)  anova(vare.cap) #> Permutation test for capscale under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: capscale(formula = varespec ~ N + P + K + Condition(Al), data = varechem, distance = \"bray\") #>          Df SumOfSqs      F Pr(>F)    #> Model     3  0.99717 2.2324  0.004 ** #> Residual 19  2.82904                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Avoid negative eigenvalues with additive constant capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\", add =TRUE) #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\", add = TRUE) #>  #>               Inertia Proportion Rank #> Total          6.2496     1.0000      #> Conditional    1.0468     0.1675    1 #> Constrained    1.1956     0.1913    3 #> Unconstrained  4.0073     0.6412   19 #> Inertia is Lingoes adjusted squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.6103 0.3940 0.1913  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9796 0.5811 0.4077 0.3322 0.2769 0.2346 0.1962 0.1566  #> (Showing 8 of 19 unconstrained eigenvalues) #>  #> Constant added to distances: 0.07413903  #>  ## Avoid negative eigenvalues by taking square roots of dissimilarities capscale(varespec ~ N + P + K + Condition(Al), varechem,                      dist = \"bray\", sqrt.dist= TRUE) #> Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\", sqrt.dist = TRUE) #>  #>               Inertia Proportion Rank #> Total          6.9500     1.0000      #> Conditional    0.9535     0.1372    1 #> Constrained    1.2267     0.1765    3 #> Unconstrained  4.7698     0.6863   19 #> Inertia is Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for constrained axes: #>   CAP1   CAP2   CAP3  #> 0.5817 0.4086 0.2365  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9680 0.6100 0.4469 0.3837 0.3371 0.3012 0.2558 0.2010  #> (Showing 8 of 19 unconstrained eigenvalues) #>  ## Principal coordinates analysis with extended dissimilarities capscale(varespec ~ 1, dist=\"bray\", metaMDS = TRUE) #> Square root transformation #> Wisconsin double standardization #> Call: capscale(formula = varespec ~ 1, distance = \"bray\", metaMDSdist = #> TRUE) #>  #>                 Inertia Rank #> Total          2.593021      #> Unconstrained  2.594999   19 #> Imaginary     -0.001978    4 #> Inertia is squared Bray distance  #> Species scores projected from ‘varespec’  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.6075 0.3820 0.3335 0.2046 0.1731 0.1684 0.1505 0.1163  #> (Showing 8 of 19 unconstrained eigenvalues) #>  #> metaMDSdist transformed data: wisconsin(sqrt(varespec))  #>  ## dbrda dbrda(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"bray\") #> Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"bray\") #>  #>               Inertia Proportion Rank RealDims #> Total          4.5444     1.0000               #> Conditional    0.9726     0.2140    1          #> Constrained    0.9731     0.2141    3        3 #> Unconstrained  2.5987     0.5718   19       13 #> Inertia is squared Bray distance  #>  #> Eigenvalues for constrained axes: #> dbRDA1 dbRDA2 dbRDA3  #> 0.5362 0.3198 0.1171  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 0.9054 0.5070 0.3336 0.2581 0.2027 0.1605 0.1221 0.0825  #> (Showing 8 of 19 unconstrained eigenvalues) #>  ## avoid negative eigenvalues also with Jaccard distances dbrda(varespec ~ N + P + K + Condition(Al), varechem,                      dist=\"jaccard\") #> Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data = #> varechem, distance = \"jaccard\") #>  #>               Inertia Proportion Rank #> Total          6.5044     1.0000      #> Conditional    1.0330     0.1588    1 #> Constrained    1.2068     0.1855    3 #> Unconstrained  4.2646     0.6557   19 #> Inertia is squared Jaccard distance  #>  #> Eigenvalues for constrained axes: #> dbRDA1 dbRDA2 dbRDA3  #> 0.5992 0.3994 0.2082  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8  #> 1.0388 0.6441 0.4518 0.3759 0.3239 0.2785 0.2279 0.1644  #> (Showing 8 of 19 unconstrained eigenvalues) #>"},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":null,"dir":"Reference","previous_headings":"","what":"K-means partitioning using a range of values of K — cascadeKM","title":"K-means partitioning using a range of values of K — cascadeKM","text":"function wrapper kmeans function. creates  several partitions forming cascade small large number  groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"K-means partitioning using a range of values of K — cascadeKM","text":"","code":"cascadeKM(data, inf.gr, sup.gr, iter = 100, criterion = \"calinski\",   parallel = getOption(\"mc.cores\"))  cIndexKM(y, x, index = \"all\")  # S3 method for cascadeKM plot(x, min.g, max.g, grpmts.plot = TRUE,       sortg = FALSE, gridcol = NA, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"K-means partitioning using a range of values of K — cascadeKM","text":"data data matrix. objects (samples) rows. inf.gr number groups partition      smallest number groups cascade (min). sup.gr number groups partition largest \t     number groups cascade (max). iter number random starting configurations value     \\(K\\). criterion criterion used select best     partition. default value \"calinski\", refers     Calinski-Harabasz (1974) criterion. simple structure index     (\"ssi\") also available. indices available     package cclust.     experience, two indices work best likely     return maximum value near optimal number     clusters \"calinski\" \"ssi\". y Object class \"kmeans\" returned clustering algorithm     kmeans x Data matrix columns correspond variables rows     observations, plotting object plot index available indices : \"calinski\" \"ssi\".      Type \"\" obtain indices.      Abbreviations names also accepted. min.g, max.g minimum maximum numbers groups     displayed. grpmts.plot Show plot (TRUE FALSE). sortg Sort objects function group membership     produce easily interpretable graph. See Details.     original object names kept; used labels     output table x, although graph.      row names, sequential row numbers used keep track     original order objects. gridcol colour grid lines plots. NA,     default value, removes grid lines. ... parameters functions (ignored). parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"K-means partitioning using a range of values of K — cascadeKM","text":"function creates several partitions forming cascade small   large number groups formed kmeans.    work performed function cIndex based   clustIndex package cclust).    criteria removed version computation    errors generated one object found group. default value \"calinski\", refers well-known   Calinski-Harabasz (1974) criterion. available index   simple structure index \"ssi\" (Dolnicar et al. 1999).   case groups equal   sizes, \"calinski\" generally good criterion indicate   correct number groups. Users take indications   literally groups equal size. Type \"\"   obtain  indices. indices defined : calinski: \\((SSB/(K-1))/(SSW/(n-K))\\), \\(n\\)     number data points \\(K\\) number clusters.     \\(SSW\\) sum squares within clusters     \\(SSB\\) sum squares among clusters. index     simply \\(F\\) (ANOVA) statistic. ssi: “Simple Structure Index” multiplicatively combines     several elements influence interpretability     partitioning solution. best partition indicated     highest SSI value. simulation study, Milligan Cooper (1985) found   Calinski-Harabasz criterion recovered correct number   groups often. recommend criterion ,   groups equal sizes, maximum value \"calinski\"   usually indicates correct number groups. Another available   index simple structure index \"ssi\". Users   take indications indices literally groups   equal size explore groups corresponding values   \\(K\\). Function cascadeKM plot method.  Two plots   produced. graph left objects    abscissa number groups ordinate. groups   represented colours. graph right shows values   criterion (\"calinski\" \"ssi\") determining best   partition. highest value criterion marked red. Points   marked orange, , indicate partitions producing increase   criterion value number groups increases; may   represent interesting partitions. sortg=TRUE, objects reordered following   procedure: (1) simple matching distance matrix computed among   objects, based table K-means assignments groups,   \\(K\\) = min.g \\(K\\) = max.g. (2) principal   coordinate analysis (PCoA, Gower 1966) computed centred   distance matrix. (3) first principal coordinate used new   order objects graph. simplified algorithm used   compute first principal coordinate , using iterative   algorithm described Legendre & Legendre (2012).   full distance matrix among objects never computed; avoids   problem storing number objects   large. Distance values computed needed   algorithm.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Function cascadeKM returns object class  cascadeKM items: partition Table partitions found different numbers      groups \\(K\\), \\(K\\) = inf.gr \\(K\\) =     sup.gr. results Values criterion select best     partition. criterion name criterion used. size number objects found group,      partitions (columns). Function cIndex returns vector index values.   maximum value indices supposed indicate best   partition. indices work best groups equal sizes.   groups equal sizes, one put much faith   maximum indices, also explore groups   corresponding values \\(K\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Calinski, T. J. Harabasz. 1974. dendrite method cluster   analysis. Commun. Stat. 3: 1--27. Dolnicar, S., K. Grabler J. . Mazanec. 1999.  tale three   cities: perceptual charting analyzing destination images. Pp.   39-62 : Woodside, . et al. [eds.] Consumer psychology   tourism, hospitality leisure. CAB International, New York. Gower, J. C. 1966. distance properties latent root vector   methods used multivariate analysis. Biometrika 53:   325--338. Legendre, P. & L. Legendre. 2012. Numerical ecology, 3rd   English edition. Elsevier Science BV, Amsterdam. Milligan, G. W. & M. C. Cooper. 1985. examination procedures   determining number clusters data set. Psychometrika   50: 159--179. Weingessel, ., Dimitriadou, . Dolnicar, S. 2002. examination   indexes determining number clusters binary data   sets. Psychometrika 67: 137--160.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"K-means partitioning using a range of values of K — cascadeKM","text":"Marie-Helene Ouellette   Marie-Helene.Ouellette@UMontreal.ca, Sebastien Durand   Sebastien.Durand@UMontreal.ca Pierre Legendre   Pierre.Legendre@UMontreal.ca. Parallel processing Virgilio   Gómez-Rubio.  Edited vegan Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cascadeKM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"K-means partitioning using a range of values of K — cascadeKM","text":"","code":"# Partitioning a (10 x 10) data matrix of random numbers  mat <- matrix(runif(100),10,10)  res <- cascadeKM(mat, 2, 5, iter = 25, criterion = 'calinski')   toto <- plot(res)     # Partitioning an autocorrelated time series  vec <- sort(matrix(runif(30),30,1))  res <- cascadeKM(vec, 2, 5, iter = 25, criterion = 'calinski')  toto <- plot(res)     # Partitioning a large autocorrelated time series  # Note that we remove the grid lines  vec <- sort(matrix(runif(1000),1000,1))  res <- cascadeKM(vec, 2, 7, iter = 10, criterion = 'calinski')  toto <- plot(res, gridcol=NA)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":null,"dir":"Reference","previous_headings":"","what":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Function cca performs correspondence analysis, optionally   constrained correspondence analysis (.k.. canonical correspondence   analysis), optionally partial constrained correspondence   analysis. Function rda performs redundancy analysis,   optionally principal components analysis.   popular ordination techniques community ecology.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"","code":"# S3 method for formula cca(formula, data, na.action = na.fail, subset = NULL,   ...) # S3 method for formula rda(formula, data, scale=FALSE, na.action = na.fail,   subset = NULL, ...) # S3 method for default cca(X, Y, Z, ...) # S3 method for default rda(X, Y, Z, scale=FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"formula Model formula, left hand side gives     community data matrix, right hand side gives constraining variables,     conditioning variables can given within special function     Condition. data Data frame containing variables right hand side     model formula. X Community data matrix. Y Constraining matrix, typically environmental variables.     Can missing. data.frame,     expanded model.matrix factors     expanded contrasts (“dummy variables”). better     use formula instead argument,     analyses work formula used. Z Conditioning matrix, effect removed     (“partialled ”) next step. Can missing.     data.frame, expanded similarly constraining     matrix. scale Scale species unit variance (like correlations). na.action Handling missing values constraints     conditions. default (na.fail) stop     missing value. Choice na.omit removes rows     missing values. Choice na.exclude keeps     observations gives NA results     calculated. WA scores rows may found also missing     values constraints. Missing values never allowed     dependent community data. subset Subset data rows. can logical vector     TRUE kept observations, logical expression     can contain variables working environment, data     species names community data. ... arguments print plot functions     (ignored functions).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Since introduction (ter Braak 1986), constrained, canonical,   correspondence analysis spin-, redundancy analysis,   popular ordination methods community ecology.   Functions cca rda  similar popular   proprietary software Canoco, although implementation   completely different.  functions based Legendre &   Legendre's (2012) algorithm: cca   Chi-square transformed data matrix subjected weighted linear   regression constraining variables, fitted values   submitted correspondence analysis performed via singular value   decomposition (svd). Function rda similar, uses   ordinary, unweighted linear regression unweighted SVD. Legendre &   Legendre (2012), Table 11.5 (p. 650) give skeleton RDA   algorithm vegan. algorithm CCA similar,   involves standardization row column weights. functions can called either matrix-like entries   community data constraints, formula interface.    general, formula interface preferred, allows   better control model allows factor constraints.   analyses ordination results possible model fitted   formula (e.g., cases anova.cca, automatic   model building). following sections, X, Y Z, although   referred matrices, commonly data frames. matrix interface,   community data matrix X must given, data   matrices may omitted, corresponding stage analysis   skipped.  matrix Z supplied, effects removed   community matrix, residual matrix submitted next   stage.  called partial correspondence redundancy   analysis.  matrix   Y supplied, used constrain ordination,   resulting constrained canonical correspondence analysis,   redundancy analysis.   Finally, residual submitted ordinary correspondence   analysis (principal components analysis).  matrices   Z Y missing,   data matrix analysed ordinary correspondence analysis (  principal components analysis). Instead separate matrices, model can defined using model   formula.  left hand side must   community data matrix (X).  right hand side defines   constraining model.   constraints can contain ordered unordered factors,   interactions among variables functions variables.  defined   contrasts honoured factor   variables.  constraints can also matrices (data   frames).   formula can include special term Condition   conditioning variables (“covariables”) partialled   analysis.  following commands equivalent:   cca(X, Y, Z),  cca(X ~ Y + Condition(Z)), Y   Z refer constraints conditions matrices respectively. Constrained correspondence analysis indeed constrained method:   CCA try display variation   data, part can explained used constraints.   Consequently, results strongly dependent set   constraints transformations interactions among   constraints.  shotgun method use environmental variables   constraints.  However, exploratory problems better   analysed   unconstrained methods correspondence analysis   (decorana, corresp) non-metric   multidimensional scaling (metaMDS)   environmental interpretation analysis   (envfit, ordisurf).   CCA good choice user   clear strong priori hypotheses constraints   interested major structure data set. CCA able correct curve artefact commonly found   correspondence analysis forcing configuration linear   constraints.  However, curve artefact can avoided   low number constraints curvilinear relation   .  curve can reappear even two badly chosen   constraints single factor.  Although formula interface makes   easy include polynomial interaction terms, terms often   produce curved artefacts (difficult interpret),   probably avoided. According folklore, rda used ``short   gradients'' rather cca. However, based   research finds methods based Euclidean metric uniformly   weaker based Chi-squared metric.  However, standardized   Euclidean distance may appropriate measures (see Hellinger   standardization decostand particular). Partial CCA (pCCA; alternatively partial RDA) can used remove   effect   conditioning background random variables   covariables CCA proper.  fact, pCCA compares models   cca(X ~ Z) cca(X ~ Y + Z) attributes   difference effect Y cleansed effect   Z.  people used method extracting   “components variance” CCA.  However, effect   variables together stronger sum separately, can   increase total Chi-square partialling   variation, give negative “components variance”.  general,   components “variance” trusted due   interactions two sets variables. functions summary plot methods   documented separately (see plot.cca, summary.cca).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"Function cca returns huge object class cca,   described separately cca.object. Function rda returns object class rda   inherits class cca described cca.object.   scaling used rda scores described separate   vignette package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"original method ter Braak, current   implementation follows Legendre Legendre. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier. McCune, B. (1997) Influence noisy environmental data canonical   correspondence analysis. Ecology 78, 2617-2623. Palmer, M. W. (1993) Putting things even better order:   advantages canonical correspondence analysis.  Ecology   74,2215-2230. Ter Braak, C. J. F. (1986) Canonical Correspondence Analysis: new   eigenvector technique multivariate direct gradient   analysis. Ecology 67, 1167-1179.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"responsible author Jari Oksanen, code borrows heavily   Dave Roberts (Montana State University, USA).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"[Partial] [Constrained] Correspondence Analysis and Redundancy\n  Analysis — cca","text":"","code":"data(varespec) data(varechem) ## Common but bad way: use all variables you happen to have in your ## environmental data matrix vare.cca <- cca(varespec, varechem) vare.cca #> Call: cca(X = varespec, Y = varechem) #>  #>               Inertia Proportion Rank #> Total          2.0832     1.0000      #> Constrained    1.4415     0.6920   14 #> Unconstrained  0.6417     0.3080    9 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11  #> 0.4389 0.2918 0.1628 0.1421 0.1180 0.0890 0.0703 0.0584 0.0311 0.0133 0.0084  #>  CCA12  CCA13  CCA14  #> 0.0065 0.0062 0.0047  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9  #> 0.19776 0.14193 0.10117 0.07079 0.05330 0.03330 0.01887 0.01510 0.00949  #>  plot(vare.cca)  ## Formula interface and a better model vare.cca <- cca(varespec ~ Al + P*(K + Baresoil), data=varechem) vare.cca #> Call: cca(formula = varespec ~ Al + P * (K + Baresoil), data = #> varechem) #>  #>               Inertia Proportion Rank #> Total           2.083      1.000      #> Constrained     1.046      0.502    6 #> Unconstrained   1.038      0.498   17 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6  #> 0.3756 0.2342 0.1407 0.1323 0.1068 0.0561  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8  #> 0.27577 0.15411 0.13536 0.11803 0.08887 0.05511 0.04919 0.03781  #> (Showing 8 of 17 unconstrained eigenvalues) #>  plot(vare.cca)  ## Partialling out and negative components of variance cca(varespec ~ Ca, varechem) #> Call: cca(formula = varespec ~ Ca, data = varechem) #>  #>               Inertia Proportion Rank #> Total         2.08320    1.00000      #> Constrained   0.15722    0.07547    1 #> Unconstrained 1.92598    0.92453   22 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1  #> 0.15722  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.4745 0.2939 0.2140 0.1954 0.1748 0.1171 0.1121 0.0880  #> (Showing 8 of 22 unconstrained eigenvalues) #>  cca(varespec ~ Ca + Condition(pH), varechem) #> Call: cca(formula = varespec ~ Ca + Condition(pH), data = varechem) #>  #>               Inertia Proportion Rank #> Total          2.0832     1.0000      #> Conditional    0.1458     0.0700    1 #> Constrained    0.1827     0.0877    1 #> Unconstrained  1.7547     0.8423   21 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1  #> 0.18269  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.3834 0.2749 0.2123 0.1760 0.1701 0.1161 0.1089 0.0880  #> (Showing 8 of 21 unconstrained eigenvalues) #>  ## RDA data(dune) data(dune.env) dune.Manure <- rda(dune ~ Manure, dune.env) plot(dune.Manure)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":null,"dir":"Reference","previous_headings":"","what":"Result Object from Constrained Ordination — cca.object","title":"Result Object from Constrained Ordination — cca.object","text":"Ordination methods cca, rda,   dbrda capscale return similar result   objects. methods use internal function   ordConstrained. differ (1) initial   transformation data defining inertia, (2) weighting,   (3) use rectangular rows \\(\\times\\) columns data   symmetric rows \\(\\times\\) rows dissimilarities:   rda initializes data give variance correlations   inertia, cca based double-standardized data   give Chi-square inertia uses row column weights,   capscale maps real part dissimilarities   rectangular data performs RDA, dbrda performs   RDA-like analysis directly symmetric dissimilarities. Function ordConstrained returns result components   methods, calling function may add   components final result. However, access   result components directly (using $): internal structure   regarded stable application interface (API), can   change release. access results components   directly, take risk breakage vegan release.   vegan provides wide set accessor functions   components, functions updated result object   changes. documentation gives overview accessor functions   cca result object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Result Object from Constrained Ordination — cca.object","text":"","code":"ordiYbar(x, model = c(\"CCA\", \"CA\", \"pCCA\", \"partial\", \"initial\")) # S3 method for cca model.frame(formula, ...) # S3 method for cca model.matrix(object, ...) # S3 method for cca weights(object, display = \"sites\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Result Object from Constrained Ordination — cca.object","text":"object, x, formula result object cca,     rda, dbrda,     capscale. model Show constrained (\"CCA\"), unconstrained     (\"CA\") conditioned “partial” (\"pCCA\")     results. ordiYbar value can also \"initial\"     internal working input data, \"partial\"     internal working input data removing partial effects. display Display either \"sites\" \"species\". ... arguments passed function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Result Object from Constrained Ordination — cca.object","text":"internal (“working”) form dependent (community)   data can accessed function ordiYbar. form depends   ordination method: instance, cca   data weighted Chi-square transformed,   dbrda Gower-centred dissimilarities.   input data original (“response”) form can accessed   fitted.cca residuals.cca.   Function predict.cca can return either working   response data, also lower-rank approximations. model matrix independent data (“Constraints”   “Conditions”) can extracted model.matrix.   partial analysis, function returns list design matrices   called Conditions Constraints. either component   missing, single matrix returned. redundant (aliased)   terms appear model matrix. terms can found   alias.cca. Function model.frame tries   reconstruct data frame model matrices   derived. possible original model fitted   formula data arguments, still fails   data unavailable. number observations can accessed   nobs.cca, residual degrees freedom   df.residual.cca. information observations   missing values can accessed na.action.    terms formula fitted model can accessed   formula terms. weights used cca can accessed   weights. unweighted methods (rda)   weights equal. ordination results saved separate components partial   terms, constraints residual unconstrained ordination.   guarantee components internal names   currently, cautious developing scripts   functions directly access components. constrained ordination algorithm based QR decomposition   constraints conditions (environmental data), QR   component saved separately partial constrained   components.  QR decomposition constraints can accessed   qr.cca. also include residual   effects partial terms (Conditions), used   together ordiYbar(x, \"partial\"). environmental data   first centred rda weighted centred   cca.  QR decomposition used many functions   access cca results, can used find many items   directly stored object.  examples, see   coef.cca, coef.rda,   vif.cca, permutest.cca,   predict.cca, predict.rda,   calibrate.cca. See qr possible   uses component. instance, rank constraints   can found QR decomposition. eigenvalues solution can accessed   eigenvals.cca. Eigenvalues evaluated   partial component, available constrained   residual components. ordination scores internally stored (weighted)   orthonormal scores matrices. results can accessed   scores.cca scores.rda functions.   ordination scores scaled accessed scores   functions, internal (weighted) orthonormal scores can   accessed setting scaling = FALSE. Unconstrained residual   component species site scores, constrained component   also fitted site scores linear combination scores sites   biplot scores centroids constraint variables. biplot   scores correspond model.matrix, centroids   calculated factor variables used. scores   can selected defining axes, direct way   accessing scores certain component. number dimensions   can assessed eigenvals. addition,   types can derived results although saved   results. instance, regression scores model coefficients   can accessed scores coef   functions. Partial component scores. Distance-based methods (dbrda, capscale)   can negative eigenvalues associated imaginary axis   scores. way accessing imaginary scores.    addition, species scores initially missing   dbrda accessory found analysis   capscale (may misleading). Function   sppscores can used add species scores replace   meaningful ones.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Result Object from Constrained Ordination — cca.object","text":"Saving “working” dependent (community) data changed   vegan version 2.5-0, use ordiYbar   function instead direct access, scripts functions   fail (ordiYbar available since vegan   version 2.4-3, works old current result   objects). model.matrix returns unweighted model matrix also   cca. Prior vegan version 2.5-0 returned   weighted model matrix","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Result Object from Constrained Ordination — cca.object","text":"Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/cca.object.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Result Object from Constrained Ordination — cca.object","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":null,"dir":"Reference","previous_headings":"","what":"Multinomial Species Classification Method (CLAM) — clamtest","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"CLAM statistical approach classifying generalists specialists two distinct habitats described Chazdon et al. (2011).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"","code":"clamtest(comm, groups, coverage.limit = 10, specialization = 2/3,     npoints = 20, alpha = 0.05/20) # S3 method for clamtest summary(object, ...) # S3 method for clamtest plot(x, xlab, ylab, main,  pch = 21:24, col.points = 1:4,     col.lines = 2:4, lty = 1:3, position = \"bottomright\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"comm Community matrix, consisting counts. groups vector identifying two habitats. Must exactly two unique values levels. Habitat IDs grouping vector must match corresponding rows community matrix comm. coverage.limit Integer, sample coverage based correction  applied rare species counts limit.  Sample coverage calculated separately  two habitats. Sample relative abundances used species  higher equal coverage.limit total counts per habitat. specialization Numeric, specialization threshold value 0 1. value \\(2/3\\) represents ‘supermajority’ rule, value \\(1/2\\) represents ‘simple majority’ rule assign shared species habitat specialists. npoints Integer, number points used determine boundary lines plots. alpha Numeric, nominal significance level individual   tests.  default value reduces conventional limit   \\(0.05\\) account overdispersion multiple testing   several species simultaneously. However, firm reason   exactly limit. x, object Fitted model object class \"clamtest\". xlab, ylab Labels plot axes. main Main title plot. pch, col.points Symbols colors used plotting species groups. lty, col.lines Line types colors boundary lines plot separate species groups. position Position figure legend, see legend specification details. Legend shown position = NULL. ... Additional arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"method uses multinomial model based estimated   species relative abundance two habitats (, B). minimizes bias   due differences sampling intensities two habitat types   well bias due insufficient sampling within   habitat. method permits robust statistical classification   habitat specialists generalists, without excluding rare species   priori (Chazdon et al. 2011).  Based user-defined   specialization threshold, model classifies species   one four groups: (1) generalists; (2) habitat specialists; (3)   habitat B specialists; (4) rare classify confidence.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"data frame (class attribute \"clamtest\"),   columns:  Species: species name (column names comm), Total_**: total count habitat , Total_*B*: total count habitat B, Classes: species classification, factor        levels Generalist, Specialist_**,        Specialist_*B*, Too_rare.  ** *B* placeholders habitat names/labels found   data. summary method returns descriptive statistics results. plot method returns values invisibly produces bivariate scatterplot species total abundances two habitats. Symbols boundary lines shown species groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"Chazdon, R. L., Chao, ., Colwell, R. K., Lin, S.-Y., Norden, N.,  Letcher, S. G., Clark, D. B., Finegan, B. Arroyo J. P.(2011).  novel statistical method classifying habitat generalists specialists. Ecology 92, 1332--1343.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"Peter Solymos solymos@ualberta.ca","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"code tested standalone CLAM software provided website Anne Chao (http://chao.stat.nthu.edu.tw/wordpress); minor inconsistencies found, especially finding threshold 'rare' species. inconsistencies probably due numerical differences two implementation. current R implementation uses  root finding iso-lines instead iterative search. original method (Chazdon et al. 2011) two major problems: assumes error distribution multinomial.     justified choice individuals freely distributed,     -dispersion clustering individuals.     ecological data, variance much higher multinomial     assumption, therefore test statistic optimistic. original authors suggest multiple testing adjustment     multiple testing based number points     (npoints) used draw critical lines plot,     whereas adjustment based number tests (.e.,     tested species). function uses numerical values     original paper, automatic connection     npoints alpha arguments, must work     adjustment .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/clamtest.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multinomial Species Classification Method (CLAM) — clamtest","text":"","code":"data(mite) data(mite.env) sol <- with(mite.env, clamtest(mite, Shrub==\"None\", alpha=0.005)) summary(sol) #> Two Groups Species Classification Method (CLAM) #>  #> Specialization threshold = 0.6666667 #> Alpha level = 0.005 #>  #> Estimated sample coverage: #>  FALSE   TRUE  #> 1.0000 0.9996  #>  #> Minimum abundance for classification: #> FALSE  TRUE  #>    27     9  #>  #>                  Species Proportion #> Generalist            10      0.286 #> Specialist_FALSE      14      0.400 #> Specialist_TRUE        4      0.114 #> Too_rare               7      0.200 head(sol) #>   Species Total_FALSE Total_TRUE          Classes #> 1  Brachy         534         77       Generalist #> 2    PHTH          89          0 Specialist_FALSE #> 3    HPAV         389        207       Generalist #> 4    RARD          85          0 Specialist_FALSE #> 5    SSTR          22          0         Too_rare #> 6 Protopl          26          0         Too_rare plot(sol)"},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an Object for Null Model Algorithms — commsim","title":"Create an Object for Null Model Algorithms — commsim","text":"commsim function can used feed Null Model algorithms nullmodel analysis. make.commsim function returns various predefined algorithm types (see Details). functions represent low level interface community null model infrastructure vegan intent extensibility, less emphasis direct use users.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an Object for Null Model Algorithms — commsim","text":"","code":"commsim(method, fun, binary, isSeq, mode) make.commsim(method) # S3 method for commsim print(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an Object for Null Model Algorithms — commsim","text":"method Character, name algorithm. fun function. possible formal arguments function see Details. binary Logical, algorithm applies presence-absence count matrices. isSeq Logical, algorithm sequential (needs burnin thinning) . mode Character, storage mode community matrix, either \"integer\" \"double\". x object class commsim. ... Additional arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create an Object for Null Model Algorithms — commsim","text":"function fun must return array dim(nr, nc, n), must take following arguments: x: input matrix, n: number permuted matrices output, nr: number rows, nc: number columns, rs: vector row sums, cs: vector column sums, rf: vector row frequencies (non-zero cells), cf: vector column frequencies (non-zero cells), s: total sum x, fill: matrix fill (non-zero cells), thin: thinning value sequential algorithms, ...: additional arguments. can define null model,   several null model algorithm pre-defined can called   name. predefined algorithms described detail   following chapters. binary null models produce matrices zeros   (absences) ones (presences) also input matrix   quantitative. two types quantitative data: Counts   integers natural unit individuals can shuffled,   abundances can real (floating point) values   natural subunit shuffling. quantitative models can handle   counts, able handle real values. null   models sequential next matrix derived   current one. makes models dependent previous models, usually   must thin matrices study sequences stability:   see oecosimu details instructions. See Examples structural constraints imposed algorithm   defining null model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"binary-null-models","dir":"Reference","previous_headings":"","what":"Binary null models","title":"Create an Object for Null Model Algorithms — commsim","text":"binary null models preserve fill: number presences   conversely number absences. classic models may also   preserve column (species) frequencies (c0) row frequencies   species richness site (r0) take account   commonness rarity species (r1, r2).  Algorithms   swap, tswap, curveball, quasiswap   backtracking preserve row column frequencies. Three   first ones sequential two latter non-sequential   produce independent matrices. Basic algorithms reviewed   Wright et al. (1998). \"r00\": non-sequential algorithm binary matrices      preserves number presences (fill). \"r0\": non-sequential algorithm binary     matrices preserves site (row) frequencies. \"r1\": non-sequential algorithm binary matrices     preserves site (row) frequencies, uses column marginal     frequencies probabilities selecting species. \"r2\": non-sequential algorithm binary matrices     preserves site (row) frequencies, uses squared column     marginal frequencies probabilities selecting species. \"c0\": non-sequential algorithm binary matrices     preserves species frequencies (Jonsson 2001). \"swap\": sequential algorithm binary matrices     changes matrix structure, influence marginal sums     (Gotelli & Entsminger 2003).  inspects \\(2 \\times 2\\) submatrices long swap can done. \"tswap\": sequential algorithm binary matrices.     \"swap\" algorithm, tries fixed     number times performs zero many swaps one step     (according thin argument call).     approach suggested Miklós & Podani (2004)     found ordinary swap may lead biased     sequences, since columns rows easily swapped. \"curveball\": sequential method binary matrices     implements ‘Curveball’ algorithm Strona et     al. (2014). algorithm selects two random rows finds set     unique species occur one rows.     algorithm distributes set unique species rows preserving     original row frequencies.  Zero several species swapped     one step, usually matrix perturbed strongly     sequential methods. \"quasiswap\": non-sequential algorithm binary     matrices implements method matrix first filled     honouring row column totals, integers may     larger one.  method inspects random     \\(2 \\times 2\\) matrices performs quasiswap     . addition ordinary swaps, quasiswap can reduce numbers     one ones preserving marginal totals (Miklós &     Podani 2004). method non-sequential, accepts     thin argument: convergence checked every     thin steps. allows performing several ordinary swaps     addition fill changing swaps helps reducing removing     bias. \"greedyqswap\": greedy variant quasiswap.     greedy step, one element \\(2 \\times 2\\) matrix     taken \\(> 1\\) elements. greedy steps biased,     method can thinned, first thin     steps greedy. Even modest thinning (say thin = 20)     removes reduces bias, thin = 100 (1% greedy     steps) looks completely safe still speeds simulation.     code experimental provided scrutiny,     tested bias use. \"backtracking\": non-sequential algorithm binary     matrices implements filling method constraints     row column frequencies (Gotelli & Entsminger 2001).  matrix     first filled randomly, typically row column sums     reached incidences filled . begins     \"backtracking\", incidences removed,     filling started , backtracking done many     times incidences filled matrix.  results     may biased inspected carefully use.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-models-for-counts-with-fixed-marginal-sums","dir":"Reference","previous_headings":"","what":"Quantitative Models for Counts with Fixed Marginal Sums","title":"Create an Object for Null Model Algorithms — commsim","text":"models shuffle individuals counts keep marginal sums   fixed, marginal frequencies preserved. Algorithm   r2dtable uses standard R function r2dtable also   used simulated \\(P\\)-values chisq.test.   Algorithm quasiswap_count uses , preserves   original fill. Typically means increasing numbers zero cells   result zero-inflated respect r2dtable. \"r2dtable\": non-sequential algorithm count     matrices.  algorithm keeps matrix sum row/column sums     constant. Based r2dtable. \"quasiswap_count\": non-sequential algorithm count     matrices.  algorithm similar Carsten Dormann's     swap.web function package     bipartite. First, random matrix generated     r2dtable function preserving row column sums.      original matrix fill reconstructed sequential steps     increase decrease matrix fill random matrix. steps     based swapping \\(2 \\times 2\\) submatrices (see     \"swap_count\" algorithm details) maintain row     column totals.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-swap-models","dir":"Reference","previous_headings":"","what":"Quantitative Swap Models","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative swap models similar binary swap,   swap largest permissible value. models section   maintain fill perform quantitative swap can   done without changing fill. Single step swap often changes   matrix little. particular, cell counts variable,   high values change slowly. Checking chain stability   independence even crucial binary swap,   strong thinning often needed. models never   used without inspecting properties current data.   null models can also defined using permatswap   function.  \"swap_count\": sequential algorithm count matrices.     algorithm find \\(2 \\times 2\\) submatrices can     swapped leaving column row totals fill unchanged.     algorithm finds largest value submatrix can     swapped (\\(d\\)). Swap means values diagonal     antidiagonal positions decreased \\(d\\), remaining     cells increased \\(d\\). swap made fill     change. \"abuswap_r\": sequential algorithm count     nonnegative real valued matrices fixed row frequencies (see     also permatswap).  algorithm similar     swap_count, uses different swap value row     \\(2 \\times 2\\) submatrix. step changes     corresponding column sums, honours matrix fill, row sums,     row/column frequencies (Hardy 2008; randomization scheme 2x). \"abuswap_c\": sequential algorithm count     nonnegative real valued matrices fixed column frequencies     (see also permatswap).  algorithm similar     previous one, operates columns.  step changes     corresponding row sums, honours matrix fill, column sums,     row/column frequencies (Hardy 2008; randomization scheme 3x).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-swap-and-shuffle-models","dir":"Reference","previous_headings":"","what":"Quantitative Swap and Shuffle Models","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative Swap Shuffle methods (swsh methods) preserve   fill column row frequencies, also either row column   sums. methods first perform binary quasiswap   shuffle original quantitative data non-zero cells.   samp methods shuffle original non-zero cell values can   used also non-integer data. methods   redistribute individuals randomly among non-zero cells can   used integer data. shuffling either free   whole matrix, within rows (r methods) within columns   (c methods). Shuffling within row preserves row sums,   shuffling within column preserves column sums. models can   also defined permatswap. \"swsh_samp\": non-sequential algorithm     quantitative data (either integer counts non-integer values).     Original non-zero values values shuffled. \"swsh_both\": non-sequential algorithm count data.     Individuals shuffled freely non-zero cells. \"swsh_samp_r\": non-sequential algorithm     quantitative data.  Non-zero values (samples) shuffled     separately row. \"swsh_samp_c\": non-sequential algorithm     quantitative data.  Non-zero values (samples) shuffled     separately column. \"swsh_both_r\": non-sequential algorithm count matrices.     Individuals shuffled freely non-zero values within row. \"swsh_both_c\": non-sequential algorithm count matrices.     Individuals shuffled freely non-zero values column.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"quantitative-shuffle-methods","dir":"Reference","previous_headings":"","what":"Quantitative Shuffle Methods","title":"Create an Object for Null Model Algorithms — commsim","text":"Quantitative shuffle methods generalizations binary models   r00, r0 c0.  _ind methods   shuffle individuals grand sum, row sum column sums   preserved.  methods similar r2dtable   still slacker constraints marginal sums. _samp   _both methods first apply corresponding binary model   similar restriction marginal frequencies distribute   quantitative values non-zero cells. _samp models   shuffle original cell values can therefore handle also non-count   real values. _both models shuffle individuals among   non-zero values. shuffling whole matrix   r00_, within row r0_ within column   c0_ cases. \"r00_ind\": non-sequential algorithm count matrices.     algorithm preserves grand sum     individuals shuffled among cells matrix. \"r0_ind\": non-sequential algorithm count matrices.     algorithm preserves row sums     individuals shuffled among cells row matrix. \"c0_ind\": non-sequential algorithm count matrices.     algorithm preserves column sums     individuals shuffled among cells column matrix. \"r00_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves grand sum     cells matrix shuffled. \"r0_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves row sums     cells within row shuffled. \"c0_samp\": non-sequential algorithm count     nonnegative real valued (mode = \"double\") matrices.     algorithm preserves column sums constant     cells within column shuffled. \"r00_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells matrix shuffled. \"r0_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells row shuffled. \"c0_both\": non-sequential algorithm count matrices.     algorithm preserves grand sum     cells individuals among cells column shuffled.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an Object for Null Model Algorithms — commsim","text":"object class commsim elements corresponding arguments (method, binary, isSeq, mode, fun). input make.comsimm commsim object, returned without evaluation. case, character method argument matched predefined algorithm names. error message issued none found. method argument missing, function returns names currently available null model algorithms character vector.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create an Object for Null Model Algorithms — commsim","text":"Gotelli, N.J. & Entsminger, N.J. (2001). Swap fill algorithms   null model analysis: rethinking knight's tour. Oecologia   129, 281--291. Gotelli, N.J. & Entsminger, N.J. (2003). Swap algorithms null model   analysis. Ecology 84, 532--535. Hardy, O. J. (2008) Testing spatial phylogenetic structure   local communities: statistical performances different null models   test statistics locally neutral community.  Journal   Ecology 96, 914--926. Jonsson, B.G. (2001) null model randomization tests   nestedness species assemblages. Oecologia 127, 309--313. Miklós, . & Podani, J. (2004). Randomization   presence-absence matrices: comments new algorithms. Ecology   85, 86--92. Patefield, W. M. (1981) Algorithm AS159.  efficient method   generating r x c tables given row column totals.   Applied Statistics 30, 91--97. Strona, G., Nappo, D., Boccacci, F., Fattorini, S. &   San-Miguel-Ayanz, J. (2014). fast unbiased procedure   randomize ecological binary matrices fixed row column   totals. Nature Communications 5:4114   doi:10.1038/ncomms5114 . Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create an Object for Null Model Algorithms — commsim","text":"Jari Oksanen Peter Solymos","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/commsim.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create an Object for Null Model Algorithms — commsim","text":"","code":"## write the r00 algorithm f <- function(x, n, ...)     array(replicate(n, sample(x)), c(dim(x), n)) (cs <- commsim(\"r00\", fun=f, binary=TRUE,     isSeq=FALSE, mode=\"integer\")) #> An object of class “commsim”  #> ‘r00’ method (binary, non-sequential, integer mode) #>   ## retrieving the sequential swap algorithm (cs <- make.commsim(\"swap\")) #> An object of class “commsim”  #> ‘swap’ method (binary, sequential, integer mode) #>   ## feeding a commsim object as argument make.commsim(cs) #> An object of class “commsim”  #> ‘swap’ method (binary, sequential, integer mode) #>   ## making the missing c1 model using r1 as a template ##   non-sequential algorithm for binary matrices ##   that preserves the species (column) frequencies, ##   but uses row marginal frequencies ##   as probabilities of selecting sites f <- function (x, n, nr, nc, rs, cs, ...) {     out <- array(0L, c(nr, nc, n))     J <- seq_len(nc)     storage.mode(rs) <- \"double\"     for (k in seq_len(n))         for (j in J)             out[sample.int(nr, cs[j], prob = rs), j, k] <- 1L     out } cs <- make.commsim(\"r1\") cs$method <- \"c1\" cs$fun <- f  ## structural constraints diagfun <- function(x, y) {     c(sum = sum(y) == sum(x),         fill = sum(y > 0) == sum(x > 0),         rowSums = all(rowSums(y) == rowSums(x)),         colSums = all(colSums(y) == colSums(x)),         rowFreq = all(rowSums(y > 0) == rowSums(x > 0)),         colFreq = all(colSums(y > 0) == colSums(x > 0))) } evalfun <- function(meth, x, n) {     m <- nullmodel(x, meth)     y <- simulate(m, nsim=n)     out <- rowMeans(sapply(1:dim(y)[3],         function(i) diagfun(attr(y, \"data\"), y[,,i])))     z <- as.numeric(c(attr(y, \"binary\"), attr(y, \"isSeq\"),         attr(y, \"mode\") == \"double\"))     names(z) <- c(\"binary\", \"isSeq\", \"double\")     c(z, out) } x <- matrix(rbinom(10*12, 1, 0.5)*rpois(10*12, 3), 12, 10) algos <- make.commsim() a <- t(sapply(algos, evalfun, x=x, n=10)) print(as.table(ifelse(a==1,1,0)), zero.print = \".\") #>                 binary isSeq double sum fill rowSums colSums rowFreq colFreq #> r00                  1     .      .   1    1       .       .       .       . #> c0                   1     .      .   1    1       .       1       .       1 #> r0                   1     .      .   1    1       1       .       1       . #> r1                   1     .      .   1    1       1       .       1       . #> r2                   1     .      .   1    1       1       .       1       . #> quasiswap            1     .      .   1    1       1       1       1       1 #> greedyqswap          1     .      .   1    1       1       1       1       1 #> swap                 1     1      .   1    1       1       1       1       1 #> tswap                1     1      .   1    1       1       1       1       1 #> curveball            1     1      .   1    1       1       1       1       1 #> backtrack            1     .      .   1    1       1       1       1       1 #> r2dtable             .     .      .   1    .       1       1       .       . #> swap_count           .     1      .   1    1       1       1       .       . #> quasiswap_count      .     .      .   1    1       1       1       .       . #> swsh_samp            .     .      1   1    1       .       .       1       1 #> swsh_both            .     .      .   1    1       .       .       1       1 #> swsh_samp_r          .     .      1   1    1       1       .       1       1 #> swsh_samp_c          .     .      1   1    1       .       1       1       1 #> swsh_both_r          .     .      .   1    1       1       .       1       1 #> swsh_both_c          .     .      .   1    1       .       1       1       1 #> abuswap_r            .     1      1   1    1       1       .       1       1 #> abuswap_c            .     1      1   1    1       .       1       1       1 #> r00_samp             .     .      1   1    1       .       .       .       . #> c0_samp              .     .      1   1    1       .       1       .       1 #> r0_samp              .     .      1   1    1       1       .       1       . #> r00_ind              .     .      .   1    .       .       .       .       . #> c0_ind               .     .      .   1    .       .       1       .       . #> r0_ind               .     .      .   1    .       1       .       .       . #> r00_both             .     .      .   1    1       .       .       .       . #> c0_both              .     .      .   1    1       .       1       .       1 #> r0_both              .     .      .   1    1       1       .       1       ."},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":null,"dir":"Reference","previous_headings":"","what":"Contribution Diversity Approach — contribdiv","title":"Contribution Diversity Approach — contribdiv","text":"contribution diversity approach based differentiation within-unit among-unit diversity using additive diversity partitioning unit distinctiveness.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Contribution Diversity Approach — contribdiv","text":"","code":"contribdiv(comm, index = c(\"richness\", \"simpson\"),      relative = FALSE, scaled = TRUE, drop.zero = FALSE) # S3 method for contribdiv plot(x, sub, xlab, ylab, ylim, col, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Contribution Diversity Approach — contribdiv","text":"comm community data matrix samples rows species column. index Character, diversity index calculated. relative Logical, TRUE contribution diversity     values expressed signed deviation mean. See details. scaled Logical, TRUE relative contribution diversity     values scaled sum gamma values (index = \"richness\")     sum gamma values times number rows comm     (index = \"simpson\"). See details. drop.zero Logical, empty rows dropped result?     empty rows dropped, corresponding results NAs. x object class \"contribdiv\". sub, xlab, ylab, ylim, col Graphical arguments passed plot. ... arguments passed plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Contribution Diversity Approach — contribdiv","text":"approach proposed Lu et al. (2007). Additive diversity partitioning (see adipart references) deals relation mean alpha total (gamma) diversity. Although alpha diversity values often vary considerably. Thus, contributions sites total diversity uneven. site specific contribution measured contribution diversity components. unit e.g. many unique species contribute higher level (gamma) diversity another unit number species, common. Distinctiveness species \\(j\\) can defined number sites occurs (\\(n_j\\)), sum relative frequencies (\\(p_j\\)). Relative frequencies computed sitewise \\(sum_j{p_ij}\\)s site \\(\\) sum \\(1\\). contribution site \\(\\) total diversity given \\(alpha_i = sum_j(1 / n_ij)\\) dealing richness \\(alpha_i = sum(p_{ij} * (1 - p_{ij}))\\) Simpson index. unit distinctiveness site \\(\\) average species distinctiveness, averaging species occur site \\(\\). species richness: \\(alpha_i = mean(n_i)\\) (paper, second equation contains typo, \\(n\\) without index). Simpson index: \\(alpha_i = mean(n_i)\\). Lu et al. (2007) gives -depth description different indices.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Contribution Diversity Approach — contribdiv","text":"object class \"contribdiv\" inheriting data frame. Returned values alpha, beta gamma components sites (rows) community matrix. \"diff.coef\" attribute gives differentiation coefficient (see Examples).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Contribution Diversity Approach — contribdiv","text":"Lu, H. P., Wagner, H. H. Chen, X. Y. 2007. contribution diversity approach evaluate species diversity. Basic Applied Ecology, 8, 1--12.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Contribution Diversity Approach — contribdiv","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/contribdiv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Contribution Diversity Approach — contribdiv","text":"","code":"## Artificial example given in ## Table 2 in Lu et al. 2007 x <- matrix(c( 1/3,1/3,1/3,0,0,0, 0,0,1/3,1/3,1/3,0, 0,0,0,1/3,1/3,1/3), 3, 6, byrow = TRUE, dimnames = list(LETTERS[1:3],letters[1:6])) x #>           a         b         c         d         e         f #> A 0.3333333 0.3333333 0.3333333 0.0000000 0.0000000 0.0000000 #> B 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 0.0000000 #> C 0.0000000 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 ## Compare results with Table 2 contribdiv(x, \"richness\") #>   alpha beta gamma #> A     1  1.5   2.5 #> B     1  0.5   1.5 #> C     1  1.0   2.0 contribdiv(x, \"simpson\") #>       alpha      beta     gamma #> A 0.6666667 0.1851852 0.8518519 #> B 0.6666667 0.1111111 0.7777778 #> C 0.6666667 0.1481481 0.8148148 ## Relative contribution (C values), compare with Table 2 (cd1 <- contribdiv(x, \"richness\", relative = TRUE, scaled = FALSE)) #>   alpha beta gamma #> A     0  0.5   0.5 #> B     0 -0.5  -0.5 #> C     0  0.0   0.0 (cd2 <- contribdiv(x, \"simpson\", relative = TRUE, scaled = FALSE)) #>   alpha        beta       gamma #> A     0  0.03703704  0.03703704 #> B     0 -0.03703704 -0.03703704 #> C     0  0.00000000  0.00000000 ## Differentiation coefficients attr(cd1, \"diff.coef\") # D_ST #> [1] 0.5 attr(cd2, \"diff.coef\") # D_DT #> [1] 0.1818182 ## BCI data set data(BCI) opar <- par(mfrow=c(2,2)) plot(contribdiv(BCI, \"richness\"), main = \"Absolute\") plot(contribdiv(BCI, \"richness\", relative = TRUE), main = \"Relative\") plot(contribdiv(BCI, \"simpson\")) plot(contribdiv(BCI, \"simpson\", relative = TRUE))  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":null,"dir":"Reference","previous_headings":"","what":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Performs detrended correspondence analysis basic reciprocal   averaging orthogonal correspondence analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"","code":"decorana(veg, iweigh=0, iresc=4, ira=0, mk=26, short=0,          before=NULL, after=NULL)  # S3 method for decorana plot(x, choices=c(1,2), origin=TRUE,      display=c(\"both\",\"sites\",\"species\",\"none\"),      cex = 0.8, cols = c(1,2), type, xlim, ylim, ...)  # S3 method for decorana text(x, display = c(\"sites\", \"species\"), labels,      choices = 1:2, origin = TRUE, select,  ...)  # S3 method for decorana points(x, display = c(\"sites\", \"species\"),        choices=1:2, origin = TRUE, select, ...)  # S3 method for decorana summary(object, digits=3, origin=TRUE,         display=c(\"both\", \"species\",\"sites\",\"none\"), ...)  # S3 method for summary.decorana print(x, head = NA, tail = head, ...)  downweight(veg, fraction = 5)  # S3 method for decorana scores(x, display=\"sites\", choices=1:4,        origin=TRUE, tidy=FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"veg Community data, matrix-like object. iweigh Downweighting rare species (0: ). iresc Number rescaling cycles (0: rescaling). ira Type analysis (0: detrended, 1: basic reciprocal averaging). mk Number segments rescaling. short Shortest gradient rescaled. Hill's piecewise transformation: values transformation. Hill's piecewise transformation: values   transformation -- must correspond values . x, object decorana result object. choices Axes shown. origin Use true origin even detrended correspondence analysis. display Display sites, species, neither. cex Plot character size. cols Colours used sites species. type Type plots, partial match \"text\",     \"points\" \"none\". labels Optional text used instead row names. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. xlim, ylim x y limits (min,max) plot. digits Number digits summary output. head, tail Number rows printed head tail     species site scores. Default NA prints . fraction Abundance fraction downweighting begins. tidy Return scores compatible ggplot2:     scores single data.frame, score type     identified factor variable score (\"sites\",     \"species\"), names variable label. scores     incompatible conventional plot functions, can     used ggplot2. ... arguments plot function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"late 1970s, correspondence analysis became method choice   ordination vegetation science, since seemed better able cope    non-linear species responses principal components   analysis. However, even correspondence analysis can produce arc-shaped   configuration single gradient. Mark Hill developed detrended   correspondence analysis correct two assumed ‘faults’    correspondence analysis: curvature straight gradients packing   sites ends gradient. curvature removed replacing orthogonalization axes   detrending.  orthogonalization successive axes made   non-correlated, detrending remove systematic dependence   axes.  Detrending performed using smoothing window   mk segments.  packing sites ends gradient   undone rescaling axes extraction.  rescaling,   axis supposed scaled ‘SD’ units,   average width Gaussian species responses supposed one   whole axis. innovations piecewise linear transformation   species abundances downweighting rare species   regarded unduly high influence ordination axes. seems detrending actually works twisting ordination   space, results look non-curved two-dimensional   projections (‘lolly paper effect’).  result, points   usually easily recognized triangular diamond shaped   pattern, obviously artefact detrending.  Rescaling works   differently commonly presented, . decorana   use, even evaluate, widths species responses.  Instead,   tries equalize weighted standard deviation species scores   axis segments (parameter mk effect, since   decorana finds segments internally). Function   tolerance returns internal criterion can   used assess success rescaling. summary method prints ordination scores,   possible prior weights used downweighting, marginal totals   applying weights. plot method plots   species site scores.  Classical decorana scaled axes   smallest site score 0 (smallest species score   negative), summary, plot   scores use true origin, unless origin = FALSE. addition proper eigenvalues, function reports   ‘decorana values’ detrended analysis. ‘decorana   values’ values legacy code decorana returns   eigenvalues. estimated iteration, describe   joint effects axes detrending. ‘decorana values’   estimated rescaling show effect   eigenvalues. proper eigenvalues estimated extraction   axes ratio weighted sum squares site   species scores even detrended rescaled solutions.   eigenvalues estimated axis separately,   additive, higher decorana axes can show effects already   explained prior axes. ‘Additive eigenvalues’ cleansed   effects prior axes, can assumed add   total inertia (scaled Chi-square). proportions cumulative   proportions explained can use eigenvals.decorana.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"decorana returns object class \"decorana\",   print, summary, scores, plot,  points text methods, support functions  eigenvals, bstick, screeplot,  predict tolerance. downweight   independent function can also used methods  decorana.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Hill, M.O. Gauch, H.G. (1980). Detrended correspondence analysis:   improved ordination technique. Vegetatio 42,   47--58. Oksanen, J. Minchin, P.R. (1997). Instability ordination   results changes input data order: explanations   remedies. Journal Vegetation Science 8, 447--454.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"Mark O. Hill wrote original Fortran code, R port   Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"decorana uses central numerical engine   original Fortran code (public domain), 1/3   original program.  tried implement original   behaviour, although great part preparatory steps written   R language, may differ somewhat original code. However,   well-known bugs corrected strict criteria used (Oksanen &   Minchin 1997). Please note really need piecewise transformation   even downweighting within decorana, since   powerful extensive alternatives R, options   included compliance original software.  different   fraction abundance needed downweighting, function   downweight must applied decorana.  Function   downweight indeed can applied prior correspondence   analysis, can used together cca, . Github package natto R implementation   decorana allows easier inspection   algorithm also easier development function.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/decorana.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Detrended Correspondence Analysis and Basic Reciprocal Averaging — decorana","text":"","code":"data(varespec) vare.dca <- decorana(varespec) vare.dca #>  #> Call: #> decorana(veg = varespec)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.0832  #>  #>                        DCA1   DCA2    DCA3    DCA4 #> Eigenvalues          0.5235 0.3253 0.20010 0.19176 #> Additive Eigenvalues 0.5235 0.3217 0.17919 0.11922 #> Decorana values      0.5249 0.1572 0.09669 0.06075 #> Axis lengths         2.8161 2.2054 1.54650 1.64864 #>  summary(vare.dca) #>  #> Call: #> decorana(veg = varespec)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.0832  #>  #>                        DCA1   DCA2    DCA3    DCA4 #> Eigenvalues          0.5235 0.3253 0.20010 0.19176 #> Additive Eigenvalues 0.5235 0.3217 0.17919 0.11922 #> Decorana values      0.5249 0.1572 0.09669 0.06075 #> Axis lengths         2.8161 2.2054 1.54650 1.64864 #>  #> Species scores: #>  #>              DCA1     DCA2     DCA3     DCA4 Totals #> Callvulg  0.04119 -1.53268 -2.55101  1.32277  45.07 #> Empenigr  0.09019  0.82274  0.20569  0.30631 151.99 #> Rhodtome  1.34533  2.47141 -0.34970 -1.13823   8.39 #> Vaccmyrt  1.86298  1.71424 -0.60535 -0.40205  50.71 #> Vaccviti  0.16641  0.71095  0.00313 -0.55801 275.03 #> Pinusylv -0.73490  1.62050 -1.60275 -2.10199   4.11 #> Descflex  1.97061  1.81651  1.74896 -0.91463   5.60 #> Betupube  0.79745  3.36374 -0.94546 -1.01741   0.29 #> Vacculig -0.08912 -1.17478  2.86624  0.87025  15.22 #> Diphcomp -0.82669 -0.44195  2.58579 -0.38459   3.24 #> Dicrsp    2.37743 -0.27373 -0.47099 -1.89036  40.50 #> Dicrfusc  1.58267 -1.33770 -1.33563  1.47417 113.52 #> Dicrpoly  0.86689  2.39519 -0.82064 -3.41534   6.06 #> Hylosple  2.66242  1.19669  1.48288 -0.69978  18.04 #> Pleuschr  1.64098  0.15607  0.30044 -0.26717 377.97 #> Polypili -0.56213  0.14009  0.25198  0.49177   0.61 #> Polyjuni  1.22244 -0.89173  0.61287  3.60066  13.85 #> Polycomm  1.01545  2.08388  0.06402  0.84199   0.71 #> Pohlnuta -0.00712  1.09704 -0.82126 -1.59862   2.62 #> Ptilcili  0.48093  2.86420 -0.71801 -1.02698  14.01 #> Barbhatc  0.58303  3.71792 -0.84212 -1.88837   3.19 #> Cladarbu -0.18554 -1.18973  0.68113  0.55399 255.05 #> Cladrang -0.83427 -0.78085  0.90603  0.70057 388.71 #> Cladstel -1.67768  0.98907 -0.83789 -0.60206 486.71 #> Cladunci  0.97686 -1.70859 -1.68281 -2.26756  56.28 #> Cladcocc -0.27221 -0.76713 -0.63836  0.66927   2.79 #> Cladcorn  0.29068 -0.97039  0.50414  0.95738   6.22 #> Cladgrac  0.21778 -0.41879  0.06530 -0.31472   5.14 #> Cladfimb  0.00889 -0.23922 -0.26505  0.33123   3.96 #> Cladcris  0.37774 -1.09161 -0.55627  0.23868   7.47 #> Cladchlo -0.91983  1.54955 -0.58109 -1.48643   1.16 #> Cladbotr  0.66438  2.19584 -0.90331 -0.91391   0.47 #> Cladamau -0.96418 -0.98992  2.71458  0.52352   0.14 #> Cladsp   -1.12318 -0.15330 -0.69833  0.44040   0.52 #> Cetreric  0.27163 -1.28867 -0.81682 -1.93935   3.60 #> Cetrisla -0.50158  2.22098 -1.16461 -1.89349   2.03 #> Flavniva -1.67937 -3.67985  4.15644  3.18919  11.85 #> Nepharct  2.18561 -0.82837  0.71958  5.81930   5.26 #> Stersp   -0.78699 -2.01214  2.31212  2.03946  17.52 #> Peltapht  0.45763 -0.34395  0.09916  1.34695   0.76 #> Icmaeric  0.04950 -1.97605  1.41509  2.10154   0.22 #> Cladcerv -1.21585 -2.30519  2.55186  3.41532   0.10 #> Claddefo  0.60517 -1.19771 -0.33388  0.22585  10.23 #> Cladphyl -1.53959  1.48574 -1.43209 -1.52387   0.80 #>  #> Site scores: #>  #>       DCA1    DCA2    DCA3    DCA4 Totals #> 18 -0.1729 -0.2841  0.4775  0.2521   89.2 #> 15  0.8539 -0.3360  0.0708  0.0924   89.8 #> 24  1.2467 -0.1183 -0.1211 -0.8718   94.2 #> 27  1.0675  0.4169  0.2897 -0.1758  125.6 #> 23  0.4234  0.0112  0.2179  0.1265   90.5 #> 19  0.0252  0.3600 -0.0263 -0.1168   81.3 #> 22  1.0695 -0.3707 -0.4285  0.4145  109.8 #> 16  0.7724 -0.5325 -0.2856  0.5269   88.5 #> 28  1.6189  0.5482  0.2342 -0.3333  110.7 #> 13 -0.2642 -0.6851 -0.3777  0.5003  101.9 #> 14  0.6431 -0.9604 -0.6000 -0.2885   81.7 #> 20  0.4504 -0.1666  0.1850 -0.1291   64.1 #> 25  1.2501 -0.2248  0.0244  0.3741   94.1 #> 7  -0.3910 -0.7618  0.8640  0.5557  103.4 #> 5  -0.6407 -0.9427  0.9465  0.7769   94.8 #> 6  -0.4523 -0.5529  0.3988  0.2781  110.9 #> 3  -1.1043  0.2106 -0.0653 -0.0539  106.7 #> 4  -0.9454 -0.5974  0.4639  0.4889   84.8 #> 2  -1.1971  0.5691 -0.3246 -0.2522  119.1 #> 9  -1.0983  0.7850 -0.5274 -0.4848  122.6 #> 12 -0.8673  0.5621 -0.3254 -0.3217  119.8 #> 10 -1.1842  0.7442 -0.4995 -0.3917  122.4 #> 11 -0.4134  0.0260  0.0107 -0.0682  112.8 #> 21  0.3210  1.2450 -0.2541 -0.5253   99.2 #>  plot(vare.dca)   ### the detrending rationale: gaussresp <- function(x,u) exp(-(x-u)^2/2) x <- seq(0,6,length=15) ## The gradient u <- seq(-2,8,len=23)   ## The optima pack <- outer(x,u,gaussresp) matplot(x, pack, type=\"l\", main=\"Species packing\")  opar <- par(mfrow=c(2,2)) plot(scores(prcomp(pack)), asp=1, type=\"b\", main=\"PCA\") plot(scores(decorana(pack, ira=1)), asp=1, type=\"b\", main=\"CA\") plot(scores(decorana(pack)), asp=1, type=\"b\", main=\"DCA\") plot(scores(cca(pack ~ x), dis=\"sites\"), asp=1, type=\"b\", main=\"CCA\")   ### Let's add some noise: noisy <- (0.5 + runif(length(pack)))*pack par(mfrow=c(2,1)) matplot(x, pack, type=\"l\", main=\"Ideal model\") matplot(x, noisy, type=\"l\", main=\"Noisy model\")  par(mfrow=c(2,2)) plot(scores(prcomp(noisy)), type=\"b\", main=\"PCA\", asp=1) plot(scores(decorana(noisy, ira=1)), type=\"b\", main=\"CA\", asp=1) plot(scores(decorana(noisy)), type=\"b\", main=\"DCA\", asp=1) plot(scores(cca(noisy ~ x), dis=\"sites\"), asp=1, type=\"b\", main=\"CCA\")  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":null,"dir":"Reference","previous_headings":"","what":"Standardization Methods for Community Ecology — decostand","title":"Standardization Methods for Community Ecology — decostand","text":"function provides popular (effective) standardization methods community ecologists.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Standardization Methods for Community Ecology — decostand","text":"","code":"decostand(x, method, MARGIN, range.global, logbase = 2, na.rm=FALSE, ...) wisconsin(x) decobackstand(x, zap = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Standardization Methods for Community Ecology — decostand","text":"x Community data, matrix-like object.     decobackstand standardized data. method Standardization method. See Details available options. MARGIN Margin, default acceptable. 1 = rows,     2 = columns x. range.global Matrix range found     method = \"range\".  allows using ranges across     subsets data.  dimensions MARGIN must match     x. logbase logarithm base used method = \"log\". na.rm Ignore missing values row column standardizations. zap Make near-zero values exact zeros avoid negative     values exaggerated estimates species richness. ... arguments function (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Standardization Methods for Community Ecology — decostand","text":"function offers following standardization methods community   data: total: divide margin total (default MARGIN = 1). max: divide margin maximum (default MARGIN = 2). frequency: divide margin total multiply     number non-zero items, average non-zero entries     one (Oksanen 1983; default MARGIN = 2). normalize: make margin sum squares equal one (default     MARGIN = 1). range: standardize values range 0 ... 1 (default     MARGIN = 2).  values constant,     transformed 0. rank, rrank: rank replaces abundance values     increasing ranks leaving zeros unchanged, rrank     similar uses relative ranks maximum 1 (default     MARGIN = 1). Average ranks used tied values. standardize: scale x zero mean unit variance     (default MARGIN = 2). pa: scale x presence/absence scale (0/1). chi.square: divide row sums square root     column sums, adjust square root matrix total     (Legendre & Gallagher 2001). used Euclidean     distance, distances similar     Chi-square distance used correspondence analysis. However,     results cmdscale still differ, since     CA weighted ordination method (default MARGIN = 1). hellinger: square root method = \"total\"     (Legendre & Gallagher 2001). log: logarithmic transformation suggested      Anderson et al. (2006): \\(\\log_b (x) + 1\\)      \\(x > 0\\), \\(b\\) base logarithm; zeros      left zeros. Higher bases give less weight quantities      presences, logbase = Inf gives presence/absence      scaling. Please note \\(\\log(x+1)\\).      Anderson et al. (2006) suggested (strongly) modified      Gower distance (implemented method = \"altGower\"       vegdist), standardization can used       independently distance indices. alr: Additive log ratio (\"alr\") transformation      (Aitchison 1986) reduces data skewness compositionality      bias. transformation assumes positive values, pseudocounts can      added argument pseudocount. One      rows/columns reference can given reference      (name index). first row/column used default      (reference = 1).  Note transformation drops one      row column transformed output data. alr      transformation defined formally follows:      $$alr = [log\\frac{x_1}{x_D}, ..., log\\frac{x_{D-1}}{x_D}]$$      denominator sample \\(x_D\\) can chosen      arbitrarily. transformation often used pH      chemistry measurenments. also commonly used multinomial      logistic regression. Default MARGIN = 1 uses row      reference. clr: centered log ratio (\"clr\") transformation proposed      Aitchison (1986) used reduce data skewness compositionality bias.      transformation frequent applications microbial ecology      (see e.g. Gloor et al., 2017). clr transformation defined :      $$clr = log\\frac{x}{g(x)} = log x - log g(x)$$           \\(x\\) single value, g(x) geometric mean      \\(x\\).      method can operate positive data;      common way deal zeroes add pseudocount      (e.g. smallest positive value data), either      adding manually input data, using argument      pseudocount      decostand(x, method = \"clr\", pseudocount = 1). Adding      pseudocount inevitably introduce bias; see      rclr method one available solution. rclr: robust clr (\"rclr\") similar regular clr      (see ) allows data contains zeroes. method      use pseudocounts, unlike standard clr.      robust clr (rclr) divides values geometric mean      observed features; zero values kept zeroes,      taken account. high dimensional data,      geometric mean rclr approximates true      geometric mean; see e.g. Martino et al. (2019)      rclr transformation defined formally follows:      $$rclr = log\\frac{x}{g(x > 0)}$$      \\(x\\) single value, \\(g(x > 0)\\) geometric       mean sample-wide values \\(x\\) positive (> 0). Standardization, contrasted transformation, means   entries transformed relative entries. methods default margin. MARGIN=1 means rows (sites   normal data set) MARGIN=2 means columns (species   normal data set). Command wisconsin shortcut common Wisconsin double   standardization species (MARGIN=2) first standardized   maxima (max) sites (MARGIN=1)   site totals (tot). standardization methods give nonsense results   negative data entries normally occur community   data. empty sites species (constant   method =  \"range\"), many standardization change   NaN. Function decobackstand can used transform standardized   data back original. possible standardization   may implemented cases   possible. round-errors back-transformation   exact, wise overwrite original data.   zap=TRUE original zeros exact.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Standardization Methods for Community Ecology — decostand","text":"Returns standardized data frame, adds attribute  \"decostand\" giving name applied standardization  \"method\" attribute \"parameters\" appropriate   transformation parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Standardization Methods for Community Ecology — decostand","text":"Jari Oksanen, Etienne Laliberté   (method = \"log\"), Leo Lahti (alr,    \"clr\" \"rclr\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Standardization Methods for Community Ecology — decostand","text":"Common transformations can made standard R functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Standardization Methods for Community Ecology — decostand","text":"Aitchison, J. Statistical Analysis Compositional Data (1986).   London, UK: Chapman & Hall. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters    9, 683--693. Egozcue, J.J., Pawlowsky-Glahn, V., Mateu-Figueras, G.,   Barcel'o-Vidal, C. (2003) Isometric logratio transformations   compositional data analysis. Mathematical Geology   35, 279--300. Gloor, G.B., Macklaim, J.M., Pawlowsky-Glahn, V. & Egozcue, J.J. (2017)   Microbiome Datasets Compositional: Optional.   Frontiers Microbiology 8, 2224. Legendre, P. & Gallagher, E.D. (2001) Ecologically meaningful   transformations ordination species data. Oecologia   129, 271--280. Martino, C., Morton, J.T., Marotz, C.., Thompson, L.R., Tripathi, .,   Knight, R. & Zengler, K. (2019) novel sparse compositional technique   reveals microbial perturbations.   mSystems 4, 1. Oksanen, J. (1983) Ordination boreal heath-like vegetation   principal component analysis, correspondence analysis   multidimensional scaling. Vegetatio 52, 181--189.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/decostand.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Standardization Methods for Community Ecology — decostand","text":"","code":"data(varespec) sptrans <- decostand(varespec, \"max\") apply(sptrans, 2, max) #> Callvulg Empenigr Rhodtome Vaccmyrt Vaccviti Pinusylv Descflex Betupube  #>        1        1        1        1        1        1        1        1  #> Vacculig Diphcomp   Dicrsp Dicrfusc Dicrpoly Hylosple Pleuschr Polypili  #>        1        1        1        1        1        1        1        1  #> Polyjuni Polycomm Pohlnuta Ptilcili Barbhatc Cladarbu Cladrang Cladstel  #>        1        1        1        1        1        1        1        1  #> Cladunci Cladcocc Cladcorn Cladgrac Cladfimb Cladcris Cladchlo Cladbotr  #>        1        1        1        1        1        1        1        1  #> Cladamau   Cladsp Cetreric Cetrisla Flavniva Nepharct   Stersp Peltapht  #>        1        1        1        1        1        1        1        1  #> Icmaeric Cladcerv Claddefo Cladphyl  #>        1        1        1        1  sptrans <- wisconsin(varespec)  # CLR transformation for rows, with pseudocount varespec.clr <- decostand(varespec, \"clr\", pseudocount=1)  # ALR transformation for rows, with pseudocount and reference sample varespec.alr <- decostand(varespec, \"alr\", pseudocount=1, reference=1)  ## Chi-square: PCA similar but not identical to CA. ## Use wcmdscale for weighted analysis and identical results. sptrans <- decostand(varespec, \"chi.square\") plot(procrustes(rda(sptrans), cca(varespec)))"},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Design your own Dissimilarities — designdist","title":"Design your own Dissimilarities — designdist","text":"Function designdist lets define dissimilarities   using terms shared total quantities, number rows number   columns. shared total quantities can binary, quadratic   minimum terms. binary terms, shared component number   shared species, totals numbers species sites.   quadratic terms cross-products sums squares, minimum   terms sums parallel minima row totals. Function   chaodist lets define dissimilarities using terms   supposed take account “unseen species”   (see Chao et al., 2005 Details vegdist).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Design your own Dissimilarities — designdist","text":"","code":"designdist(x, method = \"(A+B-2*J)/(A+B)\",            terms = c(\"binary\", \"quadratic\", \"minimum\"),             abcd = FALSE, alphagamma = FALSE, name, maxdist) chaodist(x, method = \"1 - 2*U*V/(U+V)\", name)"},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Design your own Dissimilarities — designdist","text":"x Input data. method Equation dissimilarities. can use terms     J shared quantity, B totals,     N number rows (sites) P     number columns (species) chaodist can use terms     U V. equation can also contain R     functions accepts vector arguments returns vectors     length. terms shared total components found. vectors     x y  \"quadratic\" terms J = sum(x*y),     = sum(x^2), B = sum(y^2), \"minimum\" terms     J = sum(pmin(x,y)), = sum(x) B = sum(y),      \"binary\" terms either transforming     data binary form (shared number species, number     species row). abcd Use 2x2 contingency table notation binary data:     \\(\\) number shared species, \\(b\\) \\(c\\)     numbers species occurring one sites ,     \\(d\\) number species occur neither sites. alphagamma Use beta diversity notation terms     alpha average alpha diversity compared sites,     gamma diversity pooled sites, delta     absolute value difference average alpha alpha     diversities compared sites. Terms     B refer alpha diversities compared sites. name name want use index. default     combine method equation terms argument. maxdist Theoretical maximum dissimilarity, NA     index open absolute maximum. necessary     argument, used vegan functions,     certain maximum, better supply value.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Design your own Dissimilarities — designdist","text":"popular dissimilarity measures ecology can expressed   help terms J, B, also involve   matrix dimensions N P. examples can define   designdist : function designdist can implement dissimilarity   indices vegdist elsewhere, can also   used implement many indices, amongst ,   described Legendre & Legendre (2012). can also used   implement indices beta diversity described Koleff et   al. (2003), also specific function   betadiver purpose. want implement binary dissimilarities based 2x2   contingency table notation, can set abcd = TRUE.   notation = J, b = -J, c = B-J, d = P--B+J.    notation often used instead   tangible default notation reasons opaque . alphagamma = TRUE possible use beta diversity   notation terms alpha average alpha diversity   gamma gamma diversity two compared sites. terms   calculated alpha = (+B)/2, gamma = +B-J   delta = abs(-B)/2.  Terms B also   available give alpha diversities individual compared   sites.  beta diversity terms may make sense binary   terms (diversities expressed numbers species),   calculated quadratic minimum terms well (  warning). Function chaodist similar designgist, uses   terms U V Chao et al. (2005). terms   supposed take account effects unseen species.   U V scaled range \\(0 \\dots 1\\). take   place B product U*V used   place J designdist.  Function   chaodist can implement commonly used Chao et al. (2005)   style dissimilarity: Function vegdist implements Jaccard-type Chao distance,   documentation contains complete discussion   calculation terms.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Design your own Dissimilarities — designdist","text":"designdist returns object class dist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Design your own Dissimilarities — designdist","text":"Chao, ., Chazdon, R. L., Colwell, R. K. Shen, T. (2005) new   statistical approach assessing similarity species composition   incidence abundance data. Ecology Letters 8,   148--159. Koleff, P., Gaston, K.J. Lennon, J.J. (2003) Measuring beta   diversity presence--absence data. J. Animal Ecol.   72, 367--382. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd   English ed. Elsevier","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Design your own Dissimilarities — designdist","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Design your own Dissimilarities — designdist","text":"designdist use compiled code, based   vectorized R code. designdist function can much   faster vegdist, although latter uses compiled   code. However, designdist skip missing values uses   much memory calculations. use sum terms can numerically unstable. particularly,   terms large, precision may lost. risk   large number columns high, particularly large   quadratic terms. precise calculations better use   functions like dist vegdist   robust numerical problems.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/designdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Design your own Dissimilarities — designdist","text":"","code":"data(BCI) ## Four ways of calculating the same Sørensen dissimilarity d0 <- vegdist(BCI, \"bray\", binary = TRUE) d1 <- designdist(BCI, \"(A+B-2*J)/(A+B)\") d2 <- designdist(BCI, \"(b+c)/(2*a+b+c)\", abcd = TRUE) d3 <- designdist(BCI, \"gamma/alpha - 1\", alphagamma = TRUE) ## Arrhenius dissimilarity: the value of z in the species-area model ## S = c*A^z when combining two sites of equal areas, where S is the ## number of species, A is the area, and c and z are model parameters. ## The A below is not the area (which cancels out), but number of ## species in one of the sites, as defined in designdist(). dis <- designdist(BCI, \"(log(A+B-J)-log(A+B)+log(2))/log(2)\") ## This can be used in clustering or ordination... ordiplot(cmdscale(dis)) #> species scores not available  ## ... or in analysing beta diversity (without gradients) summary(dis) #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2733  0.3895  0.4192  0.4213  0.4537  0.5906"},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions extract statistics resemble deviance AIC   result constrained correspondence analysis cca   redundancy analysis rda.  functions rarely   needed directly, called step   automatic model building.  Actually, cca   rda AIC functions   certainly wrong.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"","code":"# S3 method for cca deviance(object, ...)  # S3 method for cca extractAIC(fit, scale = 0, k = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"object result constrained ordination     (cca rda). fit fitted model constrained ordination. scale optional numeric specifying scale parameter model,     see scale step. k numeric specifying \"weight\" equivalent degrees     freedom (=:edf) part AIC formula. ... arguments.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions find statistics   resemble deviance AIC constrained   ordination.  Actually, constrained ordination methods   log-Likelihood, means AIC deviance.   Therefore use functions, use ,   trust .  use functions, remains   responsibility check adequacy result. deviance cca equal Chi-square   residual data matrix fitting constraints.  deviance    rda defined residual sum squares.   deviance function rda also used   capscale. Function extractAIC mimics   extractAIC.lm translating deviance AIC. little need call functions directly.  However,   called implicitly step function used automatic   selection constraining variables.  check resulting   model criteria, statistics used   unfounded. particular, penalty k properly   defined, default k = 2 justified   theoretically. continuous covariates, step   function base model building magnitude eigenvalues,   value k influences stopping point (  variables highest eigenvalues necessarily   significant permutation tests anova.cca).   also multi-class factors, value k   capricious effect model building. step function   pass arguments add1.cca   drop1.cca, setting test = \"permutation\"   provide permutation tests deletion addition   can help judging validity model building.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"deviance functions return “deviance”,  extractAIC returns effective degrees freedom “AIC”.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"Godínez-Domínguez, E. & Freire, J. (2003)   Information-theoretic approach selection spatial temporal   models community organization. Marine Ecology Progress     Series 253, 17--24.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"Jari  Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"functions unfounded untested used   directly implicitly.  Moreover, usual caveats using    step valid.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/deviance.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statistics Resembling Deviance and AIC for Constrained Ordination — deviance.cca","text":"","code":"# The deviance of correspondence analysis equals Chi-square data(dune) data(dune.env) chisq.test(dune) #> Warning: Chi-squared approximation may be incorrect #>  #> \tPearson's Chi-squared test #>  #> data:  dune #> X-squared = 1449, df = 551, p-value < 2.2e-16 #>  deviance(cca(dune)) #> [1] 1448.956 # Stepwise selection (forward from an empty model \"dune ~ 1\") ord <- cca(dune ~ ., dune.env) step(cca(dune ~ 1, dune.env), scope = formula(ord)) #> Start:  AIC=87.66 #> dune ~ 1 #>  #>              Df    AIC #> + Moisture    3 86.608 #> + Management  3 86.935 #> + A1          1 87.411 #>           87.657 #> + Manure      4 88.832 #> + Use         2 89.134 #>  #> Step:  AIC=86.61 #> dune ~ Moisture #>  #>              Df    AIC #>           86.608 #> + Management  3 86.813 #> + A1          1 86.992 #> + Use         2 87.259 #> + Manure      4 87.342 #> - Moisture    3 87.657 #> Call: cca(formula = dune ~ Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    0.6283     0.2970    3 #> Unconstrained  1.4870     0.7030   16 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3  #> 0.4187 0.1330 0.0766  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11  #> 0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419  #>   CA12   CA13   CA14   CA15   CA16  #> 0.0201 0.0143 0.0099 0.0085 0.0080  #>"},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":null,"dir":"Reference","previous_headings":"","what":"Morisita index of intraspecific aggregation — dispindmorisita","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Calculates Morisita index dispersion, standardized index values, called clumpedness uniform indices.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"","code":"dispindmorisita(x, unique.rm = FALSE, crit = 0.05, na.rm = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"x community data matrix, sites (samples) rows     species columns. unique.rm logical, TRUE, unique species (occurring     one sample) removed result. crit two-sided p-value used calculate critical     Chi-squared values. na.rm logical.     missing values (including NaN) omitted     calculations?","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Morisita index dispersion defined (Morisita 1959, 1962): Imor = n * (sum(xi^2) - sum(xi)) / (sum(xi)^2 - sum(xi)) \\(xi\\) count individuals sample \\(\\), \\(n\\) number samples (\\(= 1, 2, \\ldots, n\\)). \\(Imor\\) values 0 \\(n\\). uniform (hyperdispersed) patterns value falls 0 1, clumped patterns falls 1 \\(n\\). increasing sample sizes (.e. joining neighbouring quadrats), \\(Imor\\) goes \\(n\\) quadrat size approaches clump size. random patterns, \\(Imor = 1\\) counts samples follow Poisson frequency distribution. deviation random expectation (null hypothesis) can tested using critical values Chi-squared distribution \\(n-1\\) degrees freedom. Confidence intervals around 1 can calculated clumped \\(Mclu\\) uniform \\(Muni\\) indices (Hairston et al. 1971, Krebs 1999) (Chi2Lower Chi2Upper refers e.g. 0.025 0.975 quantile values Chi-squared distribution \\(n-1\\) degrees freedom, respectively, crit = 0.05): Mclu = (Chi2Lower - n + sum(xi)) / (sum(xi) - 1) Muni = (Chi2Upper - n + sum(xi)) / (sum(xi) - 1) Smith-Gill (1975) proposed scaling Morisita index [0, n] interval [-1, 1], setting -0.5 0.5 values confidence limits around random distribution rescaled value 0. rescale Morisita index, one following four equations apply calculate standardized index \\(Imst\\): () Imor >= Mclu > 1: Imst = 0.5 + 0.5 (Imor - Mclu) / (n - Mclu), (b) Mclu > Imor >= 1: Imst = 0.5 (Imor - 1) / (Mclu - 1), (c) 1 > Imor > Muni: Imst = -0.5 (Imor - 1) / (Muni - 1), (d) 1 > Muni > Imor: Imst = -0.5 + 0.5 (Imor - Muni) / Muni.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Returns data frame many rows number columns input data, four columns. Columns : imor unstandardized Morisita index, mclu clumpedness index, muni uniform index, imst standardized Morisita index, pchisq Chi-squared based probability null hypothesis random expectation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Morisita, M. 1959. Measuring dispersion individuals analysis distributional patterns.  Mem. Fac. Sci. Kyushu Univ. Ser. E 2, 215--235. Morisita, M. 1962. Id-index, measure dispersion individuals. Res. Popul. Ecol. 4, 1--7. Smith-Gill, S. J. 1975. Cytophysiological basis disruptive pigmentary patterns leopard frog, Rana pipiens. II.  Wild type mutant cell specific patterns. J. Morphol. 146, 35--54. Hairston, N. G., Hill, R. Ritte, U. 1971. interpretation aggregation patterns. : Patil, G. P., Pileou, E. C. Waters, W. E. eds. Statistical Ecology 1: Spatial Patterns Statistical Distributions. Penn. State Univ. Press, University Park. Krebs, C. J. 1999. Ecological Methodology. 2nd ed. Benjamin Cummings Publishers.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"common error found several papers standardizing case (b), denominator given Muni - 1. results hiatus [0, 0.5] interval standardized index. root typo book Krebs (1999), see Errata book (Page 217, https://www.zoology.ubc.ca/~krebs/downloads/errors_2nd_printing.pdf).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispindmorisita.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Morisita index of intraspecific aggregation — dispindmorisita","text":"","code":"data(dune) x <- dispindmorisita(dune) x #>                imor      mclu         muni        imst       pchisq #> Achimill  2.1666667  1.923488  0.327101099  0.50672636 9.157890e-03 #> Agrostol  1.8085106  1.294730  0.785245032  0.51373357 1.142619e-05 #> Airaprae  8.0000000  4.463082 -1.523370880  0.61382303 3.571702e-04 #> Alopgeni  2.5396825  1.395781  0.711614757  0.53074307 3.024441e-08 #> Anthodor  2.6666667  1.692616  0.495325824  0.52660266 5.897217e-05 #> Bellpere  2.0512821  2.154361  0.158876373  0.45535255 3.451547e-02 #> Bromhord  3.2380952  1.989452  0.279036892  0.53466422 1.170437e-04 #> Chenalbu        NaN       Inf         -Inf         NaN          NaN #> Cirsarve 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03 #> Comapalu  6.6666667  5.617442 -2.364494506  0.53647558 1.055552e-02 #> Eleopalu  3.7333333  1.577180  0.579438187  0.55851854 2.958285e-10 #> Elymrepe  2.7692308  1.554093  0.596260659  0.53293787 1.180195e-06 #> Empenigr 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03 #> Hyporadi  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07 #> Juncarti  3.1372549  1.814843  0.406265675  0.53635966 2.066336e-05 #> Juncbufo  4.1025641  2.154361  0.158876373  0.55458486 1.503205e-05 #> Lolipere  1.5849970  1.243023  0.822921342  0.50911591 5.873839e-05 #> Planlanc  2.4615385  1.554093  0.596260659  0.52459747 1.921730e-05 #> Poaprat   1.1702128  1.294730  0.785245032  0.28876015 1.046531e-01 #> Poatriv   1.4644137  1.223425  0.837201879  0.50641728 2.747301e-04 #> Ranuflam  2.4175824  2.065564  0.223578191  0.50981405 7.010483e-03 #> Rumeacet  3.9215686  1.814843  0.406265675  0.55792432 1.530085e-07 #> Sagiproc  2.4210526  1.729070  0.468764025  0.51893672 4.956394e-04 #> Salirepe  5.8181818  2.385233 -0.009348352  0.59744520 2.687397e-07 #> Scorautu  0.9643606  1.261365  0.809556915 -0.09356972 5.823404e-01 #> Trifprat  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07 #> Trifrepe  1.2210916  1.301138  0.780576445  0.36709402 6.335449e-02 #> Vicilath  3.3333333  5.617442 -2.364494506  0.25266513 1.301890e-01 #> Bracruta  1.1904762  1.288590  0.789719093  0.33001160 8.071762e-02 #> Callcusp  5.3333333  2.539147 -0.121498169  0.58001287 7.982634e-06 y <- dispindmorisita(dune, unique.rm = TRUE) y #>               imor     mclu         muni        imst       pchisq #> Achimill 2.1666667 1.923488  0.327101099  0.50672636 9.157890e-03 #> Agrostol 1.8085106 1.294730  0.785245032  0.51373357 1.142619e-05 #> Airaprae 8.0000000 4.463082 -1.523370880  0.61382303 3.571702e-04 #> Alopgeni 2.5396825 1.395781  0.711614757  0.53074307 3.024441e-08 #> Anthodor 2.6666667 1.692616  0.495325824  0.52660266 5.897217e-05 #> Bellpere 2.0512821 2.154361  0.158876373  0.45535255 3.451547e-02 #> Bromhord 3.2380952 1.989452  0.279036892  0.53466422 1.170437e-04 #> Comapalu 6.6666667 5.617442 -2.364494506  0.53647558 1.055552e-02 #> Eleopalu 3.7333333 1.577180  0.579438187  0.55851854 2.958285e-10 #> Elymrepe 2.7692308 1.554093  0.596260659  0.53293787 1.180195e-06 #> Hyporadi 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07 #> Juncarti 3.1372549 1.814843  0.406265675  0.53635966 2.066336e-05 #> Juncbufo 4.1025641 2.154361  0.158876373  0.55458486 1.503205e-05 #> Lolipere 1.5849970 1.243023  0.822921342  0.50911591 5.873839e-05 #> Planlanc 2.4615385 1.554093  0.596260659  0.52459747 1.921730e-05 #> Poaprat  1.1702128 1.294730  0.785245032  0.28876015 1.046531e-01 #> Poatriv  1.4644137 1.223425  0.837201879  0.50641728 2.747301e-04 #> Ranuflam 2.4175824 2.065564  0.223578191  0.50981405 7.010483e-03 #> Rumeacet 3.9215686 1.814843  0.406265675  0.55792432 1.530085e-07 #> Sagiproc 2.4210526 1.729070  0.468764025  0.51893672 4.956394e-04 #> Salirepe 5.8181818 2.385233 -0.009348352  0.59744520 2.687397e-07 #> Scorautu 0.9643606 1.261365  0.809556915 -0.09356972 5.823404e-01 #> Trifprat 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07 #> Trifrepe 1.2210916 1.301138  0.780576445  0.36709402 6.335449e-02 #> Vicilath 3.3333333 5.617442 -2.364494506  0.25266513 1.301890e-01 #> Bracruta 1.1904762 1.288590  0.789719093  0.33001160 8.071762e-02 #> Callcusp 5.3333333 2.539147 -0.121498169  0.58001287 7.982634e-06 dim(x) ## with unique species #> [1] 30  5 dim(y) ## unique species removed #> [1] 27  5"},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":null,"dir":"Reference","previous_headings":"","what":"Dispersion-based weighting of species counts — dispweight","title":"Dispersion-based weighting of species counts — dispweight","text":"Transform abundance data downweighting species    overdispersed Poisson error.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dispersion-based weighting of species counts — dispweight","text":"","code":"dispweight(comm, groups, nsimul = 999, nullmodel = \"c0_ind\",     plimit = 0.05) gdispweight(formula, data, plimit = 0.05) # S3 method for dispweight summary(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dispersion-based weighting of species counts — dispweight","text":"comm Community data matrix. groups Factor describing group structure. missing,       sites regarded belonging one group. NA values       allowed. nsimul Number simulations. nullmodel nullmodel used     commsim within groups. default     follows Clarke et al. (2006). plimit Downweight species \\(p\\)-value      limit. formula, data Formula left-hand side     community data frame right-hand side gives explanatory     variables. explanatory variables found data frame     given data parent frame. object Result object dispweight     gdispweight. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dispersion-based weighting of species counts — dispweight","text":"dispersion index (\\(D\\)) calculated ratio variance expected value species.  species abundances follow Poisson distribution, expected dispersion \\(E(D) = 1\\), \\(D > 1\\), species overdispersed. inverse \\(1/D\\) can used downweight species abundances.  Species downweighted overdispersion judged statistically significant (Clarke et al. 2006). Function dispweight implements original procedure Clarke et al. (2006). one factor can used group sites find species means. significance overdispersion assessed freely distributing individuals species within factor levels. achieved using nullmodel \"c0_ind\" (accords Clarke et al. 2006), nullmodels can used, though may meaningful (see commsim alternatives). species absent factor level, whole level ignored calculation overdispersion, number degrees freedom can vary among species. reduced number degrees freedom used divisor overdispersion \\(D\\), species higher dispersion hence lower weights transformation. Function gdispweight generalized parametric version dispweight. function based glm quasipoisson error family. glm model can used, including several factors continuous covariates. Function gdispweight uses test statistic dispweight (Pearson Chi-square), ignore factor levels species absent, number degrees freedom equal species. Therefore transformation weights can higher dispweight. gdispweight function evaluates significance overdispersion parametrically Chi-square distribution (pchisq). Functions dispweight gdispweight transform data, add information overdispersion weights attributes result. summary can used extract print information.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dispersion-based weighting of species counts — dispweight","text":"Function returns transformed data following new attributes: D Dispersion statistic. df Degrees freedom species. p \\(p\\)-value Dispersion statistic \\(D\\). weights weights applied community data. nsimul Number simulations used assess \\(p\\)-value,       NA simulations performed. nullmodel name commsim null model,       NA simulations performed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dispersion-based weighting of species counts — dispweight","text":"Clarke, K. R., M. G. Chapman, P. J. Somerfield, H. R. Needham. 2006. Dispersion-based weighting species counts assemblage analyses. Marine Ecology Progress Series, 320, 11–27.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dispersion-based weighting of species counts — dispweight","text":"Eduard Szöcs eduardszoesc@gmail.com wrote original   dispweight, Jari Oksanen significantly modified code,   provided support functions developed gdispweight.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dispweight.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dispersion-based weighting of species counts — dispweight","text":"","code":"data(mite, mite.env) ## dispweight and its summary mite.dw <- with(mite.env, dispweight(mite, Shrub, nsimul = 99)) ## IGNORE_RDIFF_BEGIN summary(mite.dw) #>          Dispersion    Weight Df Pr(Disp.)    #> Brachy       9.6908 0.1031909 67      0.01 ** #> PHTH         3.2809 0.3047900 49      0.01 ** #> HPAV         6.5263 0.1532264 67      0.01 ** #> RARD         6.0477 0.1653525 49      0.01 ** #> SSTR         2.2619 0.4421053 49      0.01 ** #> Protopl      5.4229 0.1844031 49      0.01 ** #> MEGR         4.5354 0.2204860 67      0.01 ** #> MPRO         1.2687 0.7882353 67      0.03 *  #> TVIE         2.5956 0.3852706 67      0.01 ** #> HMIN        10.0714 0.0992906 67      0.01 ** #> HMIN2        7.5674 0.1321466 49      0.01 ** #> NPRA         2.6743 0.3739344 67      0.01 ** #> TVEL         9.6295 0.1038474 49      0.01 ** #> ONOV        11.3628 0.0880064 67      0.01 ** #> SUCT         8.7372 0.1144533 67      0.01 ** #> LCIL       129.4436 0.0077254 67      0.01 ** #> Oribatl1     4.1250 0.2424248 67      0.01 ** #> Ceratoz1     1.7150 0.5830768 67      0.02 *  #> PWIL         2.2943 0.4358538 67      0.01 ** #> Galumna1     2.8777 0.3474943 49      0.01 ** #> Stgncrs2     3.8242 0.2614953 49      0.01 ** #> HRUF         1.7575 0.5690021 67      0.01 ** #> Trhypch1    14.9225 0.0670128 67      0.01 ** #> PPEL         1.3628 1.0000000 49      0.07 .  #> NCOR         2.5875 0.3864771 67      0.01 ** #> SLAT         2.7857 0.3589744 49      0.01 ** #> FSET         4.8901 0.2044944 49      0.01 ** #> Lepidzts     1.6577 0.6032360 49      0.03 *  #> Eupelops     1.4611 0.6844033 67      0.02 *  #> Miniglmn     1.6505 0.6058733 49      0.01 ** #> LRUG        12.0658 0.0828790 67      0.01 ** #> PLAG2        3.2403 0.3086090 67      0.01 ** #> Ceratoz3     3.5125 0.2846947 67      0.01 ** #> Oppiminu     3.1680 0.3156525 67      0.01 ** #> Trimalc2    10.5927 0.0944046 67      0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Based on 99 simulations on 'c0_ind' nullmodel ## IGNORE_RDIFF_END ## generalized dispersion weighting mite.dw <- gdispweight(mite ~ Shrub + WatrCont, data = mite.env) rda(mite.dw ~ Shrub + WatrCont, data = mite.env) #> Call: rda(formula = mite.dw ~ Shrub + WatrCont, data = mite.env) #>  #>               Inertia Proportion Rank #> Total         38.1640     1.0000      #> Constrained    9.2129     0.2414    3 #> Unconstrained 28.9511     0.7586   35 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>  RDA1  RDA2  RDA3  #> 7.986 0.748 0.480  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8  #> 5.886 3.634 2.791 2.592 1.932 1.573 1.210 1.078  #> (Showing 8 of 35 unconstrained eigenvalues) #>"},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":null,"dir":"Reference","previous_headings":"","what":"Connectedness of Dissimilarities — distconnected","title":"Connectedness of Dissimilarities — distconnected","text":"Function distconnected finds groups connected   disregarding dissimilarities threshold   NA. function can used find groups can   ordinated together transformed   stepacross. Function .shared returns logical   dissimilarity object, TRUE means sites   species common. minimal structure   distconnected can used set missing values   dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connectedness of Dissimilarities — distconnected","text":"","code":"distconnected(dis, toolong = 1, trace = TRUE)  no.shared(x)"},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connectedness of Dissimilarities — distconnected","text":"dis Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, .     toolong = 0 (negative), dissimilarity regarded     long. trace Summarize results distconnected x Community data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Connectedness of Dissimilarities — distconnected","text":"Data sets disconnected sample plots groups   sample plots share species sites groups   sites. data sets sensibly ordinated   unconstrained method subsets related   . instance, correspondence analysis polarize   subsets eigenvalue 1. Neither can dissimilarities   transformed stepacross, path   points, result contain NAs. Function   distconnected find subsets dissimilarity   matrices. function return grouping vector can used   sub-setting data. data connected, result vector   \\(1\\)s. connectedness two points can defined   either threshold toolong using input dissimilarities   NAs. Function .shared returns dist structure value   TRUE two sites nothing common, value   FALSE least one shared species.   minimal structure can analysed distconnected.   function can used select dissimilarities shared species   indices fixed upper limit. Function distconnected uses depth-first search   (Sedgewick 1990).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connectedness of Dissimilarities — distconnected","text":"Function distconnected returns vector   observations using integers identify connected groups. data   connected, values 1. Function .shared returns object class dist.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Connectedness of Dissimilarities — distconnected","text":"Sedgewick, R. (1990). Algorithms C. Addison Wesley.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Connectedness of Dissimilarities — distconnected","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/distconnected.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connectedness of Dissimilarities — distconnected","text":"","code":"## There are no disconnected data in vegan, and the following uses an ## extremely low threshold limit for connectedness. This is for ## illustration only, and not a recommended practice. data(dune) dis <- vegdist(dune) gr <- distconnected(dis, toolong=0.4) #> Connectivity of distance matrix with threshold dissimilarity 0.4  #> Data are disconnected: 6 groups #> Groups sizes #>  1  2  3  4  5  6  #>  1 11  2  4  1  1  # Make sites with no shared species as NA in Manhattan dissimilarities dis <- vegdist(dune, \"manhattan\") is.na(dis) <- no.shared(dune)"},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":null,"dir":"Reference","previous_headings":"","what":"Ecological Diversity Indices — diversity","title":"Ecological Diversity Indices — diversity","text":"Shannon, Simpson, Fisher diversity indices species   richness.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ecological Diversity Indices — diversity","text":"","code":"diversity(x, index = \"shannon\", groups, equalize.groups = FALSE,    MARGIN = 1, base = exp(1)) simpson.unb(x, inverse = FALSE) fisher.alpha(x, MARGIN = 1, ...) specnumber(x, groups, MARGIN = 1)"},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ecological Diversity Indices — diversity","text":"x Community data, matrix-like object vector. index Diversity index, one \"shannon\",     \"simpson\" \"invsimpson\". MARGIN Margin index computed. base logarithm base used shannon. inverse Use inverse Simpson similarly      diversity(x, \"invsimpson\"). groups grouping factor: given, finds diversity     communities pooled groups. equalize.groups Instead observed abundances, standardize     communities unit total. ... Parameters passed function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ecological Diversity Indices — diversity","text":"Shannon Shannon--Weaver (Shannon--Wiener) index defined   \\(H' = -\\sum_i p_i \\log_{b} p_i\\),   \\(p_i\\) proportional abundance species \\(\\) \\(b\\)   base logarithm.  popular use natural   logarithms, argue base \\(b = 2\\) (makes sense,   real difference). variants Simpson's index based \\(D = \\sum p_i^2\\). Choice simpson returns \\(1-D\\)   invsimpson returns \\(1/D\\). simpson.unb finds unbiased Simpson indices discrete   samples (Hurlbert 1971, eq. 5). less sensitive sample   size basic Simpson indices. unbiased indices can   calculated data integer counts. diversity function can find total (gamma) diversity   pooled communities argument groups. average alpha   diversity can found mean diversities groups,   difference ratio estimate beta diversity (see   Examples). pooling can based either observed   abundancies, communities can equalized unit total   pooling; see Jost (2007) discussion. Functions   adipart multipart provide canned   alternatives estimating alpha, beta gamma diversities   hierarchical settings. fisher.alpha estimates \\(\\alpha\\) parameter   Fisher's logarithmic series (see fisherfit).    estimation possible genuine   counts individuals. None diversity indices usable empty sampling units   without species, indices can give numeric   value. Filtering cases left user. Function specnumber finds number species.   MARGIN = 2, finds frequencies species. groups   given, finds total number species group (see    example finding one kind beta diversity option). Better stories can told Simpson's index   Shannon's index, still grander narratives   rarefaction (Hurlbert 1971).  However, indices   closely related (Hill 1973), reason despise one   others (graduate student, drag ,   obey Professor's orders). particular, exponent   Shannon index linearly related inverse Simpson (Hill 1973)   although former may sensitive rare species. Moreover,   inverse Simpson asymptotically equal rarefied species richness   sample two individuals, Fisher's \\(\\alpha\\)   similar inverse Simpson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ecological Diversity Indices — diversity","text":"vector diversity indices numbers species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Ecological Diversity Indices — diversity","text":"Fisher, R.., Corbet, .S. & Williams, C.B. (1943). relation   number species number individuals   random sample animal population. Journal Animal Ecology   12, 42--58. Hurlbert, S.H. (1971). nonconcept species diversity: critique   alternative parameters. Ecology 52, 577--586. Jost, L. (2007) Partitioning diversity independent alpha beta   components. Ecology 88, 2427--2439.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ecological Diversity Indices — diversity","text":"Jari Oksanen   Bob O'Hara (fisher.alpha).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/diversity.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ecological Diversity Indices — diversity","text":"","code":"data(BCI, BCI.env) H <- diversity(BCI) simp <- diversity(BCI, \"simpson\") invsimp <- diversity(BCI, \"inv\") ## Unbiased Simpson unbias.simp <- simpson.unb(BCI) ## Fisher alpha alpha <- fisher.alpha(BCI) ## Plot all pairs(cbind(H, simp, invsimp, unbias.simp, alpha), pch=\"+\", col=\"blue\")  ## Species richness (S) and Pielou's evenness (J): S <- specnumber(BCI) ## rowSums(BCI > 0) does the same... J <- H/log(S) ## beta diversity defined as gamma/alpha - 1: ## alpha is the average no. of species in a group, and gamma is the ## total number of species in the group (alpha <- with(BCI.env, tapply(specnumber(BCI), Habitat, mean))) #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 85.75000 91.76923 91.58333 94.00000 90.00000  (gamma <- with(BCI.env, specnumber(BCI, Habitat))) #>  OldHigh   OldLow OldSlope    Swamp    Young  #>      158      210      183      128      117  gamma/alpha - 1 #>   OldHigh    OldLow  OldSlope     Swamp     Young  #> 0.8425656 1.2883487 0.9981802 0.3617021 0.3000000  ## similar calculations with Shannon diversity (alpha <- with(BCI.env, tapply(diversity(BCI), Habitat, mean))) # average #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 3.638598 3.876413 3.887122 4.003780 3.246729  (gamma <- with(BCI.env, diversity(BCI, groups=Habitat))) # pooled #>  OldHigh   OldLow OldSlope    Swamp    Young  #> 3.873186 4.284972 4.212098 4.164335 3.387536  ## additive beta diversity based on Shannon index gamma-alpha #>   OldHigh    OldLow  OldSlope     Swamp     Young  #> 0.2345878 0.4085595 0.3249760 0.1605548 0.1408068"},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":null,"dir":"Reference","previous_headings":"","what":"Vegetation and Environment in Dutch Dune Meadows. — dune","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"dune meadow vegetation data, dune, cover class values   30 species 20 sites. corresponding environmental data frame   dune.env following entries:","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"","code":"data(dune)   data(dune.env)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"dune data frame observations 30 species 20   sites. species names abbreviated 4+4 letters (see   make.cepnames). following names changed   original source (Jongman et al. 1987): Leontodon   autumnalis Scorzoneroides, Potentilla   palustris Comarum. dune.env data frame 20 observations following   5 variables: A1: numeric vector thickness soil A1 horizon. Moisture: ordered factor levels: 1 < 2 <       4 < 5. Management: factor levels: BF (Biological       farming), HF (Hobby farming), NM (Nature       Conservation Management), SF (Standard Farming). Use: ordered factor land-use levels: Hayfield       < Haypastu < Pasture. Manure: ordered factor levels: 0 < 1 <       2 < 3 < 4.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"Jongman, R.H.G, ter Braak, C.J.F & van Tongeren,   O.F.R. (1987). Data Analysis Community Landscape     Ecology. Pudoc, Wageningen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vegetation and Environment in Dutch Dune Meadows. — dune","text":"","code":"data(dune) data(dune.env)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":null,"dir":"Reference","previous_headings":"","what":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"Classification table species dune data   set.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"","code":"data(dune.taxon)   data(dune.phylodis)"},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"dune.taxon data frame 30 species (rows) classified   five taxonomic levels (columns). dune.phylodis   dist object estimated coalescence ages extracted   doi:10.5061/dryad.63q27  (Zanne et al. 2014) using tools packages   ape phylobase.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"families orders based APG IV (2016) vascular   plants Hill et al. (2006) mosses. higher levels   (superorder subclass) based Chase & Reveal (2009). Chase   & Reveal (2009) treat Angiosperms mosses subclasses class   Equisetopsida (land plants), brylogists traditionally used   much inflated levels adjusted match   Angiosperm classification.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"APG IV [Angiosperm Phylogeny Group] (2016) update   Angiosperm Phylogeny Group classification orders   families flowering plants: APG IV. Bot. J. Linnean Soc.   181: 1--20. Chase, M.W. & Reveal, J. L. (2009) phylogenetic classification   land plants accompany APG III. Bot. J. Linnean Soc.   161: 122--127. Hill, M.O et al. (2006) annotated checklist mosses Europe   Macaronesia. J. Bryology 28: 198--267. Zanne .E., Tank D.C., Cornwell, W.K., Eastman J.M., Smith, S..,   FitzJohn, R.G., McGlinn, D.J., O’Meara, B.C., Moles, .T., Reich,   P.B., Royer, D.L., Soltis, D.E., Stevens, P.F., Westoby, M., Wright,   .J., Aarssen, L., Bertin, R.., Calaminus, ., Govaerts, R.,   Hemmings, F., Leishman, M.R., Oleksyn, J., Soltis, P.S., Swenson,   N.G., Warman, L. & Beaulieu, J.M. (2014) Three keys radiation   angiosperms freezing environments. Nature   506: 89--92.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/dune.taxon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Taxonomic Classification and Phylogeny of Dune Meadow Species — dune.taxon","text":"","code":"data(dune.taxon)    data(dune.phylodis)"},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract Eigenvalues from an Ordination Object — eigenvals","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Function extracts eigenvalues object . Many   multivariate methods return objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"","code":"eigenvals(x, ...) # S3 method for cca eigenvals(x, model = c(\"all\", \"unconstrained\", \"constrained\"),           constrained = NULL, ...) # S3 method for decorana eigenvals(x, kind = c(\"additive\", \"axiswise\", \"decorana\"),            ...) # S3 method for eigenvals summary(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"x object extract eigenvalues. object eigenvals result object. model eigenvalues return objects inherit class     \"cca\" . constrained Return constrained eigenvalues. Deprecated vegan     2.5-0. Use model instead. kind Kind eigenvalues returned decorana.     \"additive\" eigenvalues can used reporting importances     components summary. \"axiswise\" gives     non-additive eigenvalues, \"decorana\" decorana values     (see decorana details). ... arguments functions (usually ignored)","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"generic function methods cca,   wcmdscale, pcnm, prcomp,   princomp, dudi (ade4),    pca pco (   labdsv) result objects. default method also   extracts eigenvalues result looks like   eigen svd.  Functions   prcomp princomp contain square roots   eigenvalues called standard deviations,   eigenvals function returns squares.  Function   svd contains singular values, function   eigenvals returns squares. constrained ordination   methods cca, rda   capscale function returns constrained   unconstrained eigenvalues concatenated one vector, partial   component ignored. However, argument    constrained = TRUE constrained eigenvalues returned. summary eigenvals result returns eigenvalues,   proportion explained cumulative proportion explained. result   object can negative eigenvalues (wcmdscale,   capscale, pcnm) correspond   imaginary axes Euclidean mapping non-Euclidean distances   (Gower 1985). cases, sum absolute values   eigenvalues used calculating proportions explained,   real axes (corresponding positive eigenvalues) explain   part total variation (Mardia et al. 1979, Gower 1985).   decorana importances cumulative proportions   reported kind = \"additive\", alternatives   add total inertia input data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"object class \"eigenvals\", vector   eigenvalues. summary method returns object class  \"summary.eigenvals\", matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"Gower, J. C. (1985). Properties Euclidean non-Euclidean   distance matrices. Linear Algebra Applications 67,   81--97. Mardia, K. V., Kent, J. T. Bibby, J. M. (1979).  Chapter 14   Multivariate Analysis, London: Academic Press.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/eigenvals.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract Eigenvalues from an Ordination Object — eigenvals","text":"","code":"data(varespec) data(varechem) mod <- cca(varespec ~ Al + P + K, varechem) ev <- eigenvals(mod) ev #>      CCA1      CCA2      CCA3       CA1       CA2       CA3       CA4       CA5  #> 0.3615566 0.1699600 0.1126167 0.3500372 0.2200788 0.1850741 0.1551179 0.1351054  #>       CA6       CA7       CA8       CA9      CA10      CA11      CA12      CA13  #> 0.1002670 0.0772991 0.0536938 0.0365603 0.0350887 0.0282291 0.0170651 0.0122474  #>      CA14      CA15      CA16      CA17      CA18      CA19      CA20  #> 0.0101910 0.0094701 0.0055090 0.0030529 0.0025118 0.0019485 0.0005178  summary(ev) #> Importance of components: #>                         CCA1    CCA2    CCA3    CA1    CA2     CA3     CA4 #> Eigenvalue            0.3616 0.16996 0.11262 0.3500 0.2201 0.18507 0.15512 #> Proportion Explained  0.1736 0.08159 0.05406 0.1680 0.1056 0.08884 0.07446 #> Cumulative Proportion 0.1736 0.25514 0.30920 0.4772 0.5829 0.67172 0.74618 #>                           CA5     CA6     CA7     CA8     CA9    CA10    CA11 #> Eigenvalue            0.13511 0.10027 0.07730 0.05369 0.03656 0.03509 0.02823 #> Proportion Explained  0.06485 0.04813 0.03711 0.02577 0.01755 0.01684 0.01355 #> Cumulative Proportion 0.81104 0.85917 0.89627 0.92205 0.93960 0.95644 0.96999 #>                           CA12     CA13     CA14     CA15     CA16     CA17 #> Eigenvalue            0.017065 0.012247 0.010191 0.009470 0.005509 0.003053 #> Proportion Explained  0.008192 0.005879 0.004892 0.004546 0.002644 0.001465 #> Cumulative Proportion 0.978183 0.984062 0.988954 0.993500 0.996145 0.997610 #>                           CA18      CA19      CA20 #> Eigenvalue            0.002512 0.0019485 0.0005178 #> Proportion Explained  0.001206 0.0009353 0.0002486 #> Cumulative Proportion 0.998816 0.9997514 1.0000000  ## choose which eignevalues to return eigenvals(mod, model = \"unconstrained\") #>       CA1       CA2       CA3       CA4       CA5       CA6       CA7       CA8  #> 0.3500372 0.2200788 0.1850741 0.1551179 0.1351054 0.1002670 0.0772991 0.0536938  #>       CA9      CA10      CA11      CA12      CA13      CA14      CA15      CA16  #> 0.0365603 0.0350887 0.0282291 0.0170651 0.0122474 0.0101910 0.0094701 0.0055090  #>      CA17      CA18      CA19      CA20  #> 0.0030529 0.0025118 0.0019485 0.0005178"},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fits an Environmental Vector or Factor onto an Ordination — envfit","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"function fits environmental vectors factors onto   ordination. projections points onto vectors maximum   correlation corresponding environmental variables,   factors show averages factor levels. continuous varaibles   equal fitting linear trend surface (plane 2D)   variable (see ordisurf); trend surface can   presented showing gradient (direction steepest increase)   using arrow. environmental variables dependent   variables explained ordination scores,   dependent variable analysed separately.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"","code":"# S3 method for default envfit(ord, env, permutations = 999, strata = NULL,     choices=c(1,2),  display = \"sites\", w  = weights(ord, display),    na.rm = FALSE, ...) # S3 method for formula envfit(formula, data, ...) # S3 method for envfit plot(x, choices = c(1,2), labels, arrow.mul, at = c(0,0),     axis = FALSE, p.max = NULL, col = \"blue\", bg, add = TRUE, ...) # S3 method for envfit scores(x, display, choices, arrow.mul=1, tidy = FALSE, ...) vectorfit(X, P, permutations = 0, strata = NULL, w, ...) factorfit(X, P, permutations = 0, strata = NULL, w, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"ord ordination object structure     ordination scores can extracted (including data     frame matrix scores). env Data frame, matrix vector environmental     variables. variables can mixed type (factors, continuous     variables) data frames. X Matrix data frame ordination scores. P Data frame, matrix vector environmental     variable(s). must continuous vectorfit     factors characters factorfit. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. Set permutations = 0 skip     permutations. formula, data Model  formula data. na.rm Remove points missing values ordination scores     environmental variables. operation casewise: whole     row data removed missing value      na.rm = TRUE. x result object envfit. ordiArrowMul     ordiArrowTextXY must two-column matrix (    matrix-like object) containing coordinates arrow heads     two plot axes, methods extract structure     envfit results. choices Axes plotted. tidy Return scores compatible ggplot2:     scores single data.frame, score type     identified factor variable scores (\"vectors\"     \"factors\"), names variable label. scores     incompatible conventional plot functions, can     used ggplot2. labels Change plotting labels. argument list     elements vectors factors give new     plotting labels. either elements omitted,     default labels used. one type elements     (vectors factors), labels can     given vector. default labels can displayed     labels command. arrow.mul Multiplier vector lengths. arrows     automatically scaled similarly plot.cca     given plot add = TRUE. However,     scores can used adjust arrow lengths     plot function used. origin fitted arrows plot.  plot arrows     places origin, probably specify     arrrow.mul. axis Plot axis showing scaling fitted arrows. p.max Maximum estimated \\(P\\) value displayed     variables.  must calculate \\(P\\) values setting     permutations use option. col Colour plotting. bg Background colour labels. bg set,     labels displayed ordilabel instead     text. See Examples using semitransparent background. add Results added existing ordination plot. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. display fitting functions ordinary site scores     linear combination scores      (\"lc\") constrained ordination (cca,     rda, capscale). scores     function either \"vectors\" \"factors\"     (synonyms \"bp\" \"cn\", resp.). w Weights used fitting (concerns mainly cca     decorana results nonconstant weights). ... Parameters passed scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Function envfit finds vectors factor averages   environmental variables.  Function plot.envfit adds   ordination diagram.  X data.frame,   envfit   uses factorfit factor variables   vectorfit variables.  X matrix   vector, envfit uses vectorfit. Alternatively,   model can defined simplified model formula,   left hand side must ordination result object matrix   ordination scores, right hand   side lists environmental variables. formula interface can   used easier selection /transformation environmental   variables. main effects analysed even interaction   terms defined formula. ordination results extracted scores   extra arguments passed scores. fitted   models apply results defined extracting scores   using envfit. instance, scaling   constrained ordination (see scores.rda,   scores.cca) must set way   envfit plot ordination results (see   Examples). printed output continuous variables (vectors) gives   direction cosines coordinates heads unit   length vectors.  plot scaled   correlation (square root column r2)   “weak” predictors shorter arrows “strong”   predictors.  can see scaled relative lengths using command   scores.  plotted (scaled) arrows   adjusted current graph using constant multiplier:   keep relative r2-scaled lengths arrows tries   fill current plot.  can see multiplier using   ordiArrowMul(result_of_envfit), set   argument arrow.mul. Functions vectorfit factorfit can called directly.   Function vectorfit finds directions ordination space   towards environmental vectors change rapidly   maximal correlations ordination   configuration.  Function factorfit finds averages ordination   scores factor levels. Function factorfit treats ordered   unordered factors similarly. permutations \\(> 0\\), significance fitted vectors   factors assessed using permutation environmental variables.   goodness fit statistic squared correlation coefficient   (\\(r^2\\)).   factors defined \\(r^2 = 1 - ss_w/ss_t\\),   \\(ss_w\\) \\(ss_t\\) within-group total sums   squares. See permutations additional details   permutation tests Vegan. User can supply vector prior weights w. ordination   object weights, used. practise means   row totals used weights cca   decorana results. like , want   give equal weights sites, set w = NULL.    fitted vectors similar biplot arrows constrained ordination   fitted LC scores (display = \"lc\") set   scaling = \"species\" (see scores.cca).    weighted fitting gives similar results biplot arrows class   centroids cca. lengths arrows fitted vectors automatically adjusted   physical size plot, arrow lengths   compared across plots. similar scaling arrows, must   explicitly set arrow.mul argument plot   command; see ordiArrowMul   ordiArrowTextXY. results can accessed scores.envfit function   returns either fitted vectors scaled correlation coefficient   centroids fitted environmental variables, named list   .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Functions vectorfit factorfit return lists   classes vectorfit factorfit  print method.  result object following items: arrows Arrow endpoints vectorfit. arrows     scaled unit length. centroids Class centroids factorfit. r Goodness fit statistic: Squared correlation coefficient permutations Number permutations. control list control values permutations     returned function . pvals Empirical P-values variable. Function envfit returns list class envfit   results vectorfit envfit items. Function plot.envfit scales vectors correlation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Jari Oksanen.  permutation test derives code   suggested Michael Scroggie.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"Fitted vectors become method choice displaying   environmental variables ordination.  Indeed, optimal   way presenting environmental variables Constrained   Correspondence Analysis cca, since   linear constraints.   unconstrained ordination relation external variables   ordination configuration may less linear, therefore   methods arrows may useful.  simplest adjust   plotting symbol sizes (cex, symbols)   environmental variables.   Fancier methods involve smoothing regression methods   abound R, ordisurf provides wrapper .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/envfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fits an Environmental Vector or Factor onto an Ordination — envfit","text":"","code":"data(varespec, varechem) library(MASS) ord <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.2169286  #> Run 2 stress 0.2109612  #> Run 3 stress 0.2104991  #> Run 4 stress 0.1962451  #> Run 5 stress 0.2126569  #> Run 6 stress 0.2114456  #> Run 7 stress 0.195049  #> Run 8 stress 0.2382234  #> Run 9 stress 0.2104573  #> Run 10 stress 0.2352374  #> Run 11 stress 0.195049  #> Run 12 stress 0.18458  #> ... Procrustes: rmse 0.04934217  max resid 0.157446  #> Run 13 stress 0.2101147  #> Run 14 stress 0.2166093  #> Run 15 stress 0.1967393  #> Run 16 stress 0.2087945  #> Run 17 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04162955  max resid 0.1518218  #> Run 18 stress 0.1843196  #> Run 19 stress 0.2704958  #> Run 20 stress 0.2028828  #> *** Best solution was not repeated -- monoMDS stopping criteria: #>     18: stress ratio > sratmax #>      2: scale factor of the gradient < sfgrmin (fit <- envfit(ord, varechem, perm = 999)) #>  #> ***VECTORS #>  #>             NMDS1    NMDS2     r2 Pr(>r)     #> N        -0.05728 -0.99836 0.2536  0.046 *   #> P         0.61969  0.78484 0.1938  0.092 .   #> K         0.76642  0.64234 0.1809  0.122     #> Ca        0.68516  0.72839 0.4119  0.007 **  #> Mg        0.63249  0.77457 0.4270  0.004 **  #> S         0.19135  0.98152 0.1752  0.126     #> Al       -0.87162  0.49019 0.5269  0.001 *** #> Fe       -0.93604  0.35189 0.4450  0.002 **  #> Mn        0.79871 -0.60172 0.5231  0.001 *** #> Zn        0.61754  0.78654 0.1879  0.108     #> Mo       -0.90307  0.42949 0.0609  0.540     #> Baresoil  0.92491 -0.38018 0.2508  0.041 *   #> Humdepth  0.93284 -0.36029 0.5200  0.002 **  #> pH       -0.64800  0.76164 0.2308  0.066 .   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 999 #>  #>  scores(fit, \"vectors\") #>               NMDS1      NMDS2 #> N        -0.0288474 -0.5028069 #> P         0.2728265  0.3455353 #> K         0.3259990  0.2732195 #> Ca        0.4397127  0.4674522 #> Mg        0.4133202  0.5061613 #> S         0.0800898  0.4108260 #> Al       -0.6327103  0.3558281 #> Fe       -0.6244512  0.2347516 #> Mn        0.5776554 -0.4351842 #> Zn        0.2677032  0.3409638 #> Mo       -0.2229426  0.1060291 #> Baresoil  0.4631721 -0.1903835 #> Humdepth  0.6727071 -0.2598200 #> pH       -0.3113030  0.3659007 plot(ord) plot(fit) plot(fit, p.max = 0.05, col = \"red\")  ## Adding fitted arrows to CCA. We use \"lc\" scores, and hope ## that arrows are scaled similarly in cca and envfit plots ord <- cca(varespec ~ Al + P + K, varechem) plot(ord, type=\"p\") fit <- envfit(ord, varechem, perm = 999, display = \"lc\") plot(fit, p.max = 0.05, col = \"red\")  ## 'scaling' must be set similarly in envfit and in ordination plot plot(ord, type = \"p\", scaling = \"sites\") fit <- envfit(ord, varechem, perm = 0, display = \"lc\", scaling = \"sites\") plot(fit, col = \"red\")   ## Class variables, formula interface, and displaying the ## inter-class variability with ordispider, and semitransparent ## white background for labels (semitransparent colours are not ## supported by all graphics devices) data(dune) data(dune.env) ord <- cca(dune) fit <- envfit(ord ~ Moisture + A1, dune.env, perm = 0) plot(ord, type = \"n\") with(dune.env, ordispider(ord, Moisture, col=\"skyblue\")) with(dune.env, points(ord, display = \"sites\", col = as.numeric(Moisture),                       pch=16)) plot(fit, cex=1.2, axis=TRUE, bg = rgb(1, 1, 1, 0.5))  ## Use shorter labels for factor centroids labels(fit) #> $vectors #> [1] \"A1\" #>  #> $factors #> [1] \"Moisture1\" \"Moisture2\" \"Moisture4\" \"Moisture5\" #>  plot(ord) plot(fit, labels=list(factors = paste(\"M\", c(1,2,4,5), sep = \"\")),    bg = rgb(1,1,0,0.5))"},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"function eventstar finds minimum (\\(q^*\\))  evenness profile based Tsallis entropy. scale factor entropy represents specific weighting species relative frequencies leads minimum evenness community (Mendes et al. 2008).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"","code":"eventstar(x, qmax = 5)"},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"x community matrix numeric vector. qmax Maximum scale parameter Tsallis entropy used  finding minimum Tsallis based evenness range c(0, qmax).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"function eventstar finds characteristic value scale  parameter \\(q\\) Tsallis entropy corresponding minimum evenness (equitability) profile based Tsallis entropy. value proposed Mendes et al. (2008) \\(q^*\\). \\(q^\\ast\\) index represents scale parameter one parameter Tsallis diversity family leads greatest deviation maximum equitability given relative  abundance vector community. value \\(q^\\ast\\) found identifying minimum evenness profile scaling factor \\(q\\) one-dimensional minimization. evenness profile known convex function, guaranteed underlying optimize function find unique solution range c(0, qmax). scale parameter value \\(q^\\ast\\) used  find corresponding values diversity (\\(H_{q^\\ast}\\)),  evenness (\\(H_{q^\\ast}(\\max)\\)), numbers equivalent (\\(D_{q^\\ast}\\)). calculation details, see tsallis Examples . Mendes et al. (2008) advocated use \\(q^\\ast\\) corresponding diversity, evenness, Hill numbers, unique value representing diversity profile, positively associated rare species community, thus potentially useful indicator certain relative abundance distributions communities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"data frame columns: qstar scale parameter value \\(q\\ast\\)     corresponding minimum value Tsallis based evenness profile. Estar Value evenness based normalized Tsallis      entropy \\(q^\\ast\\). Hstar Value Tsallis entropy \\(q^\\ast\\). Dstar Value Tsallis entropy \\(q^\\ast\\)      converted numbers equivalents     (also called Hill numbers, effective number species,      ‘true’ diversity; cf. Jost 2007). See tsallis calculation details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Mendes, R.S., Evangelista, L.R., Thomaz, S.M.,   Agostinho, .. Gomes, L.C. (2008) unified   index measure ecological diversity species   rarity. Ecography 31, 450--456. Jost, L. (2007) Partitioning diversity independent alpha beta components.   Ecology 88, 2427--2439. Tsallis, C. (1988) Possible generalization Boltzmann-Gibbs statistics.    J. Stat. Phis. 52, 479--487.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Values \\(q^\\ast\\) found Mendes et al. (2008) ranged 0.56 1.12 presenting low variability, interval 0 5 safely encompass possibly expected \\(q^\\ast\\) values practice, profiling evenness changing value qmax argument advised output values near range limits found.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"Eduardo Ribeiro Cunha edurcunha@gmail.com  Heloisa Beatriz Antoniazi Evangelista helobeatriz@gmail.com,  technical input Péter Sólymos.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/eventstar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scale Parameter at the Minimum of the Tsallis Evenness Profile — eventstar","text":"","code":"data(BCI) (x <- eventstar(BCI[1:5,])) #>       qstar     Estar     Hstar    Dstar #> 1 0.6146389 0.4263687 10.524584 67.03551 #> 2 0.6249249 0.4080263  9.534034 57.66840 #> 3 0.6380858 0.4062032  9.225458 57.69174 #> 4 0.6245808 0.4062213 10.140189 65.50247 #> 5 0.6404825 0.4219957  9.828138 66.96440 ## profiling y <- as.numeric(BCI[10,]) (z <- eventstar(y)) #>       qstar     Estar    Hstar    Dstar #> 1 0.6372529 0.4117557 9.546332 61.77715 q <- seq(0, 2, 0.05) Eprof <- tsallis(y, scales=q, norm=TRUE) Hprof <- tsallis(y, scales=q) Dprof <- tsallis(y, scales=q, hill=TRUE) opar <- par(mfrow=c(3,1)) plot(q, Eprof, type=\"l\", main=\"Evenness\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar, norm=TRUE), col=2) plot(q, Hprof, type=\"l\", main=\"Diversity\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar), col=2) plot(q, Dprof, type=\"l\", main=\"Effective number of species\") abline(v=z$qstar, h=tsallis(y, scales=z$qstar, hill=TRUE), col=2)  par(opar)"},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Function fisherfit fits Fisher's logseries abundance   data. Function prestonfit groups species frequencies   doubling octave classes fits Preston's lognormal model,   function prestondistr fits truncated lognormal model   without pooling data octaves.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"","code":"fisherfit(x, ...) prestonfit(x, tiesplit = TRUE, ...) prestondistr(x, truncate = -1, ...) # S3 method for prestonfit plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\",      line.col = \"red\", lwd = 2, ...) # S3 method for prestonfit lines(x, line.col = \"red\", lwd = 2, ...) veiledspec(x, ...) as.fisher(x, ...) # S3 method for fisher plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\",              kind = c(\"bar\", \"hiplot\", \"points\", \"lines\"), add = FALSE, ...) as.preston(x, tiesplit = TRUE, ...) # S3 method for preston plot(x, xlab = \"Frequency\", ylab = \"Species\", bar.col = \"skyblue\", ...) # S3 method for preston lines(x, xadjust = 0.5, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"x Community data vector fitting functions result     object plot functions. tiesplit Split frequencies \\(1, 2, 4, 8\\) etc adjacent      octaves. truncate Truncation point log-Normal model, log2     units. Default value \\(-1\\) corresponds left border zero     Octave. choice strongly influences fitting results. xlab, ylab Labels x y axes. bar.col Colour data bars. line.col Colour fitted line. lwd Width fitted line. kind Kind plot drawn: \"bar\" similar bar plot     plot.fisherfit, \"hiplot\" draws vertical lines     plot(..., type=\"h\"), \"points\"     \"lines\" obvious. add Add existing plot. xadjust Adjustment horizontal positions octaves. ... parameters passed functions. Ignored      prestonfit tiesplit passed .preston     prestondistr.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Fisher's logarithmic series expected number species   \\(f\\) \\(n\\) observed individuals \\(f_n = \\alpha x^n /   n\\) (Fisher et al. 1943).  estimation possible   genuine counts individuals. parameter \\(\\alpha\\) used   diversity index can estimated separate function   fisher.alpha. parameter \\(x\\) taken   nuisance parameter estimated separately taken   \\(n/(n+\\alpha)\\). Helper function .fisher transforms   abundance data Fisher frequency table. Diversity given   NA communities one (zero) species:   reliable way estimating diversity, even equations   return bogus numeric value cases. Preston (1948) satisfied Fisher's model seemed   imply infinite species richness, postulated rare species   diminishing class species middle frequency   scale. achieved collapsing higher frequency classes   wider wider “octaves” doubling class limits: 1, 2, 3--4,   5--8, 9--16 etc. occurrences. seems Preston regarded   frequencies 1, 2, 4, etc.. “tied” octaves   (Williamson & Gaston 2005). means half species   frequency 1 shown lowest octave, rest   transferred second octave. Half species   second octave transferred higher one well,   usually large number species. practise makes data   look lognormal reducing usually high lowest   octaves. can achieved setting argument tiesplit = TRUE.    tiesplit = FALSE frequencies split,   ones lowest octave, twos second, etc.   Williamson & Gaston (2005) discuss alternative definitions   detail, consulted critical review   log-Normal model. logseries data look like lognormal plotted   Preston's way. expected frequency \\(f\\) abundance octave   \\(o\\) defined \\(f_o = S_0 \\exp(-(\\log_2(o) -   \\mu)^2/2/\\sigma^2)\\),   \\(\\mu\\) location mode \\(\\sigma\\) width,   \\(\\log_2\\) scale, \\(S_0\\) expected   number species mode. lognormal model usually truncated   left rare species observed. Function   prestonfit fits truncated lognormal model second   degree log-polynomial octave pooled data using Poisson (  tiesplit = FALSE) quasi-Poisson (tiesplit = TRUE)   error.  Function prestondistr fits left-truncated   Normal distribution \\(\\log_2\\) transformed non-pooled   observations direct maximization log-likelihood. Function   prestondistr modelled function   fitdistr can used alternative   distribution models. functions common print, plot lines   methods. lines function adds fitted curve   octave range line segments showing location mode   width (sd) response. Function .preston   transforms abundance data octaves.  Argument tiesplit   influence fit prestondistr, influence   barplot octaves. total extrapolated richness fitted Preston model can   found function veiledspec. function accepts results   prestonfit prestondistr.   veiledspec called species count vector,   internally use prestonfit. Function specpool   provides alternative ways estimating number unseen   species. fact, Preston's lognormal model seems truncated   ends, may main reason result differ   lognormal models fitted Rank--Abundance diagrams   functions rad.lognormal.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"function prestonfit returns object fitted  coefficients, observed (freq) fitted   (fitted) frequencies, string describing fitting  method. Function prestondistr omits entry  fitted.  function fisherfit returns result  nlm, item estimate \\(\\alpha\\).   result object amended nuisance parameter item  fisher observed data .fisher","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Fisher, R.., Corbet, .S. & Williams, C.B. (1943). relation   number species number individuals   random sample animal population. Journal Animal Ecology   12: 42--58. Preston, F.W. (1948) commonness rarity   species. Ecology 29, 254--283. Williamson, M. & Gaston, K.J. (2005). lognormal distribution   appropriate null hypothesis species--abundance   distribution. Journal Animal Ecology 74, 409--422.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"Bob O'Hara Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/fisherfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit Fisher's Logseries and Preston's Lognormal Model to Abundance Data — fisherfit","text":"","code":"data(BCI) mod <- fisherfit(BCI[5,]) mod #>  #> Fisher log series model #> No. of species: 101  #> Fisher alpha:   37.96423  #>  # prestonfit seems to need large samples mod.oct <- prestonfit(colSums(BCI)) mod.ll <- prestondistr(colSums(BCI)) mod.oct #>  #> Preston lognormal model #> Method: Quasi-Poisson fit to octaves  #> No. of species: 225  #>  #>      mode     width        S0  #>  4.885798  2.932690 32.022923  #>  #> Frequencies by Octave #>                 0        1        2      3        4        5        6        7 #> Observed 9.500000 16.00000 18.00000 19.000 30.00000 35.00000 31.00000 26.50000 #> Fitted   7.994154 13.31175 19.73342 26.042 30.59502 31.99865 29.79321 24.69491 #>                 8        9       10     11 #> Observed 18.00000 13.00000 7.000000 2.0000 #> Fitted   18.22226 11.97021 7.000122 3.6443 #>  mod.ll #>  #> Preston lognormal model #> Method: maximized likelihood to log2 abundances  #> No. of species: 225  #>  #>      mode     width        S0  #>  4.365002  2.753531 33.458185  #>  #> Frequencies by Octave #>                0        1        2        3        4        5        6        7 #> Observed 9.50000 16.00000 18.00000 19.00000 30.00000 35.00000 31.00000 26.50000 #> Fitted   9.52392 15.85637 23.13724 29.58961 33.16552 32.58022 28.05054 21.16645 #>                 8         9       10      11 #> Observed 18.00000 13.000000 7.000000 2.00000 #> Fitted   13.99829  8.113746 4.121808 1.83516 #>  plot(mod.oct)   lines(mod.ll, line.col=\"blue3\") # Different ## Smoothed density den <- density(log2(colSums(BCI))) lines(den$x, ncol(BCI)*den$y, lwd=2) # Fairly similar to mod.oct  ## Extrapolated richness veiledspec(mod.oct) #> Extrapolated     Observed       Veiled  #>    235.40577    225.00000     10.40577  veiledspec(mod.ll) #> Extrapolated     Observed       Veiled  #>   230.931018   225.000000     5.931018"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Functions goodness inertcomp can   used assess goodness fit individual sites   species. Function vif.cca alias.cca can used   analyse linear dependencies among constraints conditions.   addition, diagnostic tools (see 'Details').","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"","code":"# S3 method for cca goodness(object, choices, display = c(\"species\", \"sites\"),     model = c(\"CCA\", \"CA\"), summarize = FALSE, addprevious = FALSE, ...) inertcomp(object, display = c(\"species\", \"sites\"),     unity = FALSE, proportional = FALSE) spenvcor(object) intersetcor(object) vif.cca(object) # S3 method for cca alias(object, names.only = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"object result object cca,     rda, dbrda capscale. display Display \"species\" \"sites\". Species     available dbrda capscale. choices Axes shown. Default show axes     \"model\". model Show constrained (\"CCA\") unconstrained     (\"CA\") results. summarize Show accumulated total. addprevious Add variation explained previous components      statistic=\"explained\". model = \"CCA\" add      conditioned (partialled ) variation, model = \"CA\"      add conditioned constrained variation. give      cumulative explanation previous components. unity Scale inertia components unit sum (sum items     1). proportional Give inertia components proportional     corresponding total item (sum row 1).     option takes precedence unity. names.Return names aliased variable(s) instead     defining equations. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Function goodness gives cumulative proportion inertia   accounted species chosen axes. proportions can   assessed either species sites depending argument   display, species available distance-based   dbrda. function implemented   capscale. Function inertcomp decomposes inertia partial,   constrained unconstrained components site species.   Legendre & De Cáceres (2012) called inertia   components local contributions beta-diversity (LCBD)   species contributions beta-diversity (SCBD), give   relative contributions summing unity (argument   unity = TRUE). interpretation, appropriate dissimilarity   measures used dbrda appropriate   standardization rda (Legendre & De   Cáceres 2012). function implemented   capscale. Function spenvcor finds -called “species --     environment correlation” (weighted) correlation   weighted average scores linear combination scores.  bad   measure goodness ordination, sensitive extreme   scores (like correlations ), sensitive overfitting   using many constraints. Better models often poorer   correlations. Function ordispider can show   graphically. Function intersetcor finds -called “interset     correlation” (weighted) correlation weighted averages scores   constraints.  defined contrasts used factor   variables.  bad measure since correlation.  ,   focuses correlations single contrasts single axes   instead looking multivariate relationship.  Fitted vectors   (envfit) provide better alternative.  Biplot scores   (see scores.cca) multivariate alternative   (weighted) correlation linear combination scores   constraints. Function vif.cca gives variance inflation factors   constraint contrast factor constraints. partial ordination,   conditioning variables analysed together constraints. Variance   inflation diagnostic tool identify useless constraints.   common rule values 10 indicate redundant   constraints. later constraints complete linear combinations   conditions previous constraints, completely removed   estimation, biplot scores centroids calculated   aliased constraints. note printed default   output aliased constraints. Function alias   give linear coefficients defining aliased constraints,   names argument names.= TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"functions return matrices vectors appropriate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Greenacre, M. J. (1984). Theory applications correspondence   analysis. Academic Press, London. Gross, J. (2003). Variance inflation factors. R News 3(1),   13--15. Legendre, P. & De Cáceres, M. (2012). Beta diversity   variance community data: dissimilarity coefficients   partitioning. Ecology Letters 16, 951--963.   doi:10.1111/ele.12141","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"Jari Oksanen. vif.cca relies heavily code   W. N. Venables. alias.cca simplified version   alias.lm.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/goodness.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Diagnostic Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — goodness.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env) goodness(mod, addprevious = TRUE) #>                CCA1      CCA2      CCA3      CCA4 #> Achimill 0.36630013 0.3822685 0.3838616 0.4934158 #> Agrostol 0.67247051 0.6724758 0.6779597 0.7773267 #> Airaprae 0.36213737 0.3698100 0.3816619 0.3908018 #> Alopgeni 0.61547145 0.6966105 0.7042650 0.7212918 #> Anthodor 0.24619147 0.2795001 0.3509172 0.3609709 #> Bellpere 0.41185412 0.4179432 0.4847618 0.4849622 #> Bromhord 0.33487622 0.3397416 0.3870032 0.5505037 #> Chenalbu 0.23594716 0.2684323 0.2828928 0.2885321 #> Cirsarve 0.29041563 0.3013655 0.3080671 0.3591280 #> Comapalu 0.16338257 0.6836790 0.7390659 0.7963425 #> Eleopalu 0.55132024 0.6099415 0.6193301 0.6259818 #> Elymrepe 0.25239595 0.2710266 0.2761491 0.2882666 #> Empenigr 0.27089495 0.3132399 0.3153052 0.3154203 #> Hyporadi 0.31349648 0.3371809 0.3387669 0.3388716 #> Juncarti 0.43923609 0.4492937 0.4871043 0.5224072 #> Juncbufo 0.70439967 0.7226263 0.7228786 0.7257471 #> Lolipere 0.48141171 0.5720410 0.5727299 0.6034007 #> Planlanc 0.54969676 0.6084389 0.6802195 0.6826265 #> Poaprat  0.40267189 0.4944813 0.5014516 0.5326546 #> Poatriv  0.49694972 0.5409439 0.5468830 0.5594817 #> Ranuflam 0.68677962 0.6983001 0.7020461 0.7064850 #> Rumeacet 0.44788204 0.5211145 0.7673956 0.7691199 #> Sagiproc 0.27039747 0.3497634 0.3553109 0.3613746 #> Salirepe 0.64788354 0.7264891 0.7276110 0.7639711 #> Scorautu 0.54312496 0.5510319 0.6078931 0.6140593 #> Trifprat 0.37328840 0.4101104 0.6624199 0.6625703 #> Trifrepe 0.03048149 0.2115857 0.3300132 0.4207437 #> Vicilath 0.17824132 0.1784611 0.3762406 0.4279428 #> Bracruta 0.15585567 0.1641095 0.1672797 0.2449864 #> Callcusp 0.30771429 0.3143582 0.3308502 0.3518027 goodness(mod, addprevious = TRUE, summ = TRUE) #>  Achimill  Agrostol  Airaprae  Alopgeni  Anthodor  Bellpere  Bromhord  Chenalbu  #> 0.4934158 0.7773267 0.3908018 0.7212918 0.3609709 0.4849622 0.5505037 0.2885321  #>  Cirsarve  Comapalu  Eleopalu  Elymrepe  Empenigr  Hyporadi  Juncarti  Juncbufo  #> 0.3591280 0.7963425 0.6259818 0.2882666 0.3154203 0.3388716 0.5224072 0.7257471  #>  Lolipere  Planlanc   Poaprat   Poatriv  Ranuflam  Rumeacet  Sagiproc  Salirepe  #> 0.6034007 0.6826265 0.5326546 0.5594817 0.7064850 0.7691199 0.3613746 0.7639711  #>  Scorautu  Trifprat  Trifrepe  Vicilath  Bracruta  Callcusp  #> 0.6140593 0.6625703 0.4207437 0.4279428 0.2449864 0.3518027  # Inertia components inertcomp(mod, prop = TRUE) #>                pCCA        CCA        CA #> Achimill 0.34271900 0.15069678 0.5065842 #> Agrostol 0.55602406 0.22130269 0.2226733 #> Airaprae 0.06404726 0.32675457 0.6091982 #> Alopgeni 0.34238968 0.37890210 0.2787082 #> Anthodor 0.10259139 0.25837947 0.6390291 #> Bellpere 0.40972447 0.07523776 0.5150378 #> Bromhord 0.33046684 0.22003683 0.4494963 #> Chenalbu 0.11064346 0.17788865 0.7114679 #> Cirsarve 0.26649913 0.09262886 0.6408720 #> Comapalu 0.16096277 0.63537969 0.2036575 #> Eleopalu 0.53954819 0.08643366 0.3740182 #> Elymrepe 0.22234322 0.06592337 0.7117334 #> Empenigr 0.10361994 0.21180040 0.6845797 #> Hyporadi 0.03889627 0.29997533 0.6611284 #> Juncarti 0.43439190 0.08801527 0.4775928 #> Juncbufo 0.66622672 0.05952038 0.2742529 #> Lolipere 0.46273045 0.14067027 0.3965993 #> Planlanc 0.51993753 0.16268893 0.3173735 #> Poaprat  0.39408053 0.13857406 0.4673454 #> Poatriv  0.05598349 0.50349824 0.4405183 #> Ranuflam 0.68509904 0.02138594 0.2935150 #> Rumeacet 0.40125987 0.36786003 0.2308801 #> Sagiproc 0.26050435 0.10087025 0.6386254 #> Salirepe 0.12527838 0.63869277 0.2360289 #> Scorautu 0.10895437 0.50510492 0.3859407 #> Trifprat 0.34544815 0.31712212 0.3374297 #> Trifrepe 0.02132183 0.39942191 0.5792563 #> Vicilath 0.12125433 0.30668844 0.5720572 #> Bracruta 0.07222706 0.17275938 0.7550136 #> Callcusp 0.29447422 0.05732850 0.6481973 inertcomp(mod) #>                  pCCA         CCA         CA #> Achimill 0.0173766015 0.007640656 0.02568493 #> Agrostol 0.0456558521 0.018171449 0.01828399 #> Airaprae 0.0066672285 0.034014687 0.06341666 #> Alopgeni 0.0325977567 0.036073980 0.02653486 #> Anthodor 0.0096274015 0.024246897 0.05996790 #> Bellpere 0.0154640710 0.002839669 0.01943887 #> Bromhord 0.0180126793 0.011993496 0.02450059 #> Chenalbu 0.0031913088 0.005130874 0.02052099 #> Cirsarve 0.0110663060 0.003846389 0.02661204 #> Comapalu 0.0127652351 0.050389111 0.01615116 #> Eleopalu 0.0797827194 0.012780901 0.05530588 #> Elymrepe 0.0193932154 0.005749967 0.06207879 #> Empenigr 0.0063826176 0.013046147 0.04216766 #> Hyporadi 0.0046669914 0.035992710 0.07932587 #> Juncarti 0.0359126341 0.007276518 0.03948420 #> Juncbufo 0.0494087668 0.004414156 0.02033917 #> Lolipere 0.0368344271 0.011197683 0.03157023 #> Planlanc 0.0366139947 0.011456552 0.02234944 #> Poaprat  0.0142991623 0.005028142 0.01695757 #> Poatriv  0.0028845344 0.025942611 0.02269759 #> Ranuflam 0.0446783229 0.001394671 0.01914141 #> Rumeacet 0.0288221948 0.026423110 0.01658394 #> Sagiproc 0.0151161507 0.005853146 0.03705718 #> Salirepe 0.0142756439 0.072779924 0.02689581 #> Scorautu 0.0030643984 0.014206339 0.01085478 #> Trifprat 0.0228613139 0.020986733 0.02233067 #> Trifrepe 0.0008339368 0.015622139 0.02265580 #> Vicilath 0.0049088357 0.012415912 0.02315905 #> Bracruta 0.0032317812 0.007730074 0.03378289 #> Callcusp 0.0319130878 0.006212868 0.07024716 # vif.cca vif.cca(mod) #>   Moisture.L   Moisture.Q   Moisture.C           A1 ManagementHF ManagementNM  #>     1.504327     1.284489     1.347660     1.367328     2.238653     2.570972  #> ManagementSF  #>     2.424444  # Aliased constraints mod <- cca(dune ~ ., dune.env) mod #> Call: cca(formula = dune ~ A1 + Moisture + Management + Use + Manure, #> data = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Constrained    1.5032     0.7106   12 #> Unconstrained  0.6121     0.2894    7 #> Inertia is scaled Chi-square  #> Some constraints or conditions were aliased because they were redundant #>  #> Eigenvalues for constrained axes: #>   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11  #> 0.4671 0.3410 0.1761 0.1532 0.0953 0.0703 0.0589 0.0499 0.0318 0.0260 0.0228  #>  CCA12  #> 0.0108  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7  #> 0.27237 0.10876 0.08975 0.06305 0.03489 0.02529 0.01798  #>  vif.cca(mod) #>           A1   Moisture.L   Moisture.Q   Moisture.C ManagementHF ManagementNM  #>     2.208249     2.858927     3.072715     3.587087     6.608315   142.359372  #> ManagementSF        Use.L        Use.Q     Manure.L     Manure.Q     Manure.C  #>    12.862713     2.642718     3.007238    80.828330    49.294455    21.433337  #>     Manure^4  #>           NA  alias(mod) #> Model : #> dune ~ A1 + Moisture + Management + Use + Manure #>  #> Complete : #>          A1 Moisture.L Moisture.Q Moisture.C ManagementHF ManagementNM #> Manure^4                                                   8.366600    #>          ManagementSF Use.L Use.Q Manure.L  Manure.Q  Manure.C  #> Manure^4                           5.291503 -4.472136  2.645751 #>  with(dune.env, table(Management, Manure)) #>           Manure #> Management 0 1 2 3 4 #>         BF 0 2 1 0 0 #>         HF 0 1 2 2 0 #>         NM 6 0 0 0 0 #>         SF 0 0 1 2 3 # The standard correlations (not recommended) ## IGNORE_RDIFF_BEGIN spenvcor(mod) #>      CCA1      CCA2      CCA3      CCA4      CCA5      CCA6      CCA7      CCA8  #> 0.9636709 0.9487249 0.9330741 0.8734876 0.9373716 0.8362687 0.9748793 0.8392720  #>      CCA9     CCA10     CCA11     CCA12  #> 0.8748741 0.6087512 0.6633248 0.7581210  intersetcor(mod) #>                    CCA1        CCA2        CCA3         CCA4        CCA5 #> A1           -0.5332506  0.13691202 -0.47996401 -0.259859587 -0.09894964 #> Moisture.L   -0.8785505  0.17867589  0.03714134  0.181952935 -0.09826534 #> Moisture.Q   -0.1956664 -0.33044917 -0.27321286 -0.180333890  0.26609291 #> Moisture.C   -0.2023782 -0.09698397  0.28596824 -0.261712720 -0.49103002 #> ManagementHF  0.3473460  0.01680324 -0.51205769  0.194144965  0.30752664 #> ManagementNM -0.5699549 -0.61111645  0.14751127 -0.013777789  0.04571982 #> ManagementSF -0.1197499  0.64084416  0.19780650  0.134892908 -0.09679992 #> Use.L        -0.1871999  0.32990444 -0.30941161 -0.372747011  0.09586963 #> Use.Q        -0.1820298 -0.48874152 -0.01997442 -0.009812946  0.04812588 #> Manure.L      0.3175126  0.65945634  0.03724864 -0.025383543 -0.04077470 #> Manure.Q     -0.4075615 -0.21149073  0.49297244 -0.176686201  0.11973190 #> Manure.C      0.4676279  0.11376054  0.29132473 -0.173382982  0.14219924 #> Manure^4      0.2222349 -0.12789494 -0.12921227  0.108367170 -0.02559567 #>                     CCA6        CCA7        CCA8        CCA9         CCA10 #> A1           -0.15225816  0.25788462  0.19247720 -0.27694466 -0.1158449480 #> Moisture.L   -0.02923342  0.07858647 -0.10772510  0.07101300  0.0952517164 #> Moisture.Q   -0.11211675  0.05062810 -0.48302647  0.06138704 -0.2053304965 #> Moisture.C   -0.23581275 -0.38693407 -0.10144580 -0.21907160  0.1875632770 #> ManagementHF -0.24278705  0.16364055 -0.14053438  0.31066725  0.1310215145 #> ManagementNM -0.06430101  0.23917584  0.14375754 -0.27103732  0.0002768613 #> ManagementSF -0.01611984 -0.49726250  0.08073472 -0.30235728 -0.1381281272 #> Use.L         0.19127262 -0.44624831 -0.18450714  0.12950951  0.0452826749 #> Use.Q         0.13485545  0.10367354 -0.11020112  0.41245485 -0.0766932005 #> Manure.L     -0.22265819 -0.49627772 -0.16971786 -0.03943343 -0.0045229147 #> Manure.Q     -0.19402211 -0.11937394  0.17611673 -0.44002593  0.0903998202 #> Manure.C      0.14760330  0.07842345  0.37774417  0.10181374  0.1055057288 #> Manure^4     -0.36683782  0.05953330  0.40927409 -0.06054381 -0.1500198368 #>                    CCA11       CCA12 #> A1           -0.03550223 -0.08881387 #> Moisture.L    0.06404776 -0.08587882 #> Moisture.Q   -0.21810558  0.16917878 #> Moisture.C    0.13701079 -0.14260914 #> ManagementHF  0.17283125  0.13296499 #> ManagementNM -0.01358436  0.09533598 #> ManagementSF -0.01468592 -0.06614834 #> Use.L        -0.08584883  0.32559307 #> Use.Q         0.41893616  0.04881247 #> Manure.L      0.02396993  0.13049087 #> Manure.Q      0.12987366  0.07137031 #> Manure.C      0.05176927 -0.41550238 #> Manure^4     -0.41603287  0.01661279 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness.metaMDS find goodness fit measure   points nonmetric multidimensional scaling, function   stressplot makes Shepard diagram.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"","code":"# S3 method for metaMDS goodness(object, dis, ...) # S3 method for default stressplot(object, dis, pch, p.col = \"blue\", l.col = \"red\",      lwd = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"object result object metaMDS,      monoMDS isoMDS. dis Dissimilarities.  used     metaMDS monoMDS, must used     isoMDS. pch Plotting character points.  Default dependent     number points. p.col, l.col Point line colours. lwd Line width. monoMDS default     lwd = 1 two lines drawn, lwd = 2      otherwise. ... parameters functions, e.g. graphical parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness.metaMDS finds goodness fit statistic   observations (points).  defined sum squared   values equal squared stress.  Large values indicate poor fit.   absolute values goodness statistic depend   definition stress: isoMDS expresses   stress percents, therefore goodness values 100 times   higher monoMDS expresses   stress proportion. Function stressplot draws Shepard diagram plot   ordination distances monotone linear fit line   original dissimilarities.  addition, displays two   correlation-like statistics goodness fit graph.   nonmetric fit based stress \\(S\\) defined \\(R^2   = 1-S^2\\).  “linear fit” squared   correlation fitted values ordination distances.   monoMDS, “linear fit” \\(R^2\\)   “stress type 2” equal. functions can used metaMDS,   monoMDS isoMDS.  original   dissimilarities given monoMDS   metaMDS results (latter tries reconstruct   dissimilarities using metaMDSredist   isoMDS used engine).    isoMDS dissimilarities must given.    either case, functions inspect dissimilarities   consistent current ordination, refuse analyse   inconsistent dissimilarities.  Function goodness.metaMDS   generic vegan, must spell name completely   isoMDS class.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Function goodness returns vector values. Function  stressplot returns invisibly object items   original dissimilarities, ordination distances fitted values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/goodness.metaMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Goodness of Fit and Shepard Plot for Nonmetric Multidimensional Scaling — goodness.metaMDS","text":"","code":"data(varespec) mod <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.1955839  #> Run 2 stress 0.1974418  #> Run 3 stress 0.195049  #> Run 4 stress 0.1948413  #> Run 5 stress 0.1969805  #> Run 6 stress 0.2005511  #> Run 7 stress 0.2080749  #> Run 8 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04161743  max resid 0.1517614  #> Run 9 stress 0.1843196  #> Run 10 stress 0.2166093  #> Run 11 stress 0.2088293  #> Run 12 stress 0.2066172  #> Run 13 stress 0.1955842  #> Run 14 stress 0.195049  #> Run 15 stress 0.2109853  #> Run 16 stress 0.195049  #> Run 17 stress 0.1955836  #> Run 18 stress 0.2245479  #> Run 19 stress 0.1825658  #> ... Procrustes: rmse 1.859013e-06  max resid 5.255336e-06  #> ... Similar to previous best #> Run 20 stress 0.2093085  #> *** Best solution repeated 1 times stressplot(mod)  gof <- goodness(mod) gof #>  [1] 0.02984501 0.03513712 0.04189552 0.04598085 0.04003109 0.03441359 #>  [7] 0.03295039 0.03050115 0.03060825 0.02994103 0.03526095 0.02621454 #> [13] 0.03831015 0.02980923 0.03369273 0.02225952 0.03561673 0.03505294 #> [19] 0.06577458 0.03268326 0.03502942 0.02956642 0.05168324 0.04601820 plot(mod, display = \"sites\", type = \"n\") points(mod, display = \"sites\", cex = 2*gof/mean(gof))"},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":null,"dir":"Reference","previous_headings":"","what":"Indicator Power of Species — indpower","title":"Indicator Power of Species — indpower","text":"Indicator power calculation Halme et al.  (2009)   congruence indicator target species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indicator Power of Species — indpower","text":"","code":"indpower(x, type = 0)"},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indicator Power of Species — indpower","text":"x Community data frame matrix. type type   statistic returned. See Details explanation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indicator Power of Species — indpower","text":"Halme et al. (2009) described index indicator power defined   \\(IP_I = \\sqrt{\\times  b}\\), \\(= S / O_I\\)   \\(b = 1 - (O_T - S) / (N - O_I)\\).    \\(N\\) number sites,   \\(S\\) number shared occurrences indicator (\\(\\))   target (\\(T\\)) species. \\(O_I\\) \\(O_T\\) number   occurrences indicator target species. type   argument function call enables choose statistic   return. type = 0 returns \\(IP_I\\), type = 1 returns    \\(\\), type = 2 returns \\(b\\).   Total indicator power (TIP) indicator species column mean   (without value, see examples).     Halme et al. (2009) explain calculate confidence   intervals statistics, see Examples.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indicator Power of Species — indpower","text":"matrix indicator species rows   target species columns (indicated first letters   row/column names).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indicator Power of Species — indpower","text":"Halme, P., Mönkkönen, M., Kotiaho, J. S,  Ylisirniö, -L. 2009. Quantifying indicator power indicator species. Conservation Biology 23: 1008--1016.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indicator Power of Species — indpower","text":"Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/indpower.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indicator Power of Species — indpower","text":"","code":"data(dune) ## IP values ip <- indpower(dune) ## and TIP values diag(ip) <- NA (TIP <- rowMeans(ip, na.rm=TRUE)) #> i.Achimill i.Agrostol i.Airaprae i.Alopgeni i.Anthodor i.Bellpere i.Bromhord  #>  0.3186250  0.3342800  0.2168133  0.3416198  0.3567884  0.3432281  0.3665632  #> i.Chenalbu i.Cirsarve i.Comapalu i.Eleopalu i.Elymrepe i.Empenigr i.Hyporadi  #>  0.2095044  0.2781640  0.1713273  0.2414787  0.3263516  0.2016196  0.2378197  #> i.Juncarti i.Juncbufo i.Lolipere i.Planlanc  i.Poaprat  i.Poatriv i.Ranuflam  #>  0.2915850  0.3331330  0.3998442  0.3426064  0.4094319  0.3929520  0.2663080  #> i.Rumeacet i.Sagiproc i.Salirepe i.Scorautu i.Trifprat i.Trifrepe i.Vicilath  #>  0.3484684  0.3788905  0.2898512  0.4362493  0.3145854  0.4503764  0.2605349  #> i.Bracruta i.Callcusp  #>  0.4252676  0.2070766   ## p value calculation for a species ## from Halme et al. 2009 ## i is ID for the species i <- 1 fun <- function(x, i) indpower(x)[i,-i] ## 'c0' randomizes species occurrences os <- oecosimu(dune, fun, \"c0\", i=i, nsimul=99) #> Warning: nullmodel transformed 'comm' to binary data ## get z values from oecosimu output z <- os$oecosimu$z ## p-value (p <- sum(z) / sqrt(length(z))) #> [1] -1.616282 ## 'heterogeneity' measure (chi2 <- sum((z - mean(z))^2)) #> [1] 93.72683 pchisq(chi2, df=length(z)-1) #> [1] 1 ## Halme et al.'s suggested output out <- c(TIP=TIP[i],      significance=p,     heterogeneity=chi2,     minIP=min(fun(dune, i=i)),     varIP=sd(fun(dune, i=i)^2)) out #> TIP.i.Achimill   significance  heterogeneity          minIP          varIP  #>      0.3186250     -1.6162817     93.7268284      0.0000000      0.2142097"},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Linear Model Diagnostics for Constrained Ordination — influence.cca","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"set function extracts influence statistics   linear model statistics directly constrained ordination result   object cca, rda,   capscale dbrda. constraints   linear model functions support functions return identical   results corresponding linear models (lm),   can use documentation. main functions normal usage   leverage values (hatvalues), standardized residuals   (rstandard), studentized leave-one-residuals   (rstudent), Cook's distance   (cooks.distance).  addition, vcov   returns variance-covariance matrix coefficients,   diagonal values variances coefficients. functions   mainly support functions , can used directly.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"","code":"# S3 method for cca hatvalues(model, ...) # S3 method for cca rstandard(model, type = c(\"response\", \"canoco\"), ...) # S3 method for cca rstudent(model, type = c(\"response\", \"canoco\"), ...) # S3 method for cca cooks.distance(model, type = c(\"response\", \"canoco\"), ...)  # S3 method for cca sigma(object, type = c(\"response\", \"canoco\"), ...) # S3 method for cca vcov(object, type = \"canoco\", ...) # S3 method for cca SSD(object, type = \"canoco\", ...)  # S3 method for cca qr(x, ...) # S3 method for cca df.residual(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"model, object, x constrained ordination result object. type Type statistics used extracting raw residuals     residual standard deviation (sigma). Either     \"response\" species data difference WA LC     scores \"canoco\". ... arguments functions (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"vegan algorithm constrained ordination uses linear model   (weighted linear model cca) find fitted   values dependent community data, constrained ordination   based fitted response (Legendre & Legendre 2012).   hatvalues give leverage values constraints,   leverage independent response data. influence   statistics (rstandard, rstudent,   cooks.distance) based leverage, raw   residuals residual standard deviation (sigma).   type = \"response\" raw residuals given   unconstrained component constrained ordination, influence   statistics matrix dimensions . observations times   . species. cca statistics   obtained lm model using Chi-square standardized   species data (see decostand) dependent variable,   row sums community data weights, rda   lm model uses non-modified community data   weights. algorithm CANOCO software constraints results   iteration performing linear regression weighted averages (WA)   scores constraints taking fitted values regression   linear combination (LC) scores (ter Braak 1984). WA scores   directly found species scores, LC scores linear   combinations constraints regression. type =   \"canoco\" raw residuals differences WA LC scores,   residual standard deviation (sigma) taken   axis sum squared WA scores minus one. quantities   relationship residual component ordination, rather   methodological artefacts algorithm used   vegan. result matrix dimensions .   observations times . constrained axes. Function vcov returns matrix variances   covariances regression coefficients. diagonal values   matrix variances, square roots give standard   errors regression coefficients. function based   SSD extracts sum squares crossproducts   residuals. residuals defined similarly influence   measures type similar properties   limitations, define dimensions result matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd   English ed. Elsevier. ter Braak, C.J.F. (1984--): CANOCO -- FORTRAN program   canonical community ordination [partial]   [detrended] [canonical] correspondence analysis, principal components   analysis redundancy analysis. TNO Inst. Applied Computer   Sci., Stat. Dept. Wageningen, Netherlands.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Function .mlm casts ordination object multiple   linear model class \"mlm\" (see lm), similar   statistics can derived modified object set   functions. However, problems R   implementation analysis multiple linear model   objects. results differ, current set functions   probable correct. use .mlm objects   avoided.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/influence.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Linear Model Diagnostics for Constrained Ordination — influence.cca","text":"","code":"data(varespec, varechem) mod <- cca(varespec ~ Al + P + K, varechem) ## leverage hatvalues(mod) #>         18         15         24         27         23         19         22  #> 0.06904416 0.06666628 0.15245083 0.18944882 0.09291510 0.05122338 0.15309307  #>         16         28         13         14         20         25          7  #> 0.09605909 0.27139695 0.75889765 0.04958141 0.06582891 0.10590183 0.20630888  #>          5          6          3          4          2          9         12  #> 0.19797654 0.16280522 0.22738889 0.30915530 0.15557066 0.14855598 0.09046701  #>         10         11         21  #> 0.12745850 0.10984996 0.14195559  plot(hatvalues(mod), type = \"h\")  ## ordination plot with leverages: points with high leverage have ## similar LC and WA scores plot(mod, type = \"n\") ordispider(mod)       # segment from LC to WA scores points(mod, dis=\"si\", cex=5*hatvalues(mod), pch=21, bg=2) # WA scores text(mod, dis=\"bp\", col=4)   ## deviation and influence head(rstandard(mod)) #>      Callvulg   Empenigr    Rhodtome     Vaccmyrt   Vaccviti   Pinusylv #> 18  0.4084518  0.9442480 -0.68178124 -0.798241724  0.9883838 -0.3086868 #> 15 -1.3902462 -1.5717947 -0.70784872 -0.645563228  0.2353736 -0.1679226 #> 24  0.9622453 -0.9520875 -0.08884556 -0.654099911  0.2420416  0.4832198 #> 27 -1.1080099  1.0938951  1.70146427 -0.196668562 -0.3937467 -0.7424140 #> 23  0.3979939  1.3218254 -0.63872221 -1.003315524  1.8996365 -0.4495408 #> 19 -1.5874575  0.7894087 -0.59609083 -0.006142973  0.1334143 -0.1060450 #>      Descflex   Betupube   Vacculig   Diphcomp      Dicrsp     Dicrfusc #> 18 -0.5785258 -0.4585683  0.7640788  4.3748349 -0.39301720 -0.656213958 #> 15 -0.5416812 -0.4594716 -0.3410155 -0.2704388 -0.05769657  0.406022095 #> 24 -0.6409619  0.1908003  0.0198320 -0.2175720  3.75416938 -0.009140093 #> 27  4.2976822 -0.2704153  0.9211453 -0.2037075 -0.84410200 -0.712968237 #> 23 -0.8356637 -0.2779318 -0.0206861 -0.2899895 -0.67773316 -0.294674408 #> 19 -0.4453843 -0.3739569 -0.3174207 -0.2429740 -0.14281646 -0.819230368 #>      Dicrpoly   Hylosple   Pleuschr    Polypili   Polyjuni   Polycomm #> 18 -0.4933634 -0.6030042 -1.3812122 -0.07430854 -0.5332731 -0.7140513 #> 15 -0.3630434 -0.4055353  1.9930791  0.02126658 -0.2274864 -0.6730241 #> 24  2.2312025 -1.3907968  0.5792314 -0.45358405 -0.4628096 -0.2153846 #> 27 -0.5715008  1.6310289  0.8124329 -0.34628172 -0.8630615  0.9423113 #> 23 -0.4684368 -1.1995321 -0.8241477 -0.04953929  0.7890327 -0.6774675 #> 19 -0.3186606 -0.3948224  0.6180114  0.05035990  0.8260214  2.3626483 #>      Pohlnuta    Ptilcili    Barbhatc   Cladarbu    Cladrang   Cladstel #> 18  0.2918311 -0.42027512 -0.40191333  1.5303054  0.85056948 -0.2218833 #> 15 -0.6168627 -0.47096984 -0.42715787  0.1758993 -0.45409579 -0.3739920 #> 24  1.9274063  0.09984384  0.21066100  0.1668363 -0.08508535 -1.2835676 #> 27 -1.5729552 -0.31944598 -0.09167396 -0.1864165  0.51080623 -0.1083797 #> 23  0.4875575  0.61798970 -0.18848086  0.5574309  0.28079468 -0.4026464 #> 19 -0.1141521 -0.25344373 -0.31179839 -0.2391669 -0.65577452  0.6584127 #>       Cladunci    Cladcocc   Cladcorn    Cladgrac   Cladfimb   Cladcris #> 18 -0.39796095  0.93836573 -0.2564543  0.33864378  1.1572584 -0.2083305 #> 15  0.06761526  0.24340663 -0.1767166  0.27491203  1.0721632  1.9724410 #> 24  1.24902375 -0.98471253 -0.4801382  2.51184311 -1.4063518 -0.3084304 #> 27 -0.59021669 -1.25354423 -0.2460447 -1.09351514 -1.1681499 -1.0337232 #> 23 -0.34604539 -0.10730202  3.9477300  2.51924664  0.3536280  3.3882402 #> 19 -0.33866721  0.02698153  0.1776632  0.03968833 -0.7512944 -0.4763562 #>      Cladchlo   Cladbotr   Cladamau     Cladsp   Cetreric   Cetrisla #> 18 -0.5711604 -0.4914716  4.0852019  0.2489284 -0.4428064 -0.5834462 #> 15 -0.4347061 -0.6517740 -0.3155708 -0.2568784  0.2369559 -0.3468005 #> 24  0.6013607  0.4603779 -0.1576900 -0.5995616  2.7826114  0.3931826 #> 27 -0.5436659 -0.2788962 -0.1606997  0.1557879 -0.7298364 -0.5867612 #> 23  0.1029999  0.6494142 -0.3415411 -0.2330698 -0.6309632 -0.5301977 #> 19  0.2793712 -0.1315438 -0.2705486 -0.2865837 -0.4664078 -0.5056846 #>       Flavniva   Nepharct      Stersp   Peltapht     Icmaeric    Cladcerv #> 18  0.30428187 -0.3624631 -0.23665431 -0.1571633 -0.630333375  0.12058739 #> 15  0.17345018 -0.1919943  0.05469573 -0.3233311 -0.561177494  0.08518455 #> 24 -0.74154401 -0.4146848 -0.05500461 -0.7609417  0.255058737 -0.92761801 #> 27  0.11301489 -0.5064006 -0.08681568 -0.1247151 -0.001277338 -0.04038189 #> 23  0.09411988 -0.4627811  0.47668055  3.5826478 -0.274664798 -0.05517988 #> 19  0.07211309 -0.1693122 -0.17244475 -0.3155345 -0.461532920 -0.02709075 #>       Claddefo   Cladphyl #> 18 -0.43581630 -0.2098378 #> 15  0.94176661 -0.1028102 #> 24 -0.07508682 -1.0479632 #> 27 -1.06110299 -0.4908554 #> 23  2.66430575 -0.4244333 #> 19 -0.08427954 -0.1692474 head(cooks.distance(mod)) #>       Callvulg   Empenigr     Rhodtome     Vaccmyrt     Vaccviti     Pinusylv #> 18 0.003093283 0.01653142 0.0086184263 1.181427e-02 0.0181129462 0.0017667454 #> 15 0.034513793 0.04411649 0.0089472619 7.441951e-03 0.0009892926 0.0005035324 #> 24 0.041636714 0.04076229 0.0003549575 1.923947e-02 0.0026344196 0.0105001237 #> 27 0.071736260 0.06992022 0.1691597848 2.260067e-03 0.0090591037 0.0322065174 #> 23 0.004056312 0.04474315 0.0104472601 2.577825e-02 0.0924100906 0.0051750754 #> 19 0.034013281 0.00841101 0.0047958896 5.093326e-07 0.0002402422 0.0001517834 #>       Descflex    Betupube     Vacculig     Diphcomp       Dicrsp     Dicrfusc #> 18 0.006205594 0.003898934 1.082466e-02 0.3548634058 2.863921e-03 7.984152e-03 #> 15 0.005239584 0.003769873 2.076622e-03 0.0013060122 5.944416e-05 2.943802e-03 #> 24 0.018474359 0.001637053 1.768633e-05 0.0021286828 6.337714e-01 3.756697e-06 #> 27 1.079245024 0.004272814 4.958014e-02 0.0024247421 4.163335e-02 2.970242e-02 #> 23 0.017883042 0.001978130 1.095811e-05 0.0021534900 1.176240e-02 2.223634e-03 #> 19 0.002677405 0.001887502 1.359924e-03 0.0007968265 2.752966e-04 9.058502e-03 #>       Dicrpoly    Hylosple    Pleuschr     Polypili     Polyjuni    Polycomm #> 18 0.004513066 0.006741841 0.035371924 1.023801e-04 0.0052727512 0.009453588 #> 15 0.002353565 0.002936747 0.070934636 8.076156e-06 0.0009241023 0.008088546 #> 24 0.223863289 0.086982577 0.015087217 9.251676e-03 0.0096318471 0.002086096 #> 27 0.019084693 0.155444288 0.038567940 7.006653e-03 0.0435246182 0.051884812 #> 23 0.005619275 0.036846999 0.017393559 6.284604e-05 0.0159429407 0.011753178 #> 19 0.001370570 0.002104010 0.005155103 3.423056e-05 0.0092093061 0.075342921 #>        Pohlnuta     Ptilcili     Barbhatc     Cladarbu     Cladrang #> 18 0.0015790689 0.0032749544 0.0029950405 0.0434204290 0.0134139742 #> 15 0.0067949512 0.0039609143 0.0032582625 0.0005525065 0.0036821731 #> 24 0.1670519112 0.0004482780 0.0019955986 0.0012516596 0.0003255476 #> 27 0.1445719869 0.0059627459 0.0004910701 0.0020305802 0.0152462776 #> 23 0.0060873754 0.0097800450 0.0009097308 0.0079572035 0.0020190921 #> 19 0.0001758783 0.0008669766 0.0013121758 0.0007720518 0.0058043470 #>        Cladstel     Cladunci     Cladcocc     Cladcorn     Cladgrac    Cladfimb #> 18 0.0009128242 2.936424e-03 1.632609e-02 0.0012194323 2.126298e-03 0.024831249 #> 15 0.0024976637 8.163919e-05 1.057972e-03 0.0005576530 1.349574e-03 0.020527262 #> 24 0.0740870642 7.015301e-02 4.360375e-02 0.0103666250 2.837200e-01 0.088939118 #> 27 0.0006863532 2.035516e-02 9.181862e-02 0.0035373629 6.987166e-02 0.079734929 #> 23 0.0041517010 3.066511e-03 2.948453e-04 0.3990922140 1.625248e-01 0.003202372 #> 19 0.0058511426 1.548070e-03 9.826017e-06 0.0004260291 2.126033e-05 0.007618415 #>        Cladcris     Cladchlo     Cladbotr     Cladamau      Cladsp    Cetreric #> 18 0.0008047178 0.0060485887 0.0044785217 0.3094317912 0.001148912 0.003635513 #> 15 0.0694732020 0.0033744318 0.0075858327 0.0017782910 0.001178323 0.001002639 #> 24 0.0042777886 0.0162620357 0.0095308986 0.0011181833 0.016164882 0.348184969 #> 27 0.0624395810 0.0172709295 0.0045450274 0.0015089732 0.001418140 0.031124511 #> 23 0.2939860714 0.0002716767 0.0107999564 0.0029872002 0.001391075 0.010194981 #> 19 0.0030627243 0.0010534342 0.0002335528 0.0009879496 0.001108529 0.002936134 #>       Cetrisla     Flavniva     Nepharct       Stersp     Peltapht     Icmaeric #> 18 0.006311601 1.716683e-03 0.0024359336 1.038405e-03 0.0004579733 7.366793e-03 #> 15 0.002147676 5.372282e-04 0.0006582422 5.342149e-05 0.0018668272 5.623539e-03 #> 24 0.006951741 2.472742e-02 0.0077328775 1.360514e-04 0.0260380002 2.925400e-03 #> 27 0.020117510 7.463161e-04 0.0149844191 4.404005e-04 0.0009088445 9.533741e-08 #> 23 0.007198701 2.268512e-04 0.0054844061 5.818798e-03 0.3286900860 1.931899e-03 #> 19 0.003451467 7.018956e-05 0.0003869197 4.013694e-04 0.0013438101 2.875078e-03 #>        Cladcerv     Claddefo     Cladphyl #> 18 2.696135e-04 3.521639e-03 0.0008164040 #> 15 1.295779e-04 1.583784e-02 0.0001887477 #> 24 3.869397e-02 2.535317e-04 0.0493852158 #> 27 9.528504e-05 6.579101e-02 0.0140785723 #> 23 7.797221e-05 1.817802e-01 0.0046131462 #> 19 9.905729e-06 9.587131e-05 0.0003866237  ## Influence measures from lm y <- decostand(varespec, \"chi.square\") # needed in cca y1 <- with(y, Cladstel)         # take one species for lm lmod1 <- lm(y1 ~ Al + P + K, varechem, weights = rowSums(varespec)) ## numerically identical within 2e-15 all(abs(cooks.distance(lmod1) - cooks.distance(mod)[, \"Cladstel\"]) < 1e-8) #> [1] TRUE  ## t-values of regression coefficients based on type = \"canoco\" ## residuals coef(mod) #>            CCA1         CCA2         CCA3 #> Al  0.007478556 -0.001883637  0.003380774 #> P  -0.006491081 -0.102189737 -0.022306682 #> K  -0.006755568  0.015343662  0.017067351 coef(mod)/sqrt(diag(vcov(mod, type = \"canoco\"))) #>          CCA1      CCA2      CCA3 #> Al  6.5615451 -1.397643  3.313629 #> P  -0.4576132 -6.092557 -1.756774 #> K  -2.0862129  4.007159  5.887926"},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":null,"dir":"Reference","previous_headings":"","what":"Isometric Feature Mapping Ordination — isomap","title":"Isometric Feature Mapping Ordination — isomap","text":"function performs isometric feature mapping consists   three simple steps: (1) retain shortest   dissimilarities among objects, (2) estimate dissimilarities   shortest path distances, (3) perform metric scaling (Tenenbaum et   al. 2000).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Isometric Feature Mapping Ordination — isomap","text":"","code":"isomap(dist, ndim=10, ...) isomapdist(dist, epsilon, k, path = \"shortest\", fragmentedOK =FALSE, ...) # S3 method for isomap summary(object, axes = 4, ...) # S3 method for isomap plot(x, net = TRUE, n.col = \"gray\", type = \"points\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Isometric Feature Mapping Ordination — isomap","text":"dist Dissimilarities. ndim Number axes metric scaling (argument k     cmdscale). epsilon Shortest dissimilarity retained. k Number shortest dissimilarities retained point.    epsilon k given, epsilon used. path Method used stepacross estimate     shortest path, alternatives \"shortest\" \"extended\". fragmentedOK dissimilarity matrix     fragmented. TRUE, analyse largest connected group,     otherwise stop error. x, object isomap result object. axes Number axes displayed. net Draw net retained dissimilarities. n.col Colour drawn net segments. can also vector     recycled points, colour net segment     mixture joined points. type Plot observations either \"points\",     \"text\" use \"none\" plot observations.     \"text\" use ordilabel net = TRUE      ordiplot net = FALSE, pass     extra arguments functions. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Isometric Feature Mapping Ordination — isomap","text":"function isomap first calls function isomapdist   dissimilarity transformation, performs metric scaling   result. arguments isomap passed   isomapdist. functions separate   isompadist transformation easily used   functions simple linear mapping cmdscale. Function isomapdist retains either dissimilarities equal shorter   epsilon, epsilon given, least k   shortest dissimilarities point.  complete dissimilarity   matrix reconstructed using stepacross using either   flexible shortest paths extended dissimilarities (details, see   stepacross). De'ath (1999) actually published essentially method   Tenenbaum et al. (2000), De'ath's function available function   xdiss non-CRAN package mvpart. differences   isomap introduced k criterion, whereas De'ath   used epsilon criterion.  practice, De'ath also retains   higher proportion dissimilarities typical isomap. plot function uses internally ordiplot,   except adds text net using ordilabel.   plot function passes extra arguments functions.    addition, vegan3d package function   rgl.isomap make dynamic 3D plots can   rotated screen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Isometric Feature Mapping Ordination — isomap","text":"Function isomapdist returns dissimilarity object similar  dist. Function isomap returns object class  isomap plot summary methods.  plot function returns invisibly object class  ordiplot. Function scores can extract   ordination scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Isometric Feature Mapping Ordination — isomap","text":"De'ath, G. (1999)  Extended dissimilarity: method robust      estimation ecological distances high beta diversity data.      Plant Ecology 144, 191--199 Tenenbaum, J.B., de Silva, V. & Langford, J.C. (2000) global      network framework nonlinear dimensionality      reduction. Science 290, 2319--2323.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Isometric Feature Mapping Ordination — isomap","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Isometric Feature Mapping Ordination — isomap","text":"Tenenbaum et al. (2000) justify isomap tool unfolding   manifold (e.g. 'Swiss Roll'). Even manifold structure,   sampling must even dense   dissimilarities along manifold shorter across   folds. data manifold structure, results   sensitive parameter values.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/isomap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Isometric Feature Mapping Ordination — isomap","text":"","code":"## The following examples also overlay minimum spanning tree to ## the graphics in red. op <- par(mar=c(4,4,1,1)+0.2, mfrow=c(2,2)) data(BCI) dis <- vegdist(BCI) tr <- spantree(dis) pl <- ordiplot(cmdscale(dis), main=\"cmdscale\") #> species scores not available lines(tr, pl, col=\"red\") ord <- isomap(dis, k=3) ord #>  #> Isometric Feature Mapping (isomap) #>  #> Call: #> isomap(dist = dis, k = 3)  #>  #> Distance method: bray shortest isomap  #> Criterion: k = 3  pl <- plot(ord, main=\"isomap k=3\") lines(tr, pl, col=\"red\") pl <- plot(isomap(dis, k=5), main=\"isomap k=5\") lines(tr, pl, col=\"red\") pl <- plot(isomap(dis, epsilon=0.45), main=\"isomap epsilon=0.45\") lines(tr, pl, col=\"red\")  par(op) ## colour points and web by the dominant species dom <- apply(BCI, 1, which.max) ## need nine colours, but default palette  has only eight op <- palette(c(palette(\"default\"), \"sienna\")) plot(ord, pch = 16, col = dom, n.col = dom)   palette(op)"},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":null,"dir":"Reference","previous_headings":"","what":"Kendall coefficient of concordance — kendall.global","title":"Kendall coefficient of concordance — kendall.global","text":"Function kendall.global computes tests coefficient   concordance among several judges (variables, species)   permutation test. Function kendall.post carries posteriori tests   contributions individual judges (variables, species)   overall concordance group permutation tests. several groups judges identified data table,   coefficients concordance (kendall.global) posteriori   tests (kendall.post) computed group   separately. Use ecology: identify significant species   associations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kendall coefficient of concordance — kendall.global","text":"","code":"kendall.global(Y, group, nperm = 999, mult = \"holm\") kendall.post(Y, group, nperm = 999, mult = \"holm\")"},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kendall coefficient of concordance — kendall.global","text":"Y Data file (data frame matrix) containing quantitative     semiquantitative data. Rows objects columns judges     (variables). community ecology, table often     site--species table. group vector defining judges divided     groups. See example . groups explicitly defined,     judges data file considered forming single     group. nperm Number permutations performed. Default     999. mult Correct P-values multiple testing using     alternatives described p.adjust addition     \"sidak\" (see Details). Bonferroni correction overly     conservative; recommended. included allow     comparisons methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Kendall coefficient of concordance — kendall.global","text":"Y must contain quantitative data. transformed   ranks within column computation coefficient   concordance. search species associations described Legendre (2005)   proceeds 3 steps: (1) Correlation analysis species. possible method   compute Ward's agglomerative clustering matrix correlations   among species. detail: (1.1) compute Pearson Spearman   correlation matrix (correl.matrix) among species; (1.2)   turn distance matrix: mat.D = .dist(1-correl.matrix);    (1.3) carry Ward's hierarchical   clustering matrix using hclust:    clust.ward = hclust(mat.D, \"ward\"); (1.4) plot dendrogram:   plot(clust.ward, hang=-1); (1.5) cut dendrogram two   groups, retrieve vector species membership:    group.2 = cutree(clust.ward, k=2). (1.6) steps 2 3 ,    may   come back try divisions species k = \\(3, 4, 5, \\dots\\)    groups. (2) Compute global tests significance 2 () groups   using function kendall.global vector defining   groups. Groups globally significant must refined   abandoned. (3) Compute posteriori tests contribution individual   species concordance group using function   kendall.post vector defining groups.   species negative values \"Spearman.mean\", means   species clearly belong group, hence group   inclusive. Go back (1.5) cut dendrogram   finely. left right groups can cut separately,   independently levels along dendrogram; write   vector group membership cutree produce   desired groups. corrections used multiple testing applied list   P-values (P); take account number tests (k) carried   simultaneously (number groups kendall.global,   number species kendall.post). corrections   performed using function p.adjust; see function   description correction methods. addition,   Šidák correction defined    \\(P_{corr} = 1 -(1 - P)^k\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kendall coefficient of concordance — kendall.global","text":"table containing following information rows. columns   correspond groups \"judges\" defined vector \"group\".   function Kendall.post used, many tables   number predefined groups. W Kendall's coefficient concordance, W. F F statistic. F = W*(m-1)/(1-W) m number   judges. Prob.F Probability associated F statistic, computed   F distribution nu1 = n-1-(2/m) nu2 = nu1*(m-1); n   number objects. Corrected prob.F Probabilities associated F, corrected   using method selected parameter mult. Shown   one group. Chi2 Friedman's chi-square statistic (Friedman 1937) used   permutation test W. Prob.perm Permutational probabilities, uncorrected. Corrected prob.perm Permutational probabilities corrected   using method selected parameter mult. Shown   one group. Spearman.mean Mean Spearman correlations   judge test judges group. W.per.species Contribution judge test   overall concordance statistic group.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Kendall coefficient of concordance — kendall.global","text":"Friedman, M. 1937. use ranks avoid assumption normality implicit analysis variance. Journal American Statistical Association 32: 675-701. Kendall, M. G. B. Babington Smith. 1939. problem m rankings. Annals Mathematical Statistics 10: 275-287. Legendre, P. 2005. Species associations: Kendall coefficient concordance revisited. Journal Agricultural, Biological, Environmental Statistics 10: 226-245. Legendre, P. 2009. Coefficient concordance. : Encyclopedia Research Design. SAGE Publications (press). Siegel, S. N. J. Castellan, Jr. 1988. Nonparametric statistics behavioral sciences. 2nd edition. McGraw-Hill, New York.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Kendall coefficient of concordance — kendall.global","text":"F. Guillaume Blanchet, University Alberta, Pierre   Legendre, Université de Montréal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/kendall.global.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Kendall coefficient of concordance — kendall.global","text":"","code":"data(mite) mite.hel <- decostand(mite, \"hel\")  # Reproduce the results shown in Table 2 of Legendre (2005), a single group mite.small <- mite.hel[c(4,9,14,22,31,34,45,53,61,69),c(13:15,23)] kendall.global(mite.small, nperm=49) #> $Concordance_analysis #>               Group.1 #> W          0.44160305 #> F          2.37252221 #> Prob.F     0.04403791 #> Chi2      15.89770992 #> Prob.perm  0.02000000 #>  #> attr(,\"class\") #> [1] \"kendall.global\" kendall.post(mite.small, mult=\"holm\", nperm=49) #> $A_posteriori_tests #>                     TVEL      ONOV      SUCT   Trhypch1 #> Spearman.mean  0.3265678 0.3965503 0.4570402 -0.1681251 #> W.per.species  0.4949258 0.5474127 0.5927802  0.1239061 #> Prob           0.1400000 0.0200000 0.0200000  0.7000000 #> Corrected prob 0.2800000 0.0800000 0.0800000  0.7000000 #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.post\"  # Reproduce the results shown in Tables 3 and 4 of Legendre (2005), 2 groups group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2) kendall.global(mite.hel, group=group, nperm=49) #> $Concordance_analysis #>                          Group.1      Group.2 #> W                   3.097870e-01 2.911888e-01 #> F                   1.032305e+01 4.108130e+00 #> Prob.F              1.177138e-85 4.676566e-22 #> Corrected prob.F    2.354275e-85 4.676566e-22 #> Chi2                5.130073e+02 2.210123e+02 #> Prob.perm           2.000000e-02 2.000000e-02 #> Corrected prob.perm 4.000000e-02 4.000000e-02 #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.global\" kendall.post(mite.hel, group=group, mult=\"holm\", nperm=49) #> $A_posteriori_tests_Group #> $A_posteriori_tests_Group[[1]] #>                   Brachy      PHTH     RARD      SSTR   Protopl      MEGR #> Spearman.mean  0.1851177 0.4258111 0.359058 0.2505486 0.1802160 0.2833298 #> W.per.species  0.2190711 0.4497357 0.385764 0.2817757 0.2143736 0.3131911 #> Prob           0.0200000 0.0200000 0.020000 0.0200000 0.0400000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.700000 0.7000000 0.7000000 0.7000000 #>                      MPRO      HMIN     HMIN2      NPRA      TVEL      ONOV #> Spearman.mean  0.09248024 0.2444656 0.4138494 0.1263751 0.4177343 0.3301159 #> W.per.species  0.13029357 0.2759462 0.4382723 0.1627761 0.4419954 0.3580278 #> Prob           0.10000000 0.0200000 0.0200000 0.0400000 0.0200000 0.0200000 #> Corrected prob 0.70000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     SUCT Oribatl1      PWIL  Galumna1  Stgncrs2      HRUF #> Spearman.mean  0.2185421 0.421216 0.2574779 0.4180699 0.3623428 0.1250230 #> W.per.species  0.2511028 0.445332 0.2884163 0.4423170 0.3889118 0.1614804 #> Prob           0.0200000 0.020000 0.0200000 0.0200000 0.0200000 0.0800000 #> Corrected prob 0.7000000 0.700000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     PPEL      SLAT      FSET  Lepidzts  Eupelops  Miniglmn #> Spearman.mean  0.2188216 0.3016159 0.4217606 0.2577037 0.1108022 0.2301430 #> W.per.species  0.2513707 0.3307153 0.4458539 0.2886327 0.1478521 0.2622203 #> Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0800000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>  #> $A_posteriori_tests_Group[[2]] #>                     HPAV      TVIE      LCIL  Ceratoz1  Trhypch1      NCOR #> Spearman.mean  0.1222579 0.2712078 0.1906408 0.1375601 0.1342409 0.3342345 #> W.per.species  0.2020527 0.3374616 0.2642189 0.2159637 0.2129463 0.3947586 #> Prob           0.0600000 0.0200000 0.0200000 0.0200000 0.0400000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>                     LRUG     PLAG2  Ceratoz3  Oppiminu  Trimalc2 #> Spearman.mean  0.3446561 0.1833099 0.3188922 0.1764232 0.2498877 #> W.per.species  0.4042328 0.2575544 0.3808111 0.2512938 0.3180797 #> Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0200000 #> Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 #>  #>  #> $Correction.type #> [1] \"holm\" #>  #> attr(,\"class\") #> [1] \"kendall.post\"  # NOTE: 'nperm' argument usually needs to be larger than 49. # It was set to this low value for demonstration purposes."},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"Function linestack plots vertical one-dimensional plots   numeric vectors.  plots always labelled, labels   moved vertically avoid overwriting.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"","code":"linestack(x, labels, cex = 0.8, side = \"right\", hoff = 2, air = 1.1,           at = 0, add = FALSE, axis = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"x Numeric vector plotted. labels Labels used instead default (names x). May     expressions drawn plotmath. cex Size labels. side Put labels \"right\" \"left\"     axis. hoff Distance vertical axis label units     width letter “m”. air Multiplier string height leave empty space     labels. Position plot horizontal axis. add Add existing plot. axis Add axis plot. ... graphical parameters labels.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"function returns invisibly shifted positions labels   user coordinates.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"Jari Oksanen modifications Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"function always draws labelled diagrams.  want   unlabelled diagrams, can use, e.g., plot,   stripchart rug.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/linestack.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plots One-dimensional Diagrams without Overwriting Labels — linestack","text":"","code":"## First DCA axis data(dune) ord <- decorana(dune) linestack(scores(ord, choices=1, display=\"sp\")) linestack(scores(ord, choices=1, display=\"si\"), side=\"left\", add=TRUE) title(main=\"DCA axis 1\")   ## Expressions as labels N <- 10          # Number of sites df <- data.frame(Ca = rlnorm(N, 2), NO3 = rlnorm(N, 4),                  SO4 = rlnorm(N, 10), K = rlnorm(N, 3)) ord <- rda(df, scale = TRUE) ### vector of expressions for labels labs <- expression(Ca^{2+phantom()},                    NO[3]^{-phantom()},                    SO[4]^{2-phantom()},                    K^{+phantom()}) scl <- \"sites\" linestack(scores(ord, choices = 1, display = \"species\", scaling = scl),           labels = labs, air = 2) linestack(scores(ord, choices = 1, display = \"site\", scaling = scl),           side = \"left\", add = TRUE) title(main = \"PCA axis 1\")"},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":null,"dir":"Reference","previous_headings":"","what":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"standard CEP name four first letters generic name   four first letters specific epithet Latin name. last   epithet, may subspecific name, used current   function. name one component, abbreviated   eight characters (see abbreviate).   returned names made unique function   make.unique adds numbers end CEP names needed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"","code":"make.cepnames(names, seconditem = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"names names formatted CEP names. seconditem Take always second item original name     abbreviated name instead last original item     (default).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Cornell Ecology Programs (CEP) used eight-letter   abbreviations species site names. species, names   formed taking four first letters generic name four   first letters specific subspecific epithet. current   function first makes valid R names using make.names,   splits elements. CEP name made taking   four first letters first element, four first letters   last (default) second element (   seconditem = TRUE). one name element,   abbreviated eight letters. Finally, names   made unique may add numbers duplicated names. CEP names originally used, old FORTRAN IV   CHARACTER data type, text stored   numerical variables, popular computers hold four   characters. modern times, reason limitation,   ecologists used names, may practical   avoid congestion ordination plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Function returns CEP names.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"function simpleminded rigid. must write better one   need.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/make.cepnames.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Abbreviates a Botanical or Zoological Latin Name into an Eight-character Name — make.cepnames","text":"","code":"make.cepnames(c(\"Aa maderoi\", \"Poa sp.\", \"Cladina rangiferina\", \"Cladonia cornuta\", \"Cladonia cornuta var. groenlandica\", \"Cladonia rangiformis\", \"Bryoerythrophyllum\")) #> [1] \"Aamade\"     \"Poasp\"      \"Cladrang\"   \"Cladcorn\"   \"Cladgroe\"   #> [6] \"Cladrang.1\" \"Bryrythr\"   data(BCI) colnames(BCI) <- make.cepnames(colnames(BCI))"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":null,"dir":"Reference","previous_headings":"","what":"Mantel Correlogram — mantel.correlog","title":"Mantel Correlogram — mantel.correlog","text":"Function mantel.correlog computes multivariate   Mantel correlogram. Proposed Sokal (1986) Oden Sokal   (1986), method also described Legendre Legendre (2012,   pp. 819--821).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mantel Correlogram — mantel.correlog","text":"","code":"mantel.correlog(D.eco, D.geo=NULL, XY=NULL, n.class=0, break.pts=NULL,  cutoff=TRUE, r.type=\"pearson\", nperm=999, mult=\"holm\", progressive=TRUE) # S3 method for mantel.correlog plot(x, alpha=0.05, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mantel Correlogram — mantel.correlog","text":"D.eco ecological distance matrix, class   either dist matrix. D.geo geographic distance matrix, class either   dist matrix. Provide either D.geo   XY. Default: D.geo=NULL. XY file Cartesian geographic coordinates   points. Default: XY=NULL. n.class Number classes. n.class=0, Sturges   equation used unless break points provided. break.pts Vector containing break points distance   distribution. Provide (n.class+1) breakpoints, , list   beginning ending point. Default: break.pts=NULL. cutoff second half distance classes,   cutoff = TRUE limits correlogram distance classes   include points. cutoff = FALSE, correlogram   includes distance classes. r.type Type correlation calculation Mantel   statistic. Default: r.type=\"pearson\".  choices   r.type=\"spearman\" r.type=\"kendall\", functions   cor mantel. nperm Number permutations tests   significance. Default: nperm=999. large data files,   permutation tests rather slow. mult Correct P-values multiple testing. correction   methods \"holm\" (default), \"hochberg\",   \"sidak\", methods available   p.adjust function: \"bonferroni\" (best known,   recommended overly conservative), \"hommel\",   \"BH\", \"\", \"fdr\", \"none\". progressive Default: progressive=TRUE progressive   correction multiple-testing, described Legendre Legendre   (1998, p. 721). Test first distance class: correction;   second distance class: correct 2 simultaneous tests; distance   class k: correct k simultaneous tests. progressive=FALSE:   correct tests n.class simultaneous tests. x Output mantel.correlog. alpha Significance level points drawn black   symbols correlogram. Default: alpha=0.05. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mantel Correlogram — mantel.correlog","text":"correlogram graph spatial correlation values   plotted, ordinate, function geographic distance   classes among study sites along abscissa. Mantel   correlogram, Mantel correlation (Mantel 1967) computed   multivariate (e.g. multi-species) distance matrix user's choice   design matrix representing geographic distance   classes turn. Mantel statistic tested   permutational Mantel test performed vegan's   mantel function. correction multiple testing applied, permutations   necessary -correction case, obtain significant   p-values higher correlogram classes. print.mantel.correlog function prints   correlogram. See examples.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mantel Correlogram — mantel.correlog","text":"mantel.res table distance classes rows   class indices, number distances per class, Mantel statistics   (computed using Pearson's r, Spearman's r, Kendall's tau),   p-values columns. positive Mantel statistic indicates positive   spatial correlation. additional column p-values corrected   multiple testing added unless mult=\"none\". n.class n umber distance classes. break.pts break points provided user computed     program. mult name correction multiple testing.     correction: mult=\"none\". progressive logical (TRUE, FALSE) value   indicating whether progressive correction multiple   testing requested. n.tests number distance classes Mantel   tests computed tested significance. call function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mantel Correlogram — mantel.correlog","text":"Pierre Legendre, Université de Montréal","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mantel Correlogram — mantel.correlog","text":"Legendre, P. L. Legendre. 2012. Numerical ecology, 3rd English   edition. Elsevier Science BV, Amsterdam. Mantel, N. 1967. detection disease clustering generalized   regression approach. Cancer Res. 27: 209-220. Oden, N. L. R. R. Sokal. 1986. Directional autocorrelation:   extension spatial correlograms two dimensions. Syst. Zool. 35:   608-617. Sokal, R. R. 1986. Spatial data analysis historical   processes. 29-43 : E. Diday et al. [eds.] Data analysis   informatics, IV. North-Holland, Amsterdam. Sturges, H. . 1926. choice class interval. Journal    American Statistical Association 21: 65–66.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.correlog.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mantel Correlogram — mantel.correlog","text":"","code":"# Mite data available in \"vegan\" data(mite)         data(mite.xy)   mite.hel <- decostand(mite, \"hellinger\")  # Detrend the species data by regression on the site coordinates mite.hel.resid <- resid(lm(as.matrix(mite.hel) ~ ., data=mite.xy))  # Compute the detrended species distance matrix mite.hel.D <- dist(mite.hel.resid)  # Compute Mantel correlogram with cutoff, Pearson statistic mite.correlog <- mantel.correlog(mite.hel.D, XY=mite.xy, nperm=49) summary(mite.correlog) #>            Length Class  Mode      #> mantel.res 65     -none- numeric   #> n.class     1     -none- numeric   #> break.pts  14     -none- numeric   #> mult        1     -none- character #> n.tests     1     -none- numeric   #> call        4     -none- call      mite.correlog    #>  #> Mantel Correlogram Analysis #>  #> Call: #>   #> mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, nperm = 49)  #>  #>         class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)   #> D.cl.1     0.514182 358.000000   0.135713       0.02          0.02 * #> D.cl.2     1.242546 650.000000   0.118174       0.02          0.04 * #> D.cl.3     1.970910 796.000000   0.037820       0.04          0.06 . #> D.cl.4     2.699274 696.000000  -0.098605       0.02          0.08 . #> D.cl.5     3.427638 500.000000  -0.112682       0.02          0.10 . #> D.cl.6     4.156002 468.000000  -0.107603       0.02          0.12   #> D.cl.7     4.884366 364.000000  -0.022264       0.12          0.14   #> D.cl.8     5.612730 326.000000         NA         NA            NA   #> D.cl.9     6.341094 260.000000         NA         NA            NA   #> D.cl.10    7.069458 184.000000         NA         NA            NA   #> D.cl.11    7.797822 130.000000         NA         NA            NA   #> D.cl.12    8.526186  66.000000         NA         NA            NA   #> D.cl.13    9.254550  32.000000         NA         NA            NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 # or: print(mite.correlog) # or: print.mantel.correlog(mite.correlog) plot(mite.correlog)   # Compute Mantel correlogram without cutoff, Spearman statistic mite.correlog2 <- mantel.correlog(mite.hel.D, XY=mite.xy, cutoff=FALSE,     r.type=\"spearman\", nperm=49) summary(mite.correlog2) #>            Length Class  Mode      #> mantel.res 65     -none- numeric   #> n.class     1     -none- numeric   #> break.pts  14     -none- numeric   #> mult        1     -none- character #> n.tests     1     -none- numeric   #> call        6     -none- call      mite.correlog2 #>  #> Mantel Correlogram Analysis #>  #> Call: #>   #> mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, cutoff = FALSE,      r.type = \"spearman\", nperm = 49)  #>  #>         class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)   #> D.cl.1     0.514182 358.000000   0.134229       0.02          0.02 * #> D.cl.2     1.242546 650.000000   0.121270       0.02          0.04 * #> D.cl.3     1.970910 796.000000   0.035413       0.08          0.08 . #> D.cl.4     2.699274 696.000000  -0.095899       0.02          0.08 . #> D.cl.5     3.427638 500.000000  -0.118692       0.02          0.10 . #> D.cl.6     4.156002 468.000000  -0.117148       0.02          0.12   #> D.cl.7     4.884366 364.000000  -0.031123       0.08          0.16   #> D.cl.8     5.612730 326.000000   0.026064       0.08          0.24   #> D.cl.9     6.341094 260.000000   0.050573       0.06          0.24   #> D.cl.10    7.069458 184.000000   0.057017       0.02          0.20   #> D.cl.11    7.797822 130.000000   0.036195       0.14          0.32   #> D.cl.12    8.526186  66.000000  -0.054242       0.06          0.36   #> D.cl.13    9.254550  32.000000  -0.066677       0.06          0.42   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mite.correlog2)   # NOTE: 'nperm' argument usually needs to be larger than 49. # It was set to this low value for demonstration purposes."},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":null,"dir":"Reference","previous_headings":"","what":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Function mantel  finds Mantel statistic matrix   correlation two dissimilarity matrices, function   mantel.partial finds partial Mantel statistic   partial matrix correlation three dissimilarity matrices.    significance statistic evaluated permuting rows   columns first dissimilarity matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"","code":"mantel(xdis, ydis, method=\"pearson\", permutations=999, strata = NULL,     na.rm = FALSE, parallel = getOption(\"mc.cores\")) mantel.partial(xdis, ydis, zdis, method = \"pearson\", permutations = 999,      strata = NULL, na.rm = FALSE, parallel = getOption(\"mc.cores\"))"},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"xdis, ydis, zdis Dissimilarity matrices ordist     objects. first object xdis permuted     permutation tests. method Correlation method, accepted cor:     \"pearson\", \"spearman\" \"kendall\". permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. na.rm Remove missing values calculation Mantel     correlation. Use option care: Permutation tests can     biased, particular two matrices missing values     matching positions. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Mantel statistic simply correlation entries two   dissimilarity matrices (use cross products,   linearly related).  However, significance directly   assessed, \\(N(N-1)/2\\) entries just \\(N\\)   observations.  Mantel developed asymptotic test, use   permutations \\(N\\) rows columns dissimilarity   matrix. first matrix (xdist) permuted,   second kept constant. See permutations   additional details permutation tests Vegan. Partial Mantel statistic uses partial correlation   conditioned third matrix. first matrix permuted   correlation structure second first matrices   kept constant. Although mantel.partial silently accepts   methods \"pearson\", partial correlations probably   wrong methods. function uses cor, accept   alternatives pearson product moment correlations   spearman kendall rank correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"function returns list class mantel following   components: Call Function call. method Correlation method used, returned     cor.test. statistic Mantel statistic. signif Empirical significance level permutations. perm vector permuted values. distribution     permuted values can inspected permustats      function. permutations Number permutations. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"test due Mantel, course,   current implementation based Legendre Legendre. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   Edition. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Legendre & Legendre (2012, Box 10.4) warn using partial   Mantel correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mantel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mantel and Partial Mantel Tests for Dissimilarity Matrices — mantel","text":"","code":"## Is vegetation related to environment? data(varespec) data(varechem) veg.dist <- vegdist(varespec) # Bray-Curtis env.dist <- vegdist(scale(varechem), \"euclid\") mantel(veg.dist, env.dist) #>  #> Mantel statistic based on Pearson's product-moment correlation  #>  #> Call: #> mantel(xdis = veg.dist, ydis = env.dist)  #>  #> Mantel statistic r: 0.3047  #>       Significance: 0.001  #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.116 0.144 0.176 0.209  #> Permutation: free #> Number of permutations: 999 #>  mantel(veg.dist, env.dist, method=\"spear\") #>  #> Mantel statistic based on Spearman's rank correlation rho  #>  #> Call: #> mantel(xdis = veg.dist, ydis = env.dist, method = \"spear\")  #>  #> Mantel statistic r: 0.2838  #>       Significance: 0.001  #>  #> Upper quantiles of permutations (null model): #>   90%   95% 97.5%   99%  #> 0.120 0.162 0.182 0.208  #> Permutation: free #> Number of permutations: 999 #>"},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS performs Nonmetric   Multidimensional Scaling (NMDS), tries find stable solution   using several random starts. addition, standardizes   scaling result, configurations easier   interpret, adds species scores site ordination.   metaMDS function provide actual NMDS, calls   another function purpose. Currently monoMDS   default choice, also possible call   isoMDS (MASS package).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"","code":"metaMDS(comm, distance = \"bray\", k = 2, try = 20, trymax = 20,      engine = c(\"monoMDS\", \"isoMDS\"), autotransform =TRUE,     noshare = (engine == \"isoMDS\"), wascores = TRUE, expand = TRUE,      trace = 1, plot = FALSE, previous.best,  ...) # S3 method for metaMDS plot(x, display = c(\"sites\", \"species\"), choices = c(1, 2),     type = \"p\", shrink = FALSE, ...) # S3 method for metaMDS points(x, display = c(\"sites\", \"species\"),     choices = c(1,2), shrink = FALSE, select, ...) # S3 method for metaMDS text(x, display = c(\"sites\", \"species\"), labels,      choices = c(1,2), shrink = FALSE, select, ...) # S3 method for metaMDS scores(x, display = c(\"sites\", \"species\"), shrink = FALSE,      choices, tidy = FALSE, ...) metaMDSdist(comm, distance = \"bray\", autotransform = TRUE,      noshare = TRUE, trace = 1, commname, zerodist = \"ignore\",      distfun = vegdist, ...) metaMDSiter(dist, k = 2, try = 20, trymax = 20, trace = 1, plot = FALSE,      previous.best, engine = \"monoMDS\", maxit = 200,     parallel = getOption(\"mc.cores\"), ...)    initMDS(x, k=2) postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8,     nthreshold=10, plot=FALSE, ...) metaMDSredist(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"comm Community data. Alternatively, dissimilarities either     dist structure symmetric square matrix.      latter case stages skipped except random      starts centring pc rotation axes. distance Dissimilarity index used vegdist. k Number dimensions.  NB., number points \\(n\\)     \\(n > 2k + 1\\), preferably higher     global non-metric MDS, still higher local NMDS. try, trymax Minimum maximum numbers random starts     search stable solution. try reached,     iteration stop similar solutions repeated     trymax reached. engine function used MDS. default use     monoMDS function vegan, backward     compatibility also possible use isoMDS     MASS. autotransform Use simple heuristics possible data     transformation typical community data (see ).     community data, probably set     autotransform = FALSE. noshare Triggering calculation step-across extended     dissimilarities function stepacross.     argument can logical numerical value greater zero     less one. TRUE, extended dissimilarities     used always shared species sites,     FALSE, never used. noshare     numerical value, stepacross used     proportion site pairs shared species exceeds     noshare. number pairs shared species     found .shared function, noshare     effect input data dissimilarities instead     community data. wascores Calculate species scores using function     wascores. expand Expand weighted averages species     wascores. trace Trace function; trace = 2 higher     voluminous. plot Graphical tracing: plot interim results. may want set     par(ask = TRUE) option. previous.best Start searches previous solution. x metaMDS result (dissimilarity structure   initMDS). choices Axes shown. type Plot type: \"p\" points, \"t\" text,    \"n\" axes . display Display \"sites\" \"species\". shrink Shrink back species scores expanded    originally. tidy Return scores compatible ggplot2:    scores single data.frame, score type    identified factor variable code (\"sites\"    \"species\"), names variable label. scores    incompatible conventional plot functions, can    used ggplot2. labels Optional test used instead row names. select Items displayed.  can either logical    vector TRUE displayed items vector indices    displayed items. X Configuration multidimensional scaling. commname name comm: given    function called directly. zerodist Handling zero dissimilarities: either    \"fail\" \"add\" small positive value,    \"ignore\". monoMDS accepts zero dissimilarities    default zerodist = \"ignore\",    isoMDS may need set zerodist = \"add\". distfun Dissimilarity function. function returning    dist object accepting argument method can used    (extra arguments may cause name conflicts). maxit Maximum number iterations single NMDS run;    passed engine function monoMDS    isoMDS. parallel Number parallel processes predefined socket    cluster.  use pre-defined socket clusters (say,    clus), must issue clusterEvalQ(clus,    library(vegan)) make available internal vegan    functions. parallel = 1 uses ordinary, non-parallel    processing. parallel processing done parallel    package. dist Dissimilarity matrix used multidimensional scaling. pc Rotate principal components. center Centre configuration. halfchange Scale axes half-change units. defaults   TRUE dissimilarities known theoretical   maximum value (ceiling). Function vegdist   information attribute maxdist, distfun   interpreted simple test (can fail),   information may available input data distances.   FALSE, ordination dissimilarities scaled   range input dissimilarities. threshold Largest dissimilarity used half-change scaling.    dissimilarities known (inferred) ceiling, threshold    relative ceiling (see halfchange). nthreshold Minimum number points half-change scaling. object result object metaMDS. ... parameters passed functions. Function    metaMDS passes arguments component functions    metaMDSdist, metaMDSiter, postMDS,    distfun engine.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Non-metric Multidimensional Scaling (NMDS) commonly   regarded robust unconstrained ordination method   community ecology (Minchin 1987).  Function metaMDS   wrapper function calls several functions combine   Minchin's (1987) recommendations one command. complete   steps metaMDS : Transformation: data values larger common     abundance class scales, function performs Wisconsin double     standardization (wisconsin).  values look     large, function also performs sqrt     transformation. standardizations generally found     improve results. However, limits completely     arbitrary (present, data maximum 50 triggers sqrt     \\(>9\\) triggers wisconsin). want     full control analysis, set     autotransform = FALSE standardize transform data     independently. autotransform intended community     data, data types, set     autotransform = FALSE. step perfomed using     metaMDSdist, step skipped input     dissimilarities. Choice dissimilarity: good result, use     dissimilarity indices good rank order relation     ordering sites along gradients (Faith et al. 1987).  default     Bray-Curtis dissimilarity, often test     winner. However, dissimilarity index     vegdist can used. Function     rankindex can used finding test winner     data gradients. default choice may bad     analyse community data, probably select     appropriate index using argument distance.  step     performed using metaMDSdist, step skipped     input dissimilarities. Step-across dissimilarities: Ordination may difficult     large proportion sites shared species.     case, results may improved stepacross     dissimilarities, flexible shortest paths among sites.      default NMDS engine monoMDS able     break tied values maximum dissimilarity, often     sufficient handle cases shared species,     therefore default use stepacross     monoMDS.  Function isoMDS     handle tied values adequately, therefore default     use stepacross always sites     shared species engine = \"isoMDS\".     stepacross triggered option noshare.     like manipulation original distances, set     noshare = FALSE.  step skipped input data     dissimilarities instead community data. step performed     using metaMDSdist, step skipped always     input dissimilarities. NMDS random starts: NMDS easily gets trapped local     optima, must start NMDS several times random starts     confident found global solution.     strategy metaMDS first run NMDS starting     metric scaling (cmdscale usually finds good     solution often close local optimum), use     previous.best solution supplied, take solution     standard (Run 0). metaMDS starts NMDS     several random starts (minimum number given try     maximum number trymax). random starts     generated initMDS. solution better (lower     stress) previous standard, taken new     standard. solution better close standard,     metaMDS compares two solutions using Procrustes analysis     (function procrustes option     symmetric = TRUE). solutions similar     Procrustes rmse largest residual small,     solutions regarded repeated better one taken     new standard.  conditions stringent, may     found good relatively similar solutions although     function yet satisfied. Setting trace = TRUE     monitor final stresses, plot = TRUE display     Procrustes overlay plots comparison. step     performed using metaMDSiter. first step     performed input data (comm) dissimilarities. Random     starts can run parallel processing (argument     parallel). Scaling results: metaMDS run postMDS     final result. Function postMDS provides     following ways “fixing” indeterminacy scaling     orientation axes NMDS: Centring moves origin     average axes; Principal components rotate configuration     variance points maximized first dimension     (function MDSrotate can alternatively     rotate configuration first axis parallel     environmental variable); Half-change scaling scales     configuration one unit means halving community     similarity replicate similarity.  Half-change scaling     based closer dissimilarities relation     ordination distance community dissimilarity rather linear     (limit set argument threshold).     enough points threshold (controlled parameter     nthreshold), dissimilarities regressed distances.     intercept regression taken replicate     dissimilarity, half-change distance similarity     halves according linear regression.  Obviously method     applicable dissimilarity indices scaled \\(0 \\ldots     1\\), Kulczynski, Bray-Curtis Canberra indices.     half-change scaling used, ordination scaled     range original dissimilarities. Half-change scaling     skipped default input dissimilarities, can     turned argument halfchange = TRUE. NB., PC     rotation changes directions reference axes,     influence configuration solution general. Species scores: Function adds species scores final     solution weighted averages using function     wascores given value parameter     expand.  expansion weighted averages can undone     shrink = TRUE plot scores     functions, calculation species scores can suppressed     wascores = FALSE. step skipped input     dissimilarities community data unavailable. However,     species scores can added replaced     sppscores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"results-could-not-be-repeated","dir":"Reference","previous_headings":"","what":"Results Could Not Be Repeated","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Non-linear optimization hard task, best possible solution   (“global optimum”) may found random starting   configuration. software solve starting result   metric scaling (cmdscale). probably give   good result, necessarily “global   optimum”. Vegan , metaMDS tries   verify improve first solution (“try 0”) using several   random starts seeing result can repeated improved   improved solution repeated. succeed, get   message result repeated. However, result   least good usual standard strategy starting   metric scaling may improved. may need   anything message, can satisfied   result. want sure probably “global   optimum” may try following instructions. default engine = \"monoMDS\" function     tabulate stopping criteria used, can see     criterion made stringent. criteria can given     arguments metaMDS current values     described monoMDS. particular, reach     maximum number iterations, increase value     maxit. may ask larger number random starts     without losing old ones giving previous solution     argument previous.best. addition slack convergence criteria low number     random starts, wrong number dimensions (argument k)     common reason able repeat similar     solutions. NMDS usually run low number dimensions     (k=2 k=3), complex data increasing     k one may help. run NMDS much higher number     dimensions (say, k=10 ), reconsider     drastically reduce k.     heterogeneous data sets partial disjunctions, may help     set stepacross, data sets default     weakties = TRUE sufficient. Please note can give arguments     metaMDS* functions NMDS engine (default     monoMDS) metaMDS command,    check documentation functions details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"common-wrong-claims","dir":"Reference","previous_headings":"","what":"Common Wrong Claims","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"NMDS often misunderstood wrong claims properties     common Web even publications. often claimed     NMDS configuration non-metric means     fit environmental variables species onto     space. false statement. fact, result     configuration NMDS metric, can used like     ordination result. NMDS rank orders Euclidean distances     among points ordination non-metric monotone relationship     observed dissimilarities. transfer function     observed dissimilarities ordination distances non-metric     (Kruskal 1964a, 1964b), ordination result configuration     metric observed dissimilarities can kind (metric     non-metric). ordination configuration usually rotated principal     components metaMDS. rotation performed     finding result, changes direction     reference axes. important feature NMDS solution     ordination distances, change     rotation. Similarly, rank order distances change     uniform scaling centring configuration points. can also     rotate NMDS solution external environmental variables     MDSrotate. rotation also change     orientation axes, change configuration points     distances points ordination space. Function stressplot displays method graphically:     plots observed dissimilarities distances     ordination space, also shows non-metric monotone     regression.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS returns object class  metaMDS. final site ordination stored item  points, species ordination item species,   stress item stress (NB, scaling stress   depends engine: isoMDS uses   percents, monoMDS proportions range \\(0   \\ldots 1\\)). items store information steps taken   items returned engine function. object  print, plot, points text methods.   Functions metaMDSdist metaMDSredist return  vegdist objects.  Function initMDS returns   random configuration intended used within  isoMDS .  Functions metaMDSiter  postMDS returns result NMDS updated   configuration.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Faith, D. P, Minchin, P. R. Belbin, L. (1987).   Compositional dissimilarity robust measure ecological   distance. Vegetatio 69, 57--68. Kruskal, J.B. (1964a). Multidimensional scaling optimizing       goodness--fit nonmetric hypothesis. Psychometrika       29, 1--28. Kruskal, J.B. (1964b). Nonmetric multidimensional scaling: numerical       method. Psychometrika 29, 115--129. Minchin, P.R. (1987). evaluation relative robustness   techniques ecological ordinations. Vegetatio 69,   89--107.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"Function metaMDS simple wrapper NMDS engine   (either monoMDS isoMDS)   support functions (metaMDSdist,   stepacross, metaMDSiter, initMDS,   postMDS, wascores).  can call support   functions separately better control results.  Data   transformation, dissimilarities possible   stepacross made function metaMDSdist   returns dissimilarity result. Iterative search (  starting values initMDS monoMDS)   made metaMDSiter.  Processing result configuration   done postMDS, species scores added   wascores.  want certain reaching   global solution, can compare results several independent   runs. can also continue analysis previous results   configuration.  Function may save used   dissimilarity matrix (monoMDS ),   metaMDSredist tries reconstruct used dissimilarities   original data transformation possible   stepacross. metaMDS function designed used community   data.  type data, probably set   arguments non-default values: probably least wascores,   autotransform noshare FALSE.   negative data entries, metaMDS set previous   FALSE warning.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"metaMDS uses monoMDS   NMDS engine vegan version 2.0-0, replaced   isoMDS function. can set argument   engine select old engine.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/metaMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nonmetric Multidimensional Scaling with Stable Solution from\n  Random Starts, Axis Scaling and Species Scores — metaMDS","text":"","code":"## The recommended way of running NMDS (Minchin 1987) ## data(dune) ## IGNORE_RDIFF_BEGIN ## Global NMDS using monoMDS sol <- metaMDS(dune) #> Run 0 stress 0.1192678  #> Run 1 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 0.02027085  max resid 0.06496502  #> Run 2 stress 0.1183186  #> ... Procrustes: rmse 7.091627e-06  max resid 1.854739e-05  #> ... Similar to previous best #> Run 3 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 7.843875e-06  max resid 1.948718e-05  #> ... Similar to previous best #> Run 4 stress 0.1183186  #> ... Procrustes: rmse 2.646268e-06  max resid 7.785898e-06  #> ... Similar to previous best #> Run 5 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 1.748593e-06  max resid 6.04809e-06  #> ... Similar to previous best #> Run 6 stress 0.1192679  #> Run 7 stress 0.1183186  #> ... Procrustes: rmse 8.258378e-06  max resid 2.60339e-05  #> ... Similar to previous best #> Run 8 stress 0.1812932  #> Run 9 stress 0.1192678  #> Run 10 stress 0.1812932  #> Run 11 stress 0.1192678  #> Run 12 stress 0.1183186  #> ... Procrustes: rmse 7.880904e-06  max resid 2.440234e-05  #> ... Similar to previous best #> Run 13 stress 0.1192679  #> Run 14 stress 0.1192678  #> Run 15 stress 0.1192678  #> Run 16 stress 0.1192679  #> Run 17 stress 0.1183186  #> ... New best solution #> ... Procrustes: rmse 2.066359e-06  max resid 5.876586e-06  #> ... Similar to previous best #> Run 18 stress 0.1192679  #> Run 19 stress 0.1183186  #> ... Procrustes: rmse 8.209042e-06  max resid 2.501796e-05  #> ... Similar to previous best #> Run 20 stress 0.1183186  #> ... Procrustes: rmse 1.088766e-05  max resid 3.540763e-05  #> ... Similar to previous best #> *** Best solution repeated 3 times sol #>  #> Call: #> metaMDS(comm = dune)  #>  #> global Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: bray  #>  #> Dimensions: 2  #> Stress:     0.1183186  #> Stress type 1, weak ties #> Best solution was repeated 3 times in 20 tries #> The best solution was from try 17 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  plot(sol, type=\"t\")  ## Start from previous best solution sol <- metaMDS(dune, previous.best = sol) #> Starting from 2-dimensional configuration #> Run 0 stress 0.1183186  #> Run 1 stress 0.1183186  #> ... Procrustes: rmse 8.078151e-06  max resid 2.506486e-05  #> ... Similar to previous best #> Run 2 stress 0.1183186  #> ... Procrustes: rmse 2.7742e-05  max resid 8.244208e-05  #> ... Similar to previous best #> Run 3 stress 0.1192678  #> Run 4 stress 0.1183186  #> ... Procrustes: rmse 3.215555e-06  max resid 1.069389e-05  #> ... Similar to previous best #> Run 5 stress 0.1183186  #> ... Procrustes: rmse 3.626146e-06  max resid 1.088104e-05  #> ... Similar to previous best #> Run 6 stress 0.1192678  #> Run 7 stress 0.1183186  #> ... Procrustes: rmse 3.412101e-06  max resid 9.929112e-06  #> ... Similar to previous best #> Run 8 stress 0.1183186  #> ... Procrustes: rmse 4.325184e-06  max resid 1.443563e-05  #> ... Similar to previous best #> Run 9 stress 0.1183186  #> ... Procrustes: rmse 1.067267e-05  max resid 3.243463e-05  #> ... Similar to previous best #> Run 10 stress 0.1183186  #> ... Procrustes: rmse 1.040545e-06  max resid 3.205164e-06  #> ... Similar to previous best #> Run 11 stress 0.1192679  #> Run 12 stress 0.1192678  #> Run 13 stress 0.1192678  #> Run 14 stress 0.1812932  #> Run 15 stress 0.1183186  #> ... Procrustes: rmse 1.829323e-06  max resid 6.209742e-06  #> ... Similar to previous best #> Run 16 stress 0.1183186  #> ... Procrustes: rmse 1.379716e-05  max resid 4.309554e-05  #> ... Similar to previous best #> Run 17 stress 0.1183186  #> ... Procrustes: rmse 1.161158e-06  max resid 2.619725e-06  #> ... Similar to previous best #> Run 18 stress 0.1192678  #> Run 19 stress 0.1183186  #> ... Procrustes: rmse 6.012635e-06  max resid 1.936476e-05  #> ... Similar to previous best #> Run 20 stress 0.1192678  #> *** Best solution repeated 15 times ## Local NMDS and stress 2 of monoMDS sol2 <- metaMDS(dune, model = \"local\", stress=2) #> Run 0 stress 0.1928478  #> Run 1 stress 0.1928481  #> ... Procrustes: rmse 0.0006002976  max resid 0.00173639  #> ... Similar to previous best #> Run 2 stress 0.1928475  #> ... New best solution #> ... Procrustes: rmse 0.0002775662  max resid 0.0007923902  #> ... Similar to previous best #> Run 3 stress 0.1928478  #> ... Procrustes: rmse 0.000236207  max resid 0.0006921182  #> ... Similar to previous best #> Run 4 stress 0.1928475  #> ... Procrustes: rmse 0.0001198222  max resid 0.0003263339  #> ... Similar to previous best #> Run 5 stress 0.1928475  #> ... Procrustes: rmse 0.00012049  max resid 0.0003561698  #> ... Similar to previous best #> Run 6 stress 0.1928477  #> ... Procrustes: rmse 0.0001848885  max resid 0.000542114  #> ... Similar to previous best #> Run 7 stress 0.1928475  #> ... Procrustes: rmse 9.102768e-05  max resid 0.0002611822  #> ... Similar to previous best #> Run 8 stress 0.1928475  #> ... Procrustes: rmse 8.192876e-05  max resid 0.0002410819  #> ... Similar to previous best #> Run 9 stress 0.1928478  #> ... Procrustes: rmse 0.0002569454  max resid 0.0007584787  #> ... Similar to previous best #> Run 10 stress 0.1928476  #> ... Procrustes: rmse 0.0001293167  max resid 0.0003894915  #> ... Similar to previous best #> Run 11 stress 0.192848  #> ... Procrustes: rmse 0.0002858608  max resid 0.0008114817  #> ... Similar to previous best #> Run 12 stress 0.1928475  #> ... Procrustes: rmse 6.022345e-05  max resid 0.000181882  #> ... Similar to previous best #> Run 13 stress 0.1928475  #> ... New best solution #> ... Procrustes: rmse 1.332565e-05  max resid 4.452186e-05  #> ... Similar to previous best #> Run 14 stress 0.1928475  #> ... Procrustes: rmse 0.0001027541  max resid 0.0002806373  #> ... Similar to previous best #> Run 15 stress 0.1928478  #> ... Procrustes: rmse 0.0002569864  max resid 0.0007514771  #> ... Similar to previous best #> Run 16 stress 0.1928477  #> ... Procrustes: rmse 0.0001949828  max resid 0.0005737796  #> ... Similar to previous best #> Run 17 stress 0.1928475  #> ... Procrustes: rmse 4.307509e-05  max resid 0.0001216359  #> ... Similar to previous best #> Run 18 stress 0.1928475  #> ... Procrustes: rmse 5.921482e-05  max resid 0.0001702916  #> ... Similar to previous best #> Run 19 stress 0.1928478  #> ... Procrustes: rmse 0.0002239957  max resid 0.000658783  #> ... Similar to previous best #> Run 20 stress 0.1928475  #> ... Procrustes: rmse 7.641547e-05  max resid 0.0002257675  #> ... Similar to previous best #> *** Best solution repeated 8 times sol2 #>  #> Call: #> metaMDS(comm = dune, model = \"local\", stress = 2)  #>  #> local Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: bray  #>  #> Dimensions: 2  #> Stress:     0.1928475  #> Stress type 2, weak ties #> Best solution was repeated 8 times in 20 tries #> The best solution was from try 13 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  ## Use Arrhenius exponent 'z' as a binary dissimilarity measure sol <- metaMDS(dune, distfun = betadiver, distance = \"z\") #> Run 0 stress 0.1067169  #> Run 1 stress 0.1073148  #> Run 2 stress 0.1067169  #> ... Procrustes: rmse 1.589173e-05  max resid 4.504859e-05  #> ... Similar to previous best #> Run 3 stress 0.1067169  #> ... Procrustes: rmse 1.159388e-05  max resid 2.61694e-05  #> ... Similar to previous best #> Run 4 stress 0.1073148  #> Run 5 stress 0.1067169  #> ... Procrustes: rmse 1.878678e-06  max resid 5.314962e-06  #> ... Similar to previous best #> Run 6 stress 0.1073148  #> Run 7 stress 0.1067169  #> ... New best solution #> ... Procrustes: rmse 1.330249e-06  max resid 3.480961e-06  #> ... Similar to previous best #> Run 8 stress 0.1067169  #> ... Procrustes: rmse 9.506602e-07  max resid 3.301707e-06  #> ... Similar to previous best #> Run 9 stress 0.1067169  #> ... New best solution #> ... Procrustes: rmse 1.263971e-06  max resid 2.890598e-06  #> ... Similar to previous best #> Run 10 stress 0.1073148  #> Run 11 stress 0.1069786  #> ... Procrustes: rmse 0.006771704  max resid 0.02385729  #> Run 12 stress 0.1073148  #> Run 13 stress 0.1067169  #> ... Procrustes: rmse 3.175453e-06  max resid 7.631149e-06  #> ... Similar to previous best #> Run 14 stress 0.1069788  #> ... Procrustes: rmse 0.006835151  max resid 0.02414438  #> Run 15 stress 0.1073148  #> Run 16 stress 0.107471  #> Run 17 stress 0.1742034  #> Run 18 stress 0.1067169  #> ... Procrustes: rmse 2.56492e-05  max resid 8.270364e-05  #> ... Similar to previous best #> Run 19 stress 0.1073148  #> Run 20 stress 0.1073148  #> *** Best solution repeated 3 times sol #>  #> Call: #> metaMDS(comm = dune, distance = \"z\", distfun = betadiver)  #>  #> global Multidimensional Scaling using monoMDS #>  #> Data:     dune  #> Distance: beta.z  #>  #> Dimensions: 2  #> Stress:     0.1067169  #> Stress type 1, weak ties #> Best solution was repeated 3 times in 20 tries #> The best solution was from try 9 (random start) #> Scaling: centring, PC rotation, halfchange scaling  #> Species: expanded scores based on ‘dune’  #>  ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":null,"dir":"Reference","previous_headings":"","what":"Oribatid Mite Data with Explanatory Variables — mite","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Oribatid mite data. 70 soil cores collected Daniel Borcard 1989. See Borcard et al. (1992, 1994) details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"","code":"data(mite) data(mite.env) data(mite.pcnm) data(mite.xy)"},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"three linked data sets: mite contains data   35 species Oribatid mites, mite.env contains   environmental data sampling sites, mite.xy   contains geographic coordinates,  mite.pcnm   contains 22 PCNM base functions (columns) computed geographic   coordinates 70 sampling sites (Borcard & Legendre 2002).   whole sampling area 2.5 m x 10 m size. fields environmental data : SubsDens Substrate density (g/L) WatrCont Water content substrate (g/L) Substrate Substrate type, factor levels Sphagn1, \tSphagn2 Sphagn3 Sphagn Litter Barepeat Interface Shrub Shrub density, ordered factor levels 1 <       2 < 3 Topo Microtopography, factor levels Blanket Hummock","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Pierre Legendre","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"Borcard, D., P. Legendre P. Drapeau. 1992. Partialling spatial component ecological variation. Ecology 73: 1045-1055. Borcard, D. P. Legendre. 1994. Environmental control spatial structure ecological communities: example using Oribatid mites (Acari, Oribatei). Environmental Ecological Statistics 1: 37-61. Borcard, D. P. Legendre. 2002. -scale spatial analysis ecological data means principal coordinates neighbour matrices. Ecological Modelling 153: 51-68.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Oribatid Mite Data with Explanatory Variables — mite","text":"","code":"data(mite)"},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":null,"dir":"Reference","previous_headings":"","what":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Function implements Kruskal's (1964a,b) non-metric   multidimensional scaling (NMDS) using monotone regression   primary (“weak”) treatment ties. addition   traditional global NMDS, function implements local NMDS, linear   hybrid multidimensional scaling.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"","code":"monoMDS(dist, y, k = 2, model = c(\"global\", \"local\", \"linear\", \"hybrid\"),     threshold = 0.8, maxit = 200, weakties = TRUE, stress = 1,     scaling = TRUE, pc = TRUE, smin = 1e-4, sfgrmin = 1e-7,     sratmax=0.999999, ...) # S3 method for monoMDS scores(x, choices = NA, ...) # S3 method for monoMDS plot(x, choices = c(1,2), type = \"t\", ...) # S3 method for monoMDS points(x, choices = c(1,2), select, ...) # S3 method for monoMDS text(x, labels, choices = c(1,2), select, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"dist Input dissimilarities. y Starting configuration. random configuration     generated missing. k Number dimensions. NB., number points \\(n\\)     \\(n > 2k + 1\\), preferably higher     non-metric MDS. model MDS model: \"global\" normal non-metric MDS     monotone regression, \"local\" non-metric MDS     separate regressions point, \"linear\" uses linear     regression, \"hybrid\" uses linear regression     dissimilarities threshold addition monotone     regression. See Details. threshold Dissimilarity linear regression     used alternately monotone regression. maxit Maximum number iterations. weakties Use primary weak tie treatment, equal     observed dissimilarities allowed different fitted     values. FALSE, secondary (strong) tie treatment     used, tied values broken. stress Use stress type 1 2 (see Details). scaling Scale final scores unit root mean squares. pc Rotate final scores principal components. smin, sfgrmin, sratmax Convergence criteria: iterations stop     stress drops smin, scale factor gradient     drops sfgrmin, stress ratio two iterations     goes sratmax (still \\(< 1\\)). x monoMDS result. choices Dimensions returned plotted. default NA     returns dimensions. type type plot: \"t\" text, \"p\"     points, \"n\" none. select Items displayed.  can either logical           vector TRUE displayed items vector           indices displayed items. labels Labels use used instead row names. ... parameters functions (ignored     monoMDS, passed graphical functions plot.).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"several versions non-metric multidimensional   scaling R, monoMDS offers following unique   combination features: “Weak” treatment ties (Kruskal 1964a,b), tied     dissimilarities can broken monotone regression.     especially important cases compared sites share species     dissimilarities tied maximum value one. Breaking     ties allows points different distances can help     recovering long coenoclines (gradients).  Functions     smacof package also hav adequate tie treatment. Handles missing values meaningful way. Offers “local” “hybrid” scaling     addition usual “global” NMDS (see ). Uses fast compiled code (isoMDS     MASS package also uses compiled code). Function monoMDS uses Kruskal's (1964b) original monotone   regression minimize stress. two alternatives   stress: Kruskal's (1964a,b) original “stress 1”   alternative version “stress 2” (Sibson 1972).   stresses can expressed general formula $$s^2 = \\frac{\\sum (d - \\hat d)^2}{\\sum(d - d_0)^2}$$ \\(d\\) distances among points ordination configuration,   \\(\\hat d\\) fitted ordination distances,   \\(d_0\\) ordination distances null model.    “stress 1” \\(d_0 = 0\\), “stress 2”   \\(d_0 = \\bar{d}\\) mean distances. “Stress 2”   can expressed \\(s^2 = 1 - R^2\\),   \\(R^2\\) squared correlation fitted values   ordination distances, related “linear fit”   stressplot. Function monoMDS can fit several alternative NMDS variants   can selected argument model.  default model =   \"global\" fits global NMDS, Kruskal's (1964a,b) original NMDS   similar isoMDS (MASS).  Alternative   model = \"local\" fits local NMDS independent monotone   regression used point (Sibson 1972).  Alternative   model = \"linear\" fits linear MDS. fits linear   regression instead monotone, identical metric scaling   principal coordinates analysis (cmdscale)   performs eigenvector decomposition dissimilarities (Gower   1966). Alternative model = \"hybrid\" implements hybrid MDS   uses monotone regression points linear regression   dissimilarities threshold dissimilarity   alternating steps (Faith et al. 1987). Function   stressplot can used display kind regression   model. Scaling, orientation direction axes arbitrary.   However, function always centres axes, default   scaling scale configuration unit root mean   square rotate axes (argument pc) principal   components first dimension shows major variation.   possible rotate solution first axis   parallel given environmental variable using function   MDSrotate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"convergence-criteria","dir":"Reference","previous_headings":"","what":"Convergence Criteria","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"NMDS iterative, function stops   convergence criteria met. actually criterion   assured convergence, solution can local optimum.   compare several random starts (use monoMDS via   metaMDS) assess solutions likely global   optimum. stopping criteria : maxit: Maximum number iterations. Reaching      criterion means solutions almost certainly found,      maxit increased. smin: Minimum stress. stress nearly zero,      fit almost perfect. Usually means data set      small requested analysis, may several      different solutions almost perfect. reduce      number dimensions (k), get data (     observations) use method, metric scaling      (cmdscale, wcmdscale). sratmax: Change stress. Values close one      mean almost unchanged stress. may mean solution,      can also signal stranding suboptimal solution flat stress      surface. sfgrmin: Minimum scale factor. Values close      zero mean almost unchanged configuration. may mean      solution, also happen local optima.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Returns object class \"monoMDS\". final scores   returned item points (function scores extracts   results), stress item stress. addition,   large number items (may change without   notice future releases).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Faith, D.P., Minchin, P.R Belbin, L. 1987. Compositional       dissimilarity robust measure ecological       distance. Vegetatio 69, 57--68. Gower, J.C. (1966). distance properties latent root       vector methods used multivariate analysis. Biometrika       53, 325--328. Kruskal, J.B. 1964a. Multidimensional scaling optimizing       goodness--fit nonmetric hypothesis. Psychometrika       29, 1--28. Kruskal, J.B. 1964b. Nonmetric multidimensional scaling: numerical       method. Psychometrika 29, 115--129. Minchin, P.R. 1987. evaluation relative robustness       techniques ecological ordinations. Vegetatio 69,       89--107. Sibson, R. 1972. Order invariant methods data       analysis. Journal Royal Statistical Society B 34,       311--349.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"Peter R. Michin (Fortran core) Jari Oksanen (R interface).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"default NMDS function used    metaMDS. Function metaMDS adds support    functions NMDS can run like recommended Minchin    (1987).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/monoMDS.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Global and Local Non-metric Multidimensional Scaling and\n  Linear and Hybrid Scaling — monoMDS","text":"","code":"data(dune) dis <- vegdist(dune) m <- monoMDS(dis, model = \"loc\") m #>  #> Call: #> monoMDS(dist = dis, model = \"loc\")  #>  #> Local non-metric Multidimensional Scaling #>  #> 20 points, dissimilarity ‘bray’, call ‘vegdist(x = dune)’ #>  #> Dimensions: 2  #> Stress:     0.07626803  #> Stress type 1, weak ties #> Scores scaled to unit root mean square, rotated to principal components #> Stopped after 56 iterations: Stress nearly unchanged (ratio > sratmax) plot(m)"},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":null,"dir":"Reference","previous_headings":"","what":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"Multiple Response Permutation Procedure (MRPP) provides test whether significant difference two groups sampling units. Function meandist finds mean within block dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"","code":"mrpp(dat, grouping, permutations = 999, distance = \"euclidean\",      weight.type = 1, strata = NULL, parallel = getOption(\"mc.cores\")) meandist(dist, grouping, ...) # S3 method for meandist summary(object, ...) # S3 method for meandist plot(x, kind = c(\"dendrogram\", \"histogram\"),  cluster = \"average\",       ylim, axes = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"dat data matrix data frame rows samples     columns response variable(s), dissimilarity object     symmetric square matrix dissimilarities. grouping Factor numeric index grouping observations. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. used assess     significance MRPP statistic, \\(delta\\). distance Choice distance metric measures     dissimilarity two observations . See vegdist     options.  used dat dissimilarity     structure symmetric square matrix. weight.type choice group weights. See Details options. strata integer vector factor specifying strata     permutation. supplied, observations permuted within     specified strata. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. dist dist object dissimilarities,     produced functions dist, vegdist     designdist. . object, x meandist result object. kind Draw dendrogram histogram; see Details. cluster clustering method hclust     function kind = \"dendrogram\".      hclust method can used, perhaps     \"average\" \"single\" make sense. ylim Limits vertical axes (optional). axes Draw scale vertical axis. ... arguments passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"Multiple Response Permutation Procedure (MRPP) provides test   whether significant difference two groups   sampling units. difference may one location (differences   mean) one spread (differences within-group distance;   cf. Warton et al. 2012). Function mrpp operates   data.frame matrix rows observations responses   data matrix. response(s) may uni- multivariate. method   philosophically mathematically allied analysis   variance, compares dissimilarities within among   groups. two groups sampling units really different (e.g.   species composition), average within-group   compositional dissimilarities less average   dissimilarities two random collection sampling units drawn   entire population. mrpp statistic \\(\\delta\\) overall weighted mean   within-group means pairwise dissimilarities among sampling   units. choice group weights currently clear.   mrpp function offers three choices: (1) group size (\\(n\\)),   (2) degrees--freedom analogue (\\(n-1\\)), (3) weight   number unique distances calculated among \\(n\\) sampling   units (\\(n(n-1)/2\\)). mrpp algorithm first calculates pairwise distances   entire dataset, calculates \\(\\delta\\). permutes   sampling units associated pairwise distances,   recalculates \\(\\delta\\) based permuted data. repeats   permutation step permutations times. significance test   fraction permuted deltas less observed delta,   small sample correction. function also calculates   change-corrected within-group agreement \\(= 1 -\\delta/E(\\delta)\\),   \\(E(\\delta)\\) expected \\(\\delta\\) assessed   average dissimilarities. first argument dat can interpreted   dissimilarities, used directly. cases   function treats dat observations, uses   vegdist find dissimilarities.  default   distance Euclidean traditional use method,   dissimilarities vegdist also available. Function meandist calculates matrix mean within-cluster   dissimilarities (diagonal) -cluster dissimilarities   (-diagonal elements), attribute n grouping   counts. Function summary finds within-class, -class   overall means dissimilarities, MRPP statistics   weight.type options Classification Strength,   CS (Van Sickle Hughes, 2000). CS defined dissimilarities   \\(\\bar{B} - \\bar{W}\\), \\(\\bar{B}\\)   mean cluster dissimilarity \\(\\bar{W}\\) mean   within cluster dissimilarity weight.type = 1. function   perform significance tests statistics, must   use mrpp appropriate weight.type.   currently significance test CS, mrpp   weight.type = 1 gives correct test \\(\\bar{W}\\)   good approximation CS.  Function plot draws   dendrogram histogram result matrix based   within-group group dissimilarities. dendrogram   found method given cluster argument using   function hclust. terminal segments hang   within-cluster dissimilarity. clusters   heterogeneous combined class, leaf segment reversed.   histograms based dissimilarities, ore otherwise similar   Van Sickle Hughes (2000): horizontal line drawn   level mean -cluster dissimilarity vertical lines   connect within-cluster dissimilarities line.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"function returns list class mrpp following items: call Function call. delta overall weighted mean group mean distances. E.delta expected delta, null hypothesis group     structure. mean original dissimilarities. CS Classification strength (Van Sickle Hughes,     2000). Currently implemented always NA. n Number observations class. classdelta Mean dissimilarities within classes. overall     \\(\\delta\\) weighted average values given     weight.type . Pvalue Significance test. chance-corrected estimate proportion distances     explained group identity; value analogous coefficient      determination linear model. distance Choice distance metric used; \"method\" entry     dist object. weight.type choice group weights used. boot.deltas vector \"permuted deltas,\" deltas     calculated permuted datasets. distribution     item can inspected permustats function. permutations number permutations used. control list control values permutations     returned function .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"B. McCune J. B. Grace. 2002. Analysis Ecological   Communities. MjM  Software Design, Gleneden Beach, Oregon, USA. P. W. Mielke K. J. Berry. 2001. Permutation Methods:   Distance  Function Approach. Springer Series   Statistics. Springer. J. Van Sickle R. M. Hughes 2000. Classification strengths   ecoregions, catchments, geographic clusters aquatic vertebrates   Oregon. J. N. . Benthol. Soc. 19:370--384. Warton, D.., Wright, T.W., Wang, Y. 2012. Distance-based multivariate   analyses confound location dispersion effects. Methods   Ecology Evolution, 3, 89--101","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"M. Henry H. Stevens HStevens@muohio.edu Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"difference may one location (differences mean) one spread (differences within-group distance). , may find significant difference two groups simply one groups greater dissimilarities among sampling units. mrpp models can analysed adonis2 seems suffer problems mrpp robust alternative.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mrpp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multi Response Permutation Procedure and Mean Dissimilarity Matrix — mrpp","text":"","code":"data(dune) data(dune.env) dune.mrpp <- with(dune.env, mrpp(dune, Management)) dune.mrpp #>  #> Call: #> mrpp(dat = dune, grouping = Management)  #>  #> Dissimilarity index: euclidean  #> Weights for groups:  n  #>  #> Class means and counts: #>  #>       BF    HF    NM    SF    #> delta 10.03 11.08 10.66 12.27 #> n     3     5     6     6     #>  #> Chance corrected within-group agreement A: 0.1246  #> Based on observed delta 11.15 and expected delta 12.74  #>  #> Significance of delta: 0.001  #> Permutation: free #> Number of permutations: 999 #>   # Save and change plotting parameters def.par <- par(no.readonly = TRUE) layout(matrix(1:2,nr=1))  plot(dune.ord <- metaMDS(dune, trace=0), type=\"text\", display=\"sites\" ) with(dune.env, ordihull(dune.ord, Management))  with(dune.mrpp, {   fig.dist <- hist(boot.deltas, xlim=range(c(delta,boot.deltas)),                   main=\"Test of Differences Among Groups\")   abline(v=delta);    text(delta, 2*mean(fig.dist$counts), adj = -0.5,      expression(bold(delta)), cex=1.5 )  } )  par(def.par) ## meandist dune.md <- with(dune.env, meandist(vegdist(dune), Management)) dune.md #>           BF        HF        NM        SF #> BF 0.4159972 0.4736637 0.7296979 0.6247169 #> HF 0.4736637 0.4418115 0.7217933 0.5673664 #> NM 0.7296979 0.7217933 0.6882438 0.7723367 #> SF 0.6247169 0.5673664 0.7723367 0.5813015 #> attr(,\"class\") #> [1] \"meandist\" \"matrix\"   #> attr(,\"n\") #> grouping #> BF HF NM SF  #>  3  5  6  6  summary(dune.md) #>  #> Mean distances: #>                  Average #> within groups  0.5746346 #> between groups 0.6664172 #> overall        0.6456454 #>  #> Summary statistics: #>                         Statistic #> MRPP A weights n        0.1423836 #> MRPP A weights n-1      0.1339124 #> MRPP A weights n(n-1)   0.1099842 #> Classification strength 0.1127012 plot(dune.md)  plot(dune.md, kind=\"histogram\")"},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":null,"dir":"Reference","previous_headings":"","what":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function mso adds attribute vario   object class \"cca\" describes spatial   partitioning cca object performs optional   permutation test spatial independence residuals.   function plot.mso creates diagnostic plot spatial   partitioning \"cca\" object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"","code":"mso(object.cca, object.xy, grain = 1, round.up = FALSE, permutations = 0) msoplot(x, alpha = 0.05, explained = FALSE, ylim = NULL, legend = \"topleft\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"object.cca object class cca, created cca     rda function. object.xy vector, matrix data frame spatial     coordinates data represented object.cca.     number rows must match number observations (given     nobs) cca.object. Alternatively, interpoint     distances can supplied dist object. grain Interval size distance classes. round.Determines choice breaks. false, distances     rounded nearest multiple grain. true, distances     rounded upper multiple grain. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. x result object mso. alpha Significance level two-sided permutation test     Mantel statistic spatial independence residual inertia     point-wise envelope variogram total     variance. Bonferroni-type correction can achieved dividing     overall significance value (e.g. 0.05) number distance     classes. explained false, suppresses plotting variogram     explained variance. ylim Limits y-axis. legend x y co-ordinates used position legend.      can specified keyword way accepted      legend. ... arguments passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"Mantel test adaptation function mantel   vegan package parallel testing several distance classes.   compares mean inertia distance class pooled mean   inertia distance classes. explanatory variables (RDA, CCA, pRDA, pCCA)   significance test residual autocorrelation performed   running function mso, function plot.mso   print estimate much autocorrelation (based   significant distance classes) causes global error variance   regression analysis underestimated","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function mso returns amended cca rda object additional attributes grain, H,  H.test vario. grain grain attribute defines interval size     distance classes . H H object class 'dist' contains geographic     distances observations. H.test H.test contains set dummy variables describe     pairs observations (rows = elements object$H) fall     distance class (columns). vario vario attribute data frame contains     following components rda case (cca case       brackets): H Distance class multiples grain. Dist Average distance pairs observations distance class H. n Number unique pairs observations distance class \tH. Empirical (chi-square) variogram total variance \t(inertia). Sum Sum empirical (chi-square) variograms explained \tresidual variance (inertia). CA Empirical (chi-square) variogram residual variance \t(inertia). CCA Empirical (chi-square) variogram explained variance \t(inertia). pCCA Empirical (chi-square) variogram conditioned \tvariance (inertia). se Standard error empirical (chi-square) variogram \ttotal variance (inertia). CA.signif P-value permutation test spatial \tindependence residual variance (inertia).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"Wagner, H.H. 2004. Direct multi-scale ordination   canonical correspondence analysis. Ecology 85: 342--351.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"responsible author Helene Wagner.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"function based code published Ecological   Archives E085-006 (doi:10.1890/02-0738 ).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/mso.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functions for performing and displaying a spatial partitioning\nof cca or rda results — mso","text":"","code":"## Reconstruct worked example of Wagner (submitted): X <- matrix(c(1, 2, 3, 2, 1, 0), 3, 2) Y <- c(3, -1, -2) tmat <- c(1:3) ## Canonical correspondence analysis (cca): Example.cca <- cca(X, Y) Example.cca <- mso(Example.cca, tmat) #> Set of permutations < 'minperm'. Generating entire set. msoplot(Example.cca)  Example.cca$vario #>   H Dist n  All       Sum         CA       CCA se #> 1 1    1 2 0.25 0.3456633 0.07461735 0.2710459  0 #> 2 2    2 1 1.00 0.8086735 0.01147959 0.7971939 NA  ## Correspondence analysis (ca): Example.ca <- mso(cca(X), tmat) #> Set of permutations < 'minperm'. Generating entire set. msoplot(Example.ca)   ## Unconstrained ordination with test for autocorrelation ## using oribatid mite data set as in Wagner (2004) data(mite) data(mite.env) data(mite.xy)  mite.cca <- cca(log(mite + 1)) mite.cca <- mso(mite.cca, mite.xy, grain =  1, permutations = 99) msoplot(mite.cca)  mite.cca #> Call: mso(object.cca = mite.cca, object.xy = mite.xy, grain = 1, #> permutations = 99) #>  #>               Inertia Rank #> Total           1.164      #> Unconstrained   1.164   34 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>    CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8  #> 0.3662 0.1328 0.0723 0.0658 0.0559 0.0481 0.0418 0.0391  #> (Showing 8 of 34 unconstrained eigenvalues) #>  #> mso variogram: #>  #>     H   Dist   n    All     CA CA.signif #> 0   0 0.3555  63 0.6250 0.6250      0.01 #> 1   1 1.0659 393 0.7556 0.7556      0.01 #> 2   2 2.0089 534 0.8931 0.8931      0.01 #> 3   3 2.9786 417 1.0988 1.0988      0.02 #> 4   4 3.9817 322 1.3321 1.3321      0.01 #> 5   5 5.0204 245 1.5109 1.5109      0.01 #> 10 10 6.8069 441 1.7466 1.7466      0.01 #>  #> Permutation: free #> Number of permutations: 99 #>   ## Constrained ordination with test for residual autocorrelation ## and scale-invariance of species-environment relationships mite.cca <- cca(log(mite + 1) ~ SubsDens + WatrCont + Substrate + Shrub + Topo, mite.env) mite.cca <- mso(mite.cca, mite.xy, permutations = 99) msoplot(mite.cca)  #> Error variance of regression model underestimated by 0.4 percent  mite.cca #> Call: mso(object.cca = mite.cca, object.xy = mite.xy, permutations = #> 99) #>  #>               Inertia Proportion Rank #> Total          1.1638     1.0000      #> Constrained    0.5211     0.4478   11 #> Unconstrained  0.6427     0.5522   34 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1    CCA2    CCA3    CCA4    CCA5    CCA6    CCA7    CCA8    CCA9   CCA10  #> 0.31207 0.06601 0.04117 0.02938 0.02438 0.01591 0.01201 0.00752 0.00612 0.00373  #>   CCA11  #> 0.00284  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8  #> 0.07888 0.06752 0.05457 0.04023 0.03855 0.03491 0.03233 0.02692  #> (Showing 8 of 34 unconstrained eigenvalues) #>  #> mso variogram: #>  #>     H   Dist   n    All    Sum     CA    CCA      se CA.signif #> 0   0 0.3555  63 0.6250 0.7479 0.5512 0.1967 0.03506      0.01 #> 1   1 1.0659 393 0.7556 0.8820 0.6339 0.2482 0.01573      0.17 #> 2   2 2.0089 534 0.8931 0.9573 0.6473 0.3100 0.01487      0.74 #> 3   3 2.9786 417 1.0988 1.1010 0.6403 0.4607 0.01858      0.49 #> 4   4 3.9817 322 1.3321 1.2548 0.6521 0.6027 0.02439      0.97 #> 5   5 5.0204 245 1.5109 1.4564 0.6636 0.7928 0.02801      0.35 #> 10 10 6.8069 441 1.7466 1.6266 0.6914 0.9351 0.02052      0.19 #>  #> Permutation: free #> Number of permutations: 99 #>"},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":null,"dir":"Reference","previous_headings":"","what":"Multiplicative Diversity Partitioning — multipart","title":"Multiplicative Diversity Partitioning — multipart","text":"multiplicative diversity partitioning, mean values alpha diversity lower levels sampling hierarchy compared total diversity entire data set pooled samples (gamma diversity).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Multiplicative Diversity Partitioning — multipart","text":"","code":"multipart(...) # S3 method for default multipart(y, x, index=c(\"renyi\", \"tsallis\"), scales = 1,     global = FALSE, relative = FALSE, nsimul=99, method = \"r2dtable\", ...) # S3 method for formula multipart(formula, data, index=c(\"renyi\", \"tsallis\"), scales = 1,     global = FALSE, relative = FALSE, nsimul=99, method = \"r2dtable\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Multiplicative Diversity Partitioning — multipart","text":"y community matrix. x matrix number rows y, columns     coding levels sampling hierarchy. number groups within     hierarchy must decrease left right. x missing,     two levels assumed: row group first level,     rows group second level. formula two sided model formula form y ~ x,     y community data matrix samples rows     species column. Right hand side (x) must grouping     variable(s) referring levels sampling hierarchy, terms     right left treated nested (first column lowest,     last highest level). formula add unique     indentifier rows constant rows always produce     estimates row-level alpha overall gamma diversities. must     use non-formula interface avoid behaviour. Interaction terms     allowed. data data frame look variables defined     right hand side formula. missing, variables looked     global environment. index Character, entropy index calculated (see Details). relative Logical, TRUE beta diversity     standardized maximum (see Details). scales Numeric, length 1, order generalized     diversity index used. global Logical, indicates calculation beta diversity values,     see Details. nsimul Number permutations use.  nsimul = 0,     FUN argument evaluated.     thus possible reuse statistic values     without null model. method Null model method: either name (character string)     method defined make.commsim     commsim function.     default \"r2dtable\" keeps row sums column sums fixed.     See oecosimu Details Examples. ... arguments passed oecosimu, .e.     method, thin burnin.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Multiplicative Diversity Partitioning — multipart","text":"Multiplicative diversity partitioning based Whittaker's (1972) ideas, recently generalised one parametric diversity families (.e. Rényi Tsallis) Jost (2006, 2007). Jost recommends use numbers equivalents (Hill numbers), instead pure diversities, proofs, satisfies multiplicative partitioning requirements. current implementation multipart calculates Hill numbers based functions renyi tsallis (provided index argument). values one scales desired, done separate runs, adds extra dimensionality implementation, resolved efficiently. Alpha diversities averages Hill numbers hierarchy levels, global gamma diversity alpha value calculated highest hierarchy level. global = TRUE, beta calculated relative global gamma value: $$\\beta_i = \\gamma / \\alpha_{}$$ global = FALSE, beta calculated relative local gamma values (local gamma means diversity calculated particular cluster based pooled abundance vector): $$\\beta_ij = \\alpha_{(+1)j} / mean(\\alpha_{ij})$$ \\(j\\) particular cluster hierarchy level \\(\\). beta diversity value level \\(\\) mean beta values clusters level, \\(\\beta_{} = mean(\\beta_{ij})\\). relative = TRUE, respective beta diversity values standardized maximum possible values (\\(mean(\\beta_{ij}) / \\beta_{max,ij}\\)) given \\(\\beta_{max,ij} = n_{j}\\) (number lower level units given cluster \\(j\\)). expected diversity components calculated nsimul times individual based randomization community data matrix. done \"r2dtable\" method oecosimu default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Multiplicative Diversity Partitioning — multipart","text":"object class \"multipart\" structure \"oecosimu\" objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Multiplicative Diversity Partitioning — multipart","text":"Jost, L. (2006). Entropy diversity. Oikos, 113, 363--375. Jost, L. (2007). Partitioning diversity independent alpha beta components. Ecology, 88, 2427--2439. Whittaker, R. (1972). Evolution measurement species diversity. Taxon, 21, 213--251.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Multiplicative Diversity Partitioning — multipart","text":"Péter Sólymos, solymos@ualberta.ca","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/multipart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Multiplicative Diversity Partitioning — multipart","text":"","code":"## NOTE: 'nsimul' argument usually needs to be >= 99 ## here much lower value is used for demonstration  data(mite) data(mite.xy) data(mite.env) ## Function to get equal area partitions of the mite data cutter <- function (x, cut = seq(0, 10, by = 2.5)) {     out <- rep(1, length(x))     for (i in 2:(length(cut) - 1))         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i     return(out)} ## The hierarchy of sample aggregation levsm <- with(mite.xy, data.frame(     l2=cutter(y, cut = seq(0, 10, by = 2.5)),     l3=cutter(y, cut = seq(0, 10, by = 5)))) ## Multiplicative diversity partitioning multipart(mite, levsm, index=\"renyi\", scales=1, nsimul=19) #> multipart object #>  #> Call: multipart(y = mite, x = levsm, index = \"renyi\", scales = 1, #> nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES    mean    2.5%     50%   97.5% Pr(sim.)   #> alpha.1    11.235 -102.364 14.0828 14.0304 14.0823 14.1272     0.05 * #> gamma      12.006 -281.558 14.1360 14.1225 14.1395 14.1441     0.05 * #> beta.1      1.071   38.791  1.0038  1.0009  1.0038  1.0069     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ l2 + l3, levsm, index=\"renyi\", scales=1, nsimul=19) #> multipart object #>  #> Call: multipart(formula = mite ~ l2 + l3, data = levsm, index = #> \"renyi\", scales = 1, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES     mean     2.5%      50%   97.5% Pr(sim.)   #> alpha.1    8.0555  -58.621 12.19232 12.09532 12.17629 12.3010     0.05 * #> alpha.2   11.2353  -99.401 14.09710 14.05752 14.09992 14.1476     0.05 * #> alpha.3   12.0064 -302.279 14.13508 14.12234 14.13589 14.1463     0.05 * #> gamma     14.1603    0.000 14.16027 14.16027 14.16027 14.1603     1.00   #> beta.1     1.3568   30.782  1.15871  1.14935  1.15802  1.1711     0.05 * #> beta.2     1.0710   38.611  1.00271  0.99982  1.00240  1.0057     0.05 * #> beta.3     1.1794  355.814  1.00178  1.00099  1.00172  1.0027     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ ., levsm, index=\"renyi\", scales=1, nsimul=19, relative=TRUE) #> multipart object #>  #> Call: multipart(formula = mite ~ ., data = levsm, index = \"renyi\", #> scales = 1, relative = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global FALSE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES      mean      2.5%       50%   97.5% Pr(sim.)   #> alpha.1  8.055481  -57.340 12.224063 12.116113 12.236814 12.3617     0.05 * #> alpha.2 11.235261 -117.838 14.085919 14.049300 14.086691 14.1277     0.05 * #> alpha.3 12.006443 -373.475 14.134179 14.127141 14.133105 14.1449     0.05 * #> gamma   14.160271    0.000 14.160271 14.160271 14.160271 14.1603     1.00   #> beta.1   0.078594   22.948  0.068093  0.067219  0.068089  0.0689     0.05 * #> beta.2   0.535514   37.594  0.501713  0.500020  0.501788  0.5032     0.05 * #> beta.3   0.589695  439.760  0.500923  0.500543  0.500961  0.5012     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 multipart(mite ~ ., levsm, index=\"renyi\", scales=1, nsimul=19, global=TRUE) #> multipart object #>  #> Call: multipart(formula = mite ~ ., data = levsm, index = \"renyi\", #> scales = 1, global = TRUE, nsimul = 19) #>  #> nullmodel method ‘r2dtable’ with 19 simulations #> options:  index renyi, scales 1, global TRUE #> alternative hypothesis: statistic is less or greater than simulated values #>  #>         statistic      SES    mean    2.5%     50%   97.5% Pr(sim.)   #> alpha.1    8.0555  -66.262 12.1821 12.0605 12.1870 12.2667     0.05 * #> alpha.2   11.2353 -111.738 14.0941 14.0491 14.0928 14.1436     0.05 * #> alpha.3   12.0064 -310.829 14.1369 14.1230 14.1379 14.1478     0.05 * #> gamma     14.1603    0.000 14.1603 14.1603 14.1603 14.1603     1.00   #> beta.1     1.7578   99.871  1.1624  1.1544  1.1619  1.1741     0.05 * #> beta.2     1.2603  140.199  1.0047  1.0012  1.0048  1.0079     0.05 * #> beta.3     1.1794  365.916  1.0017  1.0009  1.0016  1.0026     0.05 * #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":null,"dir":"Reference","previous_headings":"","what":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Patches local communities regarded nested   subsets community. general, species poor communities   subsets species rich communities, rare species   occur species rich communities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"","code":"nestedchecker(comm) nestedn0(comm) nesteddisc(comm, niter = 200) nestedtemp(comm, ...) nestednodf(comm, order = TRUE, weighted = FALSE, wbinary = FALSE) nestedbetasor(comm) nestedbetajac(comm) # S3 method for nestedtemp plot(x, kind = c(\"temperature\", \"incidence\"),     col=rev(heat.colors(100)),  names = FALSE, ...) # S3 method for nestednodf plot(x, col = \"red\", names = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"comm Community data. niter Number iterations reorder tied columns. x Result object plot. col Colour scheme matrix temperatures. kind kind plot produced. names Label columns rows plot using names comm.     logical vector length 2, row column labels     returned accordingly. order Order rows columns frequencies. weighted Use species abundances weights interactions. wbinary Modify original method binary data give     result weighted unweighted analysis. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"nestedness functions evaluate alternative indices nestedness.   functions intended used together Null model   communities used argument oecosimu analyse   non-randomness results. Function nestedchecker gives number checkerboard units,   2x2 submatrices species occur different   sites (Stone & Roberts 1990). Function nestedn0 implements   nestedness measure N0 number absences sites   richer pauperate site species occurs   (Patterson & Atmar 1986). Function nesteddisc implements discrepancy index   number ones shifted fill row ones   table arranged species frequencies (Brualdi & Sanderson   1999). original definition arranges species (columns)   frequencies, method handling tied   frequencies.  nesteddisc function tries order tied   columns minimize discrepancy statistic rather   slow, large number tied columns guarantee   best ordering found (argument niter gives   maximum number tried orders). case warning tied   columns issued. Function nestedtemp finds matrix temperature   defined sum “surprises” arranged matrix.    arranged unsurprising matrix species within proportion given   matrix fill upper left corner matrix,   surprise absence presences diagonal distance   fill line (Atmar & Patterson 1993). Function tries pack species   sites low temperature (Rodríguez-Gironés   & Santamaria 2006), iterative procedure,   temperatures usually vary among runs.  Function nestedtemp also   plot method can display either incidences   temperatures surprises. Matrix temperature rather vaguely   described (Atmar & Patterson 1993),   Rodríguez-Gironés & Santamaria (2006)   explicit description used . However, results   probably differ implementations, users   cautious interpreting results. details calculations   explained vignette Design decisions   implementation can read using functions   browseVignettes. Function   nestedness bipartite package   direct port BINMATNEST programme   Rodríguez-Gironés & Santamaria (2006). Function nestednodf implements nestedness metric based   overlap decreasing fill (Almeida-Neto et al., 2008). Two basic   properties required matrix maximum degree   nestedness according metric: (1) complete overlap 1's   right left columns rows, (2)   decreasing marginal totals pairs columns   pairs rows. nestedness statistic evaluated separately   columns (N columns) rows (N rows) combined   whole matrix (NODF).  set order = FALSE,   statistic evaluated current matrix ordering allowing   tests meaningful hypothesis matrix structure   default ordering row column totals (breaking ties total   abundances weighted = TRUE) (see Almeida-Neto et   al. 2008). weighted = TRUE, function finds   weighted version index (Almeida-Neto & Ulrich,   2011). However, requires quantitative null models adequate   testing. Almeida-Neto & Ulrich (2011) say positive   nestedness values first row/column higher   second.  condition, weighted analysis binary data   always give zero nestedness. argument wbinary = TRUE,   equality rows/columns also indicates nestedness, binary data   give identical results weighted unweighted analysis.   However, can also influence results weighted analysis   results may differ Almeida-Neto & Ulrich (2011). Functions nestedbetasor nestedbetajac find   multiple-site dissimilarities decompose components   turnover nestedness following Baselga (2012); pairwise   dissimilarities can found designdist. can   seen decomposition beta diversity (see   betadiver).  Function nestedbetasor uses   Sørensen dissimilarity turnover component   Simpson dissimilarity (Baselga 2012), nestedbetajac uses   analogous methods Jaccard index. functions return   vector three items: turnover, nestedness sum   multiple Sørensen Jaccard dissimilarity.   last one total beta diversity (Baselga 2012). functions   treat data presence/absence (binary) can used   binary nullmodel. overall dissimilarity   constant nullmodels fix species (column)   frequencies (\"c0\"), components constant row   columns also fixed (e.g., model \"quasiswap\"),   functions meaningful null models.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"result returned nestedness function contains item called  statistic, components differ among functions.   functions constructed can handled  oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Almeida-Neto, M., Guimarães, P.,   Guimarães, P.R., Loyola, R.D. & Ulrich, W. (2008).   consistent metric nestedness analysis ecological systems:   reconciling concept measurement. Oikos 117, 1227--1239. Almeida-Neto, M. & Ulrich, W. (2011). straightforward   computational approach measuring nestedness using quantitative   matrices. Env. Mod. Software 26, 173--178. Atmar, W. & Patterson, B.D. (1993). measurement order   disorder distribution species fragmented   habitat. Oecologia 96, 373--382. Baselga, . (2012). relationship species replacement,   dissimilarity derived nestedness, nestedness. Global   Ecol. Biogeogr. 21, 1223--1232. Brualdi, R.. & Sanderson, J.G. (1999). Nested species subsets, gaps,   discrepancy. Oecologia 119, 256--264. Patterson, B.D. & Atmar, W. (1986). Nested subsets structure   insular mammalian faunas archipelagos. Biol. J. Linnean     Soc. 28, 65--82. Rodríguez-Gironés, M..  & Santamaria, L.   (2006). new algorithm calculate nestedness temperature   presence-absence matrices. J. Biogeogr. 33, 924--935. Stone, L. & Roberts, . (1990). checkerboard score species   distributions. Oecologia 85, 74--79. Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"Jari Oksanen Gustavo Carvalho (nestednodf).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/nestedtemp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Nestedness Indices for Communities of Islands or Patches — nestedtemp","text":"","code":"data(sipoo) ## Matrix temperature out <- nestedtemp(sipoo) out #> nestedness temperature: 10.25693  #> with matrix fill 0.2233333  plot(out)  plot(out, kind=\"incid\")  ## Use oecosimu to assess the non-randomness of checker board units nestedchecker(sipoo) #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  oecosimu(sipoo, nestedchecker, \"quasiswap\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = #> \"quasiswap\") #>  #> nullmodel method ‘quasiswap’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.) #> checkerboards      2767 0.40441 2725.2 2575.2 2729.0 2957.3     0.63 ## Another Null model and standardized checkerboard score oecosimu(sipoo, nestedchecker, \"r00\", statistic = \"C.score\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = \"r00\", #> statistic = \"C.score\") #>  #> nullmodel method ‘r00’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>         statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)    #> C.score    2.2588 -25.667 9.1890 8.7433 9.2033 9.7188     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract the Number of Observations from a vegan Fit. — nobs.cca","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Extract number ‘observations’ vegan model fit.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"","code":"# S3 method for cca nobs(object, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"object fitted model object. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Function nobs generic R,   vegan provides methods objects   betadisper, cca related   methods, CCorA, decorana,   isomap, metaMDS, pcnm,   procrustes, radfit,   varpart wcmdscale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"single number, normally integer, giving number   observations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nobs.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract the Number of Observations from a vegan Fit. — nobs.cca","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":null,"dir":"Reference","previous_headings":"","what":"Null Model and Simulation — nullmodel","title":"Null Model and Simulation — nullmodel","text":"nullmodel function creates object, can serve basis Null Model simulation via simulate method. update method updates nullmodel object without sampling (effective sequential algorithms). smbind binds together multiple simmat objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Null Model and Simulation — nullmodel","text":"","code":"nullmodel(x, method) # S3 method for nullmodel print(x, ...) # S3 method for nullmodel simulate(object, nsim = 1, seed = NULL,     burnin = 0, thin = 1, ...) # S3 method for nullmodel update(object, nsim = 1, seed = NULL, ...) # S3 method for simmat print(x, ...) smbind(object, ..., MARGIN, strict = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Null Model and Simulation — nullmodel","text":"x community matrix. print method, object printed. method Character, specifying one null model algorithms listed help page commsim. can user supplied object class commsim. object object class nullmodel returned function nullmodel. case smbind simmat object returned update simulate methods. nsim Positive integer, number simulated matrices return. update method, number burnin steps made sequential algorithms update status input model object. seed object specifying random number generator initialized (\"seeded\"). Either NULL integer used call set.seed simulating matrices. set, value saved \"seed\" attribute returned value. default, NULL change random generator state, return .Random.seed \"seed\"  attribute, see Value. burnin Nonnegative integer, specifying number steps discarded starting simulation. Active sequential null model algorithms. Ignored non-sequential null model algorithms. thin Positive integer, number simulation steps made returned matrix. Active sequential null model algorithms. Ignored non-sequential null model algorithms. MARGIN Integer, indicating dimension multiple simmat objects bound together smbind. 1: matrices stacked (row bound), 2: matrices column bound, 3: iterations combined. Needs length 1. dimensions expected match across objects. strict Logical, consistency time series attributes (\"start\", \"end\", \"thin\", number simulated matrices) simmat objects strictly enforced binding multiple objects together using smbind. Applies input objects based sequential null model algorithms. ... Additional arguments supplied algorithms. case smbind can contain multiple simmat objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Null Model and Simulation — nullmodel","text":"purpose nullmodel function create object, necessary statistics input matrix calculated . information reused, recalculated step simulation process done simulate method. simulate method carries simulation, simulated matrices stored array. sequential algorithms, method updates state input nullmodel object. Therefore, possible diagnostic tests returned simmat object, make simulations, use increased thinning value desired. update method makes burnin steps case sequential algorithms update status input model without attempt return matrices. non-sequential algorithms method nothing. update preferred way making burnin iterations without sampling. Alternatively, burnin can done via simulate method. convergence diagnostics, recommended use simulate method without burnin. input nullmodel object updated, samples can simulated desired without start process . See Examples. smbind function can used combine multiple simmat objects. comes handy null model simulations stratified sites (MARGIN = 1) species (MARGIN = 2), case multiple objects returned identical/consistent settings e.g. parallel computations (MARGIN = 3). Sanity checks made ensure combining multiple objects sensible, user's responsibility check independence simulated matrices null distribution converged case sequential null model algorithms. strict = FALSE setting can relax checks regarding start, end, thinning values sequential null models.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Null Model and Simulation — nullmodel","text":"function nullmodel returns object class nullmodel. set objects sharing environment: data: original matrix integer mode. nrow: number rows. ncol: number columns. rowSums: row sums. colSums: column sums. rowFreq: row frequencies (number nonzero cells). colFreq: column frequencies (number nonzero cells). totalSum: total sum. fill: number nonzero cells matrix. commsim: commsim object result     method argument. state: current state permutations,     matrix similar original.     NULL non-sequential algorithms. iter: current number iterations   sequential algorithms.     NULL non-sequential algorithms. simulate method returns object class simmat. array simulated matrices (third dimension corresponding nsim argument). update method returns current state (last updated matrix) invisibly, update input object sequential algorithms. non sequential algorithms, returns NULL. smbind function returns object class simmat.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Null Model and Simulation — nullmodel","text":"Jari Oksanen Peter Solymos","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Null Model and Simulation — nullmodel","text":"Care must taken input matrix contains single row column. input invalid swapping hypergeometric distribution (calling r2dtable) based algorithms. also applies cases input stratified subsets.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/nullmodel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Null Model and Simulation — nullmodel","text":"","code":"data(mite) x <- as.matrix(mite)[1:12, 21:30]  ## non-sequential nullmodel (nm <- nullmodel(x, \"r00\")) #> An object of class “nullmodel”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #>  (sm <- simulate(nm, nsim=10)) #> An object of class “simmat”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #>   ## sequential nullmodel (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  (sm1 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 5, End = 50, Thin = 5 #>  (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 55, End = 100, Thin = 5 #>   ## sequential nullmodel with burnin and extra updating (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  (sm1 <- simulate(nm, burnin=10, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 15, End = 60, Thin = 5 #>  (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 5, End = 50, Thin = 5 #>   ## sequential nullmodel with separate initial burnin (nm <- nullmodel(x, \"swap\")) #> An object of class “nullmodel”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Iterations = 0  #>  nm <- update(nm, nsim=10) (sm2 <- simulate(nm, nsim=10, thin=5)) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #> Start = 15, End = 60, Thin = 5 #>   ## combining multiple simmat objects  ## stratification nm1 <- nullmodel(x[1:6,], \"r00\") sm1 <- simulate(nm1, nsim=10) nm2 <- nullmodel(x[7:12,], \"r00\") sm2 <- simulate(nm2, nsim=10) smbind(sm1, sm2, MARGIN=1) #> An object of class “simmat”  #> ‘r00’ method (binary, non-sequential) #> 12 x 10 matrix #> Number of permuted matrices = 10  #>   ## binding subsequent samples from sequential algorithms ## start, end, thin retained nm <- nullmodel(x, \"swap\") nm <- update(nm, nsim=10) sm1 <- simulate(nm, nsim=10, thin=5) sm2 <- simulate(nm, nsim=20, thin=5) sm3 <- simulate(nm, nsim=10, thin=5) smbind(sm3, sm2, sm1, MARGIN=3) #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 40  #> Start = 15, End = 210, Thin = 5 #>   ## 'replicate' based usage which is similar to the output ## of 'parLapply' or 'mclapply' in the 'parallel' package ## start, end, thin are set, also noting number of chains smfun <- function(x, burnin, nsim, thin) {     nm <- nullmodel(x, \"swap\")     nm <- update(nm, nsim=burnin)     simulate(nm, nsim=nsim, thin=thin) } smlist <- replicate(3, smfun(x, burnin=50, nsim=10, thin=5), simplify=FALSE) smbind(smlist, MARGIN=3) # Number of permuted matrices = 30 #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 12 x 10 matrix #> Number of permuted matrices = 30  #> Start = 55, End = 100, Thin = 5 (3 chains) #>   if (FALSE) { ## parallel null model calculations library(parallel)  if (.Platform$OS.type == \"unix\") { ## forking on Unix systems smlist <- mclapply(1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5)) smbind(smlist, MARGIN=3) }  ## socket type cluster, works on all platforms cl <- makeCluster(3) clusterEvalQ(cl, library(vegan)) clusterExport(cl, c(\"smfun\", \"x\")) smlist <- parLapply(cl, 1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5)) stopCluster(cl) smbind(smlist, MARGIN=3) }"},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function evaluates statistic vector statistics   community evaluates significance series simulated   random communities.  approach used traditionally   analysis nestedness, function general can   used statistics evaluated simulated   communities. Function oecosimu collects evaluates   statistics. Null model communities described   make.commsim permatfull/   permatswap, definition Null models   nullmodel, nestedness statistics   nestednodf (describes several alternative   statistics, including nestedness temperature, \\(N0\\), checker   board units, nestedness discrepancy NODF).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"","code":"oecosimu(comm, nestfun, method, nsimul = 99, burnin = 0, thin = 1,    statistic = \"statistic\", alternative = c(\"two.sided\", \"less\", \"greater\"),     batchsize = NA, parallel = getOption(\"mc.cores\"), ...) # S3 method for oecosimu as.ts(x, ...) # S3 method for oecosimu toCoda(x)"},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"comm Community data, Null model object generated     nullmodel object class simmat (array     permuted matrices simulate.nullmodel).     comm community data, null model simulation     method must specified.  comm     nullmodel, simulation method ignored,     comm simmat object, arguments     ignored except nestfun, statistic     alternative. nestfun Function analysed. nestedness functions     provided vegan (see nestedtemp),     function can used accepts community first     argument, returns either plain number vector     result list item name defined argument     statistic. See Examples defining functions. method Null model method: either name (character string)     method defined make.commsim     commsim function. argument ignored     comm nullmodel simmat     object. See Details Examples. nsimul Number simulated null communities (ignored     comm simmat object). burnin Number null communities discarded proper     analysis sequential methods (\"tswap\")     (ignored non-sequential methods comm     simmat object). thin Number discarded null communities two     evaluations nestedness statistic sequential methods (ignored     non-sequential methods comm simmat     object). statistic name statistic returned     nestfun. alternative character string specifying alternative     hypothesis, must one \"two.sided\" (default), \"greater\"     \"less\". Please note \\(p\\)-value two-sided     test approximately two times higher corresponding     one-sided test (\"greater\" \"less\" depending     sign difference). batchsize Size Megabytes largest simulation object.     larger structure produced, analysis broken     internally batches. default NA analysis     broken batches.  See Details. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package.  define nestfun Windows needs     R packages vegan permute, must set     socket cluster call. x oecosimu result object. ... arguments functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function oecosimu wrapper evaluates statistic   using function given nestfun, simulates series   null models based nullmodel, evaluates   statistic null models. vegan packages contains   nestedness functions described separately   (nestedchecker, nesteddisc,   nestedn0, nestedtemp,   nestednodf), many functions can used   long meaningful simulated communities.    applicable function must return either statistic plain   number vector, list element \"statistic\" (like   chisq.test), item whose name given   argument statistic.  statistic can single number   (like typical nestedness index), can vector.   vector indices can used analyse site (row) species (column)   properties, see treedive example. Raup-Crick   index (raupcrick) gives example using   dissimilarities. Null model type can given name (quoted character string)   used define Null model make.commsim.   include binary models described Wright et al. (1998),   Jonsson (2001), Gotelli & Entsminger (2003), Miklós &   Podani (2004), others. several quantitative Null   models, discussed Hardy (2008), several   unpublished (see make.commsim,   permatfull, permatswap   discussion). user can also define commsim   function (see Examples). Function works first defining nullmodel   given commsim, generating series   simulated communities simulate.nullmodel.   shortcut can used stages input can Community data (comm), Null model function       (nestfun) number simulations (nsimul). nullmodel object number       simulations, argument method ignored. three-dimensional array simulated communities generated       simulate.nullmodel, arguments       method nsimul ignored. last case allows analysing several statistics   simulations. function first generates simulations given   nullmodel analyses using   nestfun.  large data sets /large number   simulations, generated objects can large,   memory exhausted, analysis can become slow   system can become unresponsive. simulation broken   several smaller batches simulated nullmodel   objective set batchsize avoid memory   problems (see object.size estimating size   current data set). parallel processing still increases   memory needs.  parallel processing used evaluating   nestfun.  main load may simulation   nullmodel, parallel argument help   . Function .ts transforms simulated results sequential   methods time series ts object. allows   using analytic tools time series studying sequences (see   examples). Function toCoda transforms simulated results   sequential methods \"mcmc\" object   coda package. coda package provides functions   analysis stationarity, adequacy sample size,   autocorrelation, need burn-much sequential   methods, summary results. Please consult   documentation coda package. Function permustats provides support standard   density, densityplot,   qqnorm qqmath functions   simulated values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Function oecosimu returns object class  \"oecosimu\".  result object items statistic  oecosimu.  statistic contains complete object   returned nestfun original data.   oecosimu component contains following items: statistic Observed values statistic. simulated Simulated values statistic. means Mean values statistic simulations. z Standardized effect sizes (SES, .k.. \\(z\\)-values)      observed statistic based simulations. pval \\(P\\)-values statistic based simulations. alternative type testing given argument alternative. method method used nullmodel. isSeq TRUE method sequential.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Hardy, O. J. (2008)    Testing spatial phylogenetic structure local communities:    statistical performances different null models    test statistics locally neutral community.    Journal Ecology 96, 914--926. Gotelli, N.J. & Entsminger, N.J. (2003). Swap algorithms null model   analysis. Ecology 84, 532--535. Jonsson, B.G. (2001) null model randomization tests   nestedness species assemblages. Oecologia 127, 309--313. Miklós, . & Podani, J. (2004). Randomization presence-absence   matrices: comments new algorithms. Ecology 85, 86--92. Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, . & Atmar,   W. (1998). comparative analysis nested subset patterns species   composition. Oecologia 113, 1--20.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"Jari Oksanen Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"wonder name oecosimu, look journal   names References (nestedtemp). internal structure function radically changed   vegan 2.2-0 introduction commsim   nullmodel deprecation   commsimulator.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/oecosimu.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Evaluate Statistics with Null Models of Biological Communities — oecosimu","text":"","code":"## Use the first eigenvalue of correspondence analysis as an index ## of structure: a model for making your own functions. data(sipoo) ## Traditional nestedness statistics (number of checkerboard units) oecosimu(sipoo, nestedchecker, \"r0\") #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = \"r0\") #>  #> nullmodel method ‘r0’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)    #> checkerboards      2767 -19.246 8044.2 7429.2 8063.0 8539.5     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## sequential model, one-sided test, a vector statistic out <- oecosimu(sipoo, decorana, \"swap\", burnin=100, thin=10,     statistic=\"evals\", alt = \"greater\") out #> oecosimu object #>  #> Call: oecosimu(comm = sipoo, nestfun = decorana, method = \"swap\", #> burnin = 100, thin = 10, statistic = \"evals\", alternative = \"greater\") #>  #> nullmodel method ‘swap’ with 99 simulations #> options:  thin 10, burnin 100 #> alternative hypothesis: statistic is greater than simulated values #>  #>  #> Call: #> nestfun(veg = comm)  #>  #> Detrended correspondence analysis with 26 segments. #> Rescaling of axes with 4 iterations. #> Total inertia (scaled Chi-square): 2.4436  #>  #>                        DCA1   DCA2   DCA3    DCA4 #> Eigenvalues          0.3822 0.2612 0.1668 0.08723 #> Additive Eigenvalues 0.3822 0.2609 0.1631 0.07650 #> Decorana values      0.4154 0.2465 0.1391 0.04992 #> Axis lengths         2.9197 2.5442 2.7546 1.78074 #>  #>  #>      statistic      SES    mean     50%    95% Pr(sim.)    #> DCA1  0.382249  2.32135 0.32264 0.32330 0.3622     0.01 ** #> DCA2  0.261208  1.75257 0.21898 0.22145 0.2530     0.03 *  #> DCA3  0.166788  0.46289 0.15711 0.15855 0.1901     0.32    #> DCA4  0.087226 -2.13283 0.12814 0.12458 0.1613     0.99    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Inspect the swap sequence as a time series object plot(as.ts(out))  lag.plot(as.ts(out))  acf(as.ts(out))  ## Density plot densityplot(permustats(out), as.table = TRUE, layout = c(1,4))  ## Use quantitative null models to compare ## mean Bray-Curtis dissimilarities data(dune) meandist <- function(x) mean(vegdist(x, \"bray\")) mbc1 <- oecosimu(dune, meandist, \"r2dtable\") mbc1 #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = meandist, method = \"r2dtable\") #>  #> nullmodel method ‘r2dtable’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>           statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)    #> statistic   0.64565 13.347 0.46589 0.43848 0.46665 0.4913     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Define your own null model as a 'commsim' function: shuffle cells ## in each row foo <- function(x, n, nr, nc, ...) {    out <- array(0, c(nr, nc, n))    for (k in seq_len(n))       out[,,k] <- apply(x, 2, function(z) sample(z, length(z)))    out } cf <- commsim(\"myshuffle\", foo, isSeq = FALSE, binary = FALSE,     mode = \"double\") oecosimu(dune, meandist, cf) #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = meandist, method = cf) #>  #> nullmodel method ‘myshuffle’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>           statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)    #> statistic   0.64565 3.2201 0.63568 0.63049 0.63535 0.6422     0.01 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Use pre-built null model nm <- simulate(nullmodel(sipoo, \"curveball\"), 99) oecosimu(nm, nestedchecker) #> oecosimu object #>  #> Call: oecosimu(comm = nm, nestfun = nestedchecker) #>  #> nullmodel method ‘curveball’ with 99 simulations #> options:  thin 1, burnin 0 #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic    SES   mean   2.5%    50% 97.5% Pr(sim.)   #> checkerboards      2767 1.8472 2692.5 2618.0 2688.0  2768     0.09 . #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Several chains of a sequential model -- this can be generalized ## for parallel processing (see ?smbind) nm <- replicate(5, simulate(nullmodel(sipoo, \"swap\"), 99,    thin=10, burnin=100), simplify = FALSE) ## nm is now a list of nullmodels: use smbind to combine these into one ## nullmodel with several chains ## IGNORE_RDIFF_BEGIN nm <- smbind(nm, MARGIN = 3) nm #> An object of class “simmat”  #> ‘swap’ method (binary, sequential) #> 18 x 50 matrix #> Number of permuted matrices = 495  #> Start = 110, End = 1090, Thin = 10 (5 chains) #>  oecosimu(nm, nestedchecker) #> oecosimu object #>  #> Call: oecosimu(comm = nm, nestfun = nestedchecker) #>  #> nullmodel method ‘swap’ with 495 simulations #> options:  thin 10, burnin 100, chains 5 #> alternative hypothesis: statistic is less or greater than simulated values #>  #> Checkerboard Units    : 2767  #> C-score (species mean): 2.258776  #>  #>               statistic     SES   mean   2.5%    50%  97.5% Pr(sim.) #> checkerboards      2767 0.61153 2705.6 2557.3 2690.0 2942.6   0.4657 ## IGNORE_RDIFF_END ## After this you can use toCoda() and tools in the coda package to ## analyse the chains (these will show that thin, burnin and nsimul are ## all too low for real analysis)."},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":null,"dir":"Reference","previous_headings":"","what":"Support Functions for Drawing Vectors — ordiArrowTextXY","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"Support functions assist drawing vectors (arrows)   ordination plots. ordiArrowMul finds multiplier   coordinates head vector occupy   fill proportion plot region. ordiArrowTextXY   finds coordinates locations labels drawn just   beyond head vector.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"","code":"ordiArrowTextXY(x, labels, display, choices = c(1,2),                 rescale = TRUE, fill = 0.75, at = c(0,0), ...) ordiArrowMul(x, at = c(0,0), fill = 0.75,              display, choices = c(1,2), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"x R object, scores can determine     suitable ordination scores object created     envfit, two-column matrix coordinates arrow     heads two plot axes. labels Change plotting labels. character vector labels     label coordinates sought. supplied,     determined row names x, scores(x, ...)     required. either defined, suitable labels     generated. display character string known scores one     methods indicates type scores extract.     fitting functions ordinary site scores linear     combination scores (\"lc\") constrained ordination     (cca, rda, capscale).     x created envfit display can     set user takes value \"vectors\". Ignored     x matrix. choices Axes plotted. rescale logical; coordinates extracted     x rescaled fill fill proportion plot     region? default always rescale coordinates     usually desired objects x coordinates     retrieved. supplying x 2-column matrix already     rescaled, set FALSE. fill numeric; proportion plot fill span     arrows. origin fitted arrows plot.  plot arrows     places origin, probably specify     arrrow.mul. ... Parameters passed scores,     strwidth strheight.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"ordiArrowMul finds multiplier scale bunch   arrows fill ordination plot, ordiArrowTextXY finds   coordinates labels arrows. NB.,   ordiArrowTextXY draw labels; simply returns   coordinates labels drawn use another   function, text.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"ordiArrowTextXY, 2-column matrix coordinates   label centres coordinate system currently active   plotting device. ordiArrowMul, length-1 vector containing scaling   factor.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"Jari Oksanen, modifications Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiArrowTextXY.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Support Functions for Drawing Vectors — ordiArrowTextXY","text":"","code":"## Scale arrows by hand to fill 80% of the plot     ## Biplot arrows by hand     data(varespec, varechem)     ord <- cca(varespec ~ Al + P + K, varechem)     plot(ord, display = c(\"species\",\"sites\"))      ## biplot scores     bip <- scores(ord, choices = 1:2, display = \"bp\")      ## scaling factor for arrows to fill 80% of plot     (mul <- ordiArrowMul(bip, fill = 0.8)) #> [1] 2.092173     bip.scl <- bip * mul                    # Scale the biplot scores     labs <- rownames(bip)                   # Arrow labels      ## calculate coordinate of labels for arrows     (bip.lab <- ordiArrowTextXY(bip.scl, rescale = FALSE, labels = labs)) #>          [,1]       [,2] #> Al  1.9098765 -0.3562415 #> P  -0.9298005 -1.6652122 #> K  -1.0069931 -0.3764923      ## draw arrows and text labels     arrows(0, 0, bip.scl[,1], bip.scl[,2], length = 0.1)     text(bip.lab, labels = labs)       ## Handling of ordination objects directly     mul2 <- ordiArrowMul(ord, display = \"bp\", fill = 0.8)     stopifnot(all.equal(mul, mul2))"},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Functions add arrows, line segments, regular grids   points. ordination diagrams can produced vegan   plot.cca, plot.decorana   ordiplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"","code":"ordiarrows(ord, groups, levels, replicates, order.by, display = \"sites\",          col = 1, show.groups, startmark, label = FALSE, length = 0.1, ...) ordisegments(ord, groups, levels, replicates, order.by, display = \"sites\",          col = 1, show.groups, label = FALSE, ...) ordigrid(ord, levels, replicates, display = \"sites\",  lty = c(1,1),           col = c(1,1), lwd = c(1,1), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"ord ordination object ordiplot object. groups Factor giving groups graphical item     drawn. levels, replicates Alternatively, regular     groups can defined arguments levels     replicates, levels gives number groups,     replicates number successive items     group. order.Order points increasing order variable     within groups. Reverse sign variable decreasing     ordering. display Item displayed. show.groups Show given groups. can vector,     TRUE want show items condition     TRUE. argument makes possible use different     colours line types groups. default show groups. label Label groups names.     ordiellipse, ordihull ordispider     group name centroid object, ordiarrows     start arrow, ordisegments     ends. ordiellipse ordihull use standard     text, others use ordilabel. startmark plotting character used mark first item.     default use mark, instance, startmark = 1     draw circle.  plotting characters, see pch     points. col Colour lines, label borders     startmark ordiarrows     ordisegments. can vector recycled     groups. ordigrid can vector length 2     used levels replicates. length Length edges arrow head (inches). lty, lwd Line type, line width used      levels replicates ordigrid. ... Parameters passed graphical functions     lines, segments, arrows,     scores select axes scaling etc.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Function ordiarrows draws arrows   ordisegments draws line segments   successive items groups. Function ordigrid draws line   segments within groups   corresponding items among groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"functions add graphical items ordination graph: must   draw graph first.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiarrows.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Arrows and Line Segments to Ordination Diagrams — ordiarrows","text":"","code":"example(pyrifos) #>  #> pyrifs> data(pyrifos) #>  #> pyrifs> ditch <- gl(12, 1, length=132) #>  #> pyrifs> week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) #>  #> pyrifs> dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11)) mod <- rda(pyrifos) plot(mod, type = \"n\") ## Annual succession by ditches, colour by dose ordiarrows(mod, ditch, label = TRUE, col = as.numeric(dose)) legend(\"topright\", levels(dose), lty=1, col=1:5, title=\"Dose\")  ## Show only control and highest Pyrifos treatment plot(mod, type = \"n\") ordiarrows(mod, ditch, label = TRUE,     show.groups = c(\"2\", \"3\", \"5\", \"11\")) ordiarrows(mod, ditch, label = TRUE, show = c(\"6\", \"9\"),    col = 2) legend(\"topright\", c(\"Control\", \"Pyrifos 44\"), lty = 1, col = c(1,2))"},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Functions add convex hulls, “spider” graphs, ellipses   cluster dendrogram ordination diagrams. ordination   diagrams can produced vegan plot.cca,   plot.decorana ordiplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"","code":"ordihull(ord, groups, display = \"sites\", draw = c(\"lines\",\"polygon\", \"none\"),          col = NULL, alpha = 127, show.groups, label = FALSE,          border = NULL, lty = NULL, lwd = NULL, ...) ordiellipse(ord, groups, display=\"sites\", kind = c(\"sd\",\"se\", \"ehull\"),          conf, draw = c(\"lines\",\"polygon\", \"none\"),    w = weights(ord, display), col = NULL, alpha = 127, show.groups,    label = FALSE, border = NULL, lty = NULL, lwd=NULL, ...) ordibar(ord, groups, display = \"sites\", kind = c(\"sd\", \"se\"), conf,          w = weights(ord, display), col = 1, show.groups, label = FALSE,    lwd = NULL, length = 0,  ...) ordispider(ord, groups, display=\"sites\", w = weights(ord, display),    spiders = c(\"centroid\", \"median\"),  show.groups,          label = FALSE, col = NULL, lty = NULL, lwd = NULL, ...) ordicluster(ord, cluster, prune = 0, display = \"sites\",             w = weights(ord, display), col = 1, draw = c(\"segments\", \"none\"),             ...) # S3 method for ordihull summary(object, ...) # S3 method for ordiellipse summary(object, ...) ordiareatest(ord, groups, area = c(\"hull\", \"ellipse\"), kind = \"sd\",          permutations = 999, parallel = getOption(\"mc.cores\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"ord ordination object ordiplot object. groups Factor giving groups graphical item     drawn. display Item displayed. draw character; objects represented plot?     ordihull ordiellipse use either     lines polygon draw     lines. ordicluster, line segments drawn using     segments. suppress plotting, use     \"none\". Graphical parameters passed . main     difference polygons may filled     non-transparent. none nothing drawn, function     returns invisible plotting. col Colour hull ellipse lines (draw = \"lines\")     fills (draw = \"polygon\") ordihull     ordiellipse.  draw = \"polygon\", colour     bordering lines can set argument border     polygon function. functions effect     depends underlining functions argument passed .     multiple values col specified used     element names(table(groups)) (order),     shorter vectors recycled. Function ordicluster     groups, argument recycled     points, colour connecting lines mixture point     s cluster. alpha Transparency fill colour draw     = \"polygon\" ordihull ordiellipse.      argument takes precedence possible transparency definitions     colour. value must range \\(0...255\\), low     values transparent.  Transparency available     graphics devices file formats. show.groups Show given groups. can vector,     TRUE want show items condition     TRUE. argument makes possible use different     colours line types groups. default show groups. label Label groups names centroid     object. ordiellipse ordihull use standard     text, others use ordilabel. w Weights used find average within group. Weights     used automatically cca     decorana results, unless undone     user. w=NULL sets equal weights points. kind Draw standard deviations points (sd), standard     errors (se) ellipsoid hulls enclose points     group (ehull). conf Confidence limit ellipses, e.g. 0.95. given,     corresponding sd se multiplied     corresponding value found Chi-squared distribution     2df. spiders centres spider bodies calculated either     centroids (averages) spatial medians. cluster Result hierarchic cluster analysis,     hclust agnes. prune Number upper level hierarchies removed     dendrogram. prune \\(>0\\), dendrogram     disconnected. object result object ordihull     ordiellipse. result invisible,     can saved, used summaries (areas etc. hulls     ellipses). area Evaluate area convex hulls ordihull,     ellipses ordiellipse. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. lty, lwd, border Vectors parameters can supplied     applied (appropriate) element     names(table(groups)) (order). Shorter vectors     recycled. length Width (inches) small (“caps”)     ends bar segment (passed arrows). ... Parameters passed graphical functions     scores select axes scaling etc.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Function ordihull draws lines   polygons convex   hulls found function chull encircling   items groups. Function ordiellipse draws lines   polygons ellipses groups. function   can either draw standard deviation points (kind=\"sd\")   standard error (weighted) centroids (kind=\"se\"),   (weighted) correlation defines direction principal   axis ellipse. kind = \"se\" used together   argument conf, ellipses show confidence regions   locations group centroids. kind=\"ehull\"   function draws ellipse encloses points group using   ellipsoidhull (cluster package). Function ordibar draws crossed “error bars” using   either either standard deviation point scores standard error   (weighted) average scores. principal axes   corresponding ordiellipse, found principal   component analysis (weighted) covariance matrix. Functions ordihull ordiellipse return invisibly   object summary method returns coordinates   centroids areas hulls ellipses. Function   ordiareatest studies one-sided hypothesis   areas smaller randomized groups. Argument   kind can used select kind ellipse,   effect convex hulls. Function ordispider draws ‘spider’ diagram   point connected group centroid   segments.  Weighted centroids used   correspondence analysis methods cca   decorana user gives weights   call. ordispider called cca   rda result without groups argument,   function connects ‘WA’ scores corresponding   ‘LC’ score. argument (invisible)   ordihull object, function connect points   hull centroid. Function ordicluster overlays cluster dendrogram onto   ordination. needs result hierarchic clustering   hclust agnes,   similar structure. Function ordicluster connects cluster   centroids line segments. Function   uses centroids points clusters, therefore   similar average linkage methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"functions add graphical items ordination graph:   must draw graph first. draw line segments, grids arrows, see   ordisegments, ordigrid   andordiarrows.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Functions ordihull, ordiellipse ordispider return invisible plotting structure. Function ordispider return coordinates   point connected (centroids ‘LC’ scores). Function ordihull ordiellipse return invisibly   object summary method returns coordinates   centroids areas hulls ellipses. Function  ordiareatest studies one-sided hypothesis   areas smaller randomized groups.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordihull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Groups or Factor Levels in Ordination Diagrams — ordihull","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ Management, dune.env) plot(mod, type=\"n\", scaling = \"symmetric\") ## Catch the invisible result of ordihull... pl <- with(dune.env, ordihull(mod, Management,                               scaling = \"symmetric\", label = TRUE))  ## ... and find centres and areas of the hulls summary(pl) #>             BF         HF         NM         SF #> CCA1 0.2917476 0.36826105 -1.3505642  0.2762936 #> CCA2 0.8632208 0.09419919  0.2681515 -0.8139398 #> Area 0.1951715 0.59943363  1.7398193  1.0144372 ## use more colours and add ellipsoid hulls plot(mod, type = \"n\") pl <- with(dune.env, ordihull(mod, Management,                               scaling = \"symmetric\", col = 1:4,                               draw=\"polygon\", label =TRUE)) with(dune.env, ordiellipse(mod, Management, scaling = \"symmetric\",                            kind = \"ehull\", col = 1:4, lwd=3))  ## ordispider to connect WA and LC scores plot(mod, dis=c(\"wa\",\"lc\"), type=\"p\") ordispider(mod)  ## Other types of plots plot(mod, type = \"p\", display=\"sites\") cl <- hclust(vegdist(dune)) ordicluster(mod, cl, prune=3, col = cutree(cl, 4))  ## confidence ellipse: location of the class centroids plot(mod, type=\"n\", display = \"sites\") with(dune.env, text(mod, display=\"sites\", labels = as.character(Management),                     col=as.numeric(Management))) pl <- with(dune.env, ordiellipse(mod, Management, kind=\"se\", conf=0.95, lwd=2,                                  draw = \"polygon\", col=1:4, border=1:4,                                  alpha=63)) summary(pl) #>             BF        HF          NM         SF #> CCA1 0.4312652 0.5583211 -1.87848340  0.5601499 #> CCA2 1.3273917 0.6373120 -0.05503211 -1.3859924 #> Area 1.4559842 1.3806668  2.73667419  1.5559135 ## add confidence bars with(dune.env, ordibar(mod, Management, kind=\"se\", conf=0.95, lwd=2, col=1:4,                        label=TRUE))"},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"Function ordilabel similar   text, text opaque label. can help   crowded ordination plots: still see text labels,   least uppermost readable. Argument priority helps   make important labels visible.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"","code":"ordilabel(x, display, labels, choices = c(1, 2), priority, select,      cex = 0.8, fill = \"white\", border = NULL, col = NULL, xpd = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"x ordination object object known     scores. display Kind scores displayed (passed     scores). labels Optional text used plots. given,      text found ordination object. choices Axes shown (passed scores). priority Vector length number     labels. items high priority plotted uppermost. select Items displayed. can either logical     vector TRUE displayed items vector     indices displayed items. cex Character expansion text (passed     text). fill Background colour labels (col argument     polygon). border colour visibility border label     defined polygon. col Text colour. Default NULL give value     border par(\"fg\") border NULL. xpd Draw labels also outside plot region (see      par). ... arguments (passed text).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"function may useful crowded ordination plots,   particular together argument priority. see   text labels, least readable. alternatives   crowded plots identify.ordiplot,   orditorp orditkplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordilabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Text on Non-transparent Label to an Ordination Plot. — ordilabel","text":"","code":"data(dune) ord <- cca(dune) plot(ord, type = \"n\") ordilabel(ord, dis=\"sites\", cex=1.2, font=3, fill=\"hotpink\", col=\"blue\") ## You may prefer separate plots, but here species as well ordilabel(ord, dis=\"sp\", font=2, priority=colSums(dune))"},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Alternative plot and identify Functions for Ordination — ordiplot","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot alternative plotting function   can worked vegan ordination result many   non-vegan results. addition, plot functions   vegan ordinations return invisibly \"ordiplot\" result   object, allows using ordiplot support functions   result: identify can used add labels selected   site, species constraint points, points   text can add elements plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"","code":"ordiplot(ord, choices = c(1, 2), type=\"points\", display, xlim, ylim,      cex = 0.7, ...) # S3 method for ordiplot identify(x, what, labels,  ...) # S3 method for ordiplot points(x, what, select, arrows = FALSE, ...) # S3 method for ordiplot text(x, what, labels, select, arrows = FALSE,     length = 0.05, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"ord result ordination. choices Axes shown. type type graph may \"points\",     \"text\" \"none\" ordination method. display Display \"sites\" \"species\". default     methods display , cca,     rda capscale     plot.cca. xlim, ylim x y limits (min,max) plot. cex Character expansion factor points text. ... graphical parameters. x result object ordiplot. Items identified ordination plot. types depend     kind plot used. methods know sites     species, functions cca rda     know addition      constraints (LC scores), centroids     biplot, plot.procrustes ordination plot     heads points. labels Optional text used labels. Row names used     missing. arrows Draw arrows origin. always     TRUE biplot scores value ignored. Setting     TRUE draw arrows type scores.     allows, e.g, using biplot arrows species. arrow head     value scores, possible text moved outwards. length Length arrow heads (see arrows). select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot draws ordination diagram using black circles   sites red crosses species.  returns invisibly object   class ordiplot can used identify.ordiplot   label selected sites species, constraints   cca rda. function can handle output several alternative ordination   methods. cca, rda   decorana uses plot method option   type = \"points\". addition, plot functions   methods return invisibly ordiplot object can   used identify.ordiplot label points.   ordinations relies scores extract scores. full user control plots, best call ordiplot   type = \"none\" save result, add sites   species using points.ordiplot text.ordiplot   pass arguments corresponding default graphical   functions. functions can chained pipes allows   alternative intuitive way building plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Function ordiplot returns invisibly object class  ordiplot used scores. general, vegan  plot functions ordination results also return invisible  ordiplot object. plot(..., type = \"n\") used   originally, plot empty, items can added   invisible object. Functions points text return   input object without modification, allows chaining   commands pipes. Function identify.ordiplot uses   object label point.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"purpose functions provide similar functionality   plot, plotid specid methods library   labdsv. functions somewhat limited parametrization,   can call directly standard identify   plot functions better user control.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Alternative plot and identify Functions for Ordination — ordiplot","text":"","code":"## Draw a plot for a non-vegan ordination (cmdscale). data(dune) dune.dis <- vegdist(wisconsin(dune)) dune.mds <- cmdscale(dune.dis, eig = TRUE) dune.mds$species <- wascores(dune.mds$points, dune, expand = TRUE) pl <- ordiplot(dune.mds, type = \"none\") points(pl, \"sites\", pch=21, col=\"red\", bg=\"yellow\") text(pl, \"species\", col=\"blue\", cex=0.9)  if (FALSE) { ## same plot using pipes (|>) ordiplot(dune.mds, type=\"n\") |>   points(\"sites\", pch=21, col=\"red\", bg=\"yellow\") |>   text(\"species\", col=\"blue\", cex=0.9) ## Some people think that species should be shown with arrows in PCA. ## Other ordination methods also return an invisible ordiplot object and ## we can use pipes to draw those arrows. mod <- rda(dune) plot(mod, type=\"n\") |>   points(\"sites\", pch=16, col=\"red\") |>   text(\"species\", arrows = TRUE, length=0.05, col=\"blue\") } ## Default plot of the previous using identify to label selected points if (FALSE) { pl <- ordiplot(dune.mds) identify(pl, \"spec\")}"},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function ordipointlabel produces ordination plots   points text label points. points exact   location given ordination, function tries optimize   location text labels minimize overplotting text.   function may useful moderately crowded ordination plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"","code":"ordipointlabel(x, display = c(\"sites\", \"species\"), choices = c(1, 2),    col = c(1, 2),  pch = c(\"o\", \"+\"), font = c(1, 1),     cex = c(0.8, 0.8), add = FALSE, select, ...)  # S3 method for ordipointlabel plot(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"x ordipointlabel() result object     ordination function. plot.ordipointlabel object     resulting call ordipointlabel(). display Scores displayed plot. choices Axes shown. col, pch, font, cex Colours, point types, font style      character expansion kind scores displayed      plot. vectors length number      items display. add Add existing plot. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. select used single set     scores plotted (.e. length(display) == 1),     otherwise ignored warning issued. logical vector     used, must length scores plotted. ... arguments passed points   text.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function uses simulated annealing (optim,   method = \"SANN\") optimize location text labels   points. eight possible locations: , , sides   corners. weak preference text right   point, weak avoidance corner positions. exact locations   goodness solution varies runs,   guarantee finding global optimum. optimization can take   long time difficult cases high number potential   overlaps. Several sets scores can displayed one plot. function modelled pointLabel   maptools package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function returns invisibly object class  ordipointlabel items xy coordinates   points, labels coordinates labels, items pch,  cex font graphical parameters point   label. addition, returns result optim   attribute \"optim\". unit overlap area   character \"m\", variable cex   smallest alternative. plot method based orditkplot   alter reset graphical parameters via par. result object ordipointlabel inherits  orditkplot, can also replotted  plot method. may possible edit result   object orditkplot, good results   necessary points span whole horizontal axis without empty   margins.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"function designed ordination graphics,   optimization works properly plots isometric aspect ratio.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordipointlabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Ordination Plots with Points and Optimized Locations for Text — ordipointlabel","text":"","code":"data(dune) ord <- cca(dune) plt <- ordipointlabel(ord)   ## set scaling - should be no warnings! ordipointlabel(ord, scaling = \"sites\")   ## plot then add plot(ord, scaling = \"symmetric\", type = \"n\") ordipointlabel(ord, display = \"species\", scaling = \"symm\", add = TRUE) ordipointlabel(ord, display = \"sites\", scaling = \"symm\", add = TRUE)   ## redraw plot without rerunning SANN optimisation plot(plt)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":null,"dir":"Reference","previous_headings":"","what":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"function provides plot.lm style diagnostic plots   results constrained ordination cca,   rda capscale. Normally need   plots, ordination descriptive   make assumptions distribution residuals. However,   permute residuals significance tests (anova.cca),   may interested inspecting residuals really   exchangeable independent fitted values.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"","code":"ordiresids(x, kind = c(\"residuals\", \"scale\", \"qqmath\"),    residuals = \"working\", type = c(\"p\", \"smooth\", \"g\"),    formula, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"x Ordination result cca, rda     capscale. kind type plot: \"residuals\" plot residuals     fitted values, \"scale\" square root absolute     residuals fitted values, \"qqmath\" residuals     expected distribution (defaults qnorm),     unless defined differently formula  argument. residuals kind residuals fitted values, alternatives     \"working\", \"response\", \"standardized\"     \"studentized\" (see Details). type type plot. argument passed     lattice functions. formula Formula override default plot. formula can     contain items Fitted, Residuals, Species     Sites (provided names species sites available     ordination result). ... arguments passed lattice functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"default plots similar plot.lm,   use Lattice functions   xyplot qqmath.   alternatives default formulae can replaced   user. elements available formula groups argument   Fitted, Residuals, Species Sites. residuals = \"response\" residuals = \"working\"   fitted values residuals found functions   fitted.cca residuals.cca.   residuals = \"standardized\" residuals found   rstandard.cca, residuals = \"studentized\"   found rstudent.cca, cases   fitted values standardized sigma.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"function returns Lattice object can   displayed plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordiresids.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plots of Residuals and Fitted Values for Constrained Ordination — ordiresids","text":"","code":"data(varespec) data(varechem) mod <- cca(varespec ~ Al + P + K, varechem) ordiresids(mod)  ordiresids(mod, formula = Residuals ~ Fitted | Species, residuals=\"standard\",    cex = 0.5)"},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":null,"dir":"Reference","previous_headings":"","what":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Automatic stepwise model building constrained ordination methods   (cca, rda, capscale).   function ordistep modelled step   can forward, backward stepwise model selection using permutation tests.   Function ordiR2step performs forward model choice solely adjusted   \\(R^2\\) P-value, ordination objects created rda capscale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"","code":"ordistep(object, scope, direction = c(\"both\", \"backward\", \"forward\"),    Pin = 0.05, Pout = 0.1, permutations = how(nperm = 199), steps = 50,    trace = TRUE, ...) ordiR2step(object, scope, Pin = 0.05, R2scope = TRUE,    permutations = how(nperm = 499), trace = TRUE, R2permutations = 1000, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"object ordistep, ordination object inheriting   cca rda. scope Defines range models examined stepwise   search.  can list containing components upper   lower, formulae. single item, interpreted   target scope, depending direction.   direction \"forward\", single item interpreted   upper scope formula input object   lower scope.  See step details.   ordiR2step, defines upper scope; can also   ordination object model extracted. direction mode stepwise search, can one \"\",   \"backward\", \"forward\", default   \"\".  scope argument missing, default   direction \"backward\" ordistep (  ordiR2step argument, works   forward). Pin, Pout Limits permutation \\(P\\)-values adding (Pin) term   model, dropping (Pout) model. Term added   \\(P \\le\\) Pin, removed \\(P >\\) Pout. R2scope Use adjusted \\(R^2\\) stopping criterion: models   lower adjusted \\(R^2\\) scope accepted. permutations list control values permutations     returned function , number     permutations required, permutation matrix row     gives permuted indices. passed     anova.cca: see details. steps Maximum number iteration steps dropping adding terms. trace positive, information printed model building. Larger   values may give information. R2permutations Number permutations used estimation   adjusted \\(R^2\\) cca using   RsquareAdj. ... additional arguments add1.cca   drop1.cca.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"basic functions model choice constrained ordination   add1.cca drop1.cca. functions,   ordination models can chosen standard R function   step bases term choice AIC. AIC-like   statistics ordination provided functions   deviance.cca extractAIC.cca (  similar functions rda). Actually, constrained   ordination methods AIC, therefore step   may trusted. function provides alternative using   permutation \\(P\\)-values. Function ordistep defines model, scope models   considered, direction procedure similarly   step. function alternates drop   add steps stops model changed one   step. - + signs summary table indicate   stage performed.  often sensible Pout   \\(>\\) Pin stepwise models avoid cyclic adds drops   single terms. Function ordiR2step builds model forward maximizes   adjusted \\(R^2\\) (function RsquareAdj) every   step, stopping adjusted \\(R^2\\) starts decrease,   adjusted \\(R^2\\) scope exceeded,   selected permutation \\(P\\)-value exceeded (Blanchet et   al. 2008). second criterion ignored option R2scope =   FALSE, third criterion can ignored setting Pin = 1   (higher).  function used adjusted \\(R^2\\)   calculated. number predictors higher   number observations, adjusted \\(R^2\\) also unavailable.   models can analysed R2scope = FALSE,   variable selection stop models become overfitted adjusted   \\(R^2\\) calculated, adjusted \\(R^2\\)   reported zero. \\(R^2\\) cca   based simulations (see RsquareAdj) different runs   ordiR2step can give different results. Functions ordistep (based \\(P\\) values) ordiR2step   (based adjusted \\(R^2\\) hence eigenvalues) can select   variables different order.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Functions return selected model one additional   component, anova, contains brief information steps   taken. can suppress voluminous output model building   setting trace = FALSE, find summary model history   anova item.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Blanchet, F. G., Legendre, P. & Borcard, D. (2008) Forward selection   explanatory variables. Ecology 89, 2623--2632.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordistep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Choose a Model by Permutation Tests in Constrained Ordination — ordistep","text":"","code":"## See add1.cca for another example  ### Dune data data(dune) data(dune.env) mod0 <- rda(dune ~ 1, dune.env)  # Model with intercept only mod1 <- rda(dune ~ ., dune.env)  # Model with all explanatory variables  ## With scope present, the default direction is \"both\" mod <- ordistep(mod0, scope = formula(mod1)) #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.010 ** #> + A1          1 89.591 1.9217  0.045 *  #> + Use         2 91.032 1.1741  0.345    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>              Df   AIC    F Pr(>F)    #> - Management  3 89.62 2.84  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.005 ** #> + Manure    3 87.517 1.3902  0.075 .  #> + A1        1 87.424 1.2965  0.220    #> + Use       2 88.284 1.0510  0.320    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>              Df    AIC      F Pr(>F)    #> - Management  3 87.707 2.1769  0.015 *  #> - Moisture    3 87.082 1.9764  0.010 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225   0.36 #> + A1      1 86.220 0.8359   0.60 #> + Use     2 86.842 0.8027   0.71 #>  mod #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>  ## summary table of steps mod$anova #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 85.567 1.9764  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Example of ordistep, forward ordistep(mod0, scope = formula(mod1), direction=\"forward\") #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.025 *  #> + A1          1 89.591 1.9217  0.050 *  #> + Use         2 91.032 1.1741  0.240    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.010 ** #> + Manure    3 87.517 1.3902  0.115    #> + A1        1 87.424 1.2965  0.235    #> + Use       2 88.284 1.0510  0.450    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225   0.29 #> + A1      1 86.220 0.8359   0.57 #> + Use     2 86.842 0.8027   0.70 #>  #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>   ## Example of ordiR2step (always forward) ## stops because R2 of 'mod1' exceeded ordiR2step(mod0, mod1) #> Step: R2.adj= 0  #> Call: dune ~ 1  #>   #>                 R2.adjusted #>   0.32508817 #> + Management     0.22512409 #> + Moisture       0.20050225 #> + Manure         0.16723149 #> + A1             0.04626579 #> + Use            0.01799755 #>            0.00000000 #>  #>              Df    AIC    F Pr(>F)    #> + Management  3 87.082 2.84  0.002 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: R2.adj= 0.2251241  #> Call: dune ~ Management  #>   #>                 R2.adjusted #> + Moisture        0.3450334 #>    0.3250882 #> + Manure          0.2779515 #> + A1              0.2392216 #> + Use             0.2300349 #>             0.2251241 #>  #> Call: rda(formula = dune ~ Management, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   29.2307     0.3475    3 #> Unconstrained 54.8930     0.6525   16 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3  #> 14.865 10.690  3.675  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8    PC9   PC10   PC11  #> 15.270  8.428  6.899  5.675  3.988  3.121  2.588  2.380  1.818  1.376  0.995  #>   PC12   PC13   PC14   PC15   PC16  #>  0.785  0.661  0.467  0.283  0.159  #>"},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":null,"dir":"Reference","previous_headings":"","what":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Function ordisurf fits smooth surface given variable   plots result ordination diagram.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"","code":"# S3 method for default ordisurf(x, y, choices = c(1, 2), knots = 10,          family = \"gaussian\", col = \"red\", isotropic = TRUE,          thinplate = TRUE, bs = \"tp\", fx = FALSE, add = FALSE,          display = \"sites\", w = weights(x, display), main, nlevels = 10,          levels, npoints = 31, labcex = 0.6, bubble = FALSE,          cex = 1, select = TRUE, method = \"REML\", gamma = 1,          plot = TRUE, lwd.cl = par(\"lwd\"), ...)  # S3 method for formula ordisurf(formula, data, ...)  # S3 method for ordisurf calibrate(object, newdata, ...)  # S3 method for ordisurf plot(x, what = c(\"contour\",\"persp\",\"gam\"),      add = FALSE, bubble = FALSE, col = \"red\", cex = 1,      nlevels = 10, levels, labcex = 0.6, lwd.cl = par(\"lwd\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"x ordisurf ordination configuration, either     matrix result known scores.     plot.ordisurf object class \"ordisurf\"     returned ordisurf. y Variable plotted / modelled function     ordination scores. choices Ordination axes. knots Number initial knots gam (one     degrees freedom). knots = 0     knots = 1  function fit linear trend surface,     knots = 2 function  fit quadratic trend surface     instead smooth surface. vector length 2 allowed     isotropic = FALSE, first second elements     knots referring first second ordination     dimensions (indicated choices) respectively. family Error distribution gam. col Colour contours. isotropic, thinplate Fit isotropic smooth surface (.e.     smoothness ordination dimensions) via     gam. Use thinplate deprecated     removed future version package. bs two letter character string indicating smoothing basis     use. (e.g. \"tp\" thin plate regression spline,     \"cr\" cubic regression spline). One c(\"tp\", \"ts\",       \"cr\", \"cs\", \"ds\", \"ps\", \"ad\"). See     smooth.terms view     refer . default use thin plate splines: bs = \"tp\". fx indicates whether smoothers fixed degree freedom     regression splines (fx = FALSE) penalised regression     splines (fx = TRUE). Can vector length 2     anisotropic surfaces (isotropic = FALSE). make     sense use fx = TRUE select = TRUE     error . warning issued specify     fx = TRUE forget use select = FALSE though     fitting continues using select = FALSE. add Add contours existing diagram draw new plot? display Type scores known scores: typically     \"sites\" ordinary site scores \"lc\" linear combination scores. w Prior weights data. Concerns mainly cca     decorana results nonconstant weights. main main title plot, default name     plotted variable new plot. nlevels, levels Either vector levels contours     drawn, suggested number contours nlevels     levels supplied. npoints numeric; number locations evaluate     fitted surface. represents number locations     dimension. labcex Label size contours.  Setting zero suppress     labels. bubble Use “bubble plot” points, vary point     diameter value plotted variable. bubble     numeric, value used maximum symbol size (    cex), bubble = TRUE, value cex gives     maximum. minimum size always cex = 0.4.      option effect add = FALSE. cex Character expansion plotting symbols. select Logical; specify gam argument     \"select\". TRUE gam can     add extra  penalty term can penalized     zero. means smoothing parameter estimation part     fitting can completely remove terms model.     corresponding smoothing parameter estimated zero extra     penalty effect. method character; smoothing parameter estimation     method. Options allowed : \"GCV.Cp\" uses GCV models     unknown scale parameter Mallows' Cp/UBRE/AIC models     known scale; \"GACV.Cp\" \"GCV.Cp\" uses GACV     (Generalised Approximate CV) instead GCV; \"REML\"     \"ML\" use restricted maximum likelihood maximum likelihood     estimation known unknown scale; \"P-REML\"     \"P-ML\" use REML ML estimation use Pearson estimate     scale. gamma Multiplier inflate model degrees freedom GCV     UBRE/AIC score . effectively places extra penalty     complex models. oft-used value gamma = 1.4. plot logical; plotting done     ordisurf? Useful want fitted response     surface model. lwd.cl numeric; lwd (line width) parameter use     drawing contour lines. formula, data Alternative definition fitted model     x ~ y, left-hand side ordination x     right-hand side single fitted continuous variable     y. variable y must working environment     data frame environment given data.     arguments passed default method. object ordisurf result object. newdata Coordinates two-dimensional ordination new     points. character; type plot produce. \"contour\"     produces contour plot response surface, see     contour details. \"persp\" produces     perspective plot , see persp     details. \"gam\" plots fitted GAM model, object     inherits class \"gam\" returned ordisurf, see     plot.gam. ... parameters passed scores,     graphical functions. See Note exceptions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Function ordisurf fits smooth surface using penalised   splines (Wood 2003) gam, uses   predict.gam find fitted values regular   grid. smooth surface can fitted extra penalty   allows entire smoother penalized back 0 degrees   freedom, effectively removing term model (see Marra &   Wood, 2011). addition extra penalty invoked   setting argument select TRUE. alternative   use spline basis includes shrinkage (bs = \"ts\"   bs = \"cs\"). ordisurf() exposes large number options   gam specifying basis functions used   surface. stray defaults, read   Notes section relevant documentation   s smooth.terms. function plots fitted contours convex hull data points   either existing ordination diagram draws new plot.   select = TRUE smooth effectively penalised   model, contours plotted. gam determines degree smoothness   fitted response surface model fitting, unless fx =   TRUE. Argument method controls gam   performs smoothness selection. See gam   details available options. Using \"REML\" \"ML\"   yields p-values smooths best coverage properties   things matter . function uses scores extract ordination scores,   x can result object known function. user can supply vector prior weights w.   ordination object weights, used. practise   means row totals used weights cca   decorana results. like , want   give equal weights sites, set w =   NULL. behaviour consistent envfit.   complete accordance constrained cca, set   display = \"lc\". Function calibrate returns fitted values response   variable. newdata must coordinates points   fitted values desired. function based   predict.gam pass extra arguments   function.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"ordisurf usually called side effect drawing   contour plot. function returns result object class  \"ordisurf\" inherits gam used   internally fit surface, adds item grid   contains data grid surface. item grid   elements x y vectors axis coordinates,   element z matrix fitted values  contour. values outside convex hull observed   points indicated NA z.  gam component result can used   analysis like predicting new values (see  predict.gam).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Dave Roberts, Jari Oksanen Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"default use isotropic smoother via   s employing thin plate regression splines   (bs = \"tp\"). make sense ordination   equal smoothing directions rotation invariant. However,   different degrees smoothness along dimensions required,   anisotropic smooth surface may applicable. can   achieved use isotropic = FALSE, wherein   surface fitted via tensor product smoother via   te (unless bs = \"ad\", case   separate splines dimension fitted using   s). Cubic regression splines P splines can used   isotropic = FALSE. Adaptive smooths (bs = \"ad\"), especially two dimensions,   require large number observations; without many hundreds   observations, default complexities smoother exceed   number observations fitting fail. get old behaviour ordisurf use select = FALSE,   method = \"GCV.Cp\", fx = FALSE, bs = \"tp\".   latter two options current defaults. Graphical arguments supplied plot.ordisurf passed   underlying plotting functions, contour, persp,   plot.gam. exception arguments   col cex can currently passed   plot.gam bug way function   evaluates arguments arranging plot. work-around call plot.gam directly   result call ordisurf. See Examples   illustration .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"warning","dir":"Reference","previous_headings":"","what":"Warning","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"fitted GAM regression model usual assumptions   models. particular note assumption independence   residuals. observations independent (e.g.   repeat measures set objects, experimental design,   inter alia) trust p-values GAM   output. need control (.e. add additional fixed effects   model, use complex smoothers), extract ordination   scores using scores function generate   gam call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"Marra, G.P & Wood, S.N. (2011) Practical variable selection   generalized additive models. Comput. Stat. Data Analysis 55,   2372--2387. Wood, S.N. (2003) Thin plate regression splines.   J. R. Statist. Soc. B 65, 95--114.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordisurf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fit and Plot Smooth Surfaces of Variables on Ordination. — ordisurf","text":"","code":"data(varespec) data(varechem) vare.dist <- vegdist(varespec) vare.mds <- monoMDS(vare.dist) ## IGNORE_RDIFF_BEGIN ordisurf(vare.mds ~ Baresoil, varechem, bubble = 5) #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.51  total = 7.51  #>  #> REML score: 92.20464       ## as above but without the extra penalties on smooth terms, ## and using GCV smoothness selection (old behaviour of `ordisurf()`): ordisurf(vare.mds ~ Baresoil, varechem, col = \"blue\", add = TRUE,                         select = FALSE, method = \"GCV.Cp\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 7.82  total = 8.82  #>  #> GCV score: 125.6649       ## Cover of Cladina arbuscula fit <- ordisurf(vare.mds ~ Cladarbu, varespec, family=quasipoisson)  ## Get fitted values calibrate(fit) #>        18        15        24        27        23        19        22        16  #> 21.920918  7.210220  3.778808  2.599524  7.849188  5.409767  7.798663  9.866940  #>        28        13        14        20        25         7         5         6  #>  1.701333 29.381996  8.565427  9.294810  5.960113 27.308407 22.837172 28.861374  #>         3         4         2         9        12        10        11        21  #>  7.579617 15.298175  3.299211  1.330609  4.261901  1.904892  9.860122 11.170813  ## Variable selection via additional shrinkage penalties ## This allows non-significant smooths to be selected out ## of the model not just to a linear surface. There are 2 ## options available: ##  - option 1: `select = TRUE` --- the *default* ordisurf(vare.mds ~ Baresoil, varechem, method = \"REML\", select = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.51  total = 7.51  #>  #> REML score: 92.20464      ##  - option 2: use a basis with shrinkage ordisurf(vare.mds ~ Baresoil, varechem, method = \"REML\", bs = \"ts\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"ts\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 4.64  total = 5.64  #>  #> REML score: 96.0339      ## or bs = \"cs\" with `isotropic = FALSE` ## IGNORE_RDIFF_END ## Plot method plot(fit, what = \"contour\")   ## Plotting the \"gam\" object plot(fit, what = \"gam\") ## 'col' and 'cex' not passed on  ## or via plot.gam directly library(mgcv) #> Loading required package: nlme #> This is mgcv 1.9-1. For overview type 'help(\"mgcv-package\")'. plot.gam(fit, cex = 2, pch = 1, col = \"blue\")  ## 'col' effects all objects drawn...  ### controlling the basis functions used ## Use Duchon splines ordisurf(vare.mds ~ Baresoil, varechem, bs = \"ds\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"ds\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 6.56  total = 7.56  #>  #> REML score: 92.14761       ## A fixed degrees of freedom smooth, must use 'select = FALSE' ordisurf(vare.mds ~ Baresoil, varechem, knots = 4,                         fx = TRUE, select = FALSE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 4, bs = \"tp\", fx = TRUE) #>  #> Estimated degrees of freedom: #> 3  total = 4  #>  #> REML score: 81.10221       ## An anisotropic smoother with cubic regression spline bases ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,                         bs = \"cr\", knots = 4)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ te(x1, x2, k = c(4, 4), bs = c(\"cr\", \"cr\"), fx = c(FALSE,  #>     FALSE)) #>  #> Estimated degrees of freedom: #> 3.97  total = 4.97  #>  #> REML score: 92.17793       ## An anisotropic smoother with cubic regression spline with ## shrinkage bases & different degrees of freedom in each dimension ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,                         bs = \"cs\", knots = c(3,4), fx = TRUE,                         select = FALSE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ te(x1, x2, k = c(3, 4), bs = c(\"cs\", \"cs\"), fx = c(TRUE,  #>     TRUE)) #>  #> Estimated degrees of freedom: #> 11  total = 12  #>  #> REML score: 40.66178"},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":null,"dir":"Reference","previous_headings":"","what":"Add Text or Points to Ordination Plots — orditorp","title":"Add Text or Points to Ordination Plots — orditorp","text":"function adds text points   ordination plots.  Text used can done without   overwriting text labels, points used otherwise.   function can help reducing clutter ordination graphics,   manual editing may still necessary.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add Text or Points to Ordination Plots — orditorp","text":"","code":"orditorp(x, display, labels, choices = c(1, 2), priority,     select, cex = 0.7, pcex, col = par(\"col\"), pcol,     pch = par(\"pch\"), air = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add Text or Points to Ordination Plots — orditorp","text":"x result object ordination ordiplot     result. display Items displayed plot.  one     alternative allowed. Typically \"sites\"     \"species\". labels Optional text used labels. Row names used   missing. choices Axes shown. priority Text used items higher priority     labels overlap.  vector     length number items plotted. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. logical vector used, must     length scores plotted. cex, pcex Text point sizes, see plot.default.. col, pcol Text point colours, see plot.default. pch Plotting character, see points. air Amount empty space text labels. Values <1 allow     overlapping text. ... arguments scores (various     methods), text points.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add Text or Points to Ordination Plots — orditorp","text":"Function orditorp add either text points existing   plot. items high priority added first   text used can done without   overwriting previous labels,points used   otherwise. priority missing, labels added   outskirts centre. Function orditorp can used   ordination results, plotting results   ordiplot ordination plot functions   (plot.cca, plot.decorana,   plot.metaMDS). Arguments can passed relevant scores method   ordination object (x) drawn. See relevant   scores help page arguments can used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add Text or Points to Ordination Plots — orditorp","text":"function returns invisibly logical vector TRUE means item labelled text FALSE means   marked point. returned vector can used  select argument ordination text points functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add Text or Points to Ordination Plots — orditorp","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/orditorp.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add Text or Points to Ordination Plots — orditorp","text":"","code":"## A cluttered ordination plot : data(BCI) mod <- cca(BCI) plot(mod, dis=\"sp\", type=\"t\")  # Now with orditorp and abbreviated species names cnam <- make.cepnames(names(BCI)) plot(mod, dis=\"sp\", type=\"n\") stems <- colSums(BCI) orditorp(mod, \"sp\", label = cnam, priority=stems, pch=\"+\", pcol=\"grey\")   ## show select in action set.seed(1) take <- sample(ncol(BCI), 50) plot(mod, dis=\"sp\", type=\"n\") stems <- colSums(BCI) orditorp(mod, \"sp\", label = cnam, priority=stems, select = take,          pch=\"+\", pcol=\"grey\")  # \\dontshow{ ## example(orditorp) should not set random seed in the user session rm(.Random.seed) #> Warning: object '.Random.seed' not found # }"},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":null,"dir":"Reference","previous_headings":"","what":"Trellis (Lattice) Plots for Ordination — ordixyplot","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"Functions ordicloud, ordisplom ordixyplot   provide interface plot ordination results using Trellis   functions cloud, splom   xyplot package lattice.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"","code":"ordixyplot(x, data = NULL, formula, display = \"sites\", choices = 1:3,     panel = \"panel.ordi\", aspect = \"iso\", envfit,     type = c(\"p\", \"biplot\"), ...) ordisplom(x, data=NULL, formula = NULL,  display = \"sites\", choices = 1:3,     panel = \"panel.ordi\", type = \"p\",  ...) ordicloud(x, data = NULL, formula, display = \"sites\", choices = 1:3,      panel = \"panel.ordi3d\", prepanel = \"prepanel.ordi3d\",  ...)"},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"x ordination result scores knows:     ordination result vegan many others. data Optional data amend ordination results. ordination     results found x, may give data     variables needed plots. Typically environmental data. formula Formula define plots. default formula     used omitted.     ordination axes must called names     ordination results (names vary among methods).     ordisplom, special character . refers     ordination result. display kind scores: argument passed     scores. choices axes selected: argument passed     scores. panel, prepanel names panel prepanel     functions. aspect aspect plot (passed lattice     function). envfit Result envfit function displayed     ordixyplot. Please note needs choices     ordixyplot. type type plot. knows alternatives     panel.xyplot. addition ordixyplot     alternatives \"biplot\", \"arrows\"     \"polygon\". first displays fitted vectors factor     centroids envfit, constrained ordination,     biplot arrows factor centroids envfit     given. second (type = \"arrows\") trellis variant     ordiarrows draws arrows groups.     line parameters controlled     trellis.par.set superpose.line,     user can set length, angle ends     parameters panel.arrows.  last one     (type = \"polygon\") draws polygon enclosing points     panel polygon enclosing points data.     overall polygon controlled     trellis.par.set plot.polygon,     panel polygon controlled superpose.polygon. ... Arguments passed scores methods     lattice functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"functions provide interface corresponding lattice   functions.  graphical parameters passed lattice   function graphs extremely configurable. See   Lattice xyplot,     splom cloud   details, usage possibilities. argument x must always ordination result. scores   extracted vegan function scores   functions work vegan ordinations many others. formula used define models. functions   simple default formulae used formula missing.    formula omitted ordisplom   produces pairs plot ordination axes variables   data. formula given, ordination results must   referred . variables names.   functions, formula must use names ordination scores names   data. ordination scores found x, data   optional. data contain variables   ordination scores used plots. Typically,   environmental variables (typically factors) define panels plot   symbols. proper work done panel function. layout can   changed defining panel functions. See   panel.xyplot,   panel.splom   panel.cloud details survey   possibilities. Ordination graphics always isometric: scale   used axes. controlled (can changed)   argument aspect ordixyplot. ordicloud   isometric scaling defined panel prepanel   functions. must replace functions want   non-isometric scaling graphs. select isometric scaling   ordisplom.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"function return Lattice objects class  \"trellis\".","code":""},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/ordixyplot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Trellis (Lattice) Plots for Ordination — ordixyplot","text":"","code":"data(dune, dune.env) ord <- cca(dune) ## Pairs plots ordisplom(ord)  ordisplom(ord, data=dune.env, choices=1:2)  ordisplom(ord, data=dune.env, form = ~ . | Management, groups=Manure)  ## Scatter plot with polygons ordixyplot(ord, data=dune.env, form = CA1 ~ CA2 | Management,   groups=Manure, type = c(\"p\",\"polygon\"))  ## Choose a different scaling ordixyplot(ord, scaling = \"symmetric\")  ## ... Slices of third axis ordixyplot(ord, form = CA1 ~ CA2 | equal.count(CA3, 4),    type = c(\"g\",\"p\", \"polygon\"))  ## Display environmental variables ordixyplot(ord, envfit = envfit(ord ~ Management + A1, dune.env, choices=1:3))  ## 3D Scatter plots ordicloud(ord, form = CA2 ~ CA3*CA1, groups = Manure, data = dune.env)  ordicloud(ord, form = CA2 ~ CA3*CA1 | Management, groups = Manure,    data = dune.env, auto.key = TRUE, type = c(\"p\",\"h\"))"},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":null,"dir":"Reference","previous_headings":"","what":"Principal Coordinates of Neighbourhood Matrix — pcnm","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"function computed classical PCNM principal coordinate   analysis truncated distance matrix. commonly used   transform (spatial) distances rectangular data suitable   constrained ordination regression.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"","code":"pcnm(dis, threshold, w, dist.ret = FALSE)"},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"dis distance matrix. threshold threshold value truncation distance.     missing, minimum distance giving connected network     used. found longest distance minimum spanning     tree dis. w Prior weights rows. dist.ret Return distances used calculate PCNMs.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Principal Coordinates Neighbourhood Matrix (PCNM) map distances   rows onto rectangular matrix rows using truncation   threshold long distances (Borcard & Legendre 2002). original   distances Euclidean distances two dimensions (like normal   spatial distances), mapped onto two dimensions   truncation distances. truncation,   higher number principal coordinates. selection truncation   distance huge influence PCNM vectors. default   use longest distance keep data connected. distances   truncation threshold given arbitrary value 4 times   threshold.  regular data, first PCNM vectors show wide scale   variation later PCNM vectors show smaller scale variation (Borcard   & Legendre 2002), irregular data interpretation   clear. PCNM functions used express distances rectangular form   similar normal explanatory variables used , e.g.,   constrained ordination (rda, cca   capscale) univariate regression (lm)   together environmental variables (row weights supplied   cca; see Examples). regarded   powerful method forcing rectangular environmental data   distances using partial mantel analysis   (mantel.partial) together geographic distances   (Legendre et al. 2008, see Tuomisto & Ruokolainen 2008). function based pcnm function Dray's unreleased   spacemakeR package. differences current   function uses spantree internal support   function. current function also can use prior weights rows   using weighted metric scaling wcmdscale. use   row weights allows finding orthonormal PCNMs also correspondence   analysis (e.g., cca).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"list following elements: values Eigenvalues obtained principal coordinates     analysis. vectors Eigenvectors obtained principal coordinates     analysis. scaled unit norm. vectors can extracted     scores function. default return PCNM vectors,     argument choices selects given vectors. threshold Truncation distance. dist distance matrix values threshold     replaced arbitrary value four times     threshold. String \"pcnm\" added method     attribute, new attribute threshold added     distances. returned dist.ret = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Borcard D. Legendre P. (2002) -scale spatial analysis   ecological data means principal coordinates neighbour   matrices. Ecological Modelling 153, 51--68. Legendre, P., Borcard, D Peres-Neto, P. (2008) Analyzing   explaining beta diversity? Comment. Ecology 89,   3238--3244. Tuomisto, H. & Ruokolainen, K. (2008) Analyzing explaining beta   diversity? reply. Ecology 89, 3244--3256.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"Jari Oksanen, based code Stephane Dray.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/pcnm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Principal Coordinates of Neighbourhood Matrix — pcnm","text":"","code":"## Example from Borcard & Legendre (2002) data(mite.xy) pcnm1 <- pcnm(dist(mite.xy)) op <- par(mfrow=c(1,3)) ## Map of PCNMs in the sample plot ordisurf(mite.xy, scores(pcnm1, choi=1), bubble = 4, main = \"PCNM 1\") #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 8.71  total = 9.71  #>  #> REML score: 25.8026      ordisurf(mite.xy, scores(pcnm1, choi=2), bubble = 4, main = \"PCNM 2\") #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 7.18  total = 8.18  #>  #> REML score: 43.10693      ordisurf(mite.xy, scores(pcnm1, choi=3), bubble = 4, main = \"PCNM 3\")  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 8.32  total = 9.32  #>  #> REML score: 52.38255      par(op) ## Plot first PCNMs against each other ordisplom(pcnm1, choices=1:4)  ## Weighted PCNM for CCA data(mite) rs <- rowSums(mite)/sum(mite) pcnmw <- pcnm(dist(mite.xy), w = rs) ord <- cca(mite ~ scores(pcnmw)) ## Multiscale ordination: residual variance should have no distance ## trend msoplot(mso(ord, mite.xy))"},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":null,"dir":"Reference","previous_headings":"","what":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Individual (count data) incidence (presence-absence data) based null models can generated community level simulations. Options preserving characteristics original matrix (rows/columns sums, matrix fill) restricted permutations (based strata) discussed Details section.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"","code":"permatfull(m, fixedmar = \"both\", shuffle = \"both\", strata = NULL,      mtype = \"count\", times = 99, ...) permatswap(m, method = \"quasiswap\", fixedmar=\"both\", shuffle = \"both\",     strata = NULL, mtype = \"count\", times = 99,      burnin = 0, thin = 1, ...) # S3 method for permat print(x, digits = 3, ...) # S3 method for permat summary(object, ...) # S3 method for summary.permat print(x, digits = 2, ...) # S3 method for permat plot(x, type = \"bray\", ylab, xlab, col, lty,     lowess = TRUE, plot = TRUE, text = TRUE, ...) # S3 method for permat lines(x, type = \"bray\", ...) # S3 method for permat as.ts(x, type = \"bray\", ...) # S3 method for permat toCoda(x)"},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"m community data matrix plots (samples) rows     species (taxa) columns. fixedmar character, stating row/column sums     preserved (\"none\", \"rows\", \"columns\", \"\"). strata Numeric vector factor length     nrow(m) grouping rows within strata restricted     permutations. Unique values levels used. mtype Matrix data type, either \"count\" count data,     \"prab\" presence-absence type incidence data. times Number permuted matrices. method Character method used swap algorithm     (\"swap\", \"tswap\", \"quasiswap\",     \"backtrack\") described function     make.commsim. mtype=\"count\"     \"quasiswap\", \"swap\", \"swsh\"     \"abuswap\" methods available (see details). shuffle Character, indicating whether individuals     (\"ind\"), samples (\"samp\") (\"\")     shuffled, see details. burnin Number null communities discarded proper     analysis sequential (\"swap\", \"tswap\") methods. thin Number discarded permuted matrices two     evaluations sequential (\"swap\", \"tswap\") methods. x, object Object class \"permat\" digits Number digits used rounding. ylab, xlab, col, lty graphical parameters plot     method. type Character, type plot displayed: \"bray\"     Bray-Curtis dissimilarities, \"chisq\" Chi-squared values. lowess, plot, text Logical arguments plot     method, whether locally weighted regression curve drawn,     plot drawn, statistic values printed     plot. ... arguments passed simulate.nullmodel      methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"function permatfull useful matrix fill   allowed vary, matrix type count.  fixedmar   argument used set constraints permutation.  none   margins fixed, cells randomised within matrix.    rows columns fixed, cells within rows columns   randomised, respectively.  margins fixed,   r2dtable function used based Patefield's   (1981) algorithm. presence absence data, matrix fill   necessarily fixed, permatfull wrapper function   make.commsim. r00, r0, c0, quasiswap   algorithms make.commsim used \"none\",   \"rows\", \"columns\", \"\" values fixedmar argument,   respectively shuffle argument effect mtype =   \"count\" permatfull function used \"none\",   \"rows\", \"columns\" values fixedmar. cases   count data individual based randomisations. \"samp\"   \"\" options result fixed matrix fill. \"\"   option means individuals shuffled among non zero cells   ensuring cell zeros result, cell   (zero new valued cells) shuffled. function permatswap useful matrix fill   (.e. proportion empty cells) row/columns sums   kept constant. permatswap uses different kinds swap   algorithms, row columns sums fixed cases.    presence-absence data, swap tswap methods   make.commsim can used.  count data, special   swap algorithm ('swapcount') implemented results permuted   matrices fixed marginals matrix fill time. 'quasiswapcount' algorithm (method=\"quasiswap\"   mtype=\"count\") uses trick Carsten Dormann's   swap.web function package   bipartite. First, random matrix generated   r2dtable function retaining row column sums.   original matrix fill reconstructed sequential steps   increase decrease matrix fill random matrix. steps   based swapping 2x2 submatrices (see 'swapcount' algorithm   details) maintain row column totals. algorithm generates   independent matrices step, burnin thin   arguments considered. default method,   sequential (swapcount ) independence subsequent   matrices checked. swapcount algorithm (method=\"swap\"   mtype=\"count\") tries find 2x2 submatrices (identified 2   random row 2 random column indices), can swapped order   leave column row totals fill unchanged. First,   algorithm finds largest value submatrix can swapped   (\\(d\\)) whether diagonal antidiagonal way. Submatrices   contain values larger zero either diagonal   antidiagonal position can swapped. Swap means values   diagonal antidiagonal positions decreased \\(d\\),   remaining cells increased \\(d\\). swap made fill   change. algorithm sequential, subsequent matrices   independent, swaps modify little matrix   large. cases many burnin steps thinning needed get   independent random matrices. Although algorithm implemented   C, large burnin thin values can slow   considerably. WARNING: according simulations, algorithm seems   biased non random, thus use avoided! algorithm \"swsh\" function permatswap   hybrid algorithm. First, makes binary quasiswaps keep row   column incidences constant, non-zero values modified   according shuffle argument (\"samp\"   \"\" available case, applied   non-zero values). also recognizes fixedmar   argument \"\" (vegan versions <= 2.0   algorithm fixedmar = \"none\"). algorithm \"abuswap\" produces two kinds null models   (based fixedmar=\"columns\" fixedmar=\"rows\")   described Hardy (2008; randomization scheme 2x 3x,   respectively).  preserve column row occurrences, column   row sums time. (Note similar constraints   can achieved non sequential \"swsh\" algorithm   fixedmar argument set \"columns\"   \"rows\", respectively.) Constraints row/column sums, matrix fill, total sum sums within   strata can checked summary method. plot method   visually testing randomness permuted matrices,   especially sequential swap algorithms.   tendency graph, higher burnin thin values can   help sequential methods.  New lines can added existing plot   lines method. Unrestricted restricted permutations: strata   NULL, functions perform unrestricted permutations. Otherwise,   used restricted permutations. strata contain   least 2 rows order perform randomization (case low row   numbers, swap algorithms can rather slow). design   well balanced (.e. number observations within stratum),   permuted matrices may biased constraints forced   submatrices different dimensions. often means, number   potential permutations decrease dimensions.    constraints put, less randomness can expected. plot method useful graphically testing trend   independence permuted matrices. especially important   using sequential algorithms (\"swap\", \"tswap\", \"abuswap\"). .ts method can used extract Bray-Curtis   dissimilarities Chi-squared values time series. can   used testing independence (see Examples). method toCoda   useful accessing diagnostic tools available coda   package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Functions permatfull permatswap return   object class \"permat\" containing function call   (call), original data matrix used permutations   (orig) list permuted matrices length times (perm). summary method returns various statistics list   (including mean Bray-Curtis dissimilarities calculated pairwise among   original permuted matrices, Chi-square statistics, check   results constraints; see Examples). Note  strata used original call, summary calculation may   take longer. plot creates plot side effect. .ts method returns object class \"ts\".","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Original references presence-absence algorithms   given help page make.commsim. Hardy, O. J. (2008) Testing spatial phylogenetic structure   local communities: statistical performances different null models   test statistics locally neutral community. Journal Ecology   96, 914--926. Patefield, W. M. (1981) Algorithm AS159. efficient method   generating r x c tables given row column totals.     Applied Statistics 30, 91--97.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"Péter Sólymos, solymos@ualberta.ca Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permatfull.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Matrix Permutation Algorithms for Presence-Absence and Count Data — permat","text":"","code":"## A simple artificial community data matrix. m <- matrix(c(     1,3,2,0,3,1,     0,2,1,0,2,1,     0,0,1,2,0,3,     0,0,0,1,4,3     ), 4, 6, byrow=TRUE) ## Using the quasiswap algorithm to create a  ## list of permuted matrices, where ## row/columns sums and matrix fill are preserved: x1 <- permatswap(m, \"quasiswap\") summary(x1) #> Summary of object of class 'permat' #>  #> Call: permatswap(m = m, method = \"quasiswap\") #>  #> Matrix type: count  #> Permutation type: swap #> Method: quasiswap_count, burnin: 0, thin: 1 #> Restricted: FALSE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 100 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    1.01 % #> Column incidences retained: 13.13 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3667  0.4333  0.4145  0.4667  0.6000  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   16.27   19.59   21.10   21.51   23.36   31.69  ## Unrestricted permutation retaining ## row/columns sums but not matrix fill: x2 <- permatfull(m) summary(x2) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m) #>  #> Matrix type: count  #> Permutation type: full #> Method: r2dtable #> Restricted: FALSE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 16.16 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    0 % #> Column incidences retained: 1.01 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3333  0.3667  0.3865  0.4333  0.6333  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   7.824  12.046  15.660  16.015  19.413  28.132  ## Unrestricted permutation of presence-absence type ## not retaining row/columns sums: x3 <- permatfull(m, \"none\", mtype=\"prab\") x3$orig  ## note: original matrix is binarized! #>      [,1] [,2] [,3] [,4] [,5] [,6] #> [1,]    1    1    1    0    1    1 #> [2,]    0    1    1    0    1    1 #> [3,]    0    0    1    1    0    1 #> [4,]    0    0    0    1    1    1 summary(x3) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m, fixedmar = \"none\", mtype = \"prab\") #>  #> Matrix type: prab  #> Permutation type: full #> Method: r00 #> Restricted: FALSE  #> Fixed margins: none #> Individuals and samples are shuffled #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 15 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 100 % #> Row sums retained:    4.04 % #> Column sums retained: 0 % #> Row incidences retained:    4.04 % #> Column incidences retained: 0 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>  0.2000  0.3333  0.4000  0.3852  0.4000  0.5333  #>  #> Chi-squared for original matrix: 8.4 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   8.812  13.583  15.208  15.295  17.083  21.896  ## Restricted permutation, ## check sums within strata: x4 <- permatfull(m, strata=c(1,1,2,2)) summary(x4) #> Summary of object of class 'permat' #>  #> Call: permatfull(m = m, strata = c(1, 1, 2, 2)) #>  #> Matrix type: count  #> Permutation type: full #> Method: r2dtable #> Restricted: TRUE  #> Fixed margins: both #>  #> Matrix dimensions: 4 rows, 6 columns #> Sum of original matrix: 30 #> Fill of original matrix: 0.62 #> Number of permuted matrices: 99  #>  #> Matrix sums retained: 100 % #> Matrix fill retained: 38.38 % #> Row sums retained:    100 % #> Column sums retained: 100 % #> Row incidences retained:    1.01 % #> Column incidences retained: 2.02 % #> Sums within strata retained: 100 % #>  #> Bray-Curtis dissimilarities among original and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #> 0.06667 0.20000 0.26667 0.23502 0.26667 0.46667  #>  #> Chi-squared for original matrix: 18.55 #> Chi-squared values among expected and permuted matrices: #>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.  #>   14.21   18.68   21.05   22.09   25.26   36.50   ## NOTE: 'times' argument usually needs to be >= 99 ## here much lower value is used for demonstration  ## Not sequential algorithm data(BCI) a <- permatswap(BCI, \"quasiswap\", times=19) ## Sequential algorithm b <- permatswap(BCI, \"abuswap\", fixedmar=\"col\",     burnin=0, thin=100, times=19) opar <- par(mfrow=c(2,2)) plot(a, main=\"Not sequential\") plot(b, main=\"Sequential\") plot(a, \"chisq\") plot(b, \"chisq\")  par(opar) ## Extract Bray-Curtis dissimilarities ## as time series bc <- as.ts(b) ## Lag plot lag.plot(bc)  ## First order autoregressive model mar <- arima(bc, c(1,0,0)) mar #>  #> Call: #> arima(x = bc, order = c(1, 0, 0)) #>  #> Coefficients: #>          ar1  intercept #>       0.9915     0.1850 #> s.e.  0.0120     0.1374 #>  #> sigma^2 estimated as 0.000346:  log likelihood = 46.71,  aic = -87.42 ## Ljung-Box test of residuals Box.test(residuals(mar)) #>  #> \tBox-Pierce test #>  #> data:  residuals(mar) #> X-squared = 0.35725, df = 1, p-value = 0.55 #>  ## Graphical diagnostics tsdiag(mar)"},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":null,"dir":"Reference","previous_headings":"","what":"Extract, Analyse and Display Permutation Results — permustats","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function extracts permutation results   vegan functions. support functions can find quantiles   standardized effect sizes, plot densities Q-Q plots.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extract, Analyse and Display Permutation Results — permustats","text":"","code":"permustats(x, ...) # S3 method for permustats summary(object, interval = 0.95, alternative, ...) # S3 method for permustats densityplot(x, data, xlab = \"Permutations\", ...) # S3 method for permustats density(x, observed = TRUE, ...) # S3 method for permustats qqnorm(y, observed = TRUE, ...) # S3 method for permustats qqmath(x, data, observed = TRUE, sd.scale = FALSE,     ylab = \"Permutations\", ...) # S3 method for permustats boxplot(x, scale = FALSE, names, ...) # S3 method for permustats pairs(x, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extract, Analyse and Display Permutation Results — permustats","text":"object, x, y object handled. interval numeric; coverage interval reported. alternative character string specifying limits used     interval direction test evaluating     \\(p\\)-values. Must one \"two.sided\" (upper     lower limit), \"greater\" (upper limit), \"less\"     (lower limit). Usually alternative given result     object, can specified argument. xlab, ylab Arguments     densityplot     qqmath functions. observed Add observed statistic among permutations. sd.scale Scale permutations unit standard deviation observed     statistic standardized effect size. data Ignored. scale Use standardized effect size (SES). names Names boxes (default: names statistics). ... arguments passed function.     density passed density.default,     boxplot boxplot.default.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function extracts permutation results   observed statistics several vegan functions perform   permutations simulations. summary method permustats estimates   standardized effect sizes (SES) difference observed   statistic mean permutations divided standard deviation   permutations (also known \\(z\\)-values). also prints   mean, median, limits contain interval percent   permuted values. default (interval = 0.95),   two-sided test (2.5%, 97.5%) one-sided tests   either 5% 95% quantile \\(p\\)-value depending   test direction. mean, quantiles \\(z\\) values evaluated   permuted values without observed statistic,   \\(p\\)-value evaluated observed statistic.   intervals \\(p\\)-value evaluated test   direction original test, can changed   argument alternative. Several permustats objects can   combined c function. c function checks   statistics equal, performs sanity tests. density densityplot methods display   kernel density estimates permuted values. observed value   statistic included permuted values,   densityplot method marks observed statistic vertical   line. However density method uses standard plot   method mark observed value. qqnorm qqmath display Q-Q plots   permutations, optionally together observed value (default)   shown horizontal line plots. qqnorm plots   permutation values standard Normal variate. qqmath   defaults standard Normal well, can accept   alternatives (see standard qqmath).   qqmath function can also plot observed statistic   standardized effect size (SES) standandized permutations   (argument sd.scale). permutations standardized   without observed statistic, similarly summary. Functions density qqnorm based   standard R methods accept arguments. handle   one statistic, used several test statistic   evaluated. densityplot   qqmath lattice graphics, can   used either one several statistics.  functions   pass arguments underlying functions; see   documentation. Functions qqmath   densityplot default use axis scaling   subplots lattice. can use argument scales   set independent scaling subplots appropriate (see   xyplot exhaustive list arguments). Function boxplot draws box--whiskers plots effect   size, difference permutations observed statistic.   scale = TRUE, permutations standardized unit standard   deviation, plot show standardized effect sizes. Function pairs plots permutation values statistics   . function passes extra arguments   pairs. permustats can extract permutation statistics   results adonis2,   anosim, anova.cca, mantel,   mantel.partial, mrpp,   oecosimu, ordiareatest,   permutest.cca, protest,   permutest.betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extract, Analyse and Display Permutation Results — permustats","text":"permustats function returns object class  \"permustats\". list items \"statistic\"   observed statistics, permutations contains permuted   values, alternative contains text defining   character test (\"two.sided\", \"less\"  \"greater\"). qqnorm  density methods return standard result objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extract, Analyse and Display Permutation Results — permustats","text":"Jari Oksanen contributions Gavin L. Simpson   (permustats.permutest.betadisper method related   modifications summary.permustats print   method) Eduard Szöcs (permustats.anova.cca).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permustats.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extract, Analyse and Display Permutation Results — permustats","text":"","code":"data(dune, dune.env) mod <- adonis2(dune ~ Management + A1, data = dune.env) ## use permustats perm <- permustats(mod) summary(perm) #>  #>            statistic    SES   mean lower median  upper Pr(perm)    #> Management    3.0730 4.6870 1.0387       0.9565 1.8217    0.004 ** #> A1            2.7676 2.7175 1.0022       0.8484 2.2436    0.028 *  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> (Interval (Upper - Lower) = 0.95) densityplot(perm)  qqmath(perm)  boxplot(perm, scale=TRUE, lty=1, pch=16, cex=0.6, col=\"hotpink\", ylab=\"SES\") abline(h=0, col=\"skyblue\")  ## example of multiple types of statistic mod <- with(dune.env, betadisper(vegdist(dune), Management)) pmod <- permutest(mod, nperm = 99, pairwise = TRUE) perm <- permustats(pmod) summary(perm, interval = 0.90) #>  #>             statistic     SES    mean   lower  median   upper Pr(perm)   #> Overall (F)    1.9506  0.7173  1.1427          0.8211  2.4909    0.154   #> BF-HF (t)     -0.5634 -0.4124 -0.0443 -2.0202 -0.0293  1.8851    0.591   #> BF-NM (t)     -2.2387 -1.8672 -0.0045 -1.8423  0.0074  2.0628    0.067 . #> BF-SF (t)     -1.1675 -0.9341 -0.0086 -1.9337 -0.0450  1.9486    0.283   #> HF-NM (t)     -2.1017 -1.9328  0.0277 -1.6716  0.0346  1.7582    0.067 . #> HF-SF (t)     -0.8789 -0.7872  0.0321 -1.8598  0.0284  1.8394    0.379   #> NM-SF (t)      0.9485  0.8265  0.0121 -1.9118  0.0690  1.7827    0.379   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> (Interval (Upper - Lower) = 0.9)"},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation tests in Vegan — permutations","title":"Permutation tests in Vegan — permutations","text":"version 2.2-0, vegan significantly improved access   restricted permutations brings line offered   Canoco. permutation designs modelled permutation   schemes Canoco 3.1 (ter Braak, 1990). vegan currently provides following features within   permutation tests: Free permutation DATA, also known randomisation, Free permutation DATA within levels       grouping variable, Restricted permutations line transects time series, Permutation groups samples whilst retaining       within-group ordering, Restricted permutations spatial grids, Blocking, samples never permuted blocks,       Split-plot designs, permutation whole plots, split       plots, . , use DATA mean either observed data   function data, example residuals   ordination model presence covariables. capabilities provided functions permute   package. user can request particular type permutation   supplying permutations argument function   object returned , defines samples   permuted. Alternatively, user can simply specify required   number permutations simple randomisation procedure   performed. Finally, user can supply matrix permutations (  number rows equal number permutations number   columns equal number observations data)   vegan use permutations instead generating new   permutations. majority functions vegan allow full range   possibilities outlined . Exceptions include   kendall.post kendall.global. Null hypothesis first two types permutation test listed   assumes free exchangeability DATA (within levels   grouping variable, specified). Dependence   observations, arises due spatial temporal   autocorrelation, -complicated experimental designs,   split-plot designs, violates fundamental assumption test   requires complex restricted permutation test designs.   designs available via permute package   vegan provides access version 2.2-0 onwards. Unless otherwise stated help pages specific functions,   permutation tests vegan follow format/structure: appropriate test statistic chosen. statistic       chosen described help pages individual       functions. value test statistic evaluate observed       data analysis/model recorded. Denote value       \\(x_0\\). DATA randomly permuted according one       schemes, value test statistic       permutation evaluated recorded. Step 3 repeated total \\(n\\) times, \\(n\\)       number permutations requested. Denote values       \\(x_i\\), \\(= 1, ..., n\\) Count number values test statistic,       \\(x_i\\), Null distribution extreme       test statistic observed data \\(x_0\\). Denote       count \\(N\\).      use phrase extreme include cases       two-sided test performed large negative values test       statistic considered. permutation p-value computed       $$p = \\frac{N + 1}{n + 1}$$ description illustrates default number   permutations specified vegan functions takes values 199   999 example. Pretty p values achieved   \\(+ 1\\) denominator results division 200 1000,   199 999 random permutations used test. simple intuition behind presence \\(+ 1\\) numerator   denominator represent inclusion observed   value statistic Null distribution (e.g. Manly 2006).   Phipson & Smyth (2010) present compelling explanation   inclusion \\(+ 1\\) numerator denominator   p value calculation. Fisher (1935) mind permutation test involve   enumeration possible permutations data yielding exact   test. However, complete enumeration may feasible   practice owing potentially vast number arrangements   data, even modestly-sized data sets free permutation   samples. result evaluate p value tail   probability Null distribution test statistic directly   random sample possible permutations. Phipson & Smyth   (2010) show naive calculation permutation p   value $$p = \\frac{N}{n}$$ leads invalid test incorrect type error rate.   go show replacing unknown tail probability (  p value) Null distribution biased estimator $$p = \\frac{N + 1}{n + 1}$$ positive bias induced just right size   account  uncertainty estimation tail probability   set randomly sampled permutations yield test   correct type error rate. estimator described correct situation   permutations data samples randomly without   replacement. strictly happens vegan   permutations drawn pseudo-randomly independent one   another. Note actual chance happening practice   small functions permute guarantee generate   unique set permutations unless complete enumeration   permutations requested. feasible   smallest data sets restrictive permutation designs,   cases chance drawing set permutations repeats   lessened sample size, thence size set   possible permutations, increases. situation sampling permutations replacement ,   tail probability \\(p\\) calculated biased estimator   described somewhat conservative, large   amount depends number possible values test   statistic can take permutation data (Phipson & Smyth,   2010). represents slight loss statistical power   conservative p value calculation used . However, unless   sample sizes small permutation design   set values test statistic can take also small,   loss power unlikely critical. minimum achievable p-value $$p_{\\mathrm{min}} = \\frac{1}{n + 1}$$ hence depends number permutations evaluated. However,   one simply increase number permutations (\\(n\\))   achieve potentially lower p-value unless number observations   available permits number permutations. unlikely   problem smallest data sets free permutation   (randomisation) valid, restricted permutation designs   low number observations, may many unique   permutations data might desire reach required   level significance. currently responsibility user determine total   number possible permutations DATA. number   possible permutations allowed specified design can   calculated using numPerms   permute package. Heuristics employed within   shuffleSet function used vegan can   triggered generate entire set permutations instead   random set. settings controlling triggering complete   enumeration step contained within permutation design created   using link[permute]{} can set user. See   details. Limits total number permutations DATA   severe temporally spatially ordered data experimental designs   low replication. example, time series \\(n = 100\\)   observations just 100 possible permutations including   observed ordering. situations low number permutations possible due   nature DATA experimental design, enumeration   permutations becomes important achievable computationally. , provided brief overview capabilities   vegan permute. get best new   functionality details set permutation designs   using , consult vignette   Restricted permutations; using permute package supplied   permute accessible via vignette(\"permutations\",   package = \"permute\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"random-number-generation","dir":"Reference","previous_headings":"","what":"Random Number Generation","title":"Permutation tests in Vegan — permutations","text":"permutations based random number generator provided   R. may change R releases change permutations   vegan test results. One change R release   3.6.0. new version clearly better permutation tests   use . However, need reproduce old results,   can set R random number generator previous version   RNGversion.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation tests in Vegan — permutations","text":"Manly, B. F. J. (2006). Randomization, Bootstrap Monte Carlo   Methods Biology, Third Edition. Chapman Hall/CRC. Phipson, B., & Smyth, G. K. (2010). Permutation P-values never   zero: calculating exact P-values permutations randomly   drawn. Statistical Applications Genetics Molecular     Biology, 9, Article 39. DOI: 10.2202/1544-6115.1585 ter Braak, C. J. F. (1990). Update notes: CANOCO version     3.1. Wageningen: Agricultural Mathematics Group. (UR). See also: Davison, . C., & Hinkley, D. V. (1997). Bootstrap Methods     Application. Cambridge University Press.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutations.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation tests in Vegan — permutations","text":"Gavin L. Simpson","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":null,"dir":"Reference","previous_headings":"","what":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Implements permutation-based test multivariate homogeneity   group dispersions (variances) results call   betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"","code":"# S3 method for betadisper permutest(x, pairwise = FALSE,           permutations = 999,           parallel = getOption(\"mc.cores\"),           ...)"},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"x object class \"betadisper\", result     call betadisper. pairwise logical; perform pairwise comparisons group means? permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. ... Arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"test one groups variable others, ANOVA   distances group centroids can performed parametric   theory used interpret significance F. alternative   use permutation test. permutest.betadisper permutes model   residuals generate permutation distribution F Null   hypothesis difference dispersion groups. Pairwise comparisons group mean dispersions can performed   setting argument pairwise TRUE. classical t test   performed pairwise group dispersions. combined   permutation test based t statistic calculated pairwise group   dispersions. alternative classical comparison group   dispersions, calculate Tukey's Honest Significant Differences   groups, via TukeyHSD.betadisper.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"permutest.betadisper returns list class  \"permutest.betadisper\" following components: tab ANOVA table object inheriting class     \"data.frame\". pairwise list components observed     permuted containing observed permuted p-values     pairwise comparisons group mean distances (dispersions variances). groups character; levels grouping factor. control list, result call     .","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Anderson, M.J. (2006) Distance-based tests homogeneity   multivariate dispersions. Biometrics 62(1), 245--253. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006) Multivariate   dispersion measure beta diversity. Ecology Letters   9(6), 683--693.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"Gavin L. Simpson","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/permutest.betadisper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Permutation test of multivariate homogeneity of groups dispersions\n  (variances) — permutest.betadisper","text":"","code":"data(varespec)  ## Bray-Curtis distances between samples dis <- vegdist(varespec)  ## First 16 sites grazed, remaining 8 sites ungrazed groups <- factor(c(rep(1,16), rep(2,8)), labels = c(\"grazed\",\"ungrazed\"))  ## Calculate multivariate dispersions mod <- betadisper(dis, groups) mod #>  #> \tHomogeneity of multivariate dispersions #>  #> Call: betadisper(d = dis, group = groups) #>  #> No. of Positive Eigenvalues: 15 #> No. of Negative Eigenvalues: 8 #>  #> Average distance to median: #>   grazed ungrazed  #>   0.3926   0.2706  #>  #> Eigenvalues for PCoA axes: #> (Showing 8 of 23 eigenvalues) #>  PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8  #> 1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284   ## Perform test anova(mod) #> Analysis of Variance Table #>  #> Response: Distances #>           Df  Sum Sq  Mean Sq F value  Pr(>F)   #> Groups     1 0.07931 0.079306  4.6156 0.04295 * #> Residuals 22 0.37801 0.017182                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Permutation test for F pmod <- permutest(mod, permutations = 99, pairwise = TRUE)  ## Tukey's Honest Significant Differences (mod.HSD <- TukeyHSD(mod)) #>   Tukey multiple comparisons of means #>     95% family-wise confidence level #>  #> Fit: aov(formula = distances ~ group, data = df) #>  #> $group #>                       diff        lwr          upr     p adj #> ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502 #>  plot(mod.HSD)   ## Has permustats() method pstat <- permustats(pmod) densityplot(pstat, scales = list(x = list(relation = \"free\")))  qqmath(pstat, scales = list(relation = \"free\"))"},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"Functions plot extract results constrained correspondence analysis   (cca), redundancy analysis (rda)   constrained analysis principal coordinates (capscale).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"","code":"# S3 method for cca plot(x, choices = c(1, 2), display = c(\"sp\", \"wa\", \"cn\"),      scaling = \"species\", type, xlim, ylim, const,      correlation = FALSE, hill = FALSE, ...) # S3 method for cca text(x, display = \"sites\", labels, choices = c(1, 2),      scaling = \"species\", arrow.mul, head.arrow = 0.05, select, const,      axis.bp = FALSE, correlation = FALSE, hill = FALSE, ...) # S3 method for cca points(x, display = \"sites\", choices = c(1, 2),        scaling = \"species\", arrow.mul, head.arrow = 0.05, select, const,        axis.bp = FALSE, correlation = FALSE, hill = FALSE, ...) # S3 method for cca scores(x, choices = c(1,2), display = c(\"sp\",\"wa\",\"bp\",\"cn\"),        scaling = \"species\", hill = FALSE, tidy = FALSE, ...) # S3 method for rda scores(x, choices = c(1,2), display = c(\"sp\",\"wa\",\"bp\",\"cn\"),        scaling = \"species\", const, correlation = FALSE, tidy = FALSE, ...) # S3 method for cca summary(object, scaling = \"species\", axes = 6,         display = c(\"sp\", \"wa\", \"lc\", \"bp\", \"cn\"),         digits = max(3, getOption(\"digits\") - 3),         correlation = FALSE, hill = FALSE, ...) # S3 method for summary.cca print(x, digits = x$digits, head = NA, tail = head, ...) # S3 method for summary.cca head(x, n = 6, tail = 0, ...) # S3 method for summary.cca tail(x, n = 6, head = 0, ...) # S3 method for cca labels(object, display, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"x, object cca result object. choices Axes shown. display Scores shown.  must include     alternatives \"species\" \"sp\" species scores,     sites \"wa\" site scores, \"lc\" linear     constraints LC scores, \"bp\" biplot arrows     \"cn\" centroids factor constraints instead arrow,     \"reg\" regression coefficients (.k.. canonical     coefficients). alternative \"\" selects available     scores. scaling Scaling species site scores. Either species     (2) site (1) scores scaled eigenvalues,     set scores left unscaled, 3     scaled symmetrically square root eigenvalues.  Corresponding     negative values can used cca additionally multiply     results \\(\\sqrt(1/(1-\\lambda))\\).  scaling know Hill     scaling (although nothing Hill's rescaling     decorana). corresponding negative values     rda, species scores divided standard deviation     species multiplied equalizing constant. Unscaled raw     scores stored result can accessed scaling = 0. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Arguments correlation hill     scores.rda scores.cca respectively can used     combination character descriptions get     corresponding negative value. correlation, hill logical; scaling character     description scaling type, correlation hill     used select corresponding negative scaling type; either     correlation-like scores Hill's scaling PCA/RDA CA/CCA     respectively. See argument scaling details. tidy Return scores compatible     ggplot2: scores single data.frame,     score type identified factor variable score,     names variable label, weights (CCA)     variable weight. possible values score     species, sites (WA scores), constraints     (LC scores sites calculated directly constraining     variables), biplot (biplot arrows), centroids     (levels factor variables), factorbiplot (biplot     arrows model centroids), regression (regression     coefficients find LC scores constraints). scores     used conventional plot,     directly suitable used ggplot2 package. type Type plot: partial match text     text labels, points points, none     setting frames .  omitted, text selected     smaller data sets, points larger. xlim, ylim x y limits (min,max) plot. labels Optional text used instead row names.     use , good check default labels order     using labels command. arrow.mul Factor expand arrows graph.  Arrows     scaled automatically fit graph missing. head.arrow Default length arrow heads. select Items displayed.  can either logical     vector TRUE displayed items vector indices     displayed items. const General scaling constant rda scores.     default use constant gives biplot scores, ,     scores approximate original data (see vignette     ‘Design Decisions’ browseVignettes(\"vegan\")     details discussion). const vector two     items, first used species, second item site     scores. axis.bp Draw axis biplot arrows. axes Number axes summaries. digits Number digits output. n, head, tail Number rows printed head tail     species site scores.  Default NA prints . ... Parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"plot function used cca   rda. produces quick, standard plot current   scaling. plot function sets colours (col), plotting   characters (pch) character sizes (cex)   certain standard values. fuller control produced plot,   best call plot type=\"none\" first, add   plotting item separately using text.cca   points.cca functions. use default settings standard   text points functions accept   parameters, allowing  full user control produced plots. Environmental variables receive special treatment.   display=\"bp\", arrows drawn. labelled   text unlabelled points. arrows   basically unit scaling, sites scaled (scaling   \"sites\" \"symmetric\"), scores requested axes   adjusted relative axis highest eigenvalue.    scaling = \"species\" scaling = \"none\", arrows   consistent vectors fitted linear combination scores   (display = \"lc\" function envfit),   scaling alternatives differ. basic plot   function uses simple heuristics adjusting unit-length arrows   current plot area, user can give expansion factor   mul.arrow.  display=\"cn\" centroids levels   factor variables displayed (available   factors formula interface used   cca rda). option continuous   variables still presented arrows ordered factors arrows   centroids. display = \"reg\" arrows drawn   regression coefficients (.k.. canonical coefficients) constraints   conditions. Biplot arrows can interpreted individually,   regression coefficients must interpreted together: LC score   site sum regressions displayed arrows.   partialled conditions zero shown biplot arrows,   shown regressions, show effect must   partialled get LC scores. biplot arrows   standard easily interpreted, regression arrows   used know need . want better control plots, best   construct plot text points commands   accept graphical parameters. important remember use   scaling, correlation hill arguments   calls. plot.cca command returns invisibly   ordiplot result object, consistent   scaling elements. easiest way full control   graphics first set plot frame using plot   type = \"n\" needed scores display save   result. points text commands   ordiplot allow full graphical control (see   section Examples). Utility function labels returns default   labels order applied text. Function summary lists scores output can   long.  can suppress scores setting axes = 0   display = NA display = NULL. can display   first last () rows scores using head   tail explicit print command summary. Palmer (1993) suggested using linear constraints (“LC scores”)   ordination diagrams, gave better results   simulations site scores (“WA scores”) step   constrained unconstrained analysis.  However, McCune (1997) showed   noisy environmental variables (environmental measurements   noisy) destroy “LC scores” whereas “WA scores”   little affected.  Therefore plot function uses site scores   (“WA scores”) default. consistent usage   statistics functions R (lda,   cancor).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"plot function returns   invisibly plotting structure can used function  identify.ordiplot identify points   functions ordiplot family.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/plot.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot or Extract Results of Constrained Correspondence Analysis\n  or Redundancy Analysis — plot.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Moisture + Management, dune.env) ## better control -- remember to set scaling etc identically plot(mod, type=\"n\", scaling=\"sites\") text(mod, dis=\"cn\", scaling=\"sites\") points(mod, pch=21, col=\"red\", bg=\"yellow\", cex=1.2, scaling=\"sites\") text(mod, \"species\", col=\"blue\", cex=0.8, scaling=\"sites\")  ## catch the invisible result and use ordiplot support - the example ## will make a biplot with arrows for species and correlation scaling pca <- rda(dune) pl <- plot(pca, type=\"n\", scaling=\"sites\", correlation=TRUE) with(dune.env, points(pl, \"site\", pch=21, col=1, bg=Management)) text(pl, \"sp\", arrow=TRUE, length=0.05, col=4, cex=0.6, xpd=TRUE) with(dune.env, legend(\"bottomleft\", levels(Management), pch=21, pt.bg=1:4, bty=\"n\"))  ## Limited output of 'summary' (NB. Signs of axes are arbitrary and can change ## when the command is run repeatedly). ## IGNORE_RDIFF_BEGIN head(summary(mod), tail=2) #>  #> Call: #> cca(formula = dune ~ A1 + Moisture + Management, data = dune.env)  #>  #> Partitioning of scaled Chi-square: #>               Inertia Proportion #> Total          2.1153     1.0000 #> Constrained    1.1392     0.5385 #> Unconstrained  0.9761     0.4615 #>  #> Eigenvalues, and their contribution to the scaled Chi-square  #>  #> Importance of components: #>                         CCA1   CCA2    CCA3    CCA4    CCA5    CCA6    CCA7 #> Eigenvalue            0.4483 0.3001 0.14995 0.10733 0.05668 0.04335 0.03345 #> Proportion Explained  0.2119 0.1419 0.07089 0.05074 0.02680 0.02050 0.01581 #> Cumulative Proportion 0.2119 0.3538 0.42470 0.47544 0.50223 0.52273 0.53855 #>                          CA1     CA2     CA3     CA4     CA5     CA6     CA7 #> Eigenvalue            0.3064 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 #> Proportion Explained  0.1448 0.06236 0.05444 0.05175 0.03652 0.03581 0.02303 #> Cumulative Proportion 0.6834 0.74574 0.80018 0.85194 0.88845 0.92427 0.94730 #>                           CA8     CA9     CA10     CA11     CA12 #> Eigenvalue            0.03758 0.03106 0.021024 0.012542 0.009277 #> Proportion Explained  0.01777 0.01468 0.009939 0.005929 0.004386 #> Cumulative Proportion 0.96506 0.97975 0.989685 0.995614 1.000000 #>  #> Accumulated constrained eigenvalues #> Importance of components: #>                         CCA1   CCA2   CCA3    CCA4    CCA5    CCA6    CCA7 #> Eigenvalue            0.4483 0.3001 0.1499 0.10733 0.05668 0.04335 0.03345 #> Proportion Explained  0.3935 0.2635 0.1316 0.09422 0.04976 0.03806 0.02937 #> Cumulative Proportion 0.3935 0.6570 0.7886 0.88282 0.93258 0.97063 1.00000 #>  #> 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 #> Achimill  0.8150 -0.4375 -0.11236  0.35595 -0.114763 -0.01972 #> Agrostol -0.7488  0.4783  0.03561  0.17039  0.187389  0.23471 #> Airaprae -0.8186 -1.7469  1.04506 -0.28593  0.191836  0.73077 #> Alopgeni -0.3442  1.0216  0.37620  0.02296 -0.004041  0.04789 #> Anthodor  0.3367 -0.7694 -0.07602 -0.05421  0.136354  0.42463 #> Bellpere  0.6535 -0.2200  0.03438  0.60436 -0.090469  0.28138 #> ....                                                          #> Bracruta -0.1309 -0.2009 -0.03708 -0.17421 -0.109657  0.04381 #> Callcusp -1.5181 -0.3834 -0.23255  0.15246  0.104239 -0.11424 #>  #>  #> Site scores (weighted averages of species scores) #>  #>         CCA1    CCA2     CCA3    CCA4    CCA5    CCA6 #> 1     1.2468  0.4017  0.91955  0.7292  1.5785 -1.0196 #> 2     0.8622  0.1641  0.25789  1.7240 -0.7592 -0.6479 #> 3     0.3165  0.9785  0.82952  0.7451  0.6556  0.3256 #> 4     0.2405  0.8699  1.07861  1.4103  1.1164  2.4714 #> 5     1.1362 -0.2621 -1.10847 -0.9417  0.5630  1.1495 #> 6     1.0575 -0.4041 -1.65035 -1.8483  1.0287 -0.1690 #> ....                                                  #> 19   -0.7913 -2.7451  2.93017 -1.3851 -0.3932  1.7277 #> 20   -2.0770 -1.0113 -0.02581 -0.8949  1.6406 -1.7917 #>  #>  #> Site constraints (linear combinations of constraining variables) #>  #>         CCA1    CCA2     CCA3    CCA4    CCA5     CCA6 #> 1     0.7245  0.3695  1.25652 -0.3678  0.9827 -0.60590 #> 2     0.9033 -0.4250  0.03901  1.0557 -1.0860 -1.61234 #> 3     0.4493  0.6694  0.67765  0.8695  0.9609  1.52307 #> 4     0.4550  0.6532  0.72768  0.8529  0.9795  1.50218 #> 5     0.9671  0.2010 -1.93972 -0.5807  0.2582  0.31905 #> 6     1.0805 -0.1235 -0.93911 -0.9126  0.6307 -0.09863 #> ....                                                   #> 19   -1.4581 -1.6074  1.16812 -0.5305  0.3178 -0.40336 #> 20   -1.4468 -1.6399  1.26818 -0.5637  0.3551 -0.44513 #>  #>  #> Biplot scores for constraining variables #>  #>                 CCA1    CCA2     CCA3     CCA4     CCA5     CCA6 #> A1           -0.5554  0.1617 -0.67982  0.10708 -0.17998  0.30507 #> Moisture.L   -0.9437  0.1638  0.07974 -0.02238  0.03067 -0.02368 #> Moisture.Q   -0.1876 -0.3571 -0.45352 -0.17237  0.28350 -0.63025 #> Moisture.C   -0.2069 -0.1732  0.10635  0.68203  0.50123  0.35887 #> ManagementHF  0.3645  0.1171 -0.42202 -0.67746  0.17212 -0.12317 #> ManagementNM -0.5855 -0.7267 -0.01115 -0.09642 -0.11445  0.27037 #> ManagementSF -0.1511  0.6957  0.38543  0.24770  0.29469  0.23829 #>  #>  #> Centroids for factor constraints #>  #>                 CCA1     CCA2     CCA3     CCA4     CCA5    CCA6 #> Moisture1     0.9119 -0.35388 -0.40013 -0.26218  0.02084 -0.4708 #> Moisture2     0.5015  0.06706  0.60222  1.12478  0.33942  1.2024 #> Moisture4    -0.1522  1.35873  0.76544 -1.37289 -1.80794  0.3849 #> Moisture5    -1.3394 -0.11972 -0.20942  0.04843  0.39751 -0.3902 #> ManagementBF  0.8376 -0.41614  0.13885  1.40679 -0.97766 -0.9604 #> ManagementHF  0.5426  0.17426 -0.62822 -1.00848  0.25622 -0.1834 #> ManagementNM -1.1010 -1.36665 -0.02097 -0.18131 -0.21523  0.5084 #> ManagementSF -0.2320  1.06831  0.59183  0.38035  0.45250  0.3659 #>  ## IGNORE_RDIFF_END ## Scaling can be numeric or more user-friendly names ## e.g. Hill's scaling for (C)CA scrs <- scores(mod, scaling = \"sites\", hill = TRUE) ## or correlation-based scores in PCA/RDA scrs <- scores(rda(dune ~ A1 + Moisture + Management, dune.env),                scaling = \"sites\", correlation = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":null,"dir":"Reference","previous_headings":"","what":"Principal Response Curves for Treatments with Repeated Observations — prc","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"Principal Response Curves (PRC) special case   Redundancy Analysis (rda) multivariate responses   repeated observation design. originally suggested   ecological communities. easier interpret   traditional constrained ordination. can also used study   effects factor depend levels factor   B, + :B, multivariate response   experiment.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"","code":"prc(response, treatment, time, ...) # S3 method for prc summary(object, axis = 1, scaling = \"sites\", const,         digits = 4, correlation = FALSE, ...) # S3 method for prc plot(x, species = TRUE, select, scaling = \"symmetric\",      axis = 1, correlation = FALSE, const, type = \"l\", xlab, ylab, ylim,      lty = 1:5, col = 1:6, pch, legpos, cex = 0.8, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"response Multivariate response data. Typically     community (species) data. data counts, probably     log transformed prior analysis. treatment factor treatments. time unordered factor defining observations times     repeated design. object, x prc result object. axis Axis shown (one axis can selected). scaling Scaling species scores, identical     scaling scores.rda. type scores can also specified one \"none\",     \"sites\", \"species\", \"symmetric\",     correspond values 0, 1, 2, 3     respectively. Argument correlation can used combination     character descriptions get corresponding negative     value. const General scaling constant species scores (see     scores.rda details). Lower values reduce     range species scores, influence regression     coefficients. digits Number significant digits displayed. correlation logical; scaling character     description scaling type, correlation can used     select correlation-like scores PCA. See argument scaling     details. species Display species scores. select Vector select displayed species. can vector     indices logical vector TRUE selected     species type Type plot: \"l\" lines, \"p\" points     \"b\" . xlab, ylab Text replace default axis labels. ylim Limits vertical axis. lty, col, pch Line type, colour plotting characters     (defaults supplied). legpos position legend. guess     made supplied, NA suppress legend. cex Character expansion symbols species labels. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"PRC special case rda single   factor treatment single factor time points   repeated observations. vegan, corresponding   rda model defined rda(response ~ treatment *   time + Condition(time)). Since time appears twice   model formula, main effects aliased, main   effect treatment interaction terms available,   used PRC. Instead usual multivariate ordination diagrams, PRC   uses canonical (regression) coefficients species scores   single axis. current functions provide special   summary plot methods display   rda results PRC fashion. current version   works default contrasts (contr.treatment)   coefficients contrasts first level, levels   must arranged first level control (  baseline). necessary, must change baseline level   function relevel. Function summary prints species scores   coefficients. Function plot plots coefficients   time using matplot, similar defaults.   graph (PRC) meaningful first treatment   level control, results contrasts first level   unordered factors used. plot also displays species scores   right vertical axis using function   linestack. Typically number species high   can displayed default settings, users can   reduce character size padding (air)   linestack, select subset   species. legend displayed unless suppressed   legpos = NA, functions tries guess put   legend legpos supplied.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"function special case rda returns   result object (see cca.object). However, special  summary plot methods display returns differently   rda.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"van den Brink, P.J. & ter Braak, C.J.F. (1999). Principal response   curves: Analysis time-dependent multivariate responses   biological community stress. Environmental Toxicology   Chemistry, 18, 138--148.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"Jari Oksanen Cajo ter Braak","code":""},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"warning-","dir":"Reference","previous_headings":"","what":"Warning","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"first level treatment must   control: use function relevel guarantee correct   reference level. current version ignore user setting   contrasts always use treatment contrasts   (contr.treatment). time must unordered   factor.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/prc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Principal Response Curves for Treatments with Repeated Observations — prc","text":"","code":"## Chlorpyrifos experiment and experimental design: Pesticide ## treatment in ditches (replicated) and followed over from 4 weeks ## before to 24 weeks after exposure  data(pyrifos) week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11)) ditch <- gl(12, 1, length=132)  ## IGNORE_RDIFF_BEGIN ## PRC mod <- prc(pyrifos, dose, week) mod            # RDA #> Call: prc(response = pyrifos, treatment = dose, time = week) #>  #>                Inertia Proportion Rank #> Total         288.9920     1.0000      #> Conditional    63.3493     0.2192   10 #> Constrained    96.6837     0.3346   44 #> Unconstrained 128.9589     0.4462   77 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11  #> 25.282  8.297  6.044  4.766  4.148  3.857  3.587  3.334  3.087  2.551  2.466  #>  RDA12  RDA13  RDA14  RDA15  RDA16  RDA17  RDA18  RDA19  RDA20  RDA21  RDA22  #>  2.209  2.129  1.941  1.799  1.622  1.579  1.440  1.398  1.284  1.211  1.133  #>  RDA23  RDA24  RDA25  RDA26  RDA27  RDA28  RDA29  RDA30  RDA31  RDA32  RDA33  #>  1.001  0.923  0.862  0.788  0.750  0.712  0.685  0.611  0.584  0.537  0.516  #>  RDA34  RDA35  RDA36  RDA37  RDA38  RDA39  RDA40  RDA41  RDA42  RDA43  RDA44  #>  0.442  0.417  0.404  0.368  0.340  0.339  0.306  0.279  0.271  0.205  0.179  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8  #> 17.156  9.189  7.585  6.064  5.730  4.843  4.518  4.105  #> (Showing 8 of 77 unconstrained eigenvalues) #>  summary(mod)   # PRC #>  #> Call: #> prc(response = pyrifos, treatment = dose, time = week)  #> Species scores: #>     Simve     Daplo     Cerpu     Alogu     Aloco     Alore     Aloaf     Copsp  #>  2.688099  1.464566  0.542739  0.280040  0.177019  0.315038  0.426524  1.169368  #>     Ostsp     Slyla     Acrha     Aloex     Chysp     Alona     Plead     Oxyte  #>  2.312186 -0.556899  0.105535  0.228092  0.095042  0.063689  0.138397  0.025401  #>     Grate     Copdi     NauLa     CilHa     Strvi     amosp     Ascmo     Synsp  #>  0.096840  1.428854  4.847070  0.895241  3.069709 -1.357663  0.069736 -0.026494  #>     Squro     Squmu     Polar     Kerqu     Anufi     Mytve     Mytvi     Mytmu  #>  0.264390 -0.452667  0.461989  0.495348  0.432767  0.074372  0.090928  0.105891  #>     Lepsp     Leppa     Colob     Colbi     Colun     Lecsp     Lecqu     Lecco  #>  0.998286  0.084809 -0.723051 -0.139569 -0.828338  0.472866 -0.088860 -0.290531  #>     Leclu     Lecfl     Tripo     Cepsp     Monlo     Monae     Scalo     Trilo  #>  0.049788 -0.408035  0.215234 -0.809597 -0.527913 -0.089948 -0.077192 -0.039086  #>   Tripo.1     Tricy     Trisp     Tepat     Rotne     Notla     Filsp     Lopox  #>  0.246435  0.335400  0.078423  0.007719  0.143730 -0.114301 -0.168356 -0.030990  #>  hydrspec  bothrosp  olchaeta  erpoocto  glsicomp  alglhete  hebdstag   sphidae  #> -0.048698  0.398665 -1.165154 -0.901030 -0.144389 -0.073049  0.902223  1.463655  #>  ansuvote  armicris  bathcont  binitent  gyraalbu  hippcomp  lymnstag  lymnaes7  #>  0.140685  1.680010  0.073282 -1.950500  0.033051  0.404473 -0.263679  0.135150  #>  physfont  plbacorn  popyanti  radiovat  radipere  valvcris  valvpisc  hycarina  #> -0.026383  0.084761  1.272223 -0.019815 -0.625468  0.010579 -0.267577  1.044034  #>  gammpule  aselaqua  proameri  collembo  caenhora  caenluct  caenrobu  cloedipt  #>  1.526450  1.578743  0.116577  0.029906  5.767844  2.376188  0.126181  4.734035  #>  cloesimi  aeshniae  libellae  conagrae  corident  coripanz  coripunc  cymabons  #>  1.242207  0.212699 -0.081867  1.630574  0.013761  0.120439 -0.176746  0.046360  #>  hesplinn  hespsahl  notoglau  notomacu  notoobli  notoviri  pacoconc  pleaminu  #> -0.069465  0.033240  0.555201  0.050060  0.082356  0.215863  0.016709  0.071168  #>  sigadist  sigafall  sigastri  sigarasp  colyfusc  donacis6  gyrimari  haliconf  #>  0.076479 -0.018364  0.060206 -0.277312  0.036493 -0.078608  0.010579  0.446911  #>  haliflav  haligruf  haliobli  herubrev  hya_herm  hyglpusi  hyhyovat  hypoplan  #>  0.044538  0.450146  0.131472 -0.128486 -0.322379 -0.011775  0.024196  0.014976  #>  hyporusp  hytuinae  hytuvers  laphminu  noteclav  rhantusp  sialluta  ablalong  #>  0.232042  2.316179  1.772351  0.632897  0.007912  0.067618  1.109341  0.014976  #>  ablaphmo  cltanerv  malopisp  mopetenu  prdiussp  pstavari  chironsp  crchirsp  #>  2.992695  0.075631  0.047658  0.008716  0.554911  0.082842  1.889916  0.016709  #>  crclglat  ditendsp  mitegchl  pachgarc  pachgvit  popegnub  popedisp  acriluce  #>  0.028953  0.083481  0.230629 -0.012187 -0.029907  0.224272 -0.069649 -0.007950  #>  chclpige  conescut  cricotsp  liesspec  psclbarb  psclgsli  psclobvi  psclplat  #> -0.008744  0.821036  0.121530  0.107387 -0.028639  0.601568 -0.362378 -0.052054  #>  psclpsil  pscladsp  cladotsp  laa_spec  patanysp  tatarssp  zaa_spec  anopmacu  #>  0.007339  0.005674  0.539894  0.034105  0.146807  0.669430  0.049949 -0.163731  #>  cepogoae  chaoobsc  cucidae4  tabanusp  agdasphr  athrater  cyrncren  holodubi  #>  2.555403  2.442310  0.033240 -0.011601  0.271815  0.067618  0.071168  0.094754  #>  holopici  leceriae  lilurhom  monaangu  mystazur  mystloni  oecefurv  oecelacu  #>  0.611618  0.298633  0.009063  0.644295  0.033240  2.998460  0.536628  0.259064  #>  triabico  paponysp  #>  0.088915  0.097788  #>  #> Coefficients for dose + week:dose interaction #> which are contrasts to dose 0  #> rows are dose, columns are week #>           -4      -1     0.1        1       2       4        8      12      15 #> 0.1 -0.07218 -0.1375 -0.1020 -0.04068 -0.2101 -0.1364 -0.08077 -0.1536 -0.1123 #> 0.9 -0.08106 -0.1935 -0.1936 -0.47699 -0.4977 -0.4306 -0.13532 -0.3548 -0.2408 #> 6   -0.16616 -0.1232 -0.4539 -1.15638 -1.0835 -1.1511 -0.56112 -0.4698 -0.3078 #> 44  -0.13979 -0.1958 -0.7308 -1.26088 -1.2978 -1.4627 -1.29139 -1.0081 -0.7819 #>          19       24 #> 0.1 -0.2163 -0.07835 #> 0.9 -0.1756 -0.15442 #> 6   -0.3293 -0.18227 #> 44  -0.5768 -0.31022 logabu <- colSums(pyrifos) plot(mod, select = logabu > 100)  ## IGNORE_RDIFF_END ## Ditches are randomized, we have a time series, and are only ## interested in the first axis ctrl <- how(plots = Plots(strata = ditch,type = \"free\"),     within = Within(type = \"series\"), nperm = 99) anova(mod, permutations = ctrl, first=TRUE) #> Permutation test for rda under reduced model #> Plots: ditch, plot permutation: free #> Permutation: series #> Number of permutations: 99 #>  #> Model: prc(response = pyrifos, treatment = dose, time = week) #>          Df Variance      F Pr(>F)    #> RDA1      1   25.282 15.096   0.01 ** #> Residual 77  128.959                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Function predict can used find site species scores   estimates response data new data sets, Function   calibrate estimates values constraints new data set.   Functions fitted residuals return estimates   response data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"","code":"# S3 method for cca fitted(object, model = c(\"CCA\", \"CA\", \"pCCA\"),     type =  c(\"response\", \"working\"), ...) # S3 method for capscale fitted(object, model = c(\"CCA\", \"CA\", \"pCCA\", \"Imaginary\"),     type = c(\"response\", \"working\"), ...) # S3 method for cca residuals(object, ...) # S3 method for cca predict(object, newdata, type = c(\"response\", \"wa\", \"sp\", \"lc\", \"working\"),         rank = \"full\", model = c(\"CCA\", \"CA\"), scaling = \"none\",         hill = FALSE, ...) # S3 method for rda predict(object, newdata, type = c(\"response\", \"wa\", \"sp\", \"lc\", \"working\"),         rank = \"full\", model = c(\"CCA\", \"CA\"), scaling = \"none\",         correlation = FALSE, const, ...) # S3 method for cca calibrate(object, newdata, rank = \"full\", ...) # S3 method for cca coef(object, norm = FALSE, ...) # S3 method for decorana predict(object, newdata, type = c(\"response\", \"sites\", \"species\"),     rank = 4, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"object result object cca,     rda, dbrda, capscale     decorana. model Show constrained (\"CCA\"), unconstrained     (\"CA\") conditioned “partial” (\"pCCA\")     results. fitted method capscale can     also \"Imaginary\" imaginary components negative     eigenvalues newdata New data frame used prediction     calibration.  Usually new community data frame,     type = \"lc\" constrained component type =     \"response\" type = \"working\" must data frame     constraints.  newdata must number rows     original community data cca result     type = \"response\" type = \"working\".      original model row column names, new data must contain     rows columns names (row names species scores,     column names \"wa\" scores constraint names     \"lc\" scores). cases rows columns must match     directly. type type prediction, fitted values residuals:     \"response\" scales results ordination gives     results, \"working\" gives values used     internally, Chi-square standardization     cca scaling centring     rda. capscale     dbrda \"response\" gives     dissimilarities, \"working\" internal data structure     analysed ordination. Alternative \"wa\" gives site     scores weighted averages community data, \"lc\"     site scores linear combinations environmental data,     \"sp\" species scores. predict.decorana     alternatives scores \"sites\" \"species\". rank rank number axes used approximation.     default use axes (full rank) \"model\"     available four axes predict.decorana. scaling logical, character, numeric; Scaling predicted     scores meaning cca,     rda, dbrda,     capscale. See scores.cca details     acceptable values. correlation, hill logical; correlation-like scores Hill's     scaling appropriate RDA CCA respectively. See     scores.cca additional details. const Constant multiplier  RDA scores. used     scaling FALSE, default value     give similar scaling scores.rda. norm Coefficients variables centred scaled     unit norm. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Function fitted gives approximation original data   matrix dissimilarities ordination result either   scale response scaled internally function.   Function residuals gives approximation original data   unconstrained ordination.  argument type =   \"response\" fitted.cca residuals.cca function   give marginal totals original data matrix,   fitted residuals add original data.  Functions   fitted residuals dbrda   capscale give dissimilarities type =   \"response\", additive.  However,   \"working\" scores additive capscale (  dbrda). fitted residuals   capscale dbrda include   additive constant requested function call.    variants fitted residuals defined   model mod <- cca(y ~ x), cca(fitted(mod)) equal   constrained ordination, cca(residuals(mod)) equal   unconstrained part ordination. Function predict can find estimate original data   matrix dissimilarities (type = \"response\") rank.   rank = \"full\" identical fitted.    addition, function can find species scores site scores   community data matrix cca rda.   function can used new data, can used add new   species site scores existing ordinations.  function returns   (weighted) orthonormal scores default, must specify   explicit scaling add scores ordination   diagrams. type = \"wa\" function finds site scores   species scores. case, new data can contain new sites,   species must match original new data.  type=\"sp\"    function finds species scores site constraints   (linear combination scores). case new data can contain new   species, sites must match original new data.   type = \"lc\" function finds linear combination scores   sites environmental data. case new data frame   must contain constraining conditioning environmental variables   model formula. type = \"response\"    type = \"working\" new data must contain environmental variables    constrained component desired, community data matrix   residual unconstrained component desired.  types,   function uses newdata find new \"lc\" (constrained)   \"wa\" scores (unconstrained) finds response   working data new row scores species scores.    original site (row) species (column) weights used   type = \"response\" type = \"working\" correspondence   analysis (cca) therefore number rows must   match original data newdata. completely new data frame created, extreme care needed   defining variables similarly original model, particular   (ordered) factors. ordination performed formula   interface, newdata can data frame matrix,   extreme care needed columns match original   newdata. Function calibrate.cca finds estimates constraints   community ordination \"wa\" scores cca,   rda capscale. often known   calibration, bioindication environmental reconstruction.   Basically, method similar projecting site scores onto   biplot arrows, uses regression coefficients.  function   can called newdata cross-validation   possible.  newdata may contain new sites, species   must match original new data.  function work   ‘partial’ models Condition term,   used newdata capscale   dbrda results.  results may interpretable   continuous variables. Function coef give regression coefficients centred   environmental variables (constraints conditions) linear   combination scores. coefficients unstandardized environmental   variables. coefficients NA aliased effects. Function predict.decorana similar predict.cca.   However, type = \"species\" available detrended   correspondence analysis  (DCA), detrending destroys mutual   reciprocal averaging (except first axis rescaling   used). Detrended CA attempt approximate original data   matrix, type = \"response\" meaning detrended   analysis (except rank = 1).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"functions return matrices, vectors dissimilarities appropriate.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Greenacre, M. J. (1984). Theory applications correspondence   analysis. Academic Press, London.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/predict.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Prediction Tools for [Constrained] Ordination (CCA,\n  RDA, DCA, CA, PCA) — predict.cca","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env) # Definition of the concepts 'fitted' and 'residuals' mod #> Call: cca(formula = dune ~ A1 + Management + Condition(Moisture), data #> = dune.env) #>  #>               Inertia Proportion Rank #> Total          2.1153     1.0000      #> Conditional    0.6283     0.2970    3 #> Constrained    0.5109     0.2415    4 #> Unconstrained  0.9761     0.4615   12 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for constrained axes: #>    CCA1    CCA2    CCA3    CCA4  #> 0.24932 0.12090 0.08160 0.05904  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10  #> 0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102  #>    CA11    CA12  #> 0.01254 0.00928  #>  cca(fitted(mod)) #> Call: cca(X = fitted(mod)) #>  #>               Inertia Rank #> Total          0.5109      #> Unconstrained  0.5109    4 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4  #> 0.24932 0.12090 0.08160 0.05904  #>  cca(residuals(mod)) #> Call: cca(X = residuals(mod)) #>  #>               Inertia Rank #> Total          0.9761      #> Unconstrained  0.9761   12 #> Inertia is scaled Chi-square  #>  #> Eigenvalues for unconstrained axes: #>     CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10  #> 0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102  #>    CA11    CA12  #> 0.01254 0.00928  #>  # Remove rare species (freq==1) from 'cca' and find their scores # 'passively'. freq <- specnumber(dune, MARGIN=2) freq #> Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu  #>        7       10        2        8        6        6        5        1  #> Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo  #>        1        2        5        6        1        3        5        4  #> Lolipere Planlanc  Poaprat  Poatriv Ranuflam Rumeacet Sagiproc Salirepe  #>       12        7       14       13        6        5        7        3  #> Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp  #>       18        3       16        3       15        3  mod <- cca(dune[, freq>1] ~ A1 + Management + Condition(Moisture), dune.env) ## IGNORE_RDIFF_BEGIN predict(mod, type=\"sp\", newdata=dune[, freq==1], scaling=\"species\") #>                CCA1      CCA2       CCA3        CCA4 #> Chenalbu  1.5737337 0.7842538  0.5503660 -0.35108333 #> Cirsarve  0.5945146 0.3714228 -0.2862647 -0.88373727 #> Empenigr -1.8771953 0.9904299 -0.2446222 -0.04858656 # New sites predict(mod, type=\"lc\", new=data.frame(A1 = 3, Management=\"NM\", Moisture=\"2\"), scal=2) #>       CCA1     CCA2       CCA3      CCA4 #> 1 -2.38829 1.230652 -0.2363485 0.3338258 # Calibration and residual plot mod <- cca(dune ~ A1 + Moisture, dune.env) pred <- calibrate(mod) pred #>            A1  Moisture.L  Moisture.Q   Moisture.C #> 1   2.2630533 -0.62633470 -0.20456759  0.220761764 #> 2   4.0510042 -0.47341146 -0.36986691  0.474939409 #> 3   4.2752294 -0.07214500 -0.60797514  0.303213289 #> 4   4.5398659  0.03192745 -1.12417368  0.932223234 #> 5   5.0409406 -0.84235946  0.43000738 -0.291599200 #> 6   5.1962100 -0.91316862  1.11354235 -0.804453944 #> 7   4.2452549 -0.76452556  0.60464291 -0.484842066 #> 8   5.0208369  0.43886340  0.08169514  0.132995916 #> 9   4.2663219  0.10720486 -0.34067849 -0.675151598 #> 10  4.0411356 -0.65472729  0.02832164  0.558402684 #> 11  2.8280051 -0.45762457  0.63079135 -0.089977975 #> 12  5.1204137  0.36328912 -0.69118581 -0.665622948 #> 13  4.9034218  0.47069541 -0.54378271 -0.118643453 #> 14 11.6455841  0.60920550  0.78341426  0.532852308 #> 15 10.7829689  0.69208513  0.82190786  0.237311062 #> 16  7.9892176  0.96421599  0.46793089  0.373647014 #> 17  0.9218684 -0.15822891  0.14593271  1.189161582 #> 18  3.1680733 -0.41737900  1.03352732 -0.236938282 #> 19 -1.2003506  0.57033354  0.72777285  0.509955590 #> 20  4.7876770  1.00324330  1.49898460  0.009202396 ## IGNORE_RDIFF_END with(dune.env, plot(A1, pred[,\"A1\"] - A1, ylab=\"Prediction Error\")) abline(h=0)"},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":null,"dir":"Reference","previous_headings":"","what":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Function procrustes rotates configuration maximum similarity   another configuration. Function protest tests   non-randomness (significance) two configurations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"","code":"procrustes(X, Y, scale = TRUE, symmetric = FALSE, scores = \"sites\", ...) # S3 method for procrustes summary(object, digits = getOption(\"digits\"), ...) # S3 method for procrustes plot(x, kind=1, choices=c(1,2), to.target = TRUE,      type = \"p\", xlab, ylab, main, ar.col = \"blue\", length=0.05,      cex = 0.7, ...) # S3 method for procrustes points(x, display = c(\"target\", \"rotated\"),     choices = c(1,2), truemean = FALSE, ...) # S3 method for procrustes text(x, display = c(\"target\", \"rotated\"),     choices = c(1,2), labels, truemean = FALSE, ...) # S3 method for procrustes lines(x, type = c(\"segments\", \"arrows\"),     choices = c(1, 2), truemean = FALSE, ...) # S3 method for procrustes residuals(object, ...) # S3 method for procrustes fitted(object, truemean = TRUE, ...) # S3 method for procrustes predict(object, newdata, truemean = TRUE, ...) protest(X, Y, scores = \"sites\", permutations = how(nperm = 999), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"X Target matrix Y Matrix rotated. scale Allow scaling axes Y. symmetric Use symmetric Procrustes statistic (rotation     still non-symmetric). scores Kind scores used. display argument   used corresponding scores function: see   scores, scores.cca   scores.cca alternatives. x, object object class procrustes. digits Number digits output. kind plot function, kind plot produced:     kind = 1 plots shifts two configurations, kind = 0     draws corresponding empty plot, kind = 2     plots impulse diagram residuals. choices Axes (dimensions) plotted. xlab, ylab Axis labels, defaults unacceptable. main Plot title, default unacceptable. display Show \"target\" \"rotated\"     matrix points. .target Draw arrows point target. type type plot drawn. plot, type     can \"points\" \"text\" select marker     tail arrow, \"none\" drawing empty     plot. lines type selects either     arrows line segments connect     target rotated configuration. truemean Use original range target matrix instead     centring fitted values. Function plot.procrustes needs     truemean = FALSE, adding graphical items plots     original results may need truemean = TRUE. newdata Matrix coordinates rotated translated      target. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. ar.col Arrow colour. length Width arrow head. labels Character vector text labels. Rownames result      object used default. cex Character expansion points text. ... parameters passed functions. procrustes     protest parameters passed scores,     graphical functions underlying graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Procrustes rotation rotates matrix maximum similarity   target matrix minimizing sum squared differences.  Procrustes   rotation typically used comparison ordination results.    particularly useful comparing alternative solutions   multidimensional scaling.  scale=FALSE, function   rotates matrix Y. scale=TRUE, scales linearly   configuration Y maximum similarity.  Since Y scaled   fit X, scaling non-symmetric. However,   symmetric=TRUE, configurations scaled equal   dispersions  symmetric version Procrustes statistic   computed. Instead matrix, X Y can results   ordination scores can extract results.   Function procrustes passes extra arguments   scores, scores.cca etc. can   specify arguments scaling. Function plot plots procrustes object returns   invisibly ordiplot object function   identify.ordiplot can used identifying   points. items ordiplot object called   heads points kind=1 (ordination   diagram) sites kind=2 (residuals).    ordination diagrams, arrow heads point target   configuration .target = TRUE, rotated   configuration .target = FALSE.  Target original   rotated axes shown cross hairs two-dimensional Procrustes   analysis, higher number dimensions, rotated axes   projected onto plot scaled centred   range. Function plot passes parameters underlying plotting   functions.  full control plots, can draw axes using   plot kind = 0, add items   points lines.  functions pass parameters   underlying functions can select plotting   characters, size, colours etc., can select width,   colour type line segments arrows, can   select orientation head width arrows. Function residuals returns pointwise   residuals, fitted fitted values, either centred zero   mean (truemean=FALSE) original scale (  hardly make sense symmetric = TRUE).   addition, summary print methods. matrix X lower number columns matrix   Y, matrix X filled zero columns   match dimensions. means function can used rotate   ordination configuration environmental variable (  practically extracting result fitted   function). Function predict can used add new rotated   coordinates target. predict function always   translate coordinates original non-centred matrix.   function used newdata symmetric   analysis. Function protest performs symmetric Procrustes analysis   repeatedly estimate significance Procrustes   statistic. Function protest uses correlation-like statistic   derived symmetric Procrustes sum squares \\(ss\\)   \\(r =\\sqrt{1-ss}\\), also prints sum   squares symmetric analysis, sometimes called   \\(m_{12}^2\\). Function protest   print method, otherwise uses procrustes   methods. Thus plot protest object yields   Procrustean superimposition plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Function procrustes returns object class  procrustes items. Function protest inherits  procrustes, amends new items: Yrot Rotated matrix Y. X Target matrix. ss Sum squared differences X Yrot. rotation Orthogonal rotation matrix. translation Translation origin. scale Scaling factor. xmean centroid target. symmetric Type ss statistic. call Function call. t0 following items class     protest:  Procrustes correlation non-permuted solution. t Procrustes correlations permutations. distribution     correlations can inspected permustats     function. signif Significance t permutations Number permutations. control list control values permutations     returned function . control list passed argument control describing     permutation design.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Mardia, K.V., Kent, J.T. Bibby,   J.M. (1979). Multivariate Analysis. Academic Press. Peres-Neto, P.R. Jackson, D.. (2001). well multivariate   data sets match? advantages Procrustean superimposition   approach Mantel test. Oecologia 129: 169-178.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"function protest follows Peres-Neto & Jackson (2001),   implementation still Mardia et al.   (1979).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/procrustes.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Procrustes Rotation of Two Configurations and PROTEST — procrustes","text":"","code":"## IGNORE_RDIFF_BEGIN data(varespec) vare.dist <- vegdist(wisconsin(varespec)) mds.null <- monoMDS(vare.dist, y = cmdscale(vare.dist)) mds.alt <- monoMDS(vare.dist) vare.proc <- procrustes(mds.alt, mds.null) vare.proc #>  #> Call: #> procrustes(X = mds.alt, Y = mds.null)  #>  #> Procrustes sum of squares: #> 11.17  #>  summary(vare.proc) #>  #> Call: #> procrustes(X = mds.alt, Y = mds.null)  #>  #> Number of objects: 24    Number of dimensions: 2  #>  #> Procrustes sum of squares:   #>  11.17448  #> Procrustes root mean squared error:  #>  0.6823512  #> Quantiles of Procrustes errors: #>       Min        1Q    Median        3Q       Max  #> 0.1642438 0.2425785 0.2783603 0.4983976 2.4447632  #>  #> Rotation matrix: #>            [,1]        [,2] #> [1,] 0.99937107 -0.03546065 #> [2,] 0.03546065  0.99937107 #>  #> Translation of averages: #>               [,1]        [,2] #> [1,] -1.713781e-17 1.56769e-17 #>  #> Scaling of target: #> [1] 0.7310245 #>  plot(vare.proc)  plot(vare.proc, kind=2)  residuals(vare.proc) #>        18        15        24        27        23        19        22        16  #> 0.2734040 0.2032392 0.4708118 0.4420710 0.3547337 0.1642438 0.2515286 0.2611623  #>        28        13        14        20        25         7         5         6  #> 0.7773604 0.3075051 0.2833167 0.1749943 0.2684784 0.5167965 0.9747233 0.2437827  #>         3         4         2         9        12        10        11        21  #> 0.2252071 0.7586954 2.4447632 0.2389659 0.2093104 0.2597721 0.4922646 1.0884414  ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":null,"dir":"Reference","previous_headings":"","what":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data log transformed abundances aquatic invertebrate   twelve ditches studied eleven times insecticide   treatment.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"","code":"data(pyrifos)"},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data frame 132 observations log-transformed (log(10*x + 1)) abundances   178 species. twelve sites (ditches, mesocosms),   studied repeatedly eleven occasions. treatment   levels, treatment times, ditch ID's data frame,   data regular, example shows obtain   external variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"data set obtained experiment outdoor   experimental ditches. Twelve mesocosms allocated random   treatments; four served controls, remaining eight    treated insecticide chlorpyrifos, nominal dose   levels 0.1, 0.9, 6, 44  \\(\\mu\\)g/ L two mesocosms   . example data set invertebrates.   Sampling done 11 times, week -4 pre-treatment   week 24 post-treatment, giving total 132 samples (12 mesocosms   times 11 sampling dates), see van den Brink & ter Braak (1999)   details. data set contains species data,   example shows obtain treatment, time   ditch ID variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"CANOCO 4 example data, permission Cajo J. F. ter Braak.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"van den Brink, P.J. & ter Braak, C.J.F. (1999). Principal response   curves: Analysis time-dependent multivariate responses   biological community stress. Environmental Toxicology   Chemistry, 18, 138--148.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/pyrifos.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Response of Aquatic Invertebrates to Insecticide Treatment — pyrifos","text":"","code":"data(pyrifos) ditch <- gl(12, 1, length=132) week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24)) dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))"},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":null,"dir":"Reference","previous_headings":"","what":"Rank -- Abundance or Dominance / Diversity Models — radfit","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Functions construct rank -- abundance dominance / diversity   Whittaker plots fit brokenstick, preemption, log-Normal,   Zipf Zipf-Mandelbrot models species abundance.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"","code":"# S3 method for default radfit(x, ...) rad.null(x, family=poisson, ...) rad.preempt(x, family = poisson, ...) rad.lognormal(x, family = poisson, ...) rad.zipf(x, family = poisson, ...) rad.zipfbrot(x, family = poisson, ...) # S3 method for radline predict(object, newdata, total, ...) # S3 method for radfit plot(x, BIC = FALSE, legend = TRUE, ...) # S3 method for radfit.frame plot(x, order.by, BIC = FALSE, model, legend = TRUE,      as.table = TRUE, ...) # S3 method for radline plot(x, xlab = \"Rank\", ylab = \"Abundance\", type = \"b\", ...) radlattice(x, BIC = FALSE, ...) # S3 method for radfit lines(x, ...) # S3 method for radfit points(x, ...) as.rad(x) # S3 method for rad plot(x, xlab = \"Rank\", ylab = \"Abundance\", log = \"y\", ...)"},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"x Data frame, matrix vector giving species abundances, object     plotted. family Error distribution (passed glm).     alternatives accepting link = \"log\" family     can used, although make sense. object fitted result object. newdata Ranks used ordinations. models can     interpolate non-integer “ranks” (although may     approximate), extrapolation may fail total new total used predicting abundance. Observed     total count used omitted. order.vector used ordering sites plots. BIC Use Bayesian Information Criterion, BIC, instead     Akaike's AIC. penalty BIC \\(k = \\log(S)\\)  \\(S\\) number species, whereas AIC uses     \\(k = 2\\). model Show specified model. missing, AIC used     select model. model names (can abbreviated)     Null, Preemption, Lognormal, Zipf,     Mandelbrot. legend Add legend line colours. .table Arrange panels starting upper left corner (passed     xyplot). xlab,ylab Labels x y axes. type Type plot, \"b\" plotting observed points     fitted lines, \"p\" points, \"l\"     fitted lines, \"n\" setting frame. log Use logarithmic scale given axis. default     log = \"y\" gives traditional plot community ecology     preemption model straight line,     log = \"xy\" Zipf model straight line.     log = \"\" axes original arithmetic scale. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Rank--Abundance Dominance (RAD) Dominance/Diversity plots   (Whittaker 1965) display logarithmic species abundances   species rank order. plots supposed effective   analysing types abundance distributions communities.   functions fit popular models mainly following   Wilson (1991). Functions rad.null, rad.preempt, rad.lognormal,   rad.zipf zipfbrot fit individual models   (described ) single vector (row data frame),   function radfit fits models. argument function   radfit can either vector single community data   frame row represents distinct community. Function rad.null fits brokenstick model expected   abundance species rank \\(r\\) \\(a_r = (J/S)   \\sum_{x=r}^S (1/x)\\) (Pielou   1975), \\(J\\) total number individuals (site total)   \\(S\\) total number species community.    gives Null model individuals randomly distributed   among observed species, fitted parameters.   Function rad.preempt fits niche preemption model,   .k.. geometric series Motomura model, expected   abundance \\(\\) species rank \\(r\\) \\(a_r = J \\alpha   (1 - \\alpha)^{r-1}\\).   estimated parameter preemption coefficient \\(\\alpha\\)   gives decay rate abundance per rank.  niche preemption   model straight line RAD plot.  Function   rad.lognormal fits log-Normal model assumes   logarithmic abundances distributed Normally, \\(a_r = \\exp(   \\log \\mu + \\log \\sigma N)\\),   \\(N\\) Normal deviate.  Function rad.zipf fits   Zipf model \\(a_r = J p_1 r^\\gamma\\)   \\(p_1\\) fitted proportion abundant species,   \\(\\gamma\\) decay coefficient. Zipf--Mandelbrot model   (rad.zipfbrot) adds one parameter: \\(a_r = J c (r +   \\beta)^\\gamma\\) \\(p_1\\)   Zipf model changes meaningless scaling constant   \\(c\\). Log-Normal Zipf models generalized linear models   (glm) logarithmic link function.  Zipf--Mandelbrot   adds one nonlinear parameter Zipf model, fitted using   nlm nonlinear parameter estimating   parameters log-Likelihood glm. Preemption   model fitted purely nonlinear model. estimated   parameters Null model. default family poisson   appropriate genuine counts (integers), families   accept link = \"log\" can used. Families   Gamma gaussian may appropriate   abundance data, cover. best model selected   AIC. Therefore ‘quasi’ families   quasipoisson used:   AIC log-Likelihood needed non-linear models. functions plot functions.   radfit applied data frame, plot uses   Lattice graphics, plot   functions use ordinary graphics. ordinary graphics functions   return invisibly ordiplot object observed points,   function identify.ordiplot can used label   selected species.  Alternatively, radlattice uses   Lattice graphics display radfit   model single site separate panel together AIC   BIC values. Function .rad base function construct ordered RAD   data. plot used RAD plot functions   pass extra arguments (xlab log)   function. function returns ordered vector taxa   occurring site, corresponding attribute \"index\"   included taxa.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Functions rad.null, rad.preempt, rad.lognormal,  zipf zipfbrot fit single RAD model   single site. result object class \"radline\"   inherits glm, can handled (  ) glm methods. Function radfit fits models either single site   rows data frame matrix. fitted single site,   function returns object class \"radfit\" items  y (observed values), family, models list fitted \"radline\" models.  applied   data frame matrix, radfit function returns object   class \"radfit.frame\" list \"radfit\" objects, item names corresponding row name. result objects (\"radline\", \"radfit\",  \"radfit.frame\") can accessed method functions.   following methods available: AIC,  coef, deviance, logLik.   addition fit results can accessed fitted,  predict residuals (inheriting  residuals.glm). graphical functions discussed   Details.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Pielou, E.C. (1975) Ecological Diversity. Wiley & Sons. Preston, F.W. (1948) commonness rarity   species. Ecology 29, 254--283. Whittaker, R. H. (1965) Dominance diversity plant   communities. Science 147, 250--260. Wilson, J. B. (1991) Methods fitting dominance/diversity   curves. Journal Vegetation Science 2, 35--46.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"RAD models usually fitted proportions instead original   abundances. However, nothing models seems require division   abundances site totals, original observations used   functions. wish use proportions, must standardize   data site totals, e.g. decostand use   appropriate family Gamma. lognormal model fitted standard way, think   quite correct -- least equivalent fitting Normal   density log abundances like originally suggested (Preston 1948). models may fail. particular, estimation Zipf-Mandelbrot   model difficult.  fitting fails, NA returned. Wilson (1991) defined preemption model \\(a_r = J p_1 (1     - \\alpha)^{r-1}\\), \\(p_1\\)     fitted proportion first species. However, parameter     \\(p_1\\) completely defined \\(\\alpha\\) since fitted     proportions must add one, therefore handle preemption     one-parameter model. Veiled log-Normal model included earlier releases     function, removed flawed: implicit veil     line also appears ordinary log-Normal. latest release version     rad.veil 1.6-10.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/radfit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rank -- Abundance or Dominance / Diversity Models — radfit","text":"","code":"data(BCI) mod <- rad.lognormal(BCI[5,]) mod #>  #> RAD model: Log-Normal  #> Family: poisson  #> No. of species:  101  #> Total abundance: 505  #>  #>     log.mu  log.sigma   Deviance        AIC        BIC  #>   0.951926   1.165929  17.077549 317.656487 322.886728  plot(mod)  mod <- radfit(BCI[1,]) ## Standard plot overlaid for all models ## Preemption model is a line plot(mod)  ## log for both axes: Zipf model is a line plot(mod, log = \"xy\")  ## Lattice graphics separately for each model radlattice(mod)  # Take a subset of BCI to save time and nerves mod <- radfit(BCI[3:5,]) mod #>  #> Deviance for RAD models: #>  #>                  3       4      5 #> Null       86.1127 49.8111 80.855 #> Preemption 58.9295 39.7817 76.311 #> Lognormal  29.2719 16.6588 17.078 #> Zipf       50.1262 47.9108 30.936 #> Mandelbrot  5.7342  5.5665 10.573 plot(mod, pch=\".\")"},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":null,"dir":"Reference","previous_headings":"","what":"Compares Dissimilarity Indices for Gradient Detection — rankindex","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Rank correlations dissimilarity indices   gradient separation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"","code":"rankindex(grad, veg, indices = c(\"euc\", \"man\", \"gow\", \"bra\", \"kul\"),           stepacross = FALSE, method = \"spearman\",      metric = c(\"euclidean\", \"mahalanobis\", \"manhattan\", \"gower\"),     ...)"},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"grad gradient variable matrix. veg community data matrix. indices Dissimilarity indices compared, partial matches     alternatives vegdist.     Alternatively, can (named) list functions returning     objects class 'dist'. stepacross Use stepacross find     shorter path dissimilarity. dissimilarities site pairs     shared species set NA using     .shared indices fixed     upper limit can also analysed. method Correlation method used. metric Metric evaluate gradient separation. See Details. ... parameters stepacross.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"good dissimilarity index multidimensional scaling   high rank-order similarity gradient separation.  function   compares indices vegdist gradient   separation using rank correlation coefficients   cor. gradient separation point   assessed using given metric. default use Euclidean   distance continuous variables scaled unit variance, use   Gower metric mixed data using function   daisy grad factors.   alternatives Mahalanabis distances based   grad matrix scaled columns orthogonal   (uncorrelated) unit variance, Manhattan distances   grad variables scaled unit range. indices argument can accept dissimilarity    indices besides ones calculated    vegdist function. , argument value   (possibly named) list functions.   function must return valid 'dist' object dissimilarities,   similarities accepted converted dissimilarities   beforehand.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Returns named vector rank correlations.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Faith, F.P., Minchin, P.R. Belbin,   L. (1987).  Compositional dissimilarity robust measure     ecological distance. Vegetatio 69, 57-68.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"Jari Oksanen, additions Peter Solymos","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"several problems using rank correlation coefficients.   Typically many ties \\(n(n-1)/2\\) gradient   separation values derived just \\(n\\) observations.   Due floating point arithmetics, many tied values differ   machine epsilon arbitrarily ranked differently   rank used cor.test.  Two indices   identical certain   transformation standardization may differ slightly   (magnitude \\(10^{-15}\\)) may lead third fourth decimal   instability rank correlations.  Small differences rank   correlations taken seriously.  Probably method   replaced sounder method, yet know   ...  may experiment mantel,   anosim even protest. Earlier version function used method = \"kendall\",   far slow large data sets. functions returning dissimilarity objects self contained,   ... argument passes additional parameters   stepacross functions supplied   via indices argument.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/rankindex.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compares Dissimilarity Indices for Gradient Detection — rankindex","text":"","code":"data(varespec) data(varechem) ## The variables are automatically scaled rankindex(varechem, varespec) #>       euc       man       gow       bra       kul  #> 0.2396330 0.2735087 0.2288358 0.2837910 0.2839834  rankindex(varechem, wisconsin(varespec)) #>       euc       man       gow       bra       kul  #> 0.4200990 0.4215642 0.3708606 0.4215642 0.4215642  ## Using non vegdist indices as functions funs <- list(Manhattan=function(x) dist(x, \"manhattan\"),     Gower=function(x) cluster:::daisy(x, \"gower\"),     Ochiai=function(x) designdist(x, \"1-J/sqrt(A*B)\")) rankindex(scale(varechem), varespec, funs) #> Manhattan     Gower    Ochiai  #> 0.2735087 0.2288358 0.1696862"},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":null,"dir":"Reference","previous_headings":"","what":"Rarefaction Species Richness — rarefy","title":"Rarefaction Species Richness — rarefy","text":"Rarefied species richness community ecologists.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Rarefaction Species Richness — rarefy","text":"","code":"rarefy(x, sample, se = FALSE, MARGIN = 1) rrarefy(x, sample) drarefy(x, sample) rarecurve(x, step = 1, sample, xlab = \"Sample Size\", ylab = \"Species\",           label = TRUE, col, lty, tidy = FALSE, ...) rareslope(x, sample)"},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Rarefaction Species Richness — rarefy","text":"x Community data, matrix-like object vector. MARGIN Margin index computed. sample Subsample size rarefying community, either single     value vector. se Estimate standard errors. step Step size sample sizes rarefaction curves. xlab, ylab Axis labels plots rarefaction curves. label Label rarefaction curves rownames x     (logical). col, lty plotting colour line type, see     par. Can vector length nrow(x), one per     sample, extended length internally. tidy Instead drawing plot, return “tidy”     data frame can used ggplot2 graphics. data     frame variables Site (factor), Sample     Species. ... Parameters passed nlm, plot,     lines ordilabel rarecurve.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Rarefaction Species Richness — rarefy","text":"Function rarefy gives expected species richness random   subsamples size sample community. size   sample smaller total community size,   function work larger sample well (warning)   return non-rarefied species richness (standard error =   0). sample vector, rarefaction observations   performed sample size separately.  Rarefaction can   performed genuine counts individuals.  function   rarefy based Hurlbert's (1971) formulation,   standard errors Heck et al. (1975). Function rrarefy generates one randomly rarefied community   data frame vector given sample size. sample   can vector giving sample sizes row.    sample size equal larger observed number   individuals, non-rarefied community returned.    random rarefaction made without replacement variance   rarefied communities rather related rarefaction proportion   size sample. Random rarefaction   sometimes used remove effects different sample   sizes. usually bad idea: random rarefaction discards valid   data, introduces random error reduces quality data   (McMurdie & Holmes 2014). better use normalizing   transformations (decostand vegan) possible   variance stabilization (decostand   dispweight vegan) methods   sensitive sample sizes. Function drarefy returns probabilities species occur   rarefied community size sample. sample can   vector giving sample sizes row. sample   equal larger observed number individuals,   observed species sampling probability 1. Function rarecurve draws rarefaction curve row   input data. rarefaction curves evaluated using   interval step sample sizes, always including 1 total   sample size.  sample specified, vertical line   drawn sample horizontal lines rarefied   species richnesses. Function rareslope calculates slope rarecurve   (derivative rarefy) given sample size;   sample need integer. Rarefaction functions used observed counts.   think necessary use multiplier data, rarefy first   multiply. Removing rare species rarefaction can also   give biased results. Observed count data normally include singletons   (species count 1), missing, functions issue   warnings. may false positives, recommended   check observed counts multiplied rare taxa   removed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Rarefaction Species Richness — rarefy","text":"vector rarefied species richness values. single  sample se = TRUE, function rarefy returns   2-row matrix rarefied richness (S) standard error   (se). sample vector rarefy,   function returns matrix column sample size,   se = TRUE, rarefied richness standard error   consecutive lines. Function rarecurve returns invisible list  rarefy results corresponding drawn curve. Alternatively,   tidy = TRUE returns data frame can used  ggplot2 graphics.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Rarefaction Species Richness — rarefy","text":"Heck, K.L., van Belle, G. & Simberloff, D. (1975). Explicit   calculation rarefaction diversity measurement   determination sufficient sample size. Ecology 56,   1459--1461. Hurlbert, S.H. (1971). nonconcept species diversity: critique   alternative parameters. Ecology 52, 577--586. McMurdie, P.J. & Holmes, S. (2014). Waste , want :   rarefying microbiome data inadmissible. PLoS Comput Biol   10(4): e1003531. doi:10.1371/journal.pcbi.1003531","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Rarefaction Species Richness — rarefy","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/rarefy.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Rarefaction Species Richness — rarefy","text":"","code":"data(BCI) S <- specnumber(BCI) # observed number of species (raremax <- min(rowSums(BCI))) #> [1] 340 Srare <- rarefy(BCI, raremax) plot(S, Srare, xlab = \"Observed No. of Species\", ylab = \"Rarefied No. of Species\") abline(0, 1)  rarecurve(BCI, step = 20, sample = raremax, col = \"blue\", cex = 0.6)"},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":null,"dir":"Reference","previous_headings":"","what":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Function finds Raup-Crick dissimilarity   probability number co-occurring species species   occurrence probabilities proportional species frequencies.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"","code":"raupcrick(comm, null = \"r1\", nsimul = 999, chase = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"comm Community data treated presence/absence data. null Null model used method      oecosimu. nsimul Number null communities assessing      dissimilarity index. chase Use Chase et al. (2011) method tie handling (     recommended except comparing results Chase      script). ... parameters passed oecosimu.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Raup-Crick index probability compared sampling   units non-identical species composition.  probability can   regarded dissimilarity, although metric: identical   sampling units can dissimilarity slightly \\(0\\),   dissimilarity can nearly zero range shared species,   sampling units shared species can dissimilarity   slightly \\(1\\). Moreover, communities sharing rare species   appear similar (lower probability finding rare species   together), communities sharing number common   species. function always treat data binary (presence/   absence). probability assessed using simulation   oecosimu test statistic observed   number shared species sampling units evaluated   community null model (see Examples).  default null model   \"r1\" probability selecting species   proportional species frequencies. vegdist function implements variant   Raup-Crick index equal sampling probabilities species using   exact analytic equations without simulation. corresponds   null model \"r0\" also can used   current function.  null model methods   oecosimu can used current function,   new unpublished methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"function returns object inheriting  dist can interpreted dissimilarity   matrix.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"Chase, J.M., Kraft, N.J.B., Smith, K.G., Vellend, M. Inouye,   B.D. (2011). Using null models disentangle variation community   dissimilarity variation \\(\\alpha\\)-diversity.   Ecosphere 2:art24 doi:10.1890/ES10-00117.1","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"function developed Brian Inouye contacted us   informed us method Chase et al. (2011),   function takes idea code published   paper. current function written Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"test statistic number shared species,   typically tied large number simulation results. tied   values handled differently current function   function published Chase et al. (2011). vegan,   index number simulated values smaller   equal observed value, smaller observed value   used Chase et al. (2011) option split = FALSE   script; can achieved chase = TRUE   vegan.  Chase et al. (2011) script split = TRUE   uses half tied simulation values calculate distance measure,   choice directly reproduced vegan (  average vegan raupcrick results    chase = TRUE chase = FALSE).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/raupcrick.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Raup-Crick Dissimilarity with Unequal Sampling Densities of Species — raupcrick","text":"","code":"## data set with variable species richness data(sipoo) ## default raupcrick dr1 <- raupcrick(sipoo) ## use null model \"r0\" of oecosimu dr0 <- raupcrick(sipoo, null = \"r0\") ## vegdist(..., method = \"raup\") corresponds to 'null = \"r0\"' d <- vegdist(sipoo, \"raup\") op <- par(mfrow=c(2,1), mar=c(4,4,1,1)+.1) plot(dr1 ~ d, xlab = \"Raup-Crick with Null R1\", ylab=\"vegdist\") plot(dr0 ~ d, xlab = \"Raup-Crick with Null R0\", ylab=\"vegdist\")  par(op)  ## The calculation is essentially as in the following oecosimu() call, ## except that designdist() is replaced with faster code if (FALSE)  oecosimu(sipoo, function(x) designdist(x, \"J\", \"binary\"), method = \"r1\")"},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads a CEP (Canoco) data file — read.cep","title":"Reads a CEP (Canoco) data file — read.cep","text":"read.cep reads file formatted relaxed strict CEP format   used Canoco software, among others.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads a CEP (Canoco) data file — read.cep","text":"","code":"read.cep(file, positive=TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads a CEP (Canoco) data file — read.cep","text":"file File name (character variable). positive positive entries, like community data.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reads a CEP (Canoco) data file — read.cep","text":"Cornell Ecology Programs (CEP) introduced several data formats   designed punched cards.  One ‘condensed   strict’ format adopted popular software DECORANA   TWINSPAN. relaxed variant format later adopted   Canoco software (ter Braak 1984). Function read.cep reads   legacy files written format. condensed CEP CANOCO formats : Two three title cards, importantly specifying format       number items per record. Data condensed format: First number line       site identifier (integer), followed pairs       (‘couplets’) numbers identifying species       abundance (integer floating point number). Species site names, given Fortran format (10A8):       Ten names per line, eight columns . option positive = TRUE function removes rows   columns zero negative marginal sums.  community data   positive entries, removes empty sites species.   data entries can negative, ruins data, data sets   read option positive = FALSE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads a CEP (Canoco) data file — read.cep","text":"Returns data frame, columns species rows   sites. Column row names taken CEP file, changed   unique R names make.names stripping blanks.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Reads a CEP (Canoco) data file — read.cep","text":"ter Braak, C.J.F. (1984--): CANOCO -- FORTRAN program canonical   community ordination [partial] [detrended] [canonical]   correspondence analysis, principal components analysis redundancy   analysis. TNO Inst. Applied Computer Sci., Stat. Dept. Wageningen,   Netherlands.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reads a CEP (Canoco) data file — read.cep","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Reads a CEP (Canoco) data file — read.cep","text":"Function read.cep used Fortran read data vegan   2.4-5 earlier, Fortran /O longer allowed CRAN   packages, function re-written R. original   Fortran code robust, several legacy data sets   may fail current version, read   previous Fortran version. CRAN package cepreader makes   available original Fortran-based code run separate   subprocess. cepreader package can also read ‘free’   ‘open’ Canoco formats handled   function. function based read.fortran.   REAL format defines decimal part species abundances   (F5.1), read.fortran divides   input corresponding power 10 even input data   explicit decimal separator. F5.1, 100 become   10, 0.1 become 0.01. Function read.cep tries undo   division, check scaling results reading   data, necessary, multiply results original scale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/read.cep.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads a CEP (Canoco) data file — read.cep","text":"","code":"## Provided that you have the file \"dune.spe\" if (FALSE) { theclassic <- read.cep(\"dune.spe\")}"},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":null,"dir":"Reference","previous_headings":"","what":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Function renyi  find Rényi diversities   scale corresponding Hill number (Hill 1973).  Function   renyiaccum finds statistics accumulating sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"","code":"renyi(x, scales = c(0, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, Inf),    hill = FALSE) # S3 method for renyi plot(x, ...) renyiaccum(x, scales = c(0, 0.5, 1, 2, 4, Inf), permutations = 100,     raw = FALSE, collector = FALSE, subset, ...) # S3 method for renyiaccum plot(x, what = c(\"Collector\", \"mean\", \"Qnt 0.025\", \"Qnt 0.975\"),     type = \"l\",     ...) # S3 method for renyiaccum persp(x, theta = 220, col = heat.colors(100), zlim, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"x Community data matrix plotting object. scales Scales Rényi diversity. hill Calculate Hill numbers. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,     permutation matrix row gives permuted indices. raw FALSE return summary statistics     permutations, TRUE returns individual     permutations. collector Accumulate diversities order sites     data set, collector curve can plotted     summary permutations. argument ignored raw = TRUE. subset logical expression indicating sites (rows) keep: missing     values taken FALSE. Items plotted. type Type plot, type = \"l\" means lines. theta Angle defining viewing direction (azimuthal)     persp. col Colours used surface. Single colour passed ,     vector colours     selected midpoint rectangle persp. zlim Limits vertical axis. ... arguments passed renyi     graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Common diversity indices special cases   Rényi diversity   $$H_a = \\frac{1}{1-} \\log \\sum p_i^$$   \\(\\) scale parameter, Hill (1975) suggested   use -called ‘Hill numbers’ defined \\(N_a = \\exp(H_a)\\).  Hill numbers number species   \\(= 0\\), \\(\\exp(H')\\) exponent Shannon   diversity \\(= 1\\), inverse Simpson \\(= 2\\)   \\(1/ \\max(p_i)\\) \\(= \\infty\\). According   theory diversity ordering, one community can regarded   diverse another Rényi diversities higher   (Tóthmérész  1995). plot method renyi uses lattice graphics,   displays diversity values scale separate panel   site together minimum, maximum median values   complete data. Function renyiaccum similar specaccum   finds Rényi Hill diversities given scales   random permutations accumulated sites.  plot   function uses lattice function xyplot   display accumulation curves value scales   separate panel.  addition, persp method   plot diversity surface scale number   sites. Similar dynamic graphics can made   rgl.renyiaccum vegan3d package.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Function renyi returns data frame selected   indices.  Function renyiaccum argument raw = FALSE returns three-dimensional array, first dimension   accumulated sites, second dimension diversity scales,   third dimension summary statistics mean, stdev,  min, max, Qnt 0.025 Qnt 0.975.    argument raw = TRUE statistics third dimension   replaced individual permutation results.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Hill, M.O. (1973). Diversity evenness: unifying notation    consequences. Ecology 54, 427--473. Kindt, R., Van Damme, P., Simons, .J. (2006). Tree diversity western    Kenya: using profiles characterise richness    evenness. Biodiversity Conservation 15, 1253--1270. Tóthmérész, B. (1995). Comparison different methods diversity    ordering. Journal Vegetation Science 6, 283--290.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"Roeland Kindt Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/renyi.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Renyi and Hill Diversities and Corresponding Accumulation Curves — renyi","text":"","code":"data(BCI) i <- sample(nrow(BCI), 12) mod <- renyi(BCI[i,]) plot(mod)  mod <- renyiaccum(BCI[i,]) plot(mod, as.table=TRUE, col = c(1, 2, 2))  persp(mod)"},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":null,"dir":"Reference","previous_headings":"","what":"Reorder a Hierarchical Clustering Tree — reorder.hclust","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Function takes hierarchical clustering tree   hclust vector values reorders   clustering tree order supplied vector, maintaining   constraints tree. method generic function   reorder alternative reordering   \"dendrogram\" object reorder.dendrogram","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"","code":"# S3 method for hclust reorder(x, wts,     agglo.FUN = c(\"mean\", \"min\", \"max\", \"sum\", \"uwmean\"), ...) # S3 method for hclust rev(x) # S3 method for hclust scores(x, display = \"internal\", ...) cutreeord(tree, k = NULL, h = NULL)"},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"x, tree hierarchical clustering hclust. wts numeric vector reordering. agglo.FUN function weights agglomeration, see . display return \"internal\" nodes \"terminal\" nodes (also   called \"leaves\"). k, h scalars vectors giving numbers desired groups heights   tree cut (passed function   cutree). ... additional arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Dendrograms can ordered many ways. reorder function   reorders hclust tree provides alternative   reorder.dendrogram can reorder   dendrogram. current function also work   differently agglo.FUN \"mean\":   reorder.dendrogram always take direct mean   member groups ignoring sizes, function used   weighted.mean weighted group sizes,   group mean always mean member leaves (terminal nodes).   want ignore group sizes, can use unweighted mean   \"uwmean\". function accepts limited list agglo.FUN   functions assessing value wts groups.   ordering always ascending, order leaves can   reversed rev. Function scores finds coordinates nodes two-column   matrix. terminal nodes (leaves) value item   merged tree, labels can still hang   level (see plot.hclust). Function cutreeord cuts tree groups numbered left   right tree. based standard function   cutree numbers groups order appear   input data instead order tree.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Reordered hclust result object added item  value gives value statistic merge   level.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"functions really base R.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/reorder.hclust.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reorder a Hierarchical Clustering Tree — reorder.hclust","text":"","code":"## reorder by water content of soil data(mite, mite.env) hc <- hclust(vegdist(wisconsin(sqrt(mite)))) ohc <- with(mite.env, reorder(hc, WatrCont)) plot(hc)  plot(ohc)   ## label leaves by the observed value, and each branching point ## (internal node) by the cluster mean with(mite.env, plot(ohc, labels=round(WatrCont), cex=0.7)) ordilabel(scores(ohc), label=round(ohc$value), cex=0.7)   ## Slightly different from reordered 'dendrogram' which ignores group ## sizes in assessing means. den <- as.dendrogram(hc) den <- with(mite.env, reorder(den, WatrCont, agglo.FUN = mean)) plot(den)"},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":null,"dir":"Reference","previous_headings":"","what":"Get Species or Site Scores from an Ordination — scores","title":"Get Species or Site Scores from an Ordination — scores","text":"Function access either species site scores specified axes   ordination methods. scores function generic   vegan, vegan ordination functions   scores functions documented separately   method (see e.g. scores.cca,   scores.metaMDS, scores.decorana).   help file documents default scores method   used non-vegan ordination objects.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get Species or Site Scores from an Ordination — scores","text":"","code":"# S3 method for default scores(x, choices,     display=c(\"sites\", \"species\", \"both\"), tidy = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get Species or Site Scores from an Ordination — scores","text":"x ordination result. choices Ordination axes.  missing, default method returns axes. display Partial match access scores \"sites\"     \"species\" \"\". tidy Return \"\" scores data frame     compatible ggplot2, variable score     labelling scores \"sites\" \"species\". ... parameters (unused).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get Species or Site Scores from an Ordination — scores","text":"Function scores generic method vegan. Several   vegan functions scores methods   defaults new arguments. help page describes   default method. methods, see, e.g.,   scores.cca, scores.rda,   scores.decorana. vegan ordination functions scores   method used extract scores instead   directly accessing . Scaling transformation scores   also happen scores function. scores   function available, results can plotted using   ordiplot, ordixyplot etc.,   ordination results can compared procrustes   analysis. scores.default function used extract scores   non-vegan ordination results.  Many standard ordination   methods libraries specific class,   specific method can written .  However,   scores.default guesses commonly used functions   keep site scores possible species scores. x matrix, scores.default returns chosen   columns matrix, ignoring whether species sites   requested (regard bug feature, please).   Currently function seems work least isoMDS,   prcomp, princomp ade4 objects.    may work cases fail mysteriously.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get Species or Site Scores from an Ordination — scores","text":"function returns matrix scores one type requested,   named list matrices display = \"\",  ggplot2 compatible data frame tidy = TRUE.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Get Species or Site Scores from an Ordination — scores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/scores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get Species or Site Scores from an Ordination — scores","text":"","code":"data(varespec) vare.pca <- prcomp(varespec) scores(vare.pca, choices=c(1,2)) #>            PC1         PC2 #> 18 -10.7847878  18.7094315 #> 15 -27.8036826 -11.7414745 #> 24 -25.6919559 -14.5399684 #> 27 -31.7820166 -31.2216800 #> 23 -19.6315869  -2.5541193 #> 19  -0.2413294 -11.4974077 #> 22 -26.6771373 -12.3140897 #> 16 -21.9230366   0.4449159 #> 28 -39.6083051 -41.8877392 #> 13  -4.0664328  20.4191153 #> 14 -18.4416245   5.4406988 #> 20 -17.3999191   2.3653380 #> 25 -25.1673547 -13.2508067 #> 7  -11.4065430  41.7356300 #> 5   -8.4243752  45.3805255 #> 6   -2.0759474  36.9311222 #> 3   39.8617580   8.0590041 #> 4   13.1065901  12.8377217 #> 2   57.6827011  -4.8983565 #> 9   63.3138332 -22.4481549 #> 12  44.1073111 -10.1653935 #> 10  64.9418975 -16.7633564 #> 11  11.5313633   3.9720890 #> 21  -3.4194194  -3.0130455"},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":null,"dir":"Reference","previous_headings":"","what":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Screeplot methods plotting variances ordination axes/components   overlaying broken stick distributions. Also, provides alternative   screeplot methods princomp prcomp.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"","code":"# S3 method for cca screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, if (is.null(x$CCA) || x$CCA$rank == 0) x$CA$rank else x$CCA$rank),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for decorana screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = 4,          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for prcomp screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, length(x$sdev)),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  # S3 method for princomp screeplot(x, bstick = FALSE, type = c(\"barplot\", \"lines\"),          npcs = min(10, length(x$sdev)),          ptype = \"o\", bst.col = \"red\", bst.lty = \"solid\",          xlab = \"Component\", ylab = \"Inertia\",          main = deparse(substitute(x)), legend = bstick,          ...)  bstick(n, ...)  # S3 method for default bstick(n, tot.var = 1, ...)  # S3 method for cca bstick(n, ...)  # S3 method for prcomp bstick(n, ...)  # S3 method for princomp bstick(n, ...)  # S3 method for decorana bstick(n, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"x object component variances can determined. bstick logical; broken stick distribution drawn? npcs number components plotted. type type plot. ptype type == \"lines\" bstick = TRUE,     character indicating type plotting used lines;     actually types plot.default. bst.col, bst.lty colour line type used draw     broken stick distribution. xlab, ylab, main graphics parameters. legend logical; draw legend? n object variances can extracted     number variances (components) case     bstick.default. tot.var total variance split. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"functions provide screeplots ordination methods   vegan enhanced versions broken stick   prcomp princomp. Function bstick gives brokenstick values ordered   random proportions, defined  \\(p_i = (tot/n) \\sum_{x=}^n      (1/x)\\) (Legendre & Legendre 2012),   \\(tot\\) total  \\(n\\) number brokenstick   components (cf. radfit).  Broken stick   recommended stopping rule principal component analysis   (Jackson 1993): principal components retained long   observed eigenvalues higher corresponding random broken stick   components. bstick function generic. default needs number   components total, specific methods extract   information ordination results.  also bstick   method cca.  However, broken stick model   strictly valid correspondence analysis (CA), eigenvalues   CA defined \\(\\leq 1\\), whereas brokenstick   components restrictions. brokenstick components   detrended correspondence analysis (DCA) assume input data   full rank, additive eigenvalues used screeplot (see   decorana).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Function screeplot draws plot currently active device,    returns invisibly xy.coords points   bars eigenvalues. Function bstick returns numeric vector broken stick   components.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Jackson, D. . (1993). Stopping rules principal components   analysis: comparison heuristical statistical   approaches. Ecology 74, 2204--2214. Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"Gavin L. Simpson","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/screeplot.cca.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Screeplots for Ordination Results and Broken Stick Distributions — screeplot.cca","text":"","code":"data(varespec) vare.pca <- rda(varespec, scale = TRUE) bstick(vare.pca) #>       PC1       PC2       PC3       PC4       PC5       PC6       PC7       PC8  #> 7.1438620 5.2308185 4.2742968 3.6366156 3.1583548 2.7757461 2.4569055 2.1836136  #>       PC9      PC10      PC11      PC12      PC13      PC14      PC15      PC16  #> 1.9444831 1.7319228 1.5406184 1.3667054 1.2072851 1.0601279 0.9234819 0.7959457  #>      PC17      PC18      PC19      PC20      PC21      PC22      PC23  #> 0.6763805 0.5638485 0.4575683 0.3568818 0.2612296 0.1701323 0.0831758  screeplot(vare.pca, bstick = TRUE, type = \"lines\")"},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":null,"dir":"Reference","previous_headings":"","what":"Similarity Percentages — simper","title":"Similarity Percentages — simper","text":"Discriminating species two groups using   Bray-Curtis dissimilarities","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Similarity Percentages — simper","text":"","code":"simper(comm, group, permutations = 999, parallel = 1, ...) # S3 method for simper summary(object, ordered = TRUE,     digits = max(3,getOption(\"digits\") - 3), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Similarity Percentages — simper","text":"comm Community data. group Factor describing group structure.     missing one level, contributions estimated     non-grouped data dissimilarities show overall     heterogeneity species abundances. permutations list control values permutations     returned function ,     number permutations required, permutation matrix     row gives permuted indices. object object returned simper. ordered Logical; species ordered     average contribution? digits Number digits output. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. (yet implemented). ... Parameters passed functions. simper     extra parameters passed shuffleSet     permutations used.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Similarity Percentages — simper","text":"Similarity percentage, simper (Clarke 1993) based   decomposition Bray-Curtis dissimilarity index (see   vegdist, designdist). contribution   individual species \\(\\) overall Bray-Curtis dissimilarity   \\(d_{jk}\\) given $$d_{ijk} = \\frac{|x_{ij}-x_{ik}|}{\\sum_{=1}^S (x_{ij}+x_{ik})}$$ \\(x\\) abundance species \\(\\) sampling units   \\(j\\) \\(k\\). overall index sum individual   contributions \\(S\\) species    \\(d_{jk}=\\sum_{=1}^S d_{ijk}\\). simper functions performs pairwise comparisons groups   sampling units finds contribution species   average -group Bray-Curtis dissimilarity. Although method   called “Similarity Percentages”, really studied   dissimilarities instead similarities (Clarke 1993). function displays important species pair   groups.  species contribute least 70 %   differences groups.  function returns much   extensive results (including species) can accessed   directly result object (see section Value). Function   summary transforms result list data frames.   argument ordered = TRUE data frames also include   cumulative contributions ordered species contribution. results simper can difficult interpret   often misunderstood even publications. method gives   contribution species overall dissimilarities,   caused variation species abundances, partly   differences among groups.  Even make groups   copies , method single species high   contribution, contributions non-existing   -group differences random noise variation species   abundances. abundant species usually highest   variances, high contributions even   differ among groups. Permutation tests study differences among   groups, can used find species   differences among groups important component   contribution dissimilarities. Analysis without group   argument find species contributions average overall   dissimilarity among sampling units. non-grouped contributions   can compared grouped contributions see much added value   grouping species.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Similarity Percentages — simper","text":"list class \"simper\" following items: species species names. average Species contribution average -group dissimilarity. overall average -group dissimilarity. sum     item average. sd Standard deviation contribution. ratio Average sd ratio. ava, avb Average abundances per group. ord index vector order vectors contribution     order cusum back original data order. cusum Ordered cumulative contribution. based item     average, sum total 1. p Permutation \\(p\\)-value. Probability getting larger     equal average contribution random permutation group     factor. area available permutations used     (default: calculated).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Similarity Percentages — simper","text":"Eduard Szöcs Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Similarity Percentages — simper","text":"Clarke, K.R. 1993. Non-parametric multivariate analyses changes     community structure. Australian Journal Ecology, 18,     117–143.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simper.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Similarity Percentages — simper","text":"","code":"data(dune) data(dune.env) (sim <- with(dune.env, simper(dune, Management, permutations = 99))) #> cumulative contributions of most influential species: #>  #> $SF_BF #>   Agrostol   Alopgeni   Lolipere   Trifrepe    Poatriv   Scorautu   Bromhord  #> 0.09824271 0.18254830 0.25956958 0.33367870 0.40734444 0.47729205 0.53120026  #>   Achimill   Planlanc   Elymrepe   Bracruta  #> 0.57946526 0.62522255 0.67016196 0.71098133  #>  #> $SF_HF #>   Agrostol   Alopgeni   Lolipere   Planlanc   Rumeacet   Elymrepe    Poatriv  #> 0.08350879 0.16534834 0.23934930 0.30843624 0.37716139 0.43334492 0.48351753  #>   Bracruta   Eleopalu    Poaprat   Anthodor   Sagiproc   Trifprat  #> 0.52804045 0.57205850 0.61423981 0.65549838 0.69628951 0.73696831  #>  #> $SF_NM #>   Poatriv  Alopgeni  Agrostol  Lolipere  Eleopalu   Poaprat  Bracruta  Elymrepe  #> 0.1013601 0.1935731 0.2667383 0.3377578 0.3999419 0.4526707 0.5044725 0.5505643  #>  Scorautu  Trifrepe  Sagiproc  Salirepe  #> 0.5926117 0.6320111 0.6712478 0.7091528  #>  #> $BF_HF #>   Rumeacet    Poatriv   Planlanc   Bromhord   Lolipere   Elymrepe   Trifrepe  #> 0.08163219 0.15193797 0.21918333 0.27967181 0.33969561 0.39843338 0.45298204  #>   Anthodor   Achimill   Bracruta   Alopgeni   Trifprat   Juncarti  #> 0.50276849 0.55222648 0.60021994 0.64584333 0.69126471 0.73366621  #>  #> $BF_NM #>  Lolipere   Poatriv   Poaprat  Trifrepe  Bromhord  Bracruta  Eleopalu  Agrostol  #> 0.1242718 0.1992126 0.2711756 0.3414609 0.3958520 0.4448077 0.4910724 0.5369083  #>  Achimill  Scorautu  Anthodor  Planlanc  #> 0.5823926 0.6253645 0.6638182 0.7012577  #>  #> $HF_NM #>    Poatriv   Lolipere   Rumeacet    Poaprat   Planlanc   Bracruta   Eleopalu  #> 0.09913221 0.17468460 0.23917190 0.29701331 0.35469313 0.40365488 0.44804851  #>   Agrostol   Trifrepe   Elymrepe   Anthodor   Juncarti   Trifprat   Salirepe  #> 0.49226546 0.53434466 0.57564661 0.61543243 0.65341300 0.68921695 0.72432408  #>  ## IGNORE_RDIFF_BEGIN summary(sim) #>  #> Contrast: SF_BF  #>  #>          average      sd   ratio     ava     avb cumsum    p   #> Agrostol 0.06137 0.03419 1.79490 4.66700 0.00000  0.098 0.05 * #> Alopgeni 0.05267 0.03648 1.44390 4.33300 0.66700  0.182 0.14   #> Lolipere 0.04812 0.03945 1.21980 3.00000 6.00000  0.260 0.39   #> Trifrepe 0.04630 0.02553 1.81380 1.33300 4.66700  0.334 0.09 . #> Poatriv  0.04602 0.03380 1.36150 4.66700 3.66700  0.407 0.46   #> Scorautu 0.04370 0.02492 1.75340 1.33300 4.33300  0.477 0.04 * #> Bromhord 0.03368 0.02586 1.30230 0.50000 2.66700  0.531 0.02 * #> Achimill 0.03015 0.02082 1.44820 0.16700 2.33300  0.580 0.04 * #> Planlanc 0.02859 0.02155 1.32650 0.00000 2.00000  0.625 0.49   #> Elymrepe 0.02807 0.02978 0.94280 2.00000 1.33300  0.670 0.52   #> Bracruta 0.02550 0.02390 1.06690 2.00000 2.00000  0.711 0.83   #> Poaprat  0.02513 0.02397 1.04850 2.50000 4.00000  0.751 0.82   #> Sagiproc 0.02433 0.02215 1.09830 1.83300 0.66700  0.790 0.39   #> Bellpere 0.01986 0.01709 1.16220 0.66700 1.66700  0.822 0.10 . #> Eleopalu 0.01861 0.04296 0.43330 1.33300 0.00000  0.852 0.82   #> Anthodor 0.01754 0.02580 0.67980 0.00000 1.33300  0.880 0.75   #> Juncbufo 0.01603 0.02371 0.67620 1.16700 0.00000  0.905 0.57   #> Vicilath 0.01467 0.01331 1.10260 0.00000 1.00000  0.929 0.04 * #> Hyporadi 0.01029 0.01520 0.67680 0.00000 0.66700  0.945 0.62   #> Ranuflam 0.00931 0.01360 0.68450 0.66700 0.00000  0.960 0.93   #> Juncarti 0.00698 0.01611 0.43330 0.50000 0.00000  0.972 0.95   #> Callcusp 0.00698 0.01611 0.43330 0.50000 0.00000  0.983 0.79   #> Rumeacet 0.00453 0.01044 0.43330 0.33300 0.00000  0.990 0.95   #> Cirsarve 0.00398 0.00918 0.43360 0.33300 0.00000  0.996 0.37   #> Chenalbu 0.00233 0.00537 0.43330 0.16700 0.00000  1.000 0.41   #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: SF_HF  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Agrostol 0.04738 0.03127 1.51510 4.66700 1.40000  0.084 0.35    #> Alopgeni 0.04643 0.03290 1.41150 4.33300 1.60000  0.165 0.20    #> Lolipere 0.04199 0.02701 1.55460 3.00000 4.00000  0.239 0.75    #> Planlanc 0.03920 0.03321 1.18040 0.00000 3.00000  0.308 0.02 *  #> Rumeacet 0.03899 0.02737 1.42470 0.33300 3.20000  0.377 0.01 ** #> Elymrepe 0.03188 0.02955 1.07870 2.00000 2.00000  0.433 0.30    #> Poatriv  0.02847 0.02152 1.32270 4.66700 4.80000  0.484 1.00    #> Bracruta 0.02526 0.02104 1.20040 2.00000 2.80000  0.528 0.92    #> Eleopalu 0.02497 0.03888 0.64240 1.33300 0.80000  0.572 0.77    #> Poaprat  0.02393 0.01918 1.24780 2.50000 3.40000  0.614 0.98    #> Anthodor 0.02341 0.02143 1.09230 0.00000 1.80000  0.655 0.67    #> Sagiproc 0.02314 0.02048 1.13010 1.83300 0.80000  0.696 0.40    #> Trifprat 0.02308 0.02343 0.98500 0.00000 1.80000  0.737 0.01 ** #> Juncarti 0.02285 0.02568 0.88990 0.50000 1.60000  0.777 0.51    #> Trifrepe 0.02238 0.01949 1.14860 1.33300 2.80000  0.817 0.94    #> Juncbufo 0.02164 0.02224 0.97330 1.16700 1.20000  0.855 0.24    #> Scorautu 0.02051 0.01642 1.24890 1.33300 2.80000  0.891 0.79    #> Achimill 0.01518 0.01139 1.33260 0.16700 1.20000  0.918 0.75    #> Bromhord 0.01338 0.01450 0.92220 0.50000 0.80000  0.941 0.79    #> Ranuflam 0.01066 0.01339 0.79640 0.66700 0.40000  0.960 0.86    #> Bellpere 0.00999 0.01257 0.79480 0.66700 0.40000  0.978 0.84    #> Callcusp 0.00662 0.01508 0.43930 0.50000 0.00000  0.989 0.92    #> Cirsarve 0.00381 0.00867 0.43940 0.33300 0.00000  0.996 0.54    #> Chenalbu 0.00221 0.00503 0.43930 0.16700 0.00000  1.000 0.51    #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Hyporadi 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Vicilath 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: SF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Poatriv  0.07828 0.04095 1.91180 4.66700 0.00000  0.101 0.01 ** #> Alopgeni 0.07122 0.04696 1.51670 4.33300 0.00000  0.194 0.01 ** #> Agrostol 0.05651 0.04418 1.27920 4.66700 2.16700  0.267 0.05 *  #> Lolipere 0.05485 0.05991 0.91550 3.00000 0.33300  0.338 0.15    #> Eleopalu 0.04803 0.04717 1.01820 1.33300 2.16700  0.400 0.04 *  #> Poaprat  0.04072 0.03179 1.28100 2.50000 0.66700  0.453 0.06 .  #> Bracruta 0.04001 0.03440 1.16310 2.00000 2.83300  0.504 0.08 .  #> Elymrepe 0.03560 0.03852 0.92430 2.00000 0.00000  0.551 0.12    #> Scorautu 0.03247 0.03481 0.93280 1.33300 3.16700  0.593 0.13    #> Trifrepe 0.03043 0.03163 0.96190 1.33300 1.83300  0.632 0.59    #> Sagiproc 0.03030 0.03048 0.99430 1.83300 0.50000  0.671 0.02 *  #> Salirepe 0.02928 0.03201 0.91440 0.00000 1.83300  0.709 0.02 *  #> Anthodor 0.02454 0.03669 0.66880 0.00000 1.33300  0.741 0.56    #> Callcusp 0.02276 0.02944 0.77310 0.50000 1.16700  0.770 0.08 .  #> Ranuflam 0.02257 0.02282 0.98890 0.66700 1.33300  0.800 0.08 .  #> Juncarti 0.02254 0.02860 0.78830 0.50000 1.16700  0.829 0.53    #> Hyporadi 0.02011 0.03129 0.64260 0.00000 1.16700  0.855 0.21    #> Juncbufo 0.01986 0.02903 0.68400 1.16700 0.00000  0.881 0.21    #> Planlanc 0.01542 0.02277 0.67720 0.00000 0.83300  0.900 0.98    #> Airaprae 0.01488 0.02188 0.68020 0.00000 0.83300  0.920 0.06 .  #> Bellpere 0.01232 0.01592 0.77370 0.66700 0.33300  0.936 0.72    #> Comapalu 0.01188 0.01741 0.68260 0.00000 0.66700  0.951 0.05 *  #> Achimill 0.00929 0.01493 0.62240 0.16700 0.33300  0.963 0.98    #> Bromhord 0.00717 0.01633 0.43910 0.50000 0.00000  0.972 0.98    #> Rumeacet 0.00559 0.01275 0.43840 0.33300 0.00000  0.980 0.98    #> Empenigr 0.00523 0.01200 0.43540 0.00000 0.33300  0.986 0.29    #> Cirsarve 0.00478 0.01089 0.43910 0.33300 0.00000  0.993 0.02 *  #> Chenalbu 0.00289 0.00660 0.43820 0.16700 0.00000  0.996 0.02 *  #> Vicilath 0.00279 0.00642 0.43450 0.00000 0.16700  1.000 0.81    #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: BF_HF  #>  #>          average      sd   ratio     ava     avb cumsum    p   #> Rumeacet 0.03867 0.02606 1.48380 0.00000 3.20000  0.082 0.03 * #> Poatriv  0.03330 0.02579 1.29110 3.66700 4.80000  0.152 0.96   #> Planlanc 0.03185 0.01830 1.74010 2.00000 3.00000  0.219 0.34   #> Bromhord 0.02865 0.01799 1.59260 2.66700 0.80000  0.280 0.07 . #> Lolipere 0.02843 0.02215 1.28340 6.00000 4.00000  0.340 1.00   #> Elymrepe 0.02782 0.02959 0.94040 1.33300 2.00000  0.398 0.56   #> Trifrepe 0.02584 0.01656 1.56030 4.66700 2.80000  0.453 0.78   #> Anthodor 0.02358 0.02042 1.15470 1.33300 1.80000  0.503 0.55   #> Achimill 0.02343 0.01474 1.58930 2.33300 1.20000  0.552 0.24   #> Bracruta 0.02273 0.01802 1.26170 2.00000 2.80000  0.600 0.89   #> Alopgeni 0.02161 0.02308 0.93630 0.66700 1.60000  0.646 0.91   #> Trifprat 0.02151 0.02207 0.97470 0.00000 1.80000  0.691 0.12   #> Juncarti 0.02008 0.02555 0.78600 0.00000 1.60000  0.734 0.59   #> Scorautu 0.01932 0.01357 1.42410 4.33300 2.80000  0.774 0.78   #> Bellpere 0.01829 0.01486 1.23050 1.66700 0.40000  0.813 0.22   #> Agrostol 0.01761 0.02284 0.77080 0.00000 1.40000  0.850 1.00   #> Juncbufo 0.01500 0.02066 0.72600 0.00000 1.20000  0.882 0.67   #> Vicilath 0.01285 0.01140 1.12740 1.00000 0.00000  0.909 0.04 * #> Sagiproc 0.01168 0.01297 0.90080 0.66700 0.80000  0.934 0.92   #> Eleopalu 0.01017 0.02111 0.48170 0.00000 0.80000  0.955 0.93   #> Hyporadi 0.00895 0.01312 0.68240 0.66700 0.00000  0.974 0.64   #> Poaprat  0.00720 0.01010 0.71330 4.00000 3.40000  0.989 1.00   #> Ranuflam 0.00508 0.01055 0.48170 0.00000 0.40000  1.000 0.97   #> Airaprae 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Comapalu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Empenigr 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Salirepe 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> Callcusp 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: BF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Lolipere 0.09068 0.02644 3.42900 6.00000 0.33300  0.124 0.04 *  #> Poatriv  0.05468 0.04465 1.22500 3.66700 0.00000  0.199 0.28    #> Poaprat  0.05251 0.01813 2.89700 4.00000 0.66700  0.271 0.02 *  #> Trifrepe 0.05129 0.02756 1.86100 4.66700 1.83300  0.342 0.04 *  #> Bromhord 0.03969 0.02920 1.35900 2.66700 0.00000  0.396 0.01 ** #> Bracruta 0.03572 0.02869 1.24500 2.00000 2.83300  0.445 0.40    #> Eleopalu 0.03376 0.03573 0.94500 0.00000 2.16700  0.491 0.43    #> Agrostol 0.03345 0.03473 0.96300 0.00000 2.16700  0.537 0.87    #> Achimill 0.03319 0.02338 1.42000 2.33300 0.33300  0.582 0.02 *  #> Scorautu 0.03136 0.02026 1.54800 4.33300 3.16700  0.625 0.29    #> Anthodor 0.02806 0.03295 0.85200 1.33300 1.33300  0.664 0.37    #> Planlanc 0.02732 0.02193 1.24600 2.00000 0.83300  0.701 0.62    #> Salirepe 0.02677 0.02927 0.91400 0.00000 1.83300  0.738 0.11    #> Bellpere 0.02353 0.01909 1.23200 1.66700 0.33300  0.770 0.04 *  #> Hyporadi 0.02172 0.02450 0.88600 0.66700 1.16700  0.800 0.26    #> Ranuflam 0.02031 0.02275 0.89300 0.00000 1.33300  0.828 0.27    #> Elymrepe 0.01999 0.02926 0.68300 1.33300 0.00000  0.855 0.79    #> Callcusp 0.01783 0.02681 0.66500 0.00000 1.16700  0.880 0.44    #> Juncarti 0.01769 0.02600 0.68100 0.00000 1.16700  0.904 0.73    #> Vicilath 0.01577 0.01447 1.09000 1.00000 0.16700  0.925 0.01 ** #> Sagiproc 0.01543 0.01857 0.83100 0.66700 0.50000  0.947 0.79    #> Airaprae 0.01341 0.01969 0.68100 0.00000 0.83300  0.965 0.30    #> Comapalu 0.01074 0.01571 0.68400 0.00000 0.66700  0.980 0.42    #> Alopgeni 0.01000 0.01463 0.68300 0.66700 0.00000  0.993 0.99    #> Empenigr 0.00479 0.01105 0.43300 0.00000 0.33300  1.000 0.41    #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Juncbufo 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Rumeacet 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Trifprat 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Contrast: HF_NM  #>  #>          average      sd   ratio     ava     avb cumsum    p    #> Poatriv  0.07155 0.01368 5.23000 4.80000 0.00000  0.099 0.01 ** #> Lolipere 0.05453 0.02962 1.84100 4.00000 0.33300  0.175 0.22    #> Rumeacet 0.04655 0.03081 1.51100 3.20000 0.00000  0.239 0.01 ** #> Poaprat  0.04175 0.01885 2.21500 3.40000 0.66700  0.297 0.06 .  #> Planlanc 0.04163 0.02956 1.40800 3.00000 0.83300  0.355 0.03 *  #> Bracruta 0.03534 0.02010 1.75800 2.80000 2.83300  0.404 0.40    #> Eleopalu 0.03204 0.03231 0.99200 0.80000 2.16700  0.448 0.51    #> Agrostol 0.03192 0.02889 1.10500 1.40000 2.16700  0.492 0.99    #> Trifrepe 0.03037 0.02287 1.32800 2.80000 1.83300  0.534 0.71    #> Elymrepe 0.02981 0.03868 0.77100 2.00000 0.00000  0.576 0.53    #> Anthodor 0.02872 0.02480 1.15800 1.80000 1.33300  0.615 0.24    #> Juncarti 0.02741 0.02854 0.96100 1.60000 1.16700  0.653 0.19    #> Trifprat 0.02584 0.02597 0.99500 1.80000 0.00000  0.689 0.01 ** #> Salirepe 0.02534 0.02729 0.92900 0.00000 1.83300  0.724 0.18    #> Alopgeni 0.02446 0.03240 0.75500 1.60000 0.00000  0.758 0.92    #> Scorautu 0.02070 0.01412 1.46600 2.80000 3.16700  0.787 0.85    #> Ranuflam 0.01928 0.01994 0.96700 0.40000 1.33300  0.814 0.36    #> Juncbufo 0.01818 0.02465 0.73800 1.20000 0.00000  0.839 0.43    #> Hyporadi 0.01714 0.02655 0.64600 0.00000 1.16700  0.863 0.42    #> Callcusp 0.01683 0.02490 0.67600 0.00000 1.16700  0.886 0.42    #> Achimill 0.01656 0.01490 1.11100 1.20000 0.33300  0.909 0.59    #> Sagiproc 0.01528 0.01653 0.92400 0.80000 0.50000  0.930 0.89    #> Airaprae 0.01261 0.01824 0.69100 0.00000 0.83300  0.947 0.30    #> Bromhord 0.01209 0.01517 0.79700 0.80000 0.00000  0.964 0.84    #> Comapalu 0.01011 0.01456 0.69400 0.00000 0.66700  0.978 0.25    #> Bellpere 0.00880 0.01373 0.64100 0.40000 0.33300  0.990 0.94    #> Empenigr 0.00454 0.01033 0.43900 0.00000 0.33300  0.997 0.60    #> Vicilath 0.00240 0.00546 0.43900 0.00000 0.16700  1.000 0.86    #> Chenalbu 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> Cirsarve 0.00000 0.00000     NaN 0.00000 0.00000  1.000   NA    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 99 ## IGNORE_RDIFF_END"},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"Function simulates response data frame adds  Gaussian error fitted responses Redundancy Analysis  (rda), Constrained Correspondence Analysis  (cca) distance-based RDA (capscale).  function special case generic simulate,  works similarly simulate.lm.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"","code":"# S3 method for rda simulate(object, nsim = 1, seed = NULL, indx = NULL,     rank = \"full\", correlated = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"object object representing fitted rda,     cca capscale model. nsim number response matrices simulated. one     dissimilarity matrix returned capscale,     larger nsim error. seed object specifying random number     generator initialized (‘seeded’). See      simulate details. indx Index residuals added fitted values,     produced shuffleSet     sample.  index can duplicate entries     bootstrapping allowed. nsim \\(>1\\), output     compliant shuffleSet     one line simulation.  nsim missing,     number rows indx used define number     simulations, nsim given, match number     rows indx. null, parametric simulation used     Gaussian error added fitted values. rank rank constrained component: passed     predict.rda predict.cca. correlated species regarded correlated parametric     simulation indx given?     correlated = TRUE, multivariate Gaussian random error     generated, FALSE, Gaussian random error generated     separately species. argument effect     capscale information species. ... additional optional arguments (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"implementation follows \"lm\" method   simulate, adds Gaussian (Normal) error fitted   values (fitted.rda) using function rnorm   correlated = FALSE mvrnorm   correlated = TRUE. standard deviations (rnorm)   covariance matrices species (mvrnorm)   estimated residuals fitting constraints.   Alternatively, function can take permutation index used   add permuted residuals (unconstrained component) fitted   values. Raw data used rda. Internal Chi-square   transformed data used cca within function,   returned matrix similar original input data.   simulation performed internal metric scaling data   capscale, function returns Euclidean   distances calculated simulated data.  simulation uses   real components, imaginary dimensions ignored.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"nsim = 1, returns matrix dissimilarities ( capscale) similar additional arguments random   number seed simulate. nsim > 1, returns   similar array returned simulate.nullmodel   similar attributes.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/simulate.rda.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Simulate Responses with Gaussian Error or Permuted Residuals for Constrained Ordination — simulate.rda","text":"","code":"data(dune) data(dune.env) mod <- rda(dune ~  Moisture + Management, dune.env) ## One simulation update(mod, simulate(mod) ~  .) #> Call: rda(formula = simulate(mod) ~ Moisture + Management, data = #> dune.env) #>  #>               Inertia Proportion Rank #> Total         79.3906     1.0000      #> Constrained   52.2955     0.6587    6 #> Unconstrained 27.0951     0.3413   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 24.007 14.238  5.712  3.314  2.879  2.145  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 6.128 4.391 3.331 3.143 2.121 1.757 1.488 1.152 1.115 1.044 0.682 0.539 0.205  #>  ## An impression of confidence regions of site scores plot(mod, display=\"sites\") for (i in 1:5) lines(procrustes(mod, update(mod, simulate(mod) ~ .)), col=\"blue\")  ## Simulate a set of null communities with permutation of residuals simulate(mod, indx = shuffleSet(nrow(dune), 99)) #> An object of class “simulate.rda”  #> ‘simulate index’ method (abundance, non-sequential) #> 20 x 30 matrix #> Number of permuted matrices = 99  #>"},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":null,"dir":"Reference","previous_headings":"","what":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"Land birds islands covered  coniferous forest Sipoo Archipelago, southern Finland.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"","code":"data(sipoo)   data(sipoo.map)"},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"sipoo data frame contains data occurrences 50 land   bird species 18 islands Sipoo Archipelago (Simberloff &   Martin, 1991, Appendix 3). species referred 4+4 letter   abbreviation Latin names (using five letters two   species names make unique). sipoo.map data contains geographic coordinates   islands ETRS89-TM35FIN coordinate system (EPSG:3067)   areas islands hectares.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"Simberloff, D. & Martin, J.-L.  (1991).  Nestedness insular   avifaunas: simple summary statistics masking complex species patterns.   Ornis Fennica 68:178--192.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sipoo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Birds in the Archipelago of Sipoo (Sibbo and Borgå) — sipoo","text":"","code":"data(sipoo) data(sipoo.map) plot(N ~ E, data=sipoo.map, asp = 1)"},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":null,"dir":"Reference","previous_headings":"","what":"Minimum Spanning Tree — spantree","title":"Minimum Spanning Tree — spantree","text":"Function spantree finds minimum spanning tree   connecting points, disregarding dissimilarities   threshold NA.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Minimum Spanning Tree — spantree","text":"","code":"spantree(d, toolong = 0) # S3 method for spantree as.hclust(x, ...) # S3 method for spantree cophenetic(x) spandepth(x) # S3 method for spantree plot(x, ord, cex = 0.7, type = \"p\", labels, dlim,      FUN = sammon,  ...) # S3 method for spantree lines(x, ord, display=\"sites\", col = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Minimum Spanning Tree — spantree","text":"d Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, .     toolong = 0 (negative), dissimilarity regarded     long. x spantree result object. ord ordination configuration, ordination result known     scores. cex Character expansion factor. type Observations plotted points     type=\"p\" type=\"b\", text label     type=\"t\". tree (lines) always plotted. labels Text used type=\"t\" node names     missing. dlim ceiling value used highest cophenetic dissimilarity. FUN Ordination function find configuration     cophenetic dissimilarities. supplied FUN work,     supply ordination result argument ord. display Type scores used ord. col Colour line segments. can vector     recycled points, line colour mixture two     joined points. ... parameters passed functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Minimum Spanning Tree — spantree","text":"Function spantree finds minimum spanning tree   dissimilarities (may several minimum spanning trees,   function finds one). Dissimilarities threshold   toolong NAs disregarded, spanning tree   found dissimilarities. data disconnected,   function return disconnected tree (forest),   corresponding link NA. Connected subtrees can identified   using distconnected. Minimum spanning tree closely related single linkage   clustering, .k.. nearest neighbour clustering, genetics   neighbour joining tree available hclust   agnes functions. important practical   difference minimum spanning tree concept cluster   membership, always joins individual points . Function   .hclust can change spantree result   corresponding hclust object. Function cophenetic finds distances points along   tree segments. Function spandepth returns depth   node. nodes tree either leaves (one link)   internal nodes (one link). leaves recursively   removed tree, depth layer leaf   removed. disconnected spantree object (forest)   tree analysed separately disconnected nodes   tree depth zero. Function plot displays tree   supplied ordination configuration, lines adds spanning   tree ordination graph. configuration supplied plot,   function ordinates cophenetic dissimilarities   spanning tree overlays tree result. default   ordination function sammon (package MASS),   Sammon scaling emphasizes structure neighbourhood   nodes may able beautifully represent tree (may need   set dlim, sometimes results remain   twisted). ordination methods work disconnected   trees, must supply ordination configuration. Function   lines overlay tree existing plot. Function spantree uses Prim's method   implemented priority-first search dense graphs (Sedgewick   1990). Function cophenetic uses function   stepacross option path = \"extended\".   spantree fast, cophenetic slow   large data sets.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Minimum Spanning Tree — spantree","text":"Function spantree returns object class spantree   list two vectors, length \\(n-1\\).   number links tree one less number observations,   first item omitted. items kid child node parent, starting parent number     two. link parent, value NA     tree disconnected node. dist Corresponding distance. kid = NA,     dist = 0. labels Names nodes found input dissimilarities. call function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Minimum Spanning Tree — spantree","text":"Sedgewick, R. (1990). Algorithms C. Addison Wesley.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Minimum Spanning Tree — spantree","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Minimum Spanning Tree — spantree","text":"principle, minimum spanning tree equivalent single linkage   clustering can performed using hclust   agnes. However, functions combine   clusters information actually connected points   (“single link”) recovered result.   graphical output single linkage clustering plotted   ordicluster look different equivalent   spanning tree plotted lines.spantree.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/spantree.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Minimum Spanning Tree — spantree","text":"","code":"data(dune) dis <- vegdist(dune) tr <- spantree(dis) ## Add tree to a metric scaling plot(tr, cmdscale(dis), type = \"t\")  ## Find a configuration to display the tree neatly plot(tr, type = \"t\") #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500  ## Depths of nodes depths <- spandepth(tr) plot(tr, type = \"t\", label = depths) #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500  ## Plot as a dendrogram cl <- as.hclust(tr) plot(cl)  ## cut hclust tree to classes and show in colours in spantree plot(tr, col = cutree(cl, 5), pch=16) #> Initial stress        : 0.03111 #> stress after  10 iters: 0.01302, magic = 0.500 #> stress after  20 iters: 0.01139, magic = 0.500 #> stress after  30 iters: 0.01118, magic = 0.500 #> stress after  40 iters: 0.01114, magic = 0.500"},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":null,"dir":"Reference","previous_headings":"","what":"Species Accumulation Curves — specaccum","title":"Species Accumulation Curves — specaccum","text":"Function specaccum finds species accumulation curves   number species certain number sampled sites   individuals.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Species Accumulation Curves — specaccum","text":"","code":"specaccum(comm, method = \"exact\", permutations = 100,           conditioned =TRUE, gamma = \"jack1\",  w = NULL, subset, ...) # S3 method for specaccum plot(x, add = FALSE, random = FALSE, ci = 2,      ci.type = c(\"bar\", \"line\", \"polygon\"), col = par(\"fg\"), lty = 1,     ci.col = col, ci.lty = 1, ci.length = 0, xlab, ylab = x$method, ylim,     xvar = c(\"sites\", \"individuals\", \"effort\"), ...) # S3 method for specaccum boxplot(x, add = FALSE, ...) fitspecaccum(object, model, method = \"random\", ...) # S3 method for fitspecaccum plot(x, col = par(\"fg\"), lty = 1, xlab = \"Sites\",      ylab = x$method, ...)  # S3 method for specaccum predict(object, newdata, interpolation = c(\"linear\", \"spline\"), ...) # S3 method for fitspecaccum predict(object, newdata, ...) specslope(object, at)"},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Species Accumulation Curves — specaccum","text":"comm Community data set. method Species accumulation method (partial match). Method     \"collector\"     adds sites order happen data,     \"random\" adds sites random order, \"exact\" finds     expected (mean) species richness, \"coleman\" finds     expected richness following     Coleman et al. 1982, \"rarefaction\" finds mean     accumulating individuals instead sites. permutations Number permutations method = \"random\".     Usually integer giving number permutations, can also     list control values permutations returned     function , permutation matrix     row gives permuted indices. conditioned Estimation standard deviation conditional     empirical dataset exact SAC gamma Method estimating total extrapolated number species     survey area function specpool w Weights giving sampling effort. subset logical expression indicating sites (rows) keep: missing     values taken FALSE. x specaccum result object add Add existing graph. random Draw random simulation separately instead     drawing average confidence intervals. ci Multiplier used get confidence intervals standard     deviation (standard error estimate). Value ci = 0     suppresses drawing confidence intervals. ci.type Type confidence intervals graph: \"bar\"     draws vertical bars, \"line\" draws lines,     \"polygon\" draws shaded area. col Colour drawing lines. lty line type (see par). ci.col Colour drawing lines filling     \"polygon\". ci.lty Line type confidence intervals border     \"polygon\". ci.length Length horizontal bars (inches) end     vertical bars ci.type = \"bar\". xlab,ylab Labels x (defaults xvar)     y axis. ylim y limits plot. xvar Variable used horizontal axis:     \"individuals\" can used     method = \"rarefaction\". object Either community data set fitted specaccum model. model Nonlinear regression model (nls). See Details. newdata Optional data used prediction interpreted     number sampling units (sites). missing, fitted values     returned. interpolation Interpolation method used newdata. Number plots slope evaluated. Can     real number. ... parameters functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Species Accumulation Curves — specaccum","text":"Species accumulation curves (SAC) used compare diversity   properties community data sets using different accumulator   functions. classic method \"random\" finds mean   SAC standard deviation random permutations data,   subsampling without replacement (Gotelli & Colwell 2001).    \"exact\" method finds expected SAC using sample-based   rarefaction method independently developed numerous   times (Chiarucci et al. 2008) often known Mao Tau   estimate (Colwell et al. 2012).  unconditional standard deviation   exact SAC represents moment-based estimation   conditioned empirical data set (sd samples > 0).   unconditional standard deviation based estimation   extrapolated number species survey area (.k.. gamma   diversity), estimated function specpool.   conditional standard deviation developed Jari Oksanen (  published, sd=0 samples). Method \"coleman\" finds   expected SAC standard deviation following Coleman et   al. (1982).  methods based sampling sites without   replacement. contrast, method = \"rarefaction\" finds   expected species richness standard deviation sampling   individuals instead sites.  achieves applying function   rarefy number individuals corresponding   average number individuals per site. Methods \"random\" \"collector\" can take weights   (w) give sampling effort site.  weights   w influence order sites accumulated,   value sampling effort sites   equal. summary results expressed sites even   accumulation uses weights (methods \"random\",   \"collector\"), based individuals   (\"rarefaction\").  actual sampling effort given item   Effort Individuals printed result.   weighted \"random\" method effort refers average   effort per site, sum weights per number sites.   weighted method = \"random\", averaged species richness   found linear interpolation single random permutations.   Therefore least first value (often several first)   NA richness, values interpolated   cases extrapolated.  plot function   defaults display results scaled sites, can   changed selecting xvar = \"effort\" (weighted methods)   xvar = \"individuals\" (method = \"rarefaction\"). summary boxplot methods available   method = \"random\". Function predict specaccum can return values   corresponding newdata. method \"exact\",   \"rarefaction\" \"coleman\" function uses analytic   equations interpolated non-integer values, methods   linear (approx) spline (spline)   interpolation. newdata given, function returns   values corresponding data. NB., fitted values   method=\"rarefaction\" based rounded integer counts,   predict can use fractional non-integer counts   newdata give slightly different results. Function fitspecaccum fits nonlinear (nls)   self-starting species accumulation model. input object   can result specaccum community data frame.   latter case function first fits specaccum model   proceeds fitting nonlinear model. function can   apply limited set nonlinear regression models suggested   species-area relationship (Dengler 2009).   selfStart models. permissible alternatives   \"arrhenius\" (SSarrhenius), \"gleason\"   (SSgleason), \"gitay\" (SSgitay),   \"lomolino\" (SSlomolino) vegan   package. addition following standard R models available:   \"asymp\" (SSasymp), \"gompertz\"   (SSgompertz), \"michaelis-menten\"   (SSmicmen), \"logis\" (SSlogis),   \"weibull\" (SSweibull). See functions   model specification details. weights w used fit based accumulated   effort model = \"rarefaction\" accumulated number   individuals.  plot still based sites, unless   alternative selected xvar. Function predict fitspecaccum uses   predict.nls, can pass arguments   function. addition, fitted, residuals, nobs,   coef, AIC, logLik deviance work   result object. Function specslope evaluates derivative species   accumulation curve given number sample plots, gives   rate increase number species. function works   specaccum result object based analytic models   \"exact\", \"rarefaction\" \"coleman\",   non-linear regression results fitspecaccum. Nonlinear regression may fail reason,   fitspecaccum models fragile may succeed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Species Accumulation Curves — specaccum","text":"Function specaccum returns object class  \"specaccum\", fitspecaccum model class  \"fitspecaccum\" adds items  \"specaccum\" (see end list ): call Function call. method Accumulator method. sites Number sites.  method = \"rarefaction\"     number sites corresponding certain number     individuals generally integer, average     number individuals also returned item individuals. effort Average sum weights corresponding number     sites model fitted argument w richness number species corresponding number     sites.  method = \"collector\" observed     richness, methods average expected richness. sd standard deviation SAC (standard error).     NULL method = \"collector\",     estimated permutations method = \"random\",     analytic equations methods. perm Permutation results method = \"random\"     NULL cases. column perm holds one     permutation. weights Matrix accumulated weights corresponding     columns perm matrix model fitted     argument w. fitted, residuals, coefficients fitspecacum:      fitted values, residuals nonlinear model coefficients.      method = \"random\" matrices column      random accumulation. models fitspecaccum: list fitted     nls models (see Examples accessing models).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Species Accumulation Curves — specaccum","text":"Chiarucci, ., Bacaro, G., Rocchini, D. & Fattorini,   L. (2008). Discovering rediscovering sample-based rarefaction   formula ecological literature. Commun. Ecol. 9:   121--123. Coleman, B.D, Mares, M.., Willis, M.R. & Hsieh,   Y. (1982). Randomness, area species richness. Ecology 63:   1121--1133. Colwell, R.K., Chao, ., Gotelli, N.J., Lin, S.Y., Mao, C.X., Chazdon,   R.L. & Longino, J.T. (2012). Models estimators linking   individual-based sample-based rarefaction, extrapolation   comparison assemblages. J. Plant Ecol. 5: 3--21. Dengler, J. (2009). function describes species-area   relationship best? review empirical evaluation.    Journal Biogeography 36, 728--744. Gotelli, N.J. & Colwell, R.K. (2001). Quantifying biodiversity:   procedures pitfalls measurement comparison species   richness. Ecol. Lett. 4, 379--391.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Species Accumulation Curves — specaccum","text":"Roeland Kindt r.kindt@cgiar.org Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Species Accumulation Curves — specaccum","text":"SAC method = \"exact\"   developed Roeland Kindt, standard deviation Jari   Oksanen (unpublished). method = \"coleman\"   underestimates SAC handle properly sampling   without replacement.  , standard deviation take   account species correlations, generally low.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/specaccum.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Species Accumulation Curves — specaccum","text":"","code":"data(BCI) sp1 <- specaccum(BCI) #> Warning: the standard deviation is zero sp2 <- specaccum(BCI, \"random\") sp2 #> Species Accumulation Curve #> Accumulation method: random, with 100 permutations #> Call: specaccum(comm = BCI, method = \"random\")  #>  #>                                                                               #> Sites     1.00000   2.00000   3.00000   4.00000   5.00000   6.00000   7.00000 #> Richness 90.42000 121.29000 138.34000 150.46000 158.46000 165.38000 170.34000 #> sd        7.23931   7.43361   7.38305   6.80377   5.92959   5.07475   4.58196 #>                                                                              #> Sites      8.00000   9.00000  10.00000  11.0000  12.00000  13.00000  14.0000 #> Richness 175.02000 178.93000 182.15000 184.8500 187.47000 189.88000 191.9000 #> sd         4.43808   4.74662   4.58671   4.4093   4.23419   4.08565   4.1451 #>                                                                                #> Sites     15.00000  16.00000  17.00000  18.00000  19.00000  20.00000  21.00000 #> Richness 193.75000 195.50000 197.32000 198.94000 200.32000 201.68000 202.95000 #> sd         4.13503   4.01889   3.54447   3.53859   3.62617   3.62895   3.41528 #>                                                                              #> Sites     22.00000  23.00000  24.00000  25.00000  26.00000  27.000  28.00000 #> Richness 204.17000 205.39000 206.65000 207.73000 208.91000 209.880 210.90000 #> sd         3.47009   3.28417   3.22357   3.06448   3.06856   3.217   3.14787 #>                                                                                #> Sites     29.00000  30.00000  31.00000  32.00000  33.00000  34.00000  35.00000 #> Richness 211.64000 212.74000 213.57000 214.43000 215.15000 215.93000 216.75000 #> sd         3.12862   3.01719   3.01931   2.92069   2.76111   2.77163   2.69446 #>                                                                                #> Sites     36.00000  37.00000  38.00000  39.00000  40.00000  41.00000  42.00000 #> Richness 217.54000 218.20000 219.00000 219.61000 220.14000 220.77000 221.28000 #> sd         2.62629   2.64384   2.45361   2.22427   2.11307   1.93769   1.82618 #>                                                                               #> Sites     43.00000  44.00000  45.00000  46.00000  47.00000  48.0000  49.00000 #> Richness 221.86000 222.33000 222.85000 223.28000 223.69000 224.1400 224.60000 #> sd         1.79235   1.49784   1.45904   1.36389   1.07961   0.8764   0.58603 #>              #> Sites     50 #> Richness 225 #> sd         0 summary(sp2) #>  1 sites          2 sites         3 sites         4 sites         #>  Min.   : 77.00   Min.   :105.0   Min.   :119.0   Min.   :132.0   #>  1st Qu.: 85.00   1st Qu.:115.8   1st Qu.:134.0   1st Qu.:146.0   #>  Median : 88.00   Median :121.5   Median :139.0   Median :151.0   #>  Mean   : 90.42   Mean   :121.3   Mean   :138.3   Mean   :150.5   #>  3rd Qu.: 94.25   3rd Qu.:126.0   3rd Qu.:143.2   3rd Qu.:155.0   #>  Max.   :109.00   Max.   :144.0   Max.   :155.0   Max.   :166.0   #>  5 sites         6 sites         7 sites         8 sites       9 sites         #>  Min.   :140.0   Min.   :149.0   Min.   :157.0   Min.   :161   Min.   :166.0   #>  1st Qu.:155.0   1st Qu.:162.0   1st Qu.:168.0   1st Qu.:173   1st Qu.:176.0   #>  Median :159.0   Median :165.0   Median :171.0   Median :175   Median :179.0   #>  Mean   :158.5   Mean   :165.4   Mean   :170.3   Mean   :175   Mean   :178.9   #>  3rd Qu.:163.0   3rd Qu.:170.0   3rd Qu.:174.0   3rd Qu.:178   3rd Qu.:182.0   #>  Max.   :172.0   Max.   :176.0   Max.   :181.0   Max.   :186   Max.   :190.0   #>  10 sites        11 sites        12 sites        13 sites        #>  Min.   :170.0   Min.   :174.0   Min.   :174.0   Min.   :179.0   #>  1st Qu.:179.0   1st Qu.:182.0   1st Qu.:184.0   1st Qu.:187.0   #>  Median :183.0   Median :185.0   Median :188.0   Median :190.5   #>  Mean   :182.2   Mean   :184.8   Mean   :187.5   Mean   :189.9   #>  3rd Qu.:185.0   3rd Qu.:188.0   3rd Qu.:191.0   3rd Qu.:193.0   #>  Max.   :191.0   Max.   :193.0   Max.   :200.0   Max.   :202.0   #>  14 sites        15 sites        16 sites        17 sites        #>  Min.   :181.0   Min.   :183.0   Min.   :185.0   Min.   :188.0   #>  1st Qu.:189.0   1st Qu.:191.0   1st Qu.:193.0   1st Qu.:195.0   #>  Median :193.0   Median :194.0   Median :196.0   Median :197.5   #>  Mean   :191.9   Mean   :193.8   Mean   :195.5   Mean   :197.3   #>  3rd Qu.:194.0   3rd Qu.:196.0   3rd Qu.:198.0   3rd Qu.:200.0   #>  Max.   :203.0   Max.   :204.0   Max.   :205.0   Max.   :205.0   #>  18 sites        19 sites        20 sites        21 sites        #>  Min.   :188.0   Min.   :188.0   Min.   :190.0   Min.   :195.0   #>  1st Qu.:196.8   1st Qu.:198.0   1st Qu.:199.0   1st Qu.:201.0   #>  Median :199.0   Median :200.0   Median :202.0   Median :203.0   #>  Mean   :198.9   Mean   :200.3   Mean   :201.7   Mean   :202.9   #>  3rd Qu.:201.0   3rd Qu.:203.0   3rd Qu.:204.0   3rd Qu.:205.0   #>  Max.   :208.0   Max.   :209.0   Max.   :210.0   Max.   :211.0   #>  22 sites        23 sites        24 sites        25 sites        #>  Min.   :195.0   Min.   :199.0   Min.   :199.0   Min.   :200.0   #>  1st Qu.:202.0   1st Qu.:203.0   1st Qu.:204.0   1st Qu.:206.0   #>  Median :204.0   Median :205.0   Median :207.0   Median :207.5   #>  Mean   :204.2   Mean   :205.4   Mean   :206.7   Mean   :207.7   #>  3rd Qu.:206.2   3rd Qu.:207.0   3rd Qu.:209.0   3rd Qu.:210.0   #>  Max.   :214.0   Max.   :214.0   Max.   :214.0   Max.   :215.0   #>  26 sites        27 sites        28 sites        29 sites        #>  Min.   :203.0   Min.   :203.0   Min.   :204.0   Min.   :204.0   #>  1st Qu.:207.0   1st Qu.:208.0   1st Qu.:209.0   1st Qu.:210.0   #>  Median :209.0   Median :210.0   Median :211.0   Median :212.0   #>  Mean   :208.9   Mean   :209.9   Mean   :210.9   Mean   :211.6   #>  3rd Qu.:211.0   3rd Qu.:212.0   3rd Qu.:213.0   3rd Qu.:214.0   #>  Max.   :217.0   Max.   :218.0   Max.   :220.0   Max.   :220.0   #>  30 sites        31 sites        32 sites        33 sites        #>  Min.   :206.0   Min.   :206.0   Min.   :206.0   Min.   :207.0   #>  1st Qu.:211.0   1st Qu.:212.0   1st Qu.:213.0   1st Qu.:214.0   #>  Median :212.5   Median :213.0   Median :214.0   Median :215.0   #>  Mean   :212.7   Mean   :213.6   Mean   :214.4   Mean   :215.2   #>  3rd Qu.:215.0   3rd Qu.:215.0   3rd Qu.:216.0   3rd Qu.:216.0   #>  Max.   :221.0   Max.   :221.0   Max.   :222.0   Max.   :222.0   #>  34 sites        35 sites        36 sites        37 sites        #>  Min.   :208.0   Min.   :208.0   Min.   :208.0   Min.   :208.0   #>  1st Qu.:214.0   1st Qu.:215.0   1st Qu.:216.0   1st Qu.:217.0   #>  Median :216.0   Median :217.0   Median :218.0   Median :218.0   #>  Mean   :215.9   Mean   :216.8   Mean   :217.5   Mean   :218.2   #>  3rd Qu.:218.0   3rd Qu.:219.0   3rd Qu.:219.0   3rd Qu.:220.0   #>  Max.   :222.0   Max.   :222.0   Max.   :223.0   Max.   :224.0   #>  38 sites        39 sites        40 sites        41 sites        #>  Min.   :212.0   Min.   :212.0   Min.   :212.0   Min.   :212.0   #>  1st Qu.:217.0   1st Qu.:218.0   1st Qu.:219.0   1st Qu.:220.0   #>  Median :219.0   Median :220.0   Median :220.0   Median :221.0   #>  Mean   :219.0   Mean   :219.6   Mean   :220.1   Mean   :220.8   #>  3rd Qu.:220.2   3rd Qu.:221.0   3rd Qu.:221.0   3rd Qu.:222.0   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   #>  42 sites        43 sites        44 sites        45 sites        #>  Min.   :215.0   Min.   :215.0   Min.   :218.0   Min.   :219.0   #>  1st Qu.:220.0   1st Qu.:221.0   1st Qu.:221.0   1st Qu.:222.0   #>  Median :221.0   Median :222.0   Median :222.0   Median :223.0   #>  Mean   :221.3   Mean   :221.9   Mean   :222.3   Mean   :222.8   #>  3rd Qu.:222.2   3rd Qu.:223.0   3rd Qu.:223.2   3rd Qu.:224.0   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   #>  46 sites        47 sites        48 sites        49 sites        50 sites      #>  Min.   :220.0   Min.   :221.0   Min.   :222.0   Min.   :223.0   Min.   :225   #>  1st Qu.:222.8   1st Qu.:223.0   1st Qu.:224.0   1st Qu.:224.0   1st Qu.:225   #>  Median :223.0   Median :224.0   Median :224.0   Median :225.0   Median :225   #>  Mean   :223.3   Mean   :223.7   Mean   :224.1   Mean   :224.6   Mean   :225   #>  3rd Qu.:224.0   3rd Qu.:225.0   3rd Qu.:225.0   3rd Qu.:225.0   3rd Qu.:225   #>  Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225   plot(sp1, ci.type=\"poly\", col=\"blue\", lwd=2, ci.lty=0, ci.col=\"lightblue\") boxplot(sp2, col=\"yellow\", add=TRUE, pch=\"+\")  ## Fit Lomolino model to the exact accumulation mod1 <- fitspecaccum(sp1, \"lomolino\") coef(mod1) #>       Asym       xmid      slope  #> 258.440682   2.442061   1.858694  fitted(mod1) #>  [1]  94.34749 121.23271 137.45031 148.83053 157.45735 164.31866 169.95946 #>  [8] 174.71115 178.78954 182.34254 185.47566 188.26658 190.77402 193.04337 #> [15] 195.11033 197.00350 198.74606 200.35705 201.85227 203.24499 204.54643 #> [22] 205.76612 206.91229 207.99203 209.01150 209.97609 210.89054 211.75903 #> [29] 212.58527 213.37256 214.12386 214.84180 215.52877 216.18692 216.81820 #> [36] 217.42437 218.00703 218.56767 219.10762 219.62811 220.13027 220.61514 #> [43] 221.08369 221.53679 221.97528 222.39991 222.81138 223.21037 223.59747 #> [50] 223.97327 plot(sp1) ## Add Lomolino model using argument 'add' plot(mod1, add = TRUE, col=2, lwd=2)  ## Fit Arrhenius models to all random accumulations mods <- fitspecaccum(sp2, \"arrh\") plot(mods, col=\"hotpink\") boxplot(sp2, col = \"yellow\", border = \"blue\", lty=1, cex=0.3, add= TRUE)  ## Use nls() methods to the list of models sapply(mods$models, AIC) #>   [1] 329.2456 321.8614 331.1568 352.1309 354.8606 323.3767 322.0897 347.7218 #>   [9] 327.6283 327.3510 335.4843 308.5300 373.4959 334.3691 320.6975 338.1084 #>  [17] 330.2018 343.5560 348.5827 300.2513 315.7909 310.7837 305.5217 295.1005 #>  [25] 359.2639 342.7111 339.7456 328.4175 338.4335 368.4988 354.7097 328.8704 #>  [33] 342.1528 292.9875 328.3752 299.7201 336.5796 364.3153 336.4822 339.6666 #>  [41] 354.7445 320.7841 304.1628 314.9640 349.6753 350.7169 307.6840 296.7971 #>  [49] 359.6018 302.9863 319.6832 339.5021 328.8450 329.0553 298.0970 334.0182 #>  [57] 291.9027 349.7161 325.1376 347.7797 340.6111 338.6148 352.0292 308.8538 #>  [65] 315.1890 289.7947 351.6732 339.3587 320.3515 300.9377 323.3054 290.9419 #>  [73] 350.8587 322.6970 340.7948 334.1965 358.2890 300.7034 338.5079 338.8941 #>  [81] 341.7687 331.4553 337.5975 349.7867 331.8581 270.3068 354.5083 326.0026 #>  [89] 337.8555 322.7217 302.5019 324.7469 322.1415 324.6922 324.5427 347.2050 #>  [97] 309.1766 316.1194 343.9958 350.5935"},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":null,"dir":"Reference","previous_headings":"","what":"Extrapolated Species Richness in a Species Pool — specpool","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"functions estimate extrapolated species richness species   pool, number unobserved species. Function specpool   based incidences sample sites, gives single estimate   collection sample sites (matrix).  Function estimateR   based abundances (counts) single sample site.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"","code":"specpool(x, pool, smallsample = TRUE) estimateR(x, ...) specpool2vect(X, index = c(\"jack1\",\"jack2\", \"chao\", \"boot\",\"Species\")) poolaccum(x, permutations = 100, minsize = 3) estaccumR(x, permutations = 100, parallel = getOption(\"mc.cores\")) # S3 method for poolaccum summary(object, display, alpha = 0.05, ...) # S3 method for poolaccum plot(x, alpha = 0.05, type = c(\"l\",\"g\"), ...)"},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"x Data frame matrix species data analysis result      plot function. pool vector giving classification pooling sites     species data. missing, sites pooled together. smallsample Use small sample correction \\((N-1)/N\\),     \\(N\\) number sites within pool. X, object specpool result object. index selected index extrapolated richness. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,      permutation matrix row gives permuted indices. minsize Smallest number sampling units reported. parallel Number parallel processes predefined socket     cluster.  parallel = 1 uses ordinary, non-parallel     processing. parallel processing done parallel     package. display Indices displayed. alpha Level quantiles shown. proportion left outside     symmetric limits. type Type graph produced xyplot. ... parameters (used).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Many species always remain unseen undetected collection   sample plots.  function uses popular ways estimating   number unseen species adding observed   species richness (Palmer 1990, Colwell & Coddington 1994). incidence-based estimates specpool use frequencies   species collection sites.   following, \\(S_P\\) extrapolated richness pool,   \\(S_0\\) observed number species   collection, \\(a_1\\) \\(a_2\\) number species   occurring one two sites collection, \\(p_i\\)   frequency species \\(\\), \\(N\\) number   sites collection.  variants extrapolated richness   specpool : specpool normally uses basic Chao equation,     doubletons (\\(a2=0\\)) switches bias-corrected     version. case Chao equation simplifies     \\(S_0 + \\frac{1}{2} a_1 (a_1-1) \\frac{N-1}{N}\\). abundance-based estimates estimateR use counts     (numbers individuals) species single site. called     matrix data frame, function give separate estimates     site.  two variants extrapolated richness     estimateR bias-corrected Chao ACE (O'Hara 2005, Chiu     et al. 2014).  Chao estimate similar bias corrected     one , \\(a_i\\) refers number species     abundance \\(\\) instead number sites, small-sample     correction used. ACE estimate defined :  \\(a_i\\) refers number species abundance \\(\\)      \\(S_{rare}\\) number rare     species,      \\(S_{abund}\\) number abundant species,     arbitrary      threshold abundance 10 rare species, \\(N_{rare}\\)     number      individuals rare species. Functions estimate standard errors estimates.     concern number added species, assume     variance observed richness.  equations standard errors     complicated reproduced help page, can     studied R source code function discussed     vignette can read     browseVignettes(\"vegan\"). standard error based     following sources: Chiu et al. (2014) Chao estimates     Smith van Belle (1984) first-order Jackknife     bootstrap (second-order jackknife still missing).      variance estimator \\(S_{ace}\\) see O'Hara (2005). Functions poolaccum estaccumR similar   specaccum, estimate extrapolated richness indices   specpool estimateR addition number   species random ordering sampling units. Function   specpool uses presence data estaccumR count   data. functions share summary plot   methods. summary returns quantile envelopes   permutations corresponding given level alpha   standard deviation permutations sample size. NB.,   based standard deviations estimated within specpool   estimateR, based permutations.   plot function shows mean envelope permutations   given alpha models. selection models can   restricted order changes using display argument   summary plot. configuration plot   command, see xyplot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Function specpool returns data frame entries   observed richness indices class  pool vector.  utility function specpool2vect maps   pooled values vector giving value selected  index original site. Function estimateR returns estimates standard errors   site. Functions poolaccum estimateR return   matrices permutation results richness estimator,   vector sample sizes table means permutations   estimator.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Chao, . (1987). Estimating population size capture-recapture   data unequal catchability. Biometrics 43, 783--791. Chiu, C.H., Wang, Y.T., Walther, B.. & Chao, . (2014). Improved   nonparametric lower bound species richness via modified   Good-Turing frequency formula. Biometrics 70, 671--682. Colwell, R.K. & Coddington, J.. (1994). Estimating terrestrial   biodiversity   extrapolation. Phil. Trans. Roy. Soc. London B 345, 101--118. O'Hara, R.B. (2005). Species richness estimators: many species   can dance head pin? J. Anim. Ecol. 74, 375--386. Palmer, M.W. (1990). estimation species richness   extrapolation. Ecology 71, 1195--1198. Smith, E.P & van Belle, G. (1984). Nonparametric estimation   species richness. Biometrics 40, 119--129.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"Bob O'Hara (estimateR) Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"functions based assumption species   pool: community closed fixed pool size   \\(S_P\\).  general, functions give lower limit   species richness: real richness \\(S >= S_P\\),   consistent bias estimates. Even bias-correction Chao   reduces bias, remove completely (Chiu et   al. 2014). Optional small sample correction added specpool   vegan 2.2-0. used older literature (Chao   1987), recommended recently (Chiu et al. 2014).","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/specpool.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Extrapolated Species Richness in a Species Pool — specpool","text":"","code":"data(dune) data(dune.env) pool <- with(dune.env, specpool(dune, Management)) pool #>    Species     chao   chao.se    jack1 jack1.se    jack2     boot  boot.se n #> BF      16 17.19048 1.5895675 19.33333 2.211083 19.83333 17.74074 1.646379 3 #> HF      21 21.51429 0.9511693 23.40000 1.876166 22.05000 22.56864 1.821518 5 #> NM      21 22.87500 2.1582871 26.00000 3.291403 25.73333 23.77696 2.300982 6 #> SF      21 29.88889 8.6447967 27.66667 3.496029 31.40000 23.99496 1.850288 6 op <- par(mfrow=c(1,2)) boxplot(specnumber(dune) ~ Management, data = dune.env,         col = \"hotpink\", border = \"cyan3\") boxplot(specnumber(dune)/specpool2vect(pool) ~ Management,         data = dune.env, col = \"hotpink\", border = \"cyan3\")  par(op) data(BCI) ## Accumulation model pool <- poolaccum(BCI) summary(pool, display = \"chao\") #> $chao #>        N     Chao     2.5%    97.5%   Std.Dev #>  [1,]  3 162.3374 142.5272 186.2227 11.217082 #>  [2,]  4 176.1243 156.4704 206.3243 12.158304 #>  [3,]  5 183.8507 162.9868 209.2821 12.488675 #>  [4,]  6 188.9018 165.6732 214.2779 12.888148 #>  [5,]  7 193.8679 175.8712 216.1384 11.602711 #>  [6,]  8 199.0315 180.2949 227.8918 12.604562 #>  [7,]  9 202.0946 183.3317 228.8381 11.958432 #>  [8,] 10 204.9843 185.3556 227.5898 12.637762 #>  [9,] 11 206.6160 186.7205 234.5167 11.679759 #> [10,] 12 209.1286 189.2824 232.6359 12.351073 #> [11,] 13 211.3655 191.7918 232.0423 11.991967 #> [12,] 14 212.8128 195.8592 239.3318 11.537817 #> [13,] 15 215.5275 198.2739 239.7978 11.422201 #> [14,] 16 218.7094 198.3891 243.3826 12.165145 #> [15,] 17 221.6814 197.6029 256.5328 14.464302 #> [16,] 18 222.7418 201.4964 257.9494 13.227892 #> [17,] 19 224.8619 206.6236 251.9979 13.165360 #> [18,] 20 226.3324 210.2832 249.5616 12.858116 #> [19,] 21 228.4284 210.9920 257.9636 13.784663 #> [20,] 22 228.8425 211.1903 254.3500 11.629250 #> [21,] 23 230.6429 214.1737 251.1681 10.510649 #> [22,] 24 231.9109 213.0874 252.7553 10.925851 #> [23,] 25 232.9972 214.3610 258.4917 11.207306 #> [24,] 26 233.8067 216.9697 263.2733 11.546339 #> [25,] 27 235.6347 217.3831 266.9230 12.800245 #> [26,] 28 235.8942 218.6913 261.4115 11.761873 #> [27,] 29 235.9612 218.6591 258.5682 11.133700 #> [28,] 30 236.6706 219.4315 259.9315 10.291499 #> [29,] 31 236.8530 220.2338 259.2903  9.810390 #> [30,] 32 237.6018 221.4868 262.0864 10.195825 #> [31,] 33 237.4291 222.2990 256.2778  9.227891 #> [32,] 34 237.6712 222.7844 258.2268  8.979536 #> [33,] 35 237.7856 222.2750 257.2540  8.537867 #> [34,] 36 238.4325 223.6473 255.5610  8.566487 #> [35,] 37 238.1834 224.9892 253.5811  7.776992 #> [36,] 38 238.4685 225.2802 254.0155  7.626532 #> [37,] 39 238.2082 226.0390 252.7975  7.642443 #> [38,] 40 238.7991 227.1971 254.1619  7.155802 #> [39,] 41 239.2246 227.3368 258.5178  7.926574 #> [40,] 42 238.4935 228.5195 256.2137  7.287824 #> [41,] 43 238.3856 227.8327 255.8470  7.300153 #> [42,] 44 238.0092 228.5279 252.9488  6.520961 #> [43,] 45 238.1537 228.7980 253.3757  6.443894 #> [44,] 46 238.0532 230.5990 250.9539  5.466587 #> [45,] 47 237.7542 231.3089 251.0192  4.821564 #> [46,] 48 237.2842 231.9015 248.6399  4.038862 #> [47,] 49 236.8407 233.3115 245.4082  2.803888 #> [48,] 50 236.3732 236.3732 236.3732  0.000000 #>  #> attr(,\"class\") #> [1] \"summary.poolaccum\" plot(pool)  ## Quantitative model estimateR(BCI[1:5,]) #>                   1          2          3          4          5 #> S.obs     93.000000  84.000000  90.000000  94.000000 101.000000 #> S.chao1  117.473684 117.214286 141.230769 111.550000 136.000000 #> se.chao1  11.583785  15.918953  23.001405   8.919663  15.467344 #> S.ACE    122.848959 117.317307 134.669844 118.729941 137.114088 #> se.ACE     5.736054   5.571998   6.191618   5.367571   5.848474"},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":null,"dir":"Reference","previous_headings":"","what":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Distance-based ordination (dbrda,   capscale, metaMDS) information   species, methods may add species scores community   data available. However, species scores may missing (  always dbrda), may   close relation used dissimilarity index. function add   species scores replace existing species scores   distance-based methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"","code":"sppscores(object) <- value"},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"object Ordination result. value Community data find species scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Distances information species (columns, variables),   hence distance-based ordination information species   scores. However, species scores can added supplementary   information analysis help interpretation   results. ordination methods (capscale,   metaMDS) can supplement species scores   analysis community data available analysis. capscale species scores found projecting   community data site ordination (linear combination scores),   scores accurate analysis used Euclidean   distances. dissimilarity index can expressed Euclidean   distances transformed data (instance, Chord Hellinger   Distances), species scores based transformed data   accurate, function still finds dissimilarities   untransformed data. Usually community dissimilarities differ two   significant ways Euclidean distances: bound maximum   1, use absolute differences instead squared   differences. cases, may better use species scores   transformed Euclidean distances good   linear relation used dissimilarities. often useful   standardize data row unit total, perform   squareroot transformation damp effect squared   differences (see Examples). Function dbrda never finds species scores,   mathematically similar capscale, similar   rules followed supplementing species scores. Function metaMDS uses weighted averages   (wascores) find species scores.   better relationship dissimilarities projection   scores used metric ordination, similar transformation   community data used dissimilarities species   scores.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Replacement function adds species scores replaces old   scores ordination object.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/sppscores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add or Replace Species Scores in Distance-Based Ordination — sppscores","text":"","code":"data(BCI, BCI.env) mod <- dbrda(vegdist(BCI) ~ Habitat, BCI.env) ## add species scores sppscores(mod) <- BCI ## Euclidean distances of BCI differ from used dissimilarity plot(vegdist(BCI), dist(BCI))  ## more linear relationship plot(vegdist(BCI), dist(sqrt(decostand(BCI, \"total\"))))  ## better species scores sppscores(mod) <- sqrt(decostand(BCI, \"total\"))"},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":null,"dir":"Reference","previous_headings":"","what":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Function stepacross tries replace dissimilarities   shortest paths stepping across intermediate    sites regarding dissimilarities threshold missing   data (NA). path = \"shortest\" flexible shortest   path (Williamson 1978, Bradfield & Kenkel 1987),   path = \"extended\"   approximation known extended dissimilarities (De'ath 1999).   use stepacross improve ordination high   beta diversity, many sites species common.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"","code":"stepacross(dis, path = \"shortest\", toolong = 1, trace = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"dis Dissimilarity data inheriting class dist     object, matrix, can converted     dissimilarity matrix. Functions vegdist     dist functions producing suitable     dissimilarity data. path method stepping across (partial match)     Alternative \"shortest\" finds shortest paths,     \"extended\"  approximation known extended     dissimilarities. toolong Shortest dissimilarity regarded NA.     function uses fuzz factor,     dissimilarities close limit made NA, . trace Trace calculations. ... parameters (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Williamson (1978) suggested using flexible shortest paths estimate   dissimilarities sites nothing common, shared   species. path = \"shortest\" function stepacross   replaces dissimilarities   toolong longer NA, tries find shortest   paths sites using remaining dissimilarities. Several   dissimilarity indices semi-metric means   obey triangle inequality \\(d_{ij} \\leq d_{ik} + d_{kj}\\), shortest path algorithm can replace   dissimilarities well, even shorter   toolong. De'ath (1999) suggested simplified method known extended   dissimilarities, calculated path = \"extended\".    method, dissimilarities   toolong longer first made NA, function   tries replace NA dissimilarities path   single stepping stone points. NA    replaced one pass, function make new passes updated   dissimilarities long   NA replaced extended dissimilarities. mean   second passes, remaining NA   dissimilarities allowed one stepping stone site,   previously replaced dissimilarities updated. ,   function consider dissimilarities shorter toolong,   although replaced shorter path   semi-metric indices, used part paths. optimal   cases, extended dissimilarities equal shortest paths,   may longer. alternative defining long dissimilarities parameter   toolong, input dissimilarities can contain NAs.   toolong zero negative, function make   dissimilarities NA. NAs   input  toolong = 0, path = \"shortest\"   find shorter paths semi-metric indices, path = \"extended\"    nothing. Function .shared can   used set dissimilarities NA. data disconnected path points,   result   contain NAs warning issued. Several methods   handle NA dissimilarities, warning taken   seriously. Function distconnected can used find   connected groups remove rare outlier observations groups   observations. Alternative path = \"shortest\" uses Dijkstra's method   finding flexible shortest paths, implemented priority-first search   dense graphs (Sedgewick 1990). Alternative path = \"extended\"    follows De'ath (1999), implementation simpler   code.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Function returns object class dist extended   dissimilarities (see functions vegdist  dist).    value path appended method attribute.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Bradfield, G.E. & Kenkel, N.C. (1987). Nonlinear ordination using   flexible shortest path adjustment ecological   distances. Ecology 68, 750--753. De'ath, G. (1999). Extended dissimilarity: method robust   estimation ecological distances high beta diversity   data. Plant Ecol. 144, 191--199. Sedgewick, R. (1990). Algorithms C. Addison Wesley. Williamson, M.H. (1978). ordination incidence   data. J. Ecol. 66, 911-920.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"function changes original dissimilarities,   like . may best  use    function really must:  extremely high   beta diversity large proportion dissimilarities   upper limit (species common). Semi-metric indices vary degree violating triangle   inequality. Morisita Horn--Morisita indices   vegdist may strongly semi-metric, shortest   paths can change indices much. Mountford index violates   basic rules dissimilarities: non-identical sites zero   dissimilarity species composition poorer site subset   richer. Mountford index, can find three sites \\(, j,     k\\) \\(d_{ik} = 0\\) \\(d_{jk} = 0\\), \\(d_{ij} > 0\\). results stepacross   Mountford index can weird. stepacross needed,   best try use metric indices .","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/stepacross.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Stepacross as Flexible Shortest Paths or Extended Dissimilarities — stepacross","text":"","code":"# There are no data sets with high beta diversity in vegan, but this # should give an idea. data(dune) dis <- vegdist(dune) edis <- stepacross(dis) #> Too long or NA distances: 5 out of 190 (2.6%) #> Stepping across 190 dissimilarities... plot(edis, dis, xlab = \"Shortest path\", ylab = \"Original\")  ## Manhattan distance have no fixed upper limit. dis <- vegdist(dune, \"manhattan\") is.na(dis) <- no.shared(dune) dis <- stepacross(dis, toolong=0) #> Too long or NA distances: 5 out of 190 (2.6%) #> Stepping across 190 dissimilarities..."},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Functions plot ordination distances given number dimensions   observed distances distances full space eigenvector   methods. display similar Shepard diagram   (stressplot non-metric multidimensional scaling   metaMDS monoMDS), shows   linear relationship eigenvector ordinations.   stressplot methods available wcmdscale,   rda, cca, capscale,   dbrda, prcomp princomp.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"","code":"# S3 method for wcmdscale stressplot(object, k = 2, pch, p.col = \"blue\", l.col = \"red\",     lwd = 2, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"object Result object eigenvector ordination (wcmdscale,     rda, cca, capscale) k Number dimensions ordination distances displayed. pch, p.col, l.col, lwd Plotting character, point colour line colour like     default stressplot ... parameters functions, e.g. graphical parameters.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"functions offer similar display eigenvector   ordinations standard Shepard diagram (stressplot)   non-metric multidimensional scaling. ordination distances   given number dimensions plotted observed   distances. metric distances, ordination distances full   space (ordination axes) equal observed distances,   fit line shows equality. general, fit line go   points, points observed distances approach   fit line . However, non-Euclidean distances (  wcmdscale capscale) negative   eigenvalues ordination distances can exceed observed distances   real dimensions; imaginary dimensions negative eigenvalues   correct excess distances. used   capscale wcmdscale argument   add avoid negative eigenvalues, ordination distances   exceed observed dissimilarities. partial ordination (cca, rda   capscale Condition formula),   distances partial component included observed   distances ordination distances.  k=0,   ordination distances refer partial ordination.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Functions draw graph return invisibly ordination distances   ordination distances.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"Jari Oksanen.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/stressplot.wcmdscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Ordination Distances Against Observed Distances in Eigenvector Ordinations — stressplot.wcmdscale","text":"","code":"data(dune, dune.env) mod <- rda(dune) stressplot(mod)  mod <- rda(dune ~ Management, dune.env) stressplot(mod, k=3)"},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":null,"dir":"Reference","previous_headings":"","what":"Indices of Taxonomic Diversity and Distinctness — taxondive","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Function finds indices taxonomic diversity distinctness,   averaged taxonomic distances among species individuals   community (Clarke & Warwick 1998, 2001)","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"","code":"taxondive(comm, dis, match.force = FALSE) taxa2dist(x, varstep = FALSE, check = TRUE, labels)"},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"comm Community data. dis Taxonomic distances among taxa comm.     dist object symmetric square matrix. match.force Force matching column names comm     labels dis. FALSE, matching happens     dimensions differ, case species must identical     order . x Classification table row species     basic taxon, columns     identifiers classification higher levels. varstep Vary step lengths successive levels     relative proportional loss number distinct classes. check TRUE, remove redundant levels     different rows constant rows regard row     different basal taxon (species). FALSE     levels retained basal taxa (species) also must coded     variables (columns). get warning species     coded, can ignore intention. labels labels attribute taxonomic distances. Row     names used given. Species matched     labels comm dis taxondive     different dimensions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Clarke & Warwick (1998, 2001) suggested several alternative indices   taxonomic diversity distinctness. Two basic indices called   taxonomic diversity (\\(\\Delta\\)) distinctness (\\(\\Delta^*\\)): equations give index value single site, summation   goes species \\(\\) \\(j\\). \\(\\omega\\) taxonomic   distances among taxa, \\(x\\) species abundances, \\(n\\)   total abundance site.    presence/absence  data indices reduce index   \\(\\Delta^+\\), index Clarke & Warwick (1998) also   estimate standard deviation. Clarke & Warwick (2001)    presented two new indices: \\(s\\Delta^+\\) product species   richness \\(\\Delta^+\\), index variation   taxonomic distinctness (\\(\\Lambda^+\\)) defined dis argument must species dissimilarities. must   similar dissimilarities produced dist.   customary integer steps taxonomic hierarchies,   kind dissimilarities can used, phylogenetic   trees genetic differences.  , dis need   taxonomic, species classifications can used. Function taxa2dist can produce suitable dist object   classification table. species (basic taxon) corresponds   row classification table, columns give   classification different levels. varstep = FALSE   successive levels separated equal steps,   varstep = TRUE step length relative proportional   decrease number classes (Clarke & Warwick 1999).   check = TRUE, function removes classes distinct   species combine species one class, assumes   row presents distinct basic taxon. function scales   distances longest path length   taxa 100 (necessarily check = FALSE). Function plot.taxondive plots \\(\\Delta^+\\) Number   species, together expectation approximate 2*sd   limits. Function summary.taxondive finds \\(z\\) values   significances Normal distribution \\(\\Delta^+\\).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Function returns object class taxondive following items: Species Number species site. D, Dstar, Dplus, SDplus, Lambda \\(\\Delta\\), \\(\\Delta^*\\),     \\(\\Delta^+\\),  \\(s\\Delta^+\\) \\(\\Lambda^+\\)      site. sd.Dplus Standard deviation \\(\\Delta^+\\). ED, EDstar, EDplus Expected values corresponding     statistics. Function taxa2dist returns object class \"dist\",   attribute \"steps\" step lengths successive levels.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Clarke, K.R & Warwick, R.M. (1998) taxonomic distinctness index  statistical properties. Journal Applied Ecology 35,  523--531. Clarke, K.R. & Warwick, R.M. (1999) taxonomic distinctness measure  biodiversity: weighting step lengths hierarchical  levels. Marine Ecology Progress Series 184: 21--29. Clarke, K.R. & Warwick, R.M. (2001) biodiversity index  applicable species lists: variation taxonomic  distinctness. Marine Ecology Progress Series 216, 265--278.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"Jari Oksanen","code":""},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"function still preliminary may change. scaling   taxonomic dissimilarities influences results. multiply   taxonomic distances (step lengths) constant, values   Deltas multiplied constant, value   \\(\\Lambda^+\\) square constant.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/taxondive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Indices of Taxonomic Diversity and Distinctness — taxondive","text":"","code":"## Preliminary: needs better data and some support functions data(dune) data(dune.taxon) # Taxonomic distances from a classification table with variable step lengths. taxdis <- taxa2dist(dune.taxon, varstep=TRUE) plot(hclust(taxdis), hang = -1)  # Indices mod <- taxondive(dune, taxdis) mod #>           Species    Delta   Delta*  Lambda+   Delta+ S Delta+ #> 1           5.000   22.736   29.232  900.298   43.364   216.82 #> 2          10.000   51.046   55.988  822.191   56.232   562.32 #> 3          10.000   41.633   46.194 1025.471   62.869   628.69 #> 4          13.000   50.795   55.140  888.244   64.837   842.88 #> 5          14.000   63.498   67.856  715.393   69.211   968.95 #> 6          11.000   70.201   76.361  628.743   73.281   806.09 #> 7          13.000   61.605   66.187  679.337   69.918   908.94 #> 8          12.000   52.544   56.374  756.375   66.729   800.74 #> 9          13.000   50.526   54.108  849.448   63.205   821.67 #> 10         12.000   60.068   64.960  730.736   69.291   831.49 #> 11          9.000   69.589   77.740  404.609   77.803   700.23 #> 12          9.000   62.405   69.795  552.129   74.470   670.23 #> 13         10.000   47.316   53.842  536.429   66.657   666.57 #> 14          7.000   71.383   82.091  239.543   82.013   574.09 #> 15          8.000   68.564   77.097  334.889   79.010   632.08 #> 16          8.000   55.984   64.400  978.014   69.708   557.66 #> 17          7.000   53.913   60.222  632.990   59.286   415.00 #> 18          9.000   73.235   81.865  438.355   76.288   686.59 #> 19          9.000   68.727   76.091  336.364   78.636   707.73 #> 20          8.000   72.343   80.670  444.915   82.078   656.62 #> Expected            65.330   62.560            71.031          summary(mod) #>            Delta  Delta*  Delta+ sd(Delta+) z(Delta+) Pr(>|z|)    #> 1        22.7362 29.2322 43.3636    10.0499   -2.7530 0.005905 ** #> 2        51.0458 55.9878 56.2323     5.7727   -2.5636 0.010359 *  #> 3        41.6334 46.1936 62.8687     5.7727   -1.4140 0.157360    #> 4        50.7952 55.1396 64.8368     4.5677   -1.3562 0.175047    #> 5        63.4979 67.8564 69.2108     4.2482   -0.4285 0.668251    #> 6        70.2011 76.3614 73.2810     5.3189    0.4229 0.672332    #> 7        61.6049 66.1871 69.9184     4.5677   -0.2437 0.807499    #> 8        52.5437 56.3743 66.7287     4.9215   -0.8743 0.381975    #> 9        50.5258 54.1079 63.2051     4.5677   -1.7134 0.086640 .  #> 10       60.0680 64.9597 69.2906     4.9215   -0.3537 0.723567    #> 11       69.5894 77.7396 77.8030     6.3011    1.0747 0.282517    #> 12       62.4049 69.7949 74.4697     6.3011    0.5457 0.585290    #> 13       47.3158 53.8421 66.6566     5.7727   -0.7578 0.448548    #> 14       71.3834 82.0909 82.0130     7.7069    1.4249 0.154186    #> 15       68.5645 77.0970 79.0097     6.9314    1.1510 0.249714    #> 16       55.9840 64.3999 69.7078     6.9314   -0.1909 0.848565    #> 17       53.9134 60.2224 59.2857     7.7069   -1.5240 0.127501    #> 18       73.2349 81.8645 76.2879     6.3011    0.8342 0.404155    #> 19       68.7273 76.0909 78.6364     6.3011    1.2069 0.227457    #> 20       72.3431 80.6704 82.0779     6.9314    1.5937 0.111005    #> Expected 65.3302 62.5603 71.0313                                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 plot(mod)"},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":null,"dir":"Reference","previous_headings":"","what":"Species tolerances and sample heterogeneities — tolerance","title":"Species tolerances and sample heterogeneities — tolerance","text":"Species tolerances sample heterogeneities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Species tolerances and sample heterogeneities — tolerance","text":"","code":"tolerance(x, ...)  # S3 method for cca tolerance(x, choices = 1:2, which = c(\"species\",\"sites\"),           scaling = \"species\", useN2 = TRUE, hill = FALSE, ...)  # S3 method for decorana tolerance(x, data, choices = 1:4,           which = c(\"sites\", \"species\"), useN2 = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Species tolerances and sample heterogeneities — tolerance","text":"Function compute species tolerances site heterogeneity measures   unimodal ordinations (CCA & CA). Implements Eq 6.47 6.48   Canoco 4.5 Reference Manual (pages 178--179).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Species tolerances and sample heterogeneities — tolerance","text":"Matrix tolerances/heterogeneities additional   attributes: , scaling, N2, latter   NA useN2 = FALSE N2   estimated.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Species tolerances and sample heterogeneities — tolerance","text":"Gavin L. Simpson Jari Oksanen (decorana method).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Species tolerances and sample heterogeneities — tolerance","text":"x object class \"cca\". choices numeric; ordination axes compute     tolerances heterogeneities . Defaults axes 1 2. character; one \"species\" \"sites\",     indicating whether species tolerances sample heterogeneities     respectively computed. scaling character numeric; ordination scaling     use. See scores.cca details. hill logical; scaling character,     control whether Hill's scaling used (C)CA     respectively. See scores.cca details. useN2 logical; bias tolerances /     heterogeneities reduced via scaling Hill's N2? data Original input data used decorana.      missing, function tries get data used     decorana call. ... arguments passed methods.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tolerance.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Species tolerances and sample heterogeneities — tolerance","text":"","code":"data(dune) data(dune.env) mod <- cca(dune ~ ., data = dune.env)  ## defaults to species tolerances tolerance(mod) #>  #> Species Tolerance #>  #> Scaling: 2 #>  #>                CCA1      CCA2 #> Achimill 0.32968099 0.9241988 #> Agrostol 0.93670069 0.9238455 #> Airaprae 1.04694096 0.5889849 #> Alopgeni 0.72227472 0.3760138 #> Anthodor 1.00596787 0.8338212 #> Bellpere 0.32891011 0.9962790 #> Bromhord 0.27740999 0.6236199 #> Chenalbu 0.00000000 0.0000000 #> Cirsarve 0.00000000 0.0000000 #> Comapalu 0.47185632 0.8029414 #> Eleopalu 0.50344134 0.9384960 #> Elymrepe 0.35119963 0.5642491 #> Empenigr 0.00000000 0.0000000 #> Hyporadi 1.05840696 0.7523003 #> Juncarti 0.78397702 1.0686743 #> Juncbufo 0.69275956 0.6180830 #> Lolipere 0.51006235 0.8278177 #> Planlanc 0.36040676 0.6962294 #> Poaprat  0.58184277 0.9547104 #> Poatriv  0.78695928 0.7433503 #> Ranuflam 0.56576326 1.1725628 #> Rumeacet 0.58715663 0.8751491 #> Sagiproc 0.70922180 1.1153129 #> Salirepe 0.98530179 0.1077917 #> Scorautu 1.04355761 1.0724439 #> Trifprat 0.03045846 0.3651949 #> Trifrepe 1.21543364 0.9115613 #> Vicilath 0.24853962 0.6194084 #> Bracruta 1.03787313 1.0958331 #> Callcusp 0.57882025 1.0418623 #>   ## sample heterogeneities for CCA axes 1:6 tolerance(mod, which = \"sites\", choices = 1:6) #>  #> Sample Heterogeneity #>  #> Scaling: 2 #>  #>         CCA1      CCA2      CCA3      CCA4      CCA5      CCA6 #> 1  0.2350112 0.8611530 1.7964571 0.4445499 2.4235732 0.5496289 #> 2  0.7100754 0.4136311 0.8151643 0.6311751 1.0467901 0.2514646 #> 3  0.5076492 0.7279717 0.8306874 0.5590739 0.3904998 0.9162012 #> 4  0.5955037 0.6901907 0.7931255 0.4873638 0.3966068 0.8700581 #> 5  0.6001048 0.5614830 1.1481560 0.3569604 0.4423909 1.9420043 #> 6  0.7272637 0.6867342 1.6068628 0.7778498 0.9187843 0.4938865 #> 7  0.6478967 0.4993262 0.7207318 0.3817131 0.4130713 0.7228173 #> 8  0.8563491 0.5498552 0.4217718 0.3370226 0.3013276 0.9535190 #> 9  0.5599722 0.7399384 0.4170304 1.0535541 1.4612437 0.7626183 #> 10 0.5210280 0.5806978 0.5856634 0.4174860 1.8559344 0.8890262 #> 11 0.4489323 0.6016877 0.3317371 1.8780211 1.2965939 2.1953737 #> 12 0.4948094 1.1084494 0.5226746 1.5064446 0.5703077 1.1561020 #> 13 0.6998985 0.8859365 0.4215474 0.8582272 0.5673698 0.5186678 #> 14 1.5925779 0.6747926 0.8927360 1.6798300 0.3480218 0.1575892 #> 15 1.0107648 0.5294221 1.0975629 1.7632888 0.2240900 0.3727240 #> 16 0.8031479 0.6058313 0.4871527 0.4227451 0.5341256 0.6990815 #> 17 0.5936276 1.5142792 0.5137979 1.0224938 1.7931775 0.6261853 #> 18 0.5689409 1.4067575 0.6398557 0.4983399 0.4364791 0.6590394 #> 19 1.1330387 0.9816332 1.1242398 0.7238920 0.5577662 0.7036044 #> 20 0.6737757 1.4458326 1.4380928 1.0959027 0.4142423 0.5332460 #>  ## average should be 1 with scaling = \"sites\", hill = TRUE tol <- tolerance(mod, which = \"sites\", scaling = \"sites\", hill = TRUE,    choices = 1:4) colMeans(tol) #>     CCA1     CCA2     CCA3     CCA4  #> 1.059199 1.048823 1.000551 1.077612  apply(tol, 2, sd) #>      CCA1      CCA2      CCA3      CCA4  #> 0.3174462 0.2793521 0.3714540 0.2681931  ## Rescaling tries to set all tolerances to 1 tol <- tolerance(decorana(dune)) colMeans(tol) #>      DCA1      DCA2      DCA3      DCA4  #> 0.9817657 0.9249544 0.9444811 0.9821666  apply(tol, 2, sd) #>      DCA1      DCA2      DCA3      DCA4  #> 0.1977777 0.3204058 0.2646872 0.1210543"},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":null,"dir":"Reference","previous_headings":"","what":"Functional Diversity and Community Distances from Species Trees — treedive","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Functional diversity defined total branch   length trait dendrogram connecting species, excluding   unnecessary root segments tree (Petchey Gaston   2006). Tree distance increase total branch length   combining two sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"","code":"treedive(comm, tree, match.force = TRUE, verbose = TRUE) treeheight(tree) treedist(x, tree, relative = TRUE, match.force = TRUE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"comm, x Community data frame matrix. tree dendrogram treedive must species     (columns). match.force Force matching column names data     (comm, x) labels tree. FALSE,     matching happens dimensions differ (warning     message). order data must match order tree     matching names done. verbose Print diagnostic messages warnings. relative Use distances relative height combined tree. ... arguments passed functions (ignored).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Function treeheight finds sum lengths connecting   segments dendrogram produced hclust,   dendrogram can coerced correct type using   .hclust. applied clustering species   traits, measure functional diversity (Petchey Gaston   2002, 2006), applied phylogenetic trees   phylogenetic diversity. Function treedive finds treeheight site   (row) community matrix. function uses subset   dendrogram species occur site, excludes   tree root needed connect species (Petchey   Gaston 2006). subset dendrogram found first   calculating cophenetic distances input   dendrogram, reconstructing dendrogram subset   cophenetic distance matrix species occurring   site. Diversity 0 one species, NA empty   communities. Function treedist finds dissimilarities among   trees. Pairwise dissimilarity two trees found combining   species common tree seeing much tree height   shared much unique. relative = FALSE   dissimilarity defined \\(2 (\\cup B) - - B\\),   \\(\\) \\(B\\) heights component trees   \\(\\cup B\\) height combined tree. relative = TRUE   dissimilarity \\((2(\\cup B)--B)/(\\cup B)\\).    Although latter formula similar   Jaccard dissimilarity (see vegdist,   designdist), range \\(0 \\ldots 1\\), since combined tree can add new root. two zero-height   trees combined tree zero height, relative   index attains maximum value \\(2\\). dissimilarity zero   combined zero-height tree. functions need dendrogram species traits phylogenies   input. species traits contain factor   ordered factor variables, recommended use Gower   distances mixed data (function daisy   package cluster), usually recommended clustering method   UPGMA (method = \"average\" function hclust)   (Podani Schmera 2006). Phylogenetic trees can changed   dendrograms using function .hclust.phylo   ape package. possible analyse non-randomness tree diversity   using oecosimu. needs specifying adequate Null   model, results change choice.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"vector diversity values single tree height,   dissimilarity structure inherits dist   can used similarly.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Lozupone, C. Knight, R. 2005. UniFrac: new phylogenetic method   comparing microbial communities. Applied Environmental   Microbiology 71, 8228--8235. Petchey, O.L. Gaston, K.J. 2002. Functional diversity (FD), species   richness community composition. Ecology Letters 5,   402--411. Petchey, O.L. Gaston, K.J. 2006. Functional diversity: back   basics looking forward. Ecology Letters 9, 741--758. Podani J. Schmera, D. 2006. dendrogram-based methods   functional diversity. Oikos 115, 179--185.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/treedive.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Functional Diversity and Community Distances from Species Trees — treedive","text":"","code":"## There is no data set on species properties yet, and we demonstrate ## the methods using phylogenetic trees data(dune) data(dune.phylodis) cl <- hclust(dune.phylodis) treedive(dune, cl) #> forced matching of 'tree' labels and 'comm' names #>         1         2         3         4         5         6         7         8  #>  384.0913  568.8791 1172.9455 1327.9317 1426.9067 1391.1628 1479.5062 1523.0792  #>         9        10        11        12        13        14        15        16  #> 1460.0423 1316.4832 1366.9960 1423.5582  895.1120 1457.2705 1505.9501 1187.5165  #>        17        18        19        20  #>  517.6920 1394.5162 1470.4671 1439.5571  ## Significance test using Null model communities. ## The current choice fixes numbers of species and picks species ## proportionally to their overall frequency oecosimu(dune, treedive, \"r1\", tree = cl, verbose = FALSE) #> Warning: nullmodel transformed 'comm' to binary data #> oecosimu object #>  #> Call: oecosimu(comm = dune, nestfun = treedive, method = \"r1\", tree = #> cl, verbose = FALSE) #>  #> nullmodel method ‘r1’ with 99 simulations #>  #> alternative hypothesis: statistic is less or greater than simulated values #>  #>    statistic       SES    mean    2.5%     50%  97.5% Pr(sim.)    #> 1     384.09 -1.238698  773.72  383.47  628.63 1237.7     0.11    #> 2     568.88 -2.353877 1222.61  663.93 1337.50 1561.4     0.01 ** #> 3    1172.95 -0.136353 1210.76  679.53 1327.94 1581.5     0.63    #> 4    1327.93 -0.418624 1427.25  886.63 1505.15 1733.1     0.45    #> 5    1426.91 -0.322462 1496.97  926.98 1559.25 1734.4     0.43    #> 6    1391.16  0.254066 1326.70  753.19 1408.30 1634.7     0.87    #> 7    1479.51  0.280433 1407.90  880.79 1476.23 1735.1     0.99    #> 8    1523.08  0.567886 1389.63  792.74 1428.01 1655.3     0.65    #> 9    1460.04  0.065245 1448.21  899.67 1472.92 1654.4     0.87    #> 10   1316.48 -0.192836 1362.43  708.60 1441.63 1608.0     0.47    #> 11   1367.00  0.768160 1150.05  621.65 1266.73 1486.4     0.43    #> 12   1423.56  1.101039 1088.13  622.24 1208.95 1474.2     0.25    #> 13    895.11 -0.972053 1188.10  656.34 1325.53 1558.5     0.61    #> 14   1457.27  1.477151  980.91  491.11 1101.65 1459.3     0.07 .  #> 15   1505.95  1.532058 1052.35  575.91 1171.88 1460.7     0.03 *  #> 16   1187.52  0.306608 1089.58  543.75 1238.26 1490.7     0.89    #> 17    517.69 -1.446211  959.50  504.26 1101.16 1367.8     0.09 .  #> 18   1394.52  0.961778 1099.50  618.22 1249.49 1493.8     0.33    #> 19   1470.47  1.134795 1121.18  564.70 1240.26 1562.8     0.15    #> 20   1439.56  1.160566 1104.59  629.08 1244.20 1467.4     0.17    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Phylogenetically ordered community table dtree <- treedist(dune, cl) tabasco(dune, hclust(dtree), cl)  ## Use tree distances  in capscale capscale(dtree ~ 1, comm=dune) #> Call: capscale(formula = dtree ~ 1, comm = dune) #>  #>                 Inertia Rank #> Total          2.335836      #> Unconstrained  2.343860   10 #> Imaginary     -0.008024    9 #> Inertia is squared Treedist distance  #> Species scores projected from ‘dune’  #>  #> Eigenvalues for unconstrained axes: #>   MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  #> 1.1971 0.4546 0.2967 0.1346 0.1067 0.0912 0.0391 0.0190 0.0045 0.0004  #>"},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":null,"dir":"Reference","previous_headings":"","what":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Function tsallis find Tsallis diversities scale corresponding evenness measures. Function tsallisaccum finds statistics accumulating sites.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"","code":"tsallis(x, scales = seq(0, 2, 0.2), norm = FALSE, hill = FALSE) tsallisaccum(x, scales = seq(0, 2, 0.2), permutations = 100,     raw = FALSE, subset, ...) # S3 method for tsallisaccum persp(x, theta = 220, phi = 15, col = heat.colors(100), zlim, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"x Community data matrix plotting object. scales Scales Tsallis diversity. norm Logical, TRUE diversity values normalized     maximum (diversity value equiprobability conditions). hill Calculate Hill numbers. permutations Usually integer giving number     permutations, can also list control values     permutations returned function ,      permutation matrix row gives permuted indices. raw FALSE return summary statistics     permutations, TRUE returns individual     permutations. subset logical expression indicating sites (rows) keep:     missing values taken FALSE. theta, phi angles defining viewing     direction. theta gives azimuthal direction     phi colatitude. col Colours used surface. zlim Limits   vertical axis. ... arguments passed tsallis     graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Tsallis diversity (also equivalent Patil Taillie diversity) one-parametric generalised entropy function, defined : $$H_q = \\frac{1}{q-1} (1-\\sum_{=1}^S p_i^q)$$ \\(q\\) scale parameter, \\(S\\) number species sample (Tsallis 1988, Tothmeresz 1995). diversity concave \\(q>0\\), non-additive (Keylock 2005). \\(q=0\\) gives number species minus one, \\(q\\) tends 1 gives Shannon diversity, \\(q=2\\) gives Simpson index (see function diversity). norm = TRUE, tsallis gives values normalized maximum: $$H_q(max) = \\frac{S^{1-q}-1}{1-q}$$ \\(S\\) number species. \\(q\\) tends 1, maximum defined \\(ln(S)\\). hill = TRUE, tsallis gives Hill numbers (numbers equivalents, see Jost 2007): $$D_q = (1-(q-1) H)^{1/(1-q)}$$ Details plotting methods accumulating values can found help pages functions renyi renyiaccum.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Function tsallis returns data frame selected indices. Function tsallisaccum argument raw = FALSE returns three-dimensional array, first dimension accumulated sites, second dimension diversity scales, third dimension summary statistics mean, stdev, min, max, Qnt 0.025 Qnt 0.975. argument raw = TRUE statistics third dimension replaced individual permutation results.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Tsallis, C. (1988) Possible generalization Boltzmann-Gibbs   statistics.  J. Stat. Phis. 52, 479--487. Tothmeresz, B. (1995) Comparison different methods diversity   ordering. Journal Vegetation Science 6, 283--290. Patil, G. P. Taillie, C. (1982) Diversity concept   measurement.  J. . Stat. Ass. 77, 548--567. Keylock, C. J. (2005) Simpson diversity Shannon-Wiener index   special cases generalized entropy.  Oikos 109,   203--207. Jost, L (2007) Partitioning diversity independent alpha beta   components.  Ecology 88, 2427--2439.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"Péter Sólymos, solymos@ualberta.ca, based code Roeland Kindt Jari Oksanen written renyi","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/tsallis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tsallis Diversity and Corresponding Accumulation Curves — tsallis","text":"","code":"data(BCI) i <- sample(nrow(BCI), 12) x1 <- tsallis(BCI[i,]) x1 #>      0      0.2      0.4      0.6      0.8        1      1.2      1.4      1.6 #> 8   87 39.98200 19.77567 10.60391 6.181934 3.908381 2.659907 1.928610 1.473408 #> 10  93 41.50369 20.10059 10.63988 6.164157 3.889803 2.648176 1.922207 1.470121 #> 5  100 44.20598 21.17686 11.08126 6.350040 3.969940 2.683412 1.937940 1.477217 #> 17  92 40.88788 19.62643 10.29183 5.926929 3.736897 2.553271 1.864739 1.435868 #> 19 108 47.27018 22.32602 11.49839 6.492802 4.013094 2.692466 1.936696 1.473828 #> 13  92 41.98171 20.60707 10.96297 6.342501 3.982373 2.694847 1.945425 1.481616 #> 46  85 38.71044 19.06049 10.22455 5.987209 3.810489 2.611431 1.904913 1.461976 #> 16  92 41.45601 20.19256 10.71573 6.210870 3.916821 2.663870 1.931567 1.475861 #> 36  91 40.76595 19.77916 10.48193 6.081803 3.846109 2.625076 1.910150 1.463936 #> 7   81 37.47840 18.73414 10.17269 6.004908 3.836811 2.631757 1.918091 1.469869 #> 24  94 42.55654 20.75558 10.99284 6.343926 3.979427 2.692702 1.944478 1.481404 #> 22  90 40.16368 19.41416 10.25630 5.939677 3.755413 2.566788 1.872586 1.439722 #>         1.8         2 #> 8  1.173986 0.9671998 #> 10 1.172341 0.9663808 #> 5  1.175553 0.9678267 #> 17 1.152122 0.9545126 #> 19 1.172481 0.9655820 #> 13 1.178033 0.9692075 #> 46 1.168556 0.9646728 #> 16 1.175935 0.9686598 #> 36 1.169232 0.9648567 #> 7  1.173083 0.9672014 #> 24 1.178152 0.9694268 #> 22 1.153640 0.9548316 diversity(BCI[i,],\"simpson\") == x1[[\"2\"]] #>    8   10    5   17   19   13   46   16   36    7   24   22  #> TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE  plot(x1)  x2 <- tsallis(BCI[i,],norm=TRUE) x2 #>    0       0.2       0.4       0.6       0.8         1       1.2       1.4 #> 8  1 0.9154260 0.8674322 0.8491531 0.8535754 0.8729254 0.8992501 0.9258854 #> 10 1 0.9001004 0.8450759 0.8255446 0.8324355 0.8561634 0.8872568 0.9180261 #> 5  1 0.9038026 0.8502581 0.8308757 0.8372445 0.8602030 0.8904867 0.9204832 #> 17 1 0.8945733 0.8308281 0.8026305 0.8032747 0.8244489 0.8566981 0.8913214 #> 19 1 0.9079031 0.8537683 0.8315799 0.8347890 0.8554245 0.8846675 0.9147428 #> 13 1 0.9185048 0.8723405 0.8549707 0.8595970 0.8786069 0.9042012 0.9298883 #> 46 1 0.9032439 0.8485357 0.8278693 0.8331492 0.8554539 0.8856795 0.9162035 #> 16 1 0.9070033 0.8547937 0.8356888 0.8417570 0.8641446 0.8938075 0.9232641 #> 36 1 0.8998669 0.8431295 0.8216927 0.8272622 0.8505725 0.8820846 0.9137994 #> 7  1 0.9094899 0.8600339 0.8427936 0.8492653 0.8706729 0.8985570 0.9261475 #> 24 1 0.9149445 0.8667059 0.8486326 0.8536824 0.8738548 0.9008891 0.9279024 #> 22 1 0.8945746 0.8334045 0.8082215 0.8109045 0.8325271 0.8637842 0.8965990 #>          1.6       1.8         2 #> 8  0.9486740 0.9660687 0.9783170 #> 10 0.9438798 0.9632975 0.9767719 #> 5  0.9456409 0.9644767 0.9775050 #> 17 0.9223038 0.9469046 0.9648877 #> 19 0.9406572 0.9605041 0.9745226 #> 13 0.9516896 0.9681999 0.9797424 #> 46 0.9422698 0.9621112 0.9760219 #> 16 0.9479928 0.9664763 0.9791887 #> 36 0.9407648 0.9611954 0.9754595 #> 7  0.9493990 0.9669335 0.9791421 #> 24 0.9507028 0.9678509 0.9797399 #> 22 0.9256369 0.9486075 0.9654409 plot(x2)  mod1 <- tsallisaccum(BCI[i,]) plot(mod1, as.table=TRUE, col = c(1, 2, 2))  persp(mod1)  mod2 <- tsallisaccum(BCI[i,], norm=TRUE) persp(mod2,theta=100,phi=30)"},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":null,"dir":"Reference","previous_headings":"","what":"Vegetation and environment in lichen pastures — varespec","title":"Vegetation and environment in lichen pastures — varespec","text":"varespec data frame 24 rows 44 columns.  Columns   estimated cover values 44 species.  variable names   formed scientific names, self explanatory anybody   familiar vegetation type. varechem data frame 24 rows 14 columns, giving soil characteristics sites varespec data frame. chemical measurements obvious names. Baresoil gives estimated cover bare soil, Humdepth thickness humus layer.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Vegetation and environment in lichen pastures — varespec","text":"","code":"data(varechem)        data(varespec)"},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Vegetation and environment in lichen pastures — varespec","text":"Väre, H., Ohtonen, R. Oksanen, J. (1995) Effects reindeer grazing understorey vegetation dry Pinus sylvestris forests. Journal Vegetation Science 6, 523--530.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varechem.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Vegetation and environment in lichen pastures — varespec","text":"","code":"data(varespec) data(varechem)"},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":null,"dir":"Reference","previous_headings":"","what":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"function partitions variation community data community   dissimilarities respect two, three, four explanatory   tables, using adjusted \\(R^2\\) redundancy analysis   ordination (RDA) distance-based redundancy analysis. response   single vector, partitioning partial regression. Collinear   variables explanatory tables removed prior   partitioning.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"","code":"varpart(Y, X, ..., data, chisquare = FALSE, transfo, scale = FALSE,     add = FALSE, sqrt.dist = FALSE, permutations) # S3 method for varpart summary(object, ...) showvarparts(parts, labels, bg = NULL, alpha = 63, Xnames,     id.size = 1.2,  ...) # S3 method for varpart234 plot(x, cutoff = 0, digits = 1, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Y Data frame matrix containing response data table   dissimilarity structure inheriting dist.   community ecology, table often site--species table   dissimilarity object. X Two four explanatory models, variables tables.  can   defined three alternative ways: (1) one-sided model formulae   beginning ~ defining model, (2) name   single numeric factor variable, (3) name matrix numeric   data frame numeric factor variables.  model formulae   can factors, interaction terms transformations   variables. names variables model formula found   data frame given data argument, found ,   user environment.  Single variables, data frames matrices   found user environment.  entries till next argument   (data transfo) interpreted explanatory models,   names extra arguments abbreviated   omitted. ... parameters passed functions. NB, arguments   dots abbreviated must spelt completely. data data frame variables used formulae   X. chisquare Partition Chi-square inertia Correspondence   Analysis (cca). transfo Transformation Y (community data) using   decostand.  alternatives decostand can   used, preserving Euclidean metric include   \"hellinger\", \"chi.square\", \"total\",   \"norm\". Ignored Y dissimilarities. scale columns Y standardized unit   variance. Ignored Y dissimilarities. add Add constant non-diagonal values euclidify   dissimilarities (see wcmdscale details). Choice   \"lingoes\" (TRUE) use recommended method   Legendre & Anderson (1999: “method 1”) \"cailliez\"   uses “method 2”. argument effect   Y dissimilarities. sqrt.dist Take square root dissimilarities. often   euclidifies dissimilarities. NB., argument name   abbreviated. argument effect Y   dissimilarities. permutations chisquare = TRUE, adjusted     \\(R^2\\) estimated permutations,     paramater can list control values permutations     returned function , number     permutations required, permutation matrix row     gives permuted indices. parts Number explanatory tables (circles) displayed. labels Labels used displayed fractions. Default use   letters printed output. bg Fill colours circles ellipses. alpha Transparency fill colour.  argument takes     precedence possible transparency definitions     colour. value must range \\(0...255\\), low values     transparent.  Transparency available     graphics devices file formats. Xnames Names sources variation. Default names X1,   X2, X3 X4. Xnames=NA,   Xnames=NULL Xnames=\"\" produce names. names   can changed names. often best use short names. id.size numerical value giving character expansion factor   names circles ellipses. x, object varpart result. cutoff values cutoff displayed. digits number significant digits; number decimal   places least one higher.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"functions partition variation Y components   accounted two four explanatory tables combined   effects. Y multicolumn data frame matrix,   partitioning based redundancy analysis (RDA, see   rda) constrained correspondence analysis   chisquare = TRUE (CCA, see cca).  Y   single variable, partitioning based linear   regression.  Y dissimilarities, decomposition   based distance-based redundancy analysis (db-RDA, see   capscale) following McArdle & Anderson (2001).   input dissimilarities must compatible results   dist. Vegan functions vegdist,   designdist, raupcrick   betadiver produce objects, many   dissimilarity functions R packages. Partitioning made   squared dissimilarities analogously using variance   rectangular data -- unless sqrt.dist = TRUE specified. function primarily uses adjusted \\(R^2\\) assess   partitions explained explanatory tables   combinations (see RsquareAdj),   unbiased method (Peres-Neto et al., 2006). raw   \\(R^2\\) basic fractions also displayed,   biased estimates variation explained explanatory   table. correspondence analysis (chisquare = TRUE),   adjusted \\(R^2\\) found permutation vary   repeated analyses. identifiable fractions designated lower case alphabets.   meaning symbols can found separate document (use   browseVignettes(\"vegan\")), can displayed graphically   using function showvarparts. fraction testable can directly expressed RDA   db-RDA model.  cases printed output also displays   corresponding RDA model using notation explanatory tables   | conditions (partialled ; see rda   details). Although single fractions can testable,   mean fractions simultaneously can tested, since   number testable fractions higher number estimated   models. non-testable components found differences   testable components. testable components permutation   variance correspondence analysis (chisquare = TRUE),   non-testable components even higher variance. abridged explanation alphabetic symbols individual   fractions follows, computational details checked   vignette (readable browseVignettes(\"vegan\"))   source code. two explanatory tables, fractions explained    uniquely two tables []   [b], joint effect    [c]. three explanatory tables, fractions explained uniquely   three tables     [] [c], joint fractions two tables   [d] [f], joint fraction three   tables [g]. four explanatory tables, fractions explained uniquely   four tables []   [d], joint fractions two tables [e]   [j], joint fractions three variables [k]   [n], joint fraction four tables   [o]. summary give overview unique overall   contribution group variables. overall contribution   (labelled “Contributed”) consists unique contribution   variable equal shares fraction variable   contributes. summary tabulates fraction divided   variables, contributed component sum   divided fractions. summary based idea Lai et   al. (2022), similar output rdacca.hp   package. plot function displays Venn diagram   labels intersection (individual fraction) adjusted R   squared higher cutoff.  helper function   showvarpart displays fraction labels. circles   ellipses labelled short default names names defined   user argument Xnames. Longer explanatory file names can   written varpart output plot follows: use option   Xnames=NA, add new names using text function.   bit fiddling coordinates (see locator)   character size allow users place names reasonably short   lengths varpart plot.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Function varpart returns   object class \"varpart\" items scale  transfo (can missing) hold information   standardizations, tables contains names explanatory   tables, call function call.   function varpart calls function varpart2,  varpart3 varpart4 return object class  \"varpart234\" saves result item part.   items object : SS.Y Sum squares matrix Y. n Number observations (rows). nsets Number explanatory tables bigwarning Warnings collinearity. fract Basic fractions estimated constrained models. indfract Individual fractions possible subsections     Venn diagram (see showvarparts). contr1 Fractions can found conditioning single     explanatory table models three four explanatory tables. contr2 Fractions can found conditioning two     explanatory tables models four explanatory tables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"fraction-data-frames","dir":"Reference","previous_headings":"","what":"Fraction Data Frames","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Items fract,   indfract, contr1 contr2 data frames   items: Df: Degrees freedom numerator \\(F\\)-statistic     fraction. R.square: Raw \\(R^2\\). calculated     fract NA items. Adj.R.square: Adjusted \\(R^2\\). Testable: fraction can expressed (partial) RDA     model, directly Testable, field     TRUE.  case fraction label also gives     specification testable RDA model.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"() References variation partitioning Borcard, D., P. Legendre & P. Drapeau. 1992. Partialling spatial component ecological variation. Ecology 73: 1045--1055. Lai J., Y. Zou, J. Zhang & P. Peres-Neto. 2022. Generalizing hierarchical variation partitioning multiple regression canonical analysis using rdacca.hp R package. Methods Ecology Evolution, 13: 782--788. Legendre, P. & L. Legendre. 2012. Numerical ecology, 3rd English edition. Elsevier Science BV, Amsterdam. (b) Reference transformations species data Legendre, P. E. D. Gallagher. 2001. Ecologically meaningful transformations ordination species data. Oecologia 129: 271--280. (c) Reference adjustment bimultivariate redundancy statistic Peres-Neto, P., P. Legendre, S. Dray D. Borcard. 2006. Variation partitioning species data matrices: estimation comparison fractions. Ecology 87: 2614--2625. (d) References partitioning dissimilarities Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy analysis: testing multispecies responses multifactorial ecological experiments. Ecological Monographs 69, 1--24. McArdle, B.H. & Anderson, M.J. (2001). Fitting multivariate models community data: comment distance-based redundancy analysis. Ecology 82, 290-297.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"Pierre Legendre, Departement de Sciences Biologiques, Universite de Montreal, Canada.  developed Jari Oksanen.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"can use command browseVignettes(\"vegan\") display   document presents Venn diagrams showing fraction names   partitioning variation Y respect 2, 3, 4 tables   explanatory variables, well equations used variation   partitioning. functions frequently give negative estimates variation.   Adjusted \\(R^2\\) can negative fraction;   unadjusted \\(R^2\\) testable fractions variances   non-negative.  Non-testable fractions found   directly, subtracting different models, subtraction   results can negative.  fractions orthogonal, linearly   independent, complicated nonlinear dependencies can   cause negative non-testable fractions. fraction can negative   non-Euclidean dissimilarities underlying db-RDA model   can yield negative eigenvalues (see capscale,   dbrda). negative eigenvalues underlying   analysis can avoided arguments sqrt.dist add   similar effect capscale: square   roots several dissimilarities negative eigenvalues,   negative eigenvalues produced Lingoes Cailliez   adjustment, effect add random variation   dissimilarities. simplified, fast version RDA, CCA adn dbRDA used (functions   simpleRDA2, simpleCCA simpleDBRDA).    actual calculations done functions varpart2   varpart4, intended called directly   user.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/varpart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Partition the Variation of Community Matrix by 2, 3, or 4 Explanatory Matrices — varpart","text":"","code":"data(mite) data(mite.env) data(mite.pcnm)  # Two explanatory data frames -- Hellinger-transform Y mod <- varpart(mite, mite.env, mite.pcnm, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = mite.env, mite.pcnm, transfo = \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  mite.env #> X2:  mite.pcnm  #>  #> No. of explanatory tables: 2  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                      Df R.squared Adj.R.squared Testable #> [a+c] = X1           11   0.52650       0.43670     TRUE #> [b+c] = X2           22   0.62300       0.44653     TRUE #> [a+b+c] = X1+X2      33   0.75893       0.53794     TRUE #> Individual fractions                                     #> [a] = X1|X2          11                 0.09141     TRUE #> [b] = X2|X1          22                 0.10124     TRUE #> [c]                   0                 0.34530    FALSE #> [d] = Residuals                         0.46206    FALSE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed Component #> X1 0.0914       0.264  mite.env #> X2 0.1012       0.274 mite.pcnm #>  #> Contributions of fractions to sets: #>  #>         X1     X2 #> [a] 0.0914        #> [b]        0.1012 #> [c] 0.1726 0.1726  ## Use fill colours showvarparts(2, bg = c(\"hotpink\",\"skyblue\"))  plot(mod, bg = c(\"hotpink\",\"skyblue\"))  ## Test fraction [a] using partial RDA, '~ .' in formula tells to use ## all variables of data mite.env. aFrac <- rda(decostand(mite, \"hel\"), mite.env, mite.pcnm) anova(aFrac) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(X = decostand(mite, \"hel\"), Y = mite.env, Z = mite.pcnm) #>          Df Variance      F Pr(>F)     #> Model    11 0.053592 1.8453  0.001 *** #> Residual 36 0.095050                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## RsquareAdj gives the same result as component [a] of varpart RsquareAdj(aFrac) #> $r.squared #> [1] 0.1359251 #>  #> $adj.r.squared #> [1] 0.09140797 #>   ## Partition Bray-Curtis dissimilarities varpart(vegdist(mite), mite.env, mite.pcnm) #>  #> Partition of squared Bray distance in dbRDA  #>  #> Call: varpart(Y = vegdist(mite), X = mite.env, mite.pcnm) #>  #> Explanatory tables: #> X1:  mite.env #> X2:  mite.pcnm  #>  #> No. of explanatory tables: 2  #> Total variation (SS): 14.696  #> No. of observations: 70  #>  #> Partition table: #>                      Df R.squared Adj.R.squared Testable #> [a+c] = X1           11   0.50512       0.41127     TRUE #> [b+c] = X2           22   0.60144       0.41489     TRUE #> [a+b+c] = X1+X2      33   0.74631       0.51375     TRUE #> Individual fractions                                     #> [a] = X1|X2          11                 0.09887     TRUE #> [b] = X2|X1          22                 0.10249     TRUE #> [c]                   0                 0.31240    FALSE #> [d] = Residuals                         0.48625    FALSE #> --- #> Use function ‘dbrda’ to test significance of fractions of interest ## Three explanatory tables with formula interface mod <- varpart(mite, ~ SubsDens + WatrCont, ~ Substrate + Shrub + Topo,    mite.pcnm, data=mite.env, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub + #> Topo, mite.pcnm, data = mite.env, transfo = \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  ~SubsDens + WatrCont #> X2:  ~Substrate + Shrub + Topo #> X3:  mite.pcnm  #>  #> No. of explanatory tables: 3  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                       Df R.square Adj.R.square Testable #> [a+d+f+g] = X1         2  0.32677      0.30667     TRUE #> [b+d+e+g] = X2         9  0.40395      0.31454     TRUE #> [c+e+f+g] = X3        22  0.62300      0.44653     TRUE #> [a+b+d+e+f+g] = X1+X2 11  0.52650      0.43670     TRUE #> [a+c+d+e+f+g] = X1+X3 24  0.67372      0.49970     TRUE #> [b+c+d+e+f+g] = X2+X3 31  0.72400      0.49884     TRUE #> [a+b+c+d+e+f+g] = All 33  0.75893      0.53794     TRUE #> Individual fractions                                    #> [a] = X1 | X2+X3       2               0.03910     TRUE #> [b] = X2 | X1+X3       9               0.03824     TRUE #> [c] = X3 | X1+X2      22               0.10124     TRUE #> [d]                    0               0.01407    FALSE #> [e]                    0               0.09179    FALSE #> [f]                    0               0.08306    FALSE #> [g]                    0               0.17045    FALSE #> [h] = Residuals                        0.46206    FALSE #> Controlling 1 table X                                   #> [a+d] = X1 | X3        2               0.05317     TRUE #> [a+f] = X1 | X2        2               0.12216     TRUE #> [b+d] = X2 | X3        9               0.05231     TRUE #> [b+e] = X2 | X1        9               0.13003     TRUE #> [c+e] = X3 | X1       22               0.19303     TRUE #> [c+f] = X3 | X2       22               0.18429     TRUE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed                 Component #> X1 0.0391       0.144      ~SubsDens + WatrCont #> X2 0.0382       0.148 ~Substrate + Shrub + Topo #> X3 0.1012       0.245                 mite.pcnm #>  #> Contributions of fractions to sets: #>  #>          X1      X2      X3 #> [a] 0.03910                 #> [b]         0.03824         #> [c]                 0.10124 #> [d] 0.00703 0.00703         #> [e]         0.04590 0.04590 #> [f] 0.04153         0.04153 #> [g] 0.05682 0.05682 0.05682 showvarparts(3, bg=2:4)  plot(mod, bg=2:4)   ## Use RDA to test fraction [a] ## Matrix can be an argument in formula rda.result <- rda(decostand(mite, \"hell\") ~ SubsDens + WatrCont +    Condition(Substrate + Shrub + Topo) +    Condition(as.matrix(mite.pcnm)), data = mite.env) anova(rda.result) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = decostand(mite, \"hell\") ~ SubsDens + WatrCont + Condition(Substrate + Shrub + Topo) + Condition(as.matrix(mite.pcnm)), data = mite.env) #>          Df Variance      F Pr(>F)    #> Model     2 0.013771 2.6079  0.005 ** #> Residual 36 0.095050                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  ## Four explanatory tables mod <- varpart(mite, ~ SubsDens + WatrCont, ~Substrate + Shrub + Topo,   mite.pcnm[,1:11], mite.pcnm[,12:22], data=mite.env, transfo=\"hel\") mod #>  #> Partition of variance in RDA  #>  #> Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub + #> Topo, mite.pcnm[, 1:11], mite.pcnm[, 12:22], data = mite.env, transfo = #> \"hel\") #> Species transformation:  hellinger #> Explanatory tables: #> X1:  ~SubsDens + WatrCont #> X2:  ~Substrate + Shrub + Topo #> X3:  mite.pcnm[, 1:11] #> X4:  mite.pcnm[, 12:22]  #>  #> No. of explanatory tables: 4  #> Total variation (SS): 27.205  #>             Variance: 0.39428  #> No. of observations: 70  #>  #> Partition table: #>                             Df R.square Adj.R.square Testable #> [aeghklno] = X1              2  0.32677      0.30667     TRUE #> [befiklmo] = X2              9  0.40395      0.31454     TRUE #> [cfgjlmno] = X3             11  0.53231      0.44361     TRUE #> [dhijkmno] = X4             11  0.09069     -0.08176     TRUE #> [abefghiklmno] = X1+X2      11  0.52650      0.43670     TRUE #> [acefghjklmno] = X1+X3      13  0.59150      0.49667     TRUE #> [adeghijklmno] = X1+X4      13  0.40374      0.26533     TRUE #> [bcefgijklmno] = X2+X3      20  0.63650      0.48813     TRUE #> [bdefhijklmno] = X2+X4      20  0.53338      0.34292     TRUE #> [cdfghijklmno] = X3+X4      22  0.62300      0.44653     TRUE #> [abcefghijklmno] = X1+X2+X3 22  0.67947      0.52944     TRUE #> [abdefghijklmno] = X1+X2+X4 22  0.61553      0.43557     TRUE #> [acdefghijklmno] = X1+X3+X4 24  0.67372      0.49970     TRUE #> [bcdefghijklmno] = X2+X3+X4 31  0.72400      0.49884     TRUE #> [abcdefghijklmno] = All     33  0.75893      0.53794     TRUE #> Individual fractions                                          #> [a] = X1 | X2+X3+X4          2               0.03910     TRUE #> [b] = X2 | X1+X3+X4          9               0.03824     TRUE #> [c] = X3 | X1+X2+X4         11               0.10237     TRUE #> [d] = X4 | X1+X2+X3         11               0.00850     TRUE #> [e]                          0               0.01407    FALSE #> [f]                          0               0.13200    FALSE #> [g]                          0               0.05355    FALSE #> [h]                          0               0.00220    FALSE #> [i]                          0              -0.00547    FALSE #> [j]                          0              -0.00963    FALSE #> [k]                          0              -0.00231    FALSE #> [l]                          0               0.24037    FALSE #> [m]                          0              -0.03474    FALSE #> [n]                          0               0.02730    FALSE #> [o]                          0              -0.06761    FALSE #> [p] = Residuals              0               0.46206    FALSE #> Controlling 2 tables X                                        #> [ae] = X1 | X3+X4            2               0.05317     TRUE #> [ag] = X1 | X2+X4            2               0.09265     TRUE #> [ah] = X1 | X2+X3            2               0.04131     TRUE #> [be] = X2 | X3+X4            9               0.05231     TRUE #> [bf] = X2 | X1+X4            9               0.17024     TRUE #> [bi] = X2 | X1+X3            9               0.03277     TRUE #> [cf] = X3 | X1+X4           11               0.23437     TRUE #> [cg] = X3 | X2+X4           11               0.15592     TRUE #> [cj] = X3 | X1+X2           11               0.09274     TRUE #> [dh] = X4 | X2+X3           11               0.01071     TRUE #> [di] = X4 | X1+X3           11               0.00303     TRUE #> [dj] = X4 | X1+X2           11              -0.00113     TRUE #> Controlling 1 table X                                         #> [aghn] = X1 | X2             2               0.12216     TRUE #> [aehk] = X1 | X3             2               0.05306     TRUE #> [aegl] = X1 | X4             2               0.34709     TRUE #> [bfim] = X2 | X1             9               0.13003     TRUE #> [beik] = X2 | X3             9               0.04452     TRUE #> [befl] = X2 | X4             9               0.42468     TRUE #> [cfjm] = X3 | X1            11               0.19000     TRUE #> [cgjn] = X3 | X2            11               0.17359     TRUE #> [cfgl] = X3 | X4            11               0.52830     TRUE #> [dijm] = X4 | X1            11              -0.04134     TRUE #> [dhjn] = X4 | X2            11               0.02837     TRUE #> [dhik] = X4 | X3            11               0.00292     TRUE #> --- #> Use function ‘rda’ to test significance of fractions of interest summary(mod) #>  #> Unique fractions and total with shared fractions equally allocated: #>  #>    Unique Contributed                 Component #> X1 0.0391      0.1456      ~SubsDens + WatrCont #> X2 0.0382      0.1594 ~Substrate + Shrub + Topo #> X3 0.1024      0.2511         mite.pcnm[, 1:11] #> X4 0.0085     -0.0181        mite.pcnm[, 12:22] #>  #> Contributions of fractions to sets: #>  #>           X1       X2       X3       X4 #> [a]  0.03910                            #> [b]           0.03824                   #> [c]                    0.10237          #> [d]                             0.00850 #> [e]  0.00703  0.00703                   #> [f]           0.06600  0.06600          #> [g]  0.02678           0.02678          #> [h]  0.00110                    0.00110 #> [i]          -0.00274          -0.00274 #> [j]                   -0.00482 -0.00482 #> [k] -0.00077 -0.00077          -0.00077 #> [l]  0.08012  0.08012  0.08012          #> [m]          -0.01158 -0.01158 -0.01158 #> [n]  0.00910           0.00910  0.00910 #> [o] -0.01690 -0.01690 -0.01690 -0.01690 plot(mod, bg=2:5)  ## Show values for all partitions by putting 'cutoff' low enough: plot(mod, cutoff = -Inf, cex = 0.7, bg=2:5)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":null,"dir":"Reference","previous_headings":"","what":"Defunct Functions in Package vegan — vegan-defunct","title":"Defunct Functions in Package vegan — vegan-defunct","text":"functions variables listed longer part   vegan longer needed.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Defunct Functions in Package vegan — vegan-defunct","text":"","code":"## defunct in vegan 2.6-0 as.mlm(x) humpfit(mass, spno, family = poisson, start) vegandocs(doc = c(\"NEWS\", \"ONEWS\", \"FAQ-vegan\", \"intro-vegan\",     \"diversity-vegan\", \"decision-vegan\", \"partitioning\", \"permutations\"))  ## defunct in vegan 2.5-0 commsimulator(x, method, thin=1)  ## defunct in vegan 2.4-0 # S3 method for adonis density(x, ...) # S3 method for vegandensity plot(x, main = NULL, xlab = NULL, ylab = \"Density\",     type = \"l\", zero.line = TRUE, obs.line = TRUE, ...) # S3 method for adonis densityplot(x, data, xlab = \"Null\", ...)  ## defunct in vegan 2.2-0 metaMDSrotate(object, vec, na.rm = FALSE, ...)  ## defunct in vegan 2.0-0 getNumObs(object, ...) permuted.index2(n, control = permControl())"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-defunct.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Defunct Functions in Package vegan — vegan-defunct","text":".mlm function replaced set functions can   find statistics directly ordination result object:   see hatvalues.cca, rstandard.cca,   rstudent.cca, cooks.distance.cca,   vcov.cca. Function humpfit transferred natto package   still available https://github.com/jarioksa/natto/. R functions news used read vegan   NEWS (news(package = \"vegan\")),   browseVignettes better tool reading vignettes   vegandocs. Function commsimulator replaced   make.commsim defines Null models,   functions nullmodel   simulate.nullmodel check input data   generate Null model communities. deprecated density densityplot methods   replaced similar methods permustats.   permustats offers powerful analysis tools   permutations, including summary.permustats giving   \\(z\\) values (.k.. standardized effect sizes, SES), Q-Q   plots (qqnorm.permustats,   qqmath.permustats). Function metaMDSrotate replaced   MDSrotate can handle monoMDS   results addition metaMDS. permutation functions moved permute package,   documented .  permute package replaces   permuted.index permuted.index2   shuffle getNumObs   specific nobs-methods.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":null,"dir":"Reference","previous_headings":"","what":"Deprecated Functions in vegan package — vegan-deprecated","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"functions provided compatibility older versions   vegan , may defunct soon next release.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"","code":"## use adonis2 instead adonis(formula, data, permutations = 999, method = \"bray\",     strata = NULL, contr.unordered = \"contr.sum\",     contr.ordered = \"contr.poly\", parallel = getOption(\"mc.cores\"), ...)     orditkplot(x, display = \"species\", choices = 1:2, width, xlim, ylim,     tcex = 0.8, tcol, pch = 1,  pcol, pbg, pcex = 0.7, labels,  ...) ## moved to vegan3d package: install from CRAN orditkplot(x, display = \"species\", choices = 1:2, width, xlim, ylim,     tcex = 0.8, tcol, pch = 1,  pcol, pbg, pcex = 0.7, labels,  ...) # S3 method for orditkplot plot(x, ...) # S3 method for orditkplot points(x, pch = x$args$pch, cex = x$args$pcex,        col = x$args$pcol, bg = x$args$pbg, ...) # S3 method for orditkplot text(x, cex = x$args$tcex, col = x$args$tcol,      font = attr(x$labels, \"font\"), ...) # S3 method for orditkplot scores(x, display, ...) ## use toCoda instead as.mcmc.oecosimu(x) as.mcmc.permat(x)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"formula, data, permutations, method, parallel, ... See     adonis2. strata groups (strata) within constrain permutations. contr.unordered, contr.ordered contrasts used design matrix. x ordination result orditkplot object      tranformed .mcmc. display, choices kind scores number axes. width size Tcl/Tk window inches. xlim, ylim, tcex, tcol, pch, pcol, pbg, pcex, labels, cex,      col, bg, font graphical parameters similar standard      plot functions; applied points preceded      p, text t.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-deprecated.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Deprecated Functions in vegan package — vegan-deprecated","text":"adonis2 replaces adonis extended   functionality completely new internal design. shared arguments   adonis similar adonis2,   arguments contr.unordered contr.ordered can set   contrasts within adonis. orditkplot moved vegan3d (version   1.3-0). Install package CRAN use old way.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal vegan functions — vegan-internal","title":"Internal vegan functions — vegan-internal","text":"Internal vegan functions intended called directly,   within functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal vegan functions — vegan-internal","text":"","code":"ordiParseFormula(formula, data, xlev = NULL,  na.action = na.fail,     subset = NULL, X) ordiTerminfo(d, data) ordiNAexclude(x, excluded) ordiNApredict(omit, x) ordiArgAbsorber(..., shrink, origin, scaling, triangular,                 display, choices, const, truemean, FUN) centroids.cca(x, mf, wt) getPermuteMatrix(perm, N, strata = NULL) howHead(x, ...) pasteCall(call, prefix = \"Call:\") veganCovEllipse(cov, center = c(0, 0), scale = 1, npoints = 100) veganMahatrans(x, s2, tol = sqrt(.Machine$double.eps)) hierParseFormula(formula, data) GowerDblcen(x, na.rm = TRUE) addLingoes(d) addCailliez(d)"},{"path":"https://vegandevs.github.io/vegan/reference/vegan-internal.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Internal vegan functions — vegan-internal","text":"description intended vegan   developers: functions intended users,   used within functions.  general, functions   exported namespace, must use   get ::: directly call   functions. ordiParseFormula returns list three matrices (dependent   variables, model.matrix constraints   conditions, possibly NULL) needed constrained   ordination. Argument xlev passed   model.frame. left-hand-side already   evaluated calling code, can given argument X   re-evaluated. ordiTermInfo finds term   information constrained ordination described   cca.object. ordiNAexclude implements   na.action = na.exclude constrained ordination finding WA   scores CCA components site scores unconstrained component   excluded rows observations. Function   ordiNApredict pads result object WA   scores similarly napredict. ordiArgAbsorber absorbs arguments scores   function vegan cause superfluous   warnings graphical function FUN. implement   scores functions new arguments, update   ordiArgAbsorber. centroids.cca finds weighted centroids variables. getPermuteMatrix interprets user input returns   permutation matrix row gives indices observations   permutation. input perm can single number   number simple permutations, result   defining permutation scheme   permutation matrix. howHead formats permutation scheme   display. formatting   compact one used print permute   package, shows non-default choices. output normally   used printing results vegan permutations. pasteCall prints function call nicely wrapped   Sweave output. veganCovEllipse finds coordinates drawing   covariance ellipse. veganMahatrans transforms data matrix Euclidean   distances Mahalanobis distances. input data x must   matrix centred columns, s2 covariance matrix.   s2 given, covariance matrix found x   within function. hierParseFormula returns list one matrix (left hand side)   model frame factors representing hierarchy levels    (right hand side) used adipart,    multipart hiersimu. GowerDblcen performs Gower double centring matrix   dissimilarities. Similar function earlier available compiled   code stats, part official API,   therefore poorer replacement. addLingoes addCailliez find constant added   non-diagonal (squared) dissimilarities make eigenvalues   non-negative Principal Co-ordinates Analysis   (wcmdscale, capscale). Function   cmdscale implements Cailliez method. argument   matrix dissimilarities.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"vegan package provides tools descriptive community ecology. basic functions diversity analysis, community ordination dissimilarity analysis. multivariate tools can used data types well.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"functions vegan package contain tools diversity analysis, ordination methods tools analysis dissimilarities. Together labdsv package, vegan package provides standard tools descriptive community analysis. Package ade4 provides alternative comprehensive package, several packages complement vegan provide tools deeper analysis specific fields. Package BiodiversityR provides GUI large subset vegan functionality. vegan package developed GitHub (https://github.com/vegandevs/vegan/).  GitHub provides --date information forums bug reports. important changes vegan documents can read news(package=\"vegan\") vignettes can browsed browseVignettes(\"vegan\"). vignettes include vegan FAQ, discussion design decisions, short introduction ordination discussion diversity methods. see preferable citation package, type citation(\"vegan\").","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"vegan development team Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, Helene Wagner.  Many people contributed individual functions: see credits function help pages.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegan-package.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Community Ecology Package: Ordination, Diversity and Dissimilarities — vegan-package","text":"","code":"### Example 1: Unconstrained ordination ## NMDS data(varespec) data(varechem) ord <- metaMDS(varespec) #> Square root transformation #> Wisconsin double standardization #> Run 0 stress 0.1843196  #> Run 1 stress 0.184583  #> ... Procrustes: rmse 0.04902295  max resid 0.1551746  #> Run 2 stress 0.1948413  #> Run 3 stress 0.2136761  #> Run 4 stress 0.2079056  #> Run 5 stress 0.2087937  #> Run 6 stress 0.196245  #> Run 7 stress 0.2069725  #> Run 8 stress 0.1948413  #> Run 9 stress 0.1825658  #> ... New best solution #> ... Procrustes: rmse 0.04165046  max resid 0.1519318  #> Run 10 stress 0.1843196  #> Run 11 stress 0.2109853  #> Run 12 stress 0.2177543  #> Run 13 stress 0.2224267  #> Run 14 stress 0.2044974  #> Run 15 stress 0.195049  #> Run 16 stress 0.1969805  #> Run 17 stress 0.22911  #> Run 18 stress 0.2397062  #> Run 19 stress 0.18584  #> Run 20 stress 0.2295494  #> *** Best solution was not repeated -- monoMDS stopping criteria: #>      1: no. of iterations >= maxit #>     19: stress ratio > sratmax plot(ord, type = \"t\") ## Fit environmental variables ef <- envfit(ord, varechem) ef #>  #> ***VECTORS #>  #>             NMDS1    NMDS2     r2 Pr(>r)     #> N        -0.05721 -0.99836 0.2537  0.038 *   #> P         0.61964  0.78489 0.1938  0.102     #> K         0.76634  0.64244 0.1809  0.127     #> Ca        0.68509  0.72846 0.4119  0.005 **  #> Mg        0.63243  0.77462 0.4271  0.003 **  #> S         0.19127  0.98154 0.1752  0.110     #> Al       -0.87166  0.49011 0.5269  0.001 *** #> Fe       -0.93612  0.35169 0.4451  0.001 *** #> Mn        0.79870 -0.60173 0.5231  0.001 *** #> Zn        0.61752  0.78655 0.1879  0.102     #> Mo       -0.90302  0.42960 0.0609  0.521     #> Baresoil  0.92500 -0.37996 0.2508  0.050 *   #> Humdepth  0.93288 -0.36018 0.5200  0.002 **  #> pH       -0.64804  0.76161 0.2308  0.074 .   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #> Permutation: free #> Number of permutations: 999 #>  #>  plot(ef, p.max = 0.05)  ### Example 2: Constrained ordination (RDA) ## The example uses formula interface to define the model data(dune) data(dune.env) ## No constraints: PCA mod0 <- rda(dune ~ 1, dune.env) mod0 #> Call: rda(formula = dune ~ 1, data = dune.env) #>  #>               Inertia Rank #> Total           84.12      #> Unconstrained   84.12   19 #> Inertia is variance  #>  #> Eigenvalues for unconstrained axes: #>    PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8  #> 24.795 18.147  7.629  7.153  5.695  4.333  3.199  2.782  #> (Showing 8 of 19 unconstrained eigenvalues) #>  plot(mod0)  ## All environmental variables: Full model mod1 <- rda(dune ~ ., dune.env) mod1 #> Call: rda(formula = dune ~ A1 + Moisture + Management + Use + Manure, #> data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   63.2062     0.7513   12 #> Unconstrained 20.9175     0.2487    7 #> Inertia is variance  #> Some constraints or conditions were aliased because they were redundant #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11  #> 22.396 16.208  7.039  4.038  3.760  2.609  2.167  1.803  1.404  0.917  0.582  #>  RDA12  #>  0.284  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7  #> 6.627 4.309 3.549 2.546 2.340 0.934 0.612  #>  plot(mod1)  ## Automatic selection of variables by permutation P-values mod <- ordistep(mod0, scope=formula(mod1)) #>  #> Start: dune ~ 1  #>  #>              Df    AIC      F Pr(>F)    #> + Management  3 87.082 2.8400  0.005 ** #> + Moisture    3 87.707 2.5883  0.005 ** #> + Manure      4 89.232 1.9539  0.015 *  #> + A1          1 89.591 1.9217  0.065 .  #> + Use         2 91.032 1.1741  0.240    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management  #>  #>              Df   AIC    F Pr(>F)    #> - Management  3 89.62 2.84  0.005 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>            Df    AIC      F Pr(>F)    #> + Moisture  3 85.567 1.9764  0.005 ** #> + Manure    3 87.517 1.3902  0.095 .  #> + A1        1 87.424 1.2965  0.200    #> + Use       2 88.284 1.0510  0.360    #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #> Step: dune ~ Management + Moisture  #>  #>              Df    AIC      F Pr(>F)    #> - Moisture    3 87.082 1.9764  0.015 *  #> - Management  3 87.707 2.1769  0.010 ** #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 #>  #>          Df    AIC      F Pr(>F) #> + Manure  3 85.762 1.1225  0.325 #> + A1      1 86.220 0.8359  0.585 #> + Use     2 86.842 0.8027  0.770 #>  mod #> Call: rda(formula = dune ~ Management + Moisture, data = dune.env) #>  #>               Inertia Proportion Rank #> Total         84.1237     1.0000      #> Constrained   46.4249     0.5519    6 #> Unconstrained 37.6988     0.4481   13 #> Inertia is variance  #>  #> Eigenvalues for constrained axes: #>   RDA1   RDA2   RDA3   RDA4   RDA5   RDA6  #> 21.588 14.075  4.123  3.163  2.369  1.107  #>  #> Eigenvalues for unconstrained axes: #>   PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13  #> 8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227  #>  plot(mod)  ## Permutation test for all variables anova(mod) #> Permutation test for rda under reduced model #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = dune ~ Management + Moisture, data = dune.env) #>          Df Variance      F Pr(>F)     #> Model     6   46.425 2.6682  0.001 *** #> Residual 13   37.699                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Permutation test of \"type III\" effects, or significance when a term ## is added to the model after all other terms anova(mod, by = \"margin\") #> Permutation test for rda under reduced model #> Marginal effects of terms #> Permutation: free #> Number of permutations: 999 #>  #> Model: rda(formula = dune ~ Management + Moisture, data = dune.env) #>            Df Variance      F Pr(>F)    #> Management  3   18.938 2.1769  0.005 ** #> Moisture    3   17.194 1.9764  0.008 ** #> Residual   13   37.699                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 ## Plot only sample plots, use different symbols and draw SD ellipses  ## for Managemenet classes plot(mod, display = \"sites\", type = \"n\") with(dune.env, points(mod, disp = \"si\", pch = as.numeric(Management))) with(dune.env, legend(\"topleft\", levels(Management), pch = 1:4,   title = \"Management\")) with(dune.env, ordiellipse(mod, Management, label = TRUE)) ## add fitted surface of diversity to the model ordisurf(mod, diversity(dune), add = TRUE)  #>  #> Family: gaussian  #> Link function: identity  #>  #> Formula: #> y ~ s(x1, x2, k = 10, bs = \"tp\", fx = FALSE) #>  #> Estimated degrees of freedom: #> 1.28  total = 2.28  #>  #> REML score: 3.00623      ### Example 3: analysis of dissimilarites a.k.a. non-parametric ### permutational anova adonis2(dune ~ ., dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ ., data = dune.env) #>            Df SumOfSqs      R2      F Pr(>F)    #> A1          1   0.7230 0.16817 5.2038  0.002 ** #> Moisture    3   1.1871 0.27613 2.8482  0.006 ** #> Management  3   0.9036 0.21019 2.1681  0.028 *  #> Use         2   0.0921 0.02143 0.3315  0.983    #> Manure      3   0.4208 0.09787 1.0096  0.439    #> Residual    7   0.9725 0.22621                  #> Total      19   4.2990 1.00000                  #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 adonis2(dune ~ Management + Moisture, dune.env) #> Permutation test for adonis under reduced model #> Terms added sequentially (first to last) #> Permutation: free #> Number of permutations: 999 #>  #> adonis2(formula = dune ~ Management + Moisture, data = dune.env) #>            Df SumOfSqs      R2      F Pr(>F)     #> Management  3   1.4686 0.34161 3.7907  0.001 *** #> Moisture    3   1.1516 0.26788 2.9726  0.002 **  #> Residual   13   1.6788 0.39051                   #> Total      19   4.2990 1.00000                   #> --- #> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1"},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":null,"dir":"Reference","previous_headings":"","what":"Dissimilarity Indices for Community Ecologists — vegdist","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"function computes dissimilarity indices useful   popular community ecologists. indices use quantitative data,   although named corresponding binary index,   can calculate binary index using appropriate argument.    find favourite index , can see can   implemented using designdist.  Gower, Bray--Curtis,   Jaccard Kulczynski indices good detecting underlying   ecological gradients (Faith et al. 1987). Morisita, Horn--Morisita,   Binomial, Cao Chao indices able handle different   sample sizes (Wolda 1981, Krebs 1999, Anderson & Millar 2004),   Mountford (1962) Raup-Crick indices presence--absence data   able handle unknown (variable) sample sizes.   indices discussed Krebs (1999) Legendre & Legendre   (2012), properties compared Wolda (1981)   Legendre & De Cáceres (2012). Aitchison (1986) distance    equivalent Euclidean distance CLR-transformed samples   (\"clr\") deals positive compositional data.   Robust Aitchison distance Martino et al. (2019) uses robust   CLR (\"rlcr\"), making applicable non-negative data   including zeroes (unlike standard Aitchison).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"","code":"vegdist(x, method=\"bray\", binary=FALSE, diag=FALSE, upper=FALSE,         na.rm = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"x Community data matrix. method Dissimilarity index, partial match     \"manhattan\", \"euclidean\", \"canberra\",     \"clark\", \"bray\", \"kulczynski\",     \"jaccard\", \"gower\", \"altGower\",     \"morisita\", \"horn\", \"mountford\", \"raup\",     \"binomial\", \"chao\", \"cao\", \"mahalanobis\",     \"chisq\", \"chord\", \"hellinger\",     \"aitchison\", \"robust.aitchison\". binary Perform presence/absence standardization analysis     using decostand. diag Compute diagonals. upper Return upper diagonal. na.rm Pairwise deletion missing observations     computing dissimilarities. ... parameters.  ignored, except     method =\"gower\" accepts range.global parameter     decostand, method=\"aitchison\",     accepts pseudocount parameter decostand used     clr transformation.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Jaccard (\"jaccard\"), Mountford (\"mountford\"),   Raup--Crick (\"raup\"), Binomial Chao indices discussed   later section.  function also finds indices presence/   absence data setting binary = TRUE. following overview   gives first quantitative version, \\(x_{ij}\\)   \\(x_{ik}\\) refer quantity species (column) \\(\\)   sites (rows) \\(j\\) \\(k\\). binary versions \\(\\)   \\(B\\) numbers species compared sites, \\(J\\)   number species occur compared sites similarly   designdist (many indices produce identical binary   versions):  Jaccard index computed \\(2B/(1+B)\\), \\(B\\)   Bray--Curtis dissimilarity. Binomial index derived Binomial deviance null hypothesis   two compared communities equal. able   handle variable sample sizes. index fixed upper   limit, can vary among sites shared species.   discussion, see Anderson & Millar (2004). Cao index CYd index (Cao et al. 1997) suggested minimally   biased index high beta diversity variable sampling intensity.   Cao index fixed upper limit, can vary among sites   shared species.  index intended count (integer)   data, undefined zero abundances; replaced   arbitrary value \\(0.1\\) following Cao et al. (1997).  Cao et   al. (1997) used \\(\\log_{10}\\), current function uses   natural logarithms values approximately \\(2.30\\)   times higher 10-based logarithms. Anderson & Thompson (2004)   give alternative formulation Cao index highlight   relationship Binomial index (). Mountford index defined \\(M = 1/\\alpha\\) \\(\\alpha\\)   parameter Fisher's logseries assuming compared   communities samples community   (cf. fisherfit, fisher.alpha). index   \\(M\\) found positive root equation \\(\\exp() +   \\exp(bM) = 1 + \\exp[(+b-j)M]\\), \\(j\\) number species occurring   communities, \\(\\) \\(b\\) number species   separate community (index uses presence--absence   information). Mountford index usually misrepresented   literature: indeed Mountford (1962) suggested approximation   used starting value iterations, proper index   defined root equation . function   vegdist solves \\(M\\) Newton method. Please note   either \\(\\) \\(b\\) equal \\(j\\), one   communities subset , dissimilarity   \\(0\\) meaning non-identical objects may regarded   similar index non-metric. Mountford index   range \\(0 \\dots \\log(2)\\). Raup--Crick dissimilarity (method = \"raup\") probabilistic   index based presence/absence data.  defined \\(1 -   prob(j)\\), based probability observing least \\(j\\)   species shared compared communities.  current function uses   analytic result hypergeometric distribution   (phyper) find probabilities.  probability   (index) dependent number species missing   sites, adding -zero species data removing missing   species data influence index.  probability (  index) may almost zero almost one wide range   parameter values.  index nonmetric: two communities   shared species may dissimilarity slightly one, two   identical communities may dissimilarity slightly zero.   index uses equal occurrence probabilities species, Raup   Crick originally suggested sampling probabilities   proportional species frequencies (Chase et al. 2011). simulation   approach unequal species sampling probabilities implemented   raupcrick function following Chase et al. (2011).    index can also used transposed data give probabilistic   dissimilarity index species co-occurrence (identical Veech   2013). Chao index tries take account number unseen species   pairs, similarly method = \"chao\"   specpool. Function vegdist implements   Jaccard, index defined   \\(1-\\frac{U \\times V}{U + V - U \\times V}\\);   types can defined function chaodist. Chao   equation, \\(U = C_j/N_j + (N_k - 1)/N_k \\times a_1/(2 a_2) \\times   S_j/N_j\\),   \\(V\\) similar except site index   \\(k\\). \\(C_j\\) total number individuals   species site \\(j\\) shared site \\(k\\),   \\(N_j\\) total number individuals site \\(j\\),   \\(a_1\\) (\\(a_2\\)) number species   occurring site \\(j\\) one (two) individuals   site \\(k\\), \\(S_j\\) total number individuals   species present site \\(j\\) occur one   individual site \\(k\\) (Chao et al. 2005). Morisita index can used genuine count data (integers) .   Horn--Morisita variant able handle abundance data. Mahalanobis distances Euclidean distances matrix   columns centred, unit variance, uncorrelated.    index commonly used community data, sometimes   used environmental variables. calculation based   transforming data matrix using Euclidean distances   following Mardia et al. (1979). Mahalanobis transformation   usually fails number columns larger number   rows (sampling units). transformation fails,   distances nearly constant except small numeric noise. Users   must check returned Mahalanobis distances meaningful. Euclidean Manhattan dissimilarities good gradient   separation without proper standardization still included   comparison special needs. Chi-square distances (\"chisq\") Euclidean distances   Chi-square transformed data (see decostand).   internal standardization used correspondence analysis   (cca, decorana). Weighted principal   coordinates analysis distances row sums weights   equal correspondence analysis (see Example   wcmdscale). Chi-square distance intended   non-negative data, typical community data. However, can   calculated long margin sums positive, warning   issued negative data entries. Chord distances (\"chord\") Euclidean distance matrix   rows standardized unit norm (sums squares 1)   using decostand. Geometrically standardization   moves row points surface multidimensional unit sphere,   distances chords across hypersphere. Hellinger distances   (\"hellinger\") related Chord distances, data   standardized unit total (row sums 1) using   decostand, square root transformed.   distances upper limit \\(\\sqrt{2}\\). Bray--Curtis Jaccard indices rank-order similar,   indices become identical rank-order similar    standardizations, especially presence/absence transformation   equalizing site totals decostand. Jaccard index   metric, probably preferred instead default   Bray-Curtis semimetric. Aitchison distance (1986) robust Aitchison distance   (Martino et al. 2019) metrics deal   compositional data. Aitchison distance said   outperform Jensen-Shannon divergence Bray-Curtis dissimilarity,   due better stability subsetting aggregation,   proper distance (Aitchison et al., 2000). naming conventions vary. one adopted traditional   rather truthful priority. function finds either   quantitative binary variants indices name,   correctly may refer one alternatives   instance, Bray   index known also Steinhaus, Czekanowski   Sørensen index.   quantitative version Jaccard probably called   Ružička index.   abbreviation \"horn\" Horn--Morisita index   misleading, since separate Horn index. abbreviation   changed index implemented vegan.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Function drop-replacement dist function   returns distance object type. result object adds   attribute maxdist gives theoretical maximum   index sampling units share species, NA   maximum.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Aitchison, J. Statistical Analysis Compositional Data (1986).   London, UK: Chapman & Hall. Aitchison, J., Barceló-Vidal, C.,   Martín-Fernández, J.., Pawlowsky-Glahn, V. (2000).   Logratio analysis compositional distance.   Math. Geol. 32, 271–275. Anderson, M.J. Millar, R.B. (2004). Spatial variation effects   habitat temperate reef fish assemblages northeastern New   Zealand.  Journal Experimental Marine Biology Ecology   305, 191--221. Anderson, M.J., Ellingsen, K.E. & McArdle, B.H. (2006). Multivariate   dispersion measure beta diversity. Ecology Letters    9, 683--693. Anderson, M.J & Thompson, .. (2004). Multivariate control charts   ecological environmental monitoring. Ecological     Applications 14, 1921--1935. Cao, Y., Williams, W.P. & Bark, .W. (1997). Similarity measure bias   river benthic Auswuchs community analysis. Water   Environment Research 69, 95--106. Chao, ., Chazdon, R. L., Colwell, R. K. Shen, T. (2005). new   statistical approach assessing similarity species composition   incidence abundance data. Ecology Letters 8, 148--159. Chase, J.M., Kraft, N.J.B., Smith, K.G., Vellend, M. Inouye,   B.D. (2011). Using null models disentangle variation community   dissimilarity variation \\(\\alpha\\)-diversity.   Ecosphere 2:art24 doi:10.1890/ES10-00117.1 Faith, D. P, Minchin, P. R. Belbin, L. (1987).   Compositional dissimilarity robust measure ecological   distance. Vegetatio 69, 57--68. Gower, J. C. (1971). general coefficient similarity   properties. Biometrics 27, 623--637. Krebs, C. J. (1999). Ecological Methodology. Addison Wesley   Longman. Legendre, P. & De Cáceres, M. (2012). Beta diversity   variance community data: dissimilarity coefficients   partitioning. Ecology Letters 16, 951--963.   doi:10.1111/ele.12141 Legendre, P. Legendre, L. (2012) Numerical Ecology. 3rd English   ed. Elsevier. Mardia, K.V., Kent, J.T. Bibby, J.M. (1979). Multivariate analysis.   Academic Press. Martino, C., Morton, J.T., Marotz, C.., Thompson, L.R., Tripathi, .,   Knight, R. & Zengler, K. (2019) novel sparse compositional technique   reveals microbial perturbations. mSystems 4, 1. Mountford, M. D. (1962). index similarity application   classification problems. : P.W.Murphy (ed.),   Progress Soil Zoology, 43--50. Butterworths. Veech, J. . (2013). probabilistic model analysing species   co-occurrence. Global Ecology Biogeography 22, 252--260. Wolda, H. (1981). Similarity indices, sample size   diversity. Oecologia 50, 296--302.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"Jari Oksanen, contributions Tyler Smith (Gower index),   Michael Bedward (Raup--Crick index),   Leo Lahti (Aitchison robust Aitchison distance).","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"function alternative dist adding   ecologically meaningful indices.  methods produce similar   types objects can interchanged method accepting   either.  Manhattan Euclidean dissimilarities identical   methods. Canberra index divided number variables   vegdist, dist.  differ   constant multiplier, alternative vegdist   range (0,1).  Function daisy (package   cluster) provides alternative implementation Gower index   also can handle mixed data numeric class variables.    two versions Gower distance (\"gower\", \"altGower\")   differ scaling: \"gower\" divides distances   number observations (rows) scales column unit range,   \"altGower\" omits double-zeros divides number   pairs least one -zero value, scale columns   (Anderson et al. 2006).  can use decostand add   range standardization \"altGower\" (see Examples). Gower   (1971) suggested omitting double zeros presences, often   taken general feature Gower distances. See Examples   implementing Anderson et al. (2006) variant Gower index. dissimilarity indices vegdist designed   community data, give misleading values   negative data entries.  results may also misleading   NA NaN empty sites.  principle,   study species composition without species remove   empty sites community data.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegdist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Dissimilarity Indices for Community Ecologists — vegdist","text":"","code":"data(varespec) vare.dist <- vegdist(varespec) # Orlóci's Chord distance: range 0 .. sqrt(2) vare.dist <- vegdist(decostand(varespec, \"norm\"), \"euclidean\") # Anderson et al.  (2006) version of Gower vare.dist <- vegdist(decostand(varespec, \"log\"), \"altGower\") #> Warning: non-integer data: divided by smallest positive value # Range standardization with \"altGower\" (that excludes double-zeros) vare.dist <- vegdist(decostand(varespec, \"range\"), \"altGower\")"},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":null,"dir":"Reference","previous_headings":"","what":"Display Compact Ordered Community Tables — vegemite","title":"Display Compact Ordered Community Tables — vegemite","text":"Functions vegemite tabasco display compact   community tables.  Function vegemite prints text tables   species rows, site takes one column without   spaces.  Function tabasco provides interface   heatmap colour image   data. community table can ordered explicit indexing,   environmental variables results ordination cluster   analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Display Compact Ordered Community Tables — vegemite","text":"","code":"vegemite(x, use, scale, sp.ind, site.ind, zero=\".\", select ,...) tabasco(x, use, sp.ind = NULL, site.ind = NULL, select,     Rowv = TRUE, Colv = TRUE, labRow = NULL, labCol = NULL,     scale, col = heat.colors(12), ...) coverscale(x, scale=c(\"Braun.Blanquet\", \"Domin\", \"Hult\", \"Hill\", \"fix\",\"log\"),            maxabund, character = TRUE)"},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Display Compact Ordered Community Tables — vegemite","text":"x Community data. use Either vector, object cca,     decorana etc. hclust     dendrogram ordering sites species. sp.ind, site.ind Species site indices. tabasco,     can also hclust tree,     agnes clusterings     dendrograms. zero Character used zeros. select Select subset sites.  can logical vector     (TRUE selected sites), vector indices selected     sites.  order indices influence results,     must specify use site.ind reorder sites. Rowv, Colv Re-order dendrograms rows (sites)     columns (species) x.  Rowv = TRUE, row     dendrograms ordered first axis correspondence     analysis, Colv = TRUE column dendrograms     weighted average (wascores) row order.     Alternatively, arguments can vectors used     reorder dendrogram. labRow, labCol character vectors row column labels     used heatmap instead default. NB.,     input matrix transposed row labels used data     columns. scale vegemite coverscale: cover scale     used (can abbreviated). tabasco: scaling colours     heatmap. alternatives coverscale     can used tabasco, addition \"column\"     \"row\" scale columns rows equal maxima (NB.,     refer transposed data heatmap),     \"none\" uses original values. col vector colours used -zero abundance values. maxabund Maximum abundance used scale = \"log\".     Data maximum selected subset used     missing. character Return character codes suitable     vegemite. FALSE, returns corresponding     integers. ... Arguments passed coverscale (.e., maxabund)     vegemite heatmap tabasco.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Display Compact Ordered Community Tables — vegemite","text":"function vegemite prints traditional community table.   display transposed, species rows sites   columns.  table printed compact form: one character   can used abundance, spaces   columns. Species occurrences dropped table. Function tabasco produces similar table vegemite   using heatmap, abundances coded   colours. function scales abundances equal intervals   colour palette, either rows columns can scaled equal   maxima, coverscale class systems can used.   function can also display dendrograms sites (columns) species   given argument (use sites,   sp.ind species). parameter use used re-order output.   use can vector object hclust   agnes, dendrogram   ordination result recognized scores (ordination   methods vegan vegan).   hclust, agnes   dendrogram must sites. dendrogram   displayed sites tabasco, shown   vegemite.  dendrogram species displayed, except   given sp.ind. use vector, used ordering sites.    use object ordination, sites species   arranged first axis (provided results available   also species).  use object   hclust, agnes   dendrogram, sites ordered similarly   cluster dendrogram.  Function tabasco re-orders dendrogram   Rowv = TRUE Rowv vector. re-ordering   available vegemite, can done hand using   reorder.dendrogram reorder.hclust.   Please note dendrogram hclust   reordering can differ: unweighted means merged branches used   dendrogram, weighted means (= means leaves   cluster) used reorder.hclust.  cases   species scores missing, species ordered weighted   averages (wascores) site order. Species sites can ordered explicitly giving indices   names parameters sp.ind site.ind.    given, take precedence use. subset sites can   displayed using argument select, used   order sites, still must give use   site.ind.  However, tabasco makes two exceptions:   site.ind select used use   dendrogram (clustering result). addition, sp.ind can   hclust tree, agnes   clustering dendrogram, case   dendrogram plotted left side   heatmap. Phylogenetic trees directly used,   package ape tools transform   hclust trees. scale given, vegemite calls coverscale   transform percent cover scale scales traditional   class scales used vegetation science (coverscale can   called directly, ). Function tabasco can also use   traditional class scales, treats transformed values   corresponding integers.  Braun-Blanquet Domin scales   actually strict cover scales, limits used codes   r + arbitrary.  Scale Hill may   inappropriately named, since Mark O. Hill probably never intended   cover scale.  However, used default “cut levels”   TWINSPAN, surprisingly many users stick   default, de facto standard publications.   traditional scales assume values cover percentages   maximum 100.  However, non-traditional alternative log can   used scale range.  class limits integer powers   1/2 maximum (argument maxabund), + used   non-zero entries less 1/512 maximum (log   stands alternatively logarithmic logical).  Scale fix   intended “fixing” 10-point scales: truncates scale values   integers, replaces 10 X positive values   1 +.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Display Compact Ordered Community Tables — vegemite","text":"functions used mainly display table, return   (invisibly) list items species ordered species   index, sites ordered site index, table   final ordered community table. items can used arguments sp.ind site.ind reproduce table, table can edited.   addition table, vegemite prints numbers species   sites name used cover scale.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Display Compact Ordered Community Tables — vegemite","text":"cover scales presented many textbooks vegetation   science; used: Shimwell, D.W. (1971) Description Classification   Vegetation. Sidgwick & Jackson.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Display Compact Ordered Community Tables — vegemite","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Display Compact Ordered Community Tables — vegemite","text":"name vegemite chosen output   compact, tabasco just compact,   uses heat colours.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/vegemite.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Display Compact Ordered Community Tables — vegemite","text":"","code":"data(varespec) ## Print only more common species freq <- apply(varespec > 0, 2, sum) vegemite(varespec, scale=\"Hult\", sp.ind = freq > 10) #>                                    #>           1122212121122       1112 #>           854739268340575634292011 #>  Callvulg 111...11.311...1111.111. #>  Empenigr 211332121112211111212213 #>  Vaccviti 323332212113221211233234 #>  Pinusylv 111.111111111.11.1111111 #>  Dicrfusc 12.111441121211111111111 #>  Dicrpoly .11.11.11..1.11....1.111 #>  Pleuschr 144533435123411111111131 #>  Polyjuni 111.11.111112111.111.111 #>  Pohlnuta 111111111111.1..11.11111 #>  Ptilcili 1111111111..1..11.11..12 #>  Cladarbu 321122121332143423111121 #>  Cladrang 321221131312145443313241 #>  Cladstel 11111311.211.11254555542 #>  Cladunci 112111111131111111111111 #>  Cladcocc 11..11111111111111.1.11. #>  Cladcorn 111111111111111111111111 #>  Cladgrac 111111111111111111111.11 #>  Cladfimb 11.1111111111111111111.1 #>  Cladcris 111111111111111111111111 #>  Cladchlo ..1.111..1...1.11.11.1.1 #>  Cetreric 111...11.111111111.1.1.. #>  Cetrisla .11....1111.1....1.11111 #>  Stersp   111.11.1111.112111...11. #>  Claddefo 1111111111111111111111.1 #> 24 sites, 24 species #> scale:  Hult  ## Order by correspondence analysis, use Hill scaling and layout: dca <- decorana(varespec) vegemite(varespec, dca, \"Hill\", zero=\"-\") #>                                    #>            1   1  1 11122211122222 #>           203942561738913046572458 #>  Flavniva -1114-11-1-11-1--------- #>  Cladstel 5555551451425411111211-- #>  Cladphyl -1-1----1-------1------- #>  Cladcerv 1---1-----------------1- #>  Cladsp   ---11--1--11---1-1-11-1- #>  Cladamau --1---1----1------------ #>  Cladchlo 1111---1-11-111-----11-- #>  Cladrang 535254555555223414332321 #>  Diphcomp --11-----112----------1- #>  Stersp   -11-1-4111111-1-111--111 #>  Pinusylv 11-111111-111111111-1111 #>  Polypili ------111--11-11--1----- #>  Cetrisla -1-111--1-1--1--111--111 #>  Cladcocc -1111-1111111-11111-1-11 #>  Cladarbu 113142453555313343413231 #>  Vacculig --1-1----3-1---1---12-11 #>  Pohlnuta -11111--11111111111111-1 #>  Cladfimb 11111111-111111111111-11 #>  Callvulg 111-21-12-51---1221-21-- #>  Icmaeric ------1--1------11------ #>  Empenigr 342214131314344333143131 #>  Vaccviti 342514244334455432444443 #>  Cladgrac 1-1111111111111111111111 #>  Cetreric -1111-11-111---1111-111- #>  Cladcorn 111111111111111111111111 #>  Cladcris 111111111111111111111111 #>  Peltapht --------1-11--1----1--1- #>  Ptilcili 1-11---11-11141--1111111 #>  Barbhatc ----------1-121----1---- #>  Claddefo 11111111-111111111111111 #>  Cladbotr ----------1-1111---1-1-1 #>  Betupube -------------1------1-1- #>  Dicrpoly -1-1--1-11--1211-11--1-1 #>  Cladunci 111111122111111251212311 #>  Polycomm ------------11--1--1--1- #>  Polyjuni 11-11-1111111121111--131 #>  Rhodtome ----------1--2-----21--1 #>  Dicrfusc 111111111121112145425-41 #>  Pleuschr 111213114132524434555555 #>  Vaccmyrt ---1------1-24--12133--4 #>  Descflex ----1----1--11-----21-11 #>  Nepharct --1------1-1---1------2- #>  Dicrsp   -----1----1--1-1-11-1541 #>  Hylosple ---------------1---3--13 #> 24 sites, 44 species #> scale:  Hill  ## Show one class from cluster analysis, but retain the ordering above clus <- hclust(vegdist(varespec)) cl <- cutree(clus, 3) sel <- vegemite(varespec, use=dca, select = cl == 3, scale=\"Br\") #>                 #>            1 12 #>           20921 #>  Flavniva .++.. #>  Cladstel 55542 #>  Cladphyl .++.. #>  Cladcerv r.... #>  Cladsp   ..+.. #>  Cladchlo r++.+ #>  Cladrang 22121 #>  Diphcomp ..+.. #>  Stersp   .+... #>  Pinusylv r++1+ #>  Cetrisla .++++ #>  Cladcocc .++.. #>  Cladarbu +1+1+ #>  Pohlnuta .++++ #>  Cladfimb r++++ #>  Callvulg r+.+. #>  Empenigr 22122 #>  Vaccviti 22223 #>  Cladgrac r.+++ #>  Cetreric .++.. #>  Cladcorn r+++r #>  Cladcris r++++ #>  Ptilcili r.+.2 #>  Barbhatc ....1 #>  Claddefo r++++ #>  Cladbotr ....+ #>  Betupube ....+ #>  Dicrpoly .++.1 #>  Cladunci +++1+ #>  Polycomm ....+ #>  Polyjuni r++.+ #>  Rhodtome ....1 #>  Dicrfusc r++++ #>  Pleuschr ++121 #>  Vaccmyrt ..+.2 #>  Descflex ....+ #>  Dicrsp   ...++ #> 5 sites, 37 species #> scale:  Braun.Blanquet  ## Re-create previous vegemite(varespec, sp=sel$sp, site=sel$site, scale=\"Hult\") #>                 #>            1 12 #>           20921 #>  Flavniva .11.. #>  Cladstel 55552 #>  Cladphyl .11.. #>  Cladcerv 1.... #>  Cladsp   ..1.. #>  Cladchlo 111.1 #>  Cladrang 32131 #>  Diphcomp ..1.. #>  Stersp   .1... #>  Pinusylv 11111 #>  Cetrisla .1111 #>  Cladcocc .11.. #>  Cladarbu 11111 #>  Pohlnuta .1111 #>  Cladfimb 11111 #>  Callvulg 11.1. #>  Empenigr 22123 #>  Vaccviti 22334 #>  Cladgrac 1.111 #>  Cetreric .11.. #>  Cladcorn 11111 #>  Cladcris 11111 #>  Ptilcili 1.1.2 #>  Barbhatc ....1 #>  Claddefo 11111 #>  Cladbotr ....1 #>  Betupube ....1 #>  Dicrpoly .11.1 #>  Cladunci 11111 #>  Polycomm ....1 #>  Polyjuni 111.1 #>  Rhodtome ....1 #>  Dicrfusc 11111 #>  Pleuschr 11111 #>  Vaccmyrt ..1.3 #>  Descflex ....1 #>  Dicrsp   ...11 #> 5 sites, 37 species #> scale:  Hult  ## Re-order clusters by ordination clus <- as.dendrogram(clus) clus <- reorder(clus, scores(dca, choices=1, display=\"sites\"), agglo.FUN = mean) vegemite(varespec, clus, scale = \"Hult\") #>                                    #>             1   111  1211221212222 #>           431567380922149306254578 #>  Flavniva 21.111.111....11........ #>  Cladamau .1.1...1................ #>  Stersp   111211111....111.1.111.1 #>  Polypili ..111..1......111..1.... #>  Diphcomp .1...111.1...........1.. #>  Cladphyl ..1.....11...1.......... #>  Cladrang 344544332133111223121121 #>  Cladcerv 1.........1..........1.. #>  Cladstel 454121215555213111111.1. #>  Cladarbu 322344331111132222121111 #>  Vacculig 11...2.1........1.1..111 #>  Callvulg 111.1.311.11.1..11111... #>  Icmaeric ...1.1.......1...1...... #>  Cladsp   1...1.11.1......111..11. #>  Cladcocc 1111111111...1111111.1.1 #>  Pinusylv 1.111.1111111111111111.1 #>  Cladchlo .1..111.111.1.11..1.1... #>  Cetrisla 1.1...1.11.111...1.111.1 #>  Cladfimb 11.11111111111111111.111 #>  Peltapht ..1...11.......1.....11. #>  Cetreric 11.1111111...1..111111.. #>  Cladgrac 11111111.111111111111111 #>  Pohlnuta 111..11111.1111111111.11 #>  Ptilcili .11.1.11.11.2.11.1111111 #>  Barbhatc ......1.....1.11......1. #>  Cladcorn 111111111111111111111111 #>  Vaccviti 113122132323412331223232 #>  Cladcris 111111111111111111111111 #>  Empenigr 111111122122312322111231 #>  Cladbotr ......1.....1.111...1.11 #>  Betupube ............1.....1..1.. #>  Cladunci 111111111111131111112111 #>  Claddefo 11.111111111111111111111 #>  Dicrpoly ..11.1..11..1.1111.11..1 #>  Polycomm ............111......11. #>  Rhodtome ......1.....1.....1...11 #>  Polyjuni 1.111111111.111111.112.1 #>  Dicrfusc 11111111111112111442.211 #>  Pleuschr 113111111111123333444455 #>  Vaccmyrt ......1..1..311..111..13 #>  Nepharct .1...1.1........1....1.. #>  Dicrsp   ......1....11...111133.1 #>  Descflex 1....1......1.1...1..111 #>  Hylosple ................1....122 #> 24 sites, 44 species #> scale:  Hult   ## Abundance values have such a wide range that they must be rescaled tabasco(varespec, dca, scale=\"Braun\")   ## Classification trees for species data(dune, dune.taxon) taxontree <- hclust(taxa2dist(dune.taxon)) plotree <- hclust(vegdist(dune), \"average\") ## Automatic reordering of clusters tabasco(dune, plotree, sp.ind = taxontree)  ## No reordering of taxonomy tabasco(dune, plotree, sp.ind = taxontree, Colv = FALSE)  ## Species cluster: most dissimilarity indices do a bad job when ## comparing rare and common species, but Raup-Crick makes sense sptree <- hclust(vegdist(t(dune), \"raup\"), \"average\") tabasco(dune, plotree, sptree)"},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted Averages Scores for Species — wascores","title":"Weighted Averages Scores for Species — wascores","text":"Computes Weighted Averages scores species ordination   configuration environmental variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted Averages Scores for Species — wascores","text":"","code":"wascores(x, w, expand=FALSE) eigengrad(x, w)"},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted Averages Scores for Species — wascores","text":"x Environmental variables ordination scores. w Weights: species abundances. expand Expand weighted averages     weighted variance corresponding environmental variables.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted Averages Scores for Species — wascores","text":"Function wascores computes weighted averages. Weighted averages   “shrink”: extreme values used   calculating averages. expand = TRUE, function   “deshrinks” weighted averages making biased   weighted variance equal biased weighted variance   corresponding environmental variable.  Function eigengrad   returns inverses squared expansion factors attribute   shrinkage wascores result environmental   gradient.  equal constrained eigenvalue   cca one gradient used   constraint, describes strength gradient.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted Averages Scores for Species — wascores","text":"Function wascores returns matrix species define rows   ordination axes environmental variables define columns.  expand = TRUE, attribute shrinkage inverses   squared expansion factors cca eigenvalues   variable.  Function eigengrad returns shrinkage attribute.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Weighted Averages Scores for Species — wascores","text":"Jari Oksanen","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/wascores.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted Averages Scores for Species — wascores","text":"","code":"data(varespec) data(varechem) vare.dist <- vegdist(wisconsin(varespec)) vare.mds <- monoMDS(vare.dist) vare.points <- postMDS(vare.mds$points, vare.dist) vare.wa <- wascores(vare.points, varespec) plot(scores(vare.points), pch=\"+\", asp=1) text(vare.wa, rownames(vare.wa), cex=0.8, col=\"blue\")  ## Omit rare species (frequency <= 4) freq <- apply(varespec>0, 2, sum) plot(scores(vare.points), pch=\"+\", asp=1) text(vare.wa[freq > 4,], rownames(vare.wa)[freq > 4],cex=0.8,col=\"blue\")  ## Works for environmental variables, too. wascores(varechem, varespec) #>                 N        P         K       Ca        Mg        S        Al #> Callvulg 25.12401 41.66188 246.92383 572.3431  99.40828 49.10552 245.15751 #> Empenigr 21.61371 44.17350 158.92517 580.8403  89.20628 35.75327 107.05670 #> Rhodtome 22.34553 40.35530 162.31108 643.8819  95.07712 30.84303  28.83159 #> Vaccmyrt 24.96352 49.80649 189.70177 656.4179  96.75529 34.55190  32.75705 #> Vaccviti 21.14028 45.86984 162.12372 613.2126  94.30084 37.26975 116.14656 #> Pinusylv 18.37299 44.24818 163.60195 670.9387  93.52214 37.02238 150.45523 #> Descflex 22.24089 54.74804 212.20357 771.0159 114.15179 38.00000  24.64143 #> Betupube 21.51034 28.86552 112.28276 513.5586  75.15172 23.55172  33.12414 #> Vacculig 28.00729 33.48758 114.90230 372.9653  70.89954 29.32378 202.89008 #> Diphcomp 22.34228 39.71049 127.44259 446.1565  80.16173 32.32963 122.31574 #> Dicrsp   21.33007 60.03758 185.04563 828.0544 148.67509 46.75427  90.42294 #> Dicrfusc 23.45681 39.14575 162.91954 578.2309  77.81648 33.48086  60.66890 #> Dicrpoly 20.65446 43.87409 150.51485 665.5845 115.22112 36.17079  90.16733 #> Hylosple 26.10599 67.88980 245.78681 779.6520 111.96685 42.27433  24.92738 #> Pleuschr 22.60476 54.22534 199.96241 712.6278 109.23425 40.01132  70.43900 #> Polypili 23.17377 43.75902 144.82623 724.9738  85.42623 30.58525 145.73115 #> Polyjuni 22.89480 47.98022 154.81906 643.3864  87.27819 33.63863  53.24888 #> Polycomm 21.73521 41.17042 154.91549 631.8704 101.84789 32.17324  46.80986 #> Pohlnuta 19.99885 48.59198 169.68855 678.3813 104.31641 39.94427 132.05458 #> Ptilcili 21.27880 33.44211 127.08522 564.5652  85.96417 27.11720  56.60692 #> Barbhatc 21.17461 27.93323 113.13542 497.9138  77.50564 23.72288  42.09749 #> Cladarbu 23.56127 38.04952 142.03073 454.9019  74.00779 33.81002 173.12698 #> Cladrang 24.28421 38.60534 135.31177 463.2750  70.54209 32.53349 183.79979 #> Cladstel 19.28049 46.71060 158.00576 540.4904  80.19153 40.29106 225.89526 #> Cladunci 21.41240 45.49844 163.40402 621.9100  98.35538 40.00734 119.59481 #> Cladcocc 21.72473 42.80681 156.32330 557.9007  80.95448 36.25161 149.82616 #> Cladcorn 22.11640 47.06656 160.36881 623.5185  95.17781 36.75273 104.71463 #> Cladgrac 22.51887 44.06576 156.50214 583.1558  94.10292 36.93930 134.13424 #> Cladfimb 21.77980 41.82652 153.29444 512.4646  78.28232 35.62323 128.96061 #> Cladcris 20.88795 44.12262 171.04016 574.5672  92.52169 38.24003 116.03507 #> Cladchlo 19.51207 45.39655 150.93190 571.0233  95.77586 39.50862 156.81983 #> Cladbotr 22.97660 38.89574 167.20000 590.8021  99.57234 34.79362  87.75957 #> Cladamau 25.07143 35.84286 105.07857 395.2214  68.18571 27.11429  95.91429 #> Cladsp   19.21923 47.37308 168.49231 526.7654  79.54423 45.15385 215.33846 #> Cetreric 21.00944 47.76972 165.07972 579.6322  99.14944 42.25472 163.46000 #> Cetrisla 18.36552 42.73695 151.78374 626.2813  89.77833 35.33498 132.68227 #> Flavniva 18.56110 61.18194 207.67705 502.9203  60.91755 50.22532 396.82405 #> Nepharct 23.33099 49.10019 146.84715 618.1601  64.27319 29.95760  31.72300 #> Stersp   28.19743 32.84800  94.33459 389.5143  53.25377 24.22175  95.39326 #> Peltapht 21.08553 54.45395 193.38816 886.5487 119.35132 37.92500 106.16447 #> Icmaeric 28.88636 27.00000  87.86818 307.0500  40.48182 22.17273  89.94091 #> Cladcerv 20.25000 56.79000 192.36000 519.2300  62.10000 45.18000 314.92000 #> Claddefo 22.19198 45.22981 167.73069 583.7983  92.01320 38.51369 100.46139 #> Cladphyl 15.73750 54.56875 180.39375 775.4500  99.65625 43.35000 208.55000 #>                  Fe        Mn        Zn        Mo  Baresoil Humdepth       pH #> Callvulg  75.457843  52.38247  8.281074 0.4734635 27.241036 2.187819 2.845108 #> Empenigr  38.146102  53.49357  7.159938 0.3289657 27.324317 2.367439 2.888078 #> Rhodtome   5.560906  70.48260  7.444100 0.2251490 37.325030 2.689154 2.895352 #> Vaccmyrt   5.589213  75.17221  7.838533 0.2666732 31.404171 2.798935 2.855216 #> Vaccviti  37.586067  51.81515  7.617213 0.3680289 26.307701 2.307879 2.923128 #> Pinusylv  39.121898  35.22311  7.733333 0.3485401 17.762968 1.996350 3.049148 #> Descflex   6.066429 110.87232  9.526607 0.2316071 22.740179 2.834821 2.822857 #> Betupube   5.417241  37.53448  5.637931 0.2068966 51.496552 2.527586 2.979310 #> Vacculig  93.963929  37.73062  4.593824 0.3780552 21.410710 2.041196 3.006965 #> Diphcomp  73.281173  46.88025  4.593827 0.3725309 31.836574 2.103704 2.856790 #> Dicrsp    22.504617  65.35020 13.060765 0.5610370 23.182889 2.232247 2.954272 #> Dicrfusc  13.922252  61.40958  6.922859 0.3218816 26.918674 2.484399 2.806431 #> Dicrpoly  20.973927  33.28779  9.110561 0.3892739 37.304043 2.228713 3.015842 #> Hylosple   4.729157 115.14606  9.885976 0.2851996 20.956264 2.925000 2.807594 #> Pleuschr  19.113811  77.12277  9.007860 0.3405945 24.584979 2.596881 2.858446 #> Polypili  51.993443  36.74754  8.045902 0.2204918 17.368852 1.493443 3.227869 #> Polyjuni  12.885704  82.56274  7.945126 0.2760289 28.116303 2.615523 2.874729 #> Polycomm   7.895775  68.22535  7.843662 0.2591549 38.687324 2.926761 2.860563 #> Pohlnuta  33.089313  42.02290  8.452290 0.3935115 24.709351 2.147328 2.985496 #> Ptilcili  14.036188  33.93547  5.906924 0.2303712 48.941884 2.502498 2.973376 #> Barbhatc   8.199687  31.11379  5.550784 0.2084639 54.331975 2.514734 2.986834 #> Cladarbu  65.470394  38.28429  6.387500 0.4464046 22.592997 2.048540 2.937879 #> Cladrang  76.612752  34.86010  6.616452 0.3903501 17.270158 1.799128 3.022346 #> Cladstel  84.639467  33.27903  7.287216 0.4054879  9.854042 1.851973 3.052167 #> Cladunci  27.463504  40.10322  9.108102 0.5120114 28.312376 2.362687 2.858564 #> Cladcocc  46.653763  43.53584  7.269176 0.3698925 19.972222 2.025090 2.974194 #> Cladcorn  32.916238  53.38441  7.518489 0.3639871 26.620868 2.399518 2.890997 #> Cladgrac  45.758366  44.63911  7.702724 0.4244163 25.546654 2.230350 2.933658 #> Cladfimb  41.710354  47.83687  6.815152 0.3887626 24.763889 2.239394 2.902778 #> Cladcris  34.729585  44.75984  6.933735 0.3746988 29.711352 2.400000 2.841633 #> Cladchlo  42.089655  35.13276  7.908621 0.3814655 22.319655 2.075000 3.022414 #> Cladbotr  23.374468  46.54255  7.263830 0.3106383 45.725532 2.580851 2.904255 #> Cladamau  68.971429  41.98571  4.928571 0.3214286 27.592857 1.857143 2.914286 #> Cladsp    47.913462  49.61923  8.421154 0.6173077 16.864423 2.213462 2.921154 #> Cetreric  42.614167  36.96694  9.516389 0.5687500 21.452639 2.058056 2.923889 #> Cetrisla  29.617734  33.24138  7.518227 0.3192118 26.417980 2.027586 3.065025 #> Flavniva  94.339916  37.03232  9.116371 0.9987764 19.692312 1.799241 2.923629 #> Nepharct  12.910837 115.15684  7.743536 0.2180608 23.135932 2.541065 2.918251 #> Stersp    30.226998  31.97061  7.635502 0.2828767 15.844007 1.477740 3.038756 #> Peltapht  37.598684  56.64079  7.652632 0.2046053 28.321053 2.286842 3.026316 #> Icmaeric  24.236364  23.95909  6.618182 0.2863636 18.727273 1.568182 2.968182 #> Cladcerv 111.090000  52.04000  8.530000 0.6800000 15.393000 1.870000 2.900000 #> Claddefo  25.116325  48.81105  7.599609 0.4096285 33.814545 2.468133 2.823656 #> Cladphyl  50.475000  35.28125  8.568750 0.2812500  7.728125 1.575000 3.231250 ## And the strengths of these variables are: eigengrad(varechem, varespec) #>          N          P          K         Ca         Mg          S         Al  #> 0.13000842 0.18880078 0.16246365 0.15722067 0.16359171 0.13391967 0.29817406  #>         Fe         Mn         Zn         Mo   Baresoil   Humdepth         pH  #> 0.20766831 0.27254480 0.16783834 0.09542514 0.20931501 0.25051326 0.14583161"},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":null,"dir":"Reference","previous_headings":"","what":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Weighted classical multidimensional scaling,   also known weighted principal coordinates analysis.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"","code":"wcmdscale(d, k, eig = FALSE, add = FALSE, x.ret = FALSE, w) # S3 method for wcmdscale plot(x, choices = c(1, 2), type = \"t\", ...) # S3 method for wcmdscale scores(x, choices = NA, tidy = FALSE, ...)"},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"d distance structure returned dist     full symmetric matrix containing dissimilarities. k dimension space data     represented ; must \\(\\{1,2,\\ldots,n-1\\}\\).     missing, dimensions zero eigenvalue. eig indicates whether eigenvalues returned. add additive constant \\(c\\) added non-diagonal     dissimilarities \\(n-1\\) eigenvalues     non-negative. Alternatives \"lingoes\" (default, also     used TRUE) \"cailliez\" (    alternative cmdscale). See Legendre & Anderson     (1999). x.ret indicates whether doubly centred symmetric distance     matrix returned. w Weights points. x wcmdscale result object function     called options eig = TRUE x.ret = TRUE (See     Details). choices Axes returned; NA returns real axes. type Type graph may \"t\"ext, \"p\"oints     \"n\"one. tidy Return scores compatible ggplot2:     scores data.frame, score type     variable score labelled \"sites\", weights     variable weigth, names variable label. ... arguments passed graphical functions.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Function wcmdscale based function   cmdscale (package stats base R), uses   point weights. Points high weights stronger   influence result low weights. Setting equal   weights w = 1 give ordinary multidimensional scaling. default options, function returns matrix scores   scaled eigenvalues real axes. function called   eig = TRUE x.ret = TRUE, function returns   object class \"wcmdscale\" print,   plot, scores, eigenvals   stressplot methods, described section Value. method Euclidean, non-Euclidean dissimilarities   eigenvalues can negative. disturbs , can   avoided adding constant non-diagonal dissimilarities making   eigenvalues non-negative. function implements methods   discussed Legendre & Anderson (1999): method Lingoes   (add=\"lingoes\") adds constant \\(c\\) squared   dissimilarities \\(d\\) using \\(\\sqrt{d^2 + 2 c}\\)   method Cailliez (add=\"cailliez\")   dissimilarities using \\(d + c\\). Legendre & Anderson (1999)   recommend method Lingoes, base R function   cmdscale implements method Cailliez.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"eig = FALSE x.ret = FALSE (default),   matrix k columns whose rows give coordinates   points corresponding positive eigenvalues.  Otherwise, object   class wcmdscale containing components mostly   similar cmdscale: points matrix k columns whose rows give     coordinates points chosen represent     dissimilarities. eig \\(n-1\\) eigenvalues computed scaling     process eig true. x doubly centred weighted distance matrix     x.ret true. ac, add additive constant adjustment method used avoid     negative eigenvalues. NA FALSE     adjustment done. GOF Goodness fit statistics k axes. first     value based sum absolute values eigenvalues,     second value based sum positive eigenvalues weights Weights. negaxes matrix scores axes negative eigenvalues      scaled absolute eigenvalues similarly      points. NULL negative      eigenvalues k specified, include      negative eigenvalues. call Function call.","code":""},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"Gower, J. C. (1966)   distance properties latent root vector   methods used multivariate analysis.   Biometrika 53, 325--328. Legendre, P. & Anderson, M. J. (1999). Distance-based redundancy     analysis: testing multispecies responses multifactorial     ecological experiments. Ecology 69, 1--24. Mardia, K. V., Kent, J. T. Bibby, J. M. (1979).  Chapter 14   Multivariate Analysis, London: Academic Press.","code":""},{"path":[]},{"path":"https://vegandevs.github.io/vegan/reference/wcmdscale.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Weighted Classical (Metric) Multidimensional Scaling — wcmdscale","text":"","code":"## Correspondence analysis as a weighted principal coordinates ## analysis of Euclidean distances of Chi-square transformed data data(dune) rs <- rowSums(dune)/sum(dune) d <- dist(decostand(dune, \"chi\")) ord <- wcmdscale(d, w = rs, eig = TRUE) ## Ordinary CA ca <- cca(dune)  ## IGNORE_RDIFF_BEGIN ## Eigevalues are numerically similar ca$CA$eig - ord$eig #>           CA1           CA2           CA3           CA4           CA5  #>  4.440892e-16  4.996004e-16  5.551115e-17  1.665335e-16  3.608225e-16  #>           CA6           CA7           CA8           CA9          CA10  #> -2.636780e-16 -1.942890e-16  8.326673e-17 -2.775558e-17 -6.938894e-18  #>          CA11          CA12          CA13          CA14          CA15  #>  9.020562e-17  1.387779e-17  1.387779e-17  2.081668e-17 -3.469447e-18  #>          CA16          CA17          CA18          CA19  #>  1.561251e-17  3.295975e-17  9.540979e-18  2.038300e-17  ## Configurations are similar when site scores are scaled by ## eigenvalues in CA procrustes(ord, ca, choices=1:19, scaling = \"sites\") #>  #> Call: #> procrustes(X = ord, Y = ca, choices = 1:19, scaling = \"sites\")  #>  #> Procrustes sum of squares: #> -5.684e-14  #>  ## IGNORE_RDIFF_END  plot(procrustes(ord, ca, choices=1:2, scaling=\"sites\"))  ## Reconstruction of non-Euclidean distances with negative eigenvalues d <- vegdist(dune) ord <- wcmdscale(d, eig = TRUE) ## Only positive eigenvalues: cor(d, dist(ord$points)) #> [1] 0.9975185 ## Correction with negative eigenvalues: cor(d, sqrt(dist(ord$points)^2 - dist(ord$negaxes)^2)) #> [1] 1"}]