R语言vegan包使用教程

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

MultivariateAnalysisofEcologicalCommunitiesinR:vegantutorialJariOksanenFebruary8,2013AbstractThistutorialdemostratestheuseofordinationmethodsinRpack-agevegan.ThetutorialassumesfamiliaritybothwithRandwithcommunityordination.Packagevegansupportsallbasicor-dinationmethods,includingnon-metricmultidimensionalscaling.Theconstrainedordinationmethodsincludeconstrainedanalysisofproximities,redundancyanalysisandconstrainedcorrespondenceanalysis.Packageveganalsohassupportfunctionsfor ttingen-vironmentalvariablesandforordinationgraphics.Contents1Introduction22Ordination:basicmethod32.1Non-metricMultidimensionalscaling............32.2Communitydissimilarities..................52.3Comparingordinations:Procrustesrotation........82.4Eigenvectormethods.....................82.5Detrendedcorrespondenceanalysis.............112.6Ordinationgraphics.....................123Environmentalinterpretation143.1Vector tting.........................143.2Surface tting.........................153.3Factors.............................164Constrainedordination184.1Modelspeci cation......................194.2Permutationtests.......................214.3Modelbuilding........................234.4Linearcombinationsandweightedaverages........284.5Biplotarrowsandenvironmentalcalibration........294.6Conditionedorpartialmodels................3011INTRODUCTION5Dissimilaritiesandenvironment325.1adonis:MultivariateANOVAbasedondissimilarities...325.2Homogeneityofgroupsandbetadiversity.........335.3Manteltest..........................355.4Protest:Procrustestest...................366Classi cation366.1Clusteranalysis........................366.2Displayandinterpretationofclasses............386.3Classi edcommunitytables.................391IntroductionThistutorialdemonstratestypicalworkowsinmultivariateordinationanalysisofbiologicalcommunities.Thetutorial rstdiscussesbasicun-constrainedanalysisandenvironmentalinterpretationoftheirresults.Thenitintroducesconstrainedordinationusingconstrainedcorrespon-denceanalysisasanexample:alternativemethodssuchasconstrainedanalysisofproximitiesandredundancyanalysiscanbeused(almost)similarly.Finallythetutorialdescribesanalysisofspecies{environmentrelationswithoutordination,andbrieytouchesclassi cationofcommu-nities.Theexamplesinthistutorialaretested:ThisisaSweavedocument.Theoriginalsource lecontainsonlytextandRcommands:theiroutputandgraphicsaregeneratedwhilerunningthesourcethroughSweave.However,youmayneedarecentversionofvegan.Thisdocumentwasgeneretatedusingveganversion2.0-6andRversion2.15.1(2012-06-22).Themanualcoversordinationmethodsinvegan.Itdoesnotdis-cussmanyothermethodsinvegan.Forinstance,thereareseveralfunc-tionsforanalysisofbiodiversity:diversityindices(diversity,renyi,fisher.alpha),extrapolatedspeciesrichness(specpool,estimateR),speciesaccumulationcurves(specaccum),speciesabundancemodels(rad-fit,fisherfit,prestonfit)etc.NeitherisvegantheonlyRpack-ageforecologicalcommunityordination.BaseRhasstandardstatisticaltools,labdsvcomplementsveganwithsomeadvancedmethodsandpro-videsalternativeversionsofsomemethods,andade4providesanalter-nativeimplementationforthewholegammeofordinationmethods.Thetutorialexplainsonlythemostimportantmethodsandshowstypicalworkows.Iseeordinationprimarilyasagraphicaltool,andIdonotshowtoomuchexactnumericalresults.Instead,therearesmallvignettesofplottingresultsinthemarginsclosetotheplacewhereyouseeaplotcommand.Isuggestthatyourepeattheanalysis,trydi erentalternativesandinspecttheresultsmorethoroughlyatyourleisure.Thefunctionsareexplainedonlybriey,anditisveryusefultocheckthecor-respondinghelppagesforamorethoroughexplanationofmethods.Themethodsalsoareonlybrieyexplained.Itisbesttoconsultatextbookonordinationmethods,ormylectures,for rmertheoreticalbackground.22ORDINATION:BASICMETHOD2Ordination:basicmethod2.1Non-metricMultidimensionalscalingNon-metricmultidimensionalscalingcanbeperformedusingisoMDSfunc-tionintheMASSpackage.Thisfunctionneedsdissimilaritiesasinput.Functionvegdistinvegancontainsdissimilaritieswhicharefoundgoodincommunityecology.ThedefaultisBray-Curtisdissimilarity,nowadaysoftenknownasSteinhausdissimilarity,orinFinlandasSrensenindex.Thebasicstepsare:library(vegan)library(MASS)data(varespec)vare.dis-vegdist(varespec)vare.mds0-isoMDS(vare.dis)initialvalue18.026495iter5value10.095483finalvalue10.020469convergedThedefaultisto ndtwodimensionsandusemetricscaling(cmdscale)asthestartingsolution.Thesolutionisiterative,ascanbeseenfromthetracinginformation(thiscanbesuppressedsettingtrace=F).TheresultsofisoMDSisalist(itemspoints,stress)forthecon- gurationandthestress.StressSisastatisticofgoodnessof t,anditisafunctionofandnon-linearmonotonetransformationofobserveddissimilarities(d)andordinationdistances~d.S=vuutPi6=j[(dij)~dij]2Pi6=j~d2ijNmdsmapsobservedcommunitydissimilaritiesnonlinearlyontoordi-nationspaceanditcanhandlenonlinearspeciesresponsesofanyshape.WecaninspectthemappingusingfunctionShepardinMASSpackage,orasimplewrapperstressplotinvegan:stressplot(vare.mds0,vare.dis)●●●●●●●●●●●●●●●●●●●●●●●●●●●●●

1 / 43
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功