Professional Documents
Culture Documents
Mark Gardener
DATA IN THE WILD SERIES
IeIagic IubIishing + vvv.eIagicubIishing.com
IubIished by IeIagic IubIishing
vvv.eIagicubIishing.com
IO ox 725, Ixeler, IX1 9QU
Communily IcoIogy
AnaIylicaI Melhods Using R and IxceI
ISN 9781907807619 (Ibk)
ISN 9781907807626 (Hbk)
ISN 9781907807633 (eIub)
ISN 9781907807657 (IDI)
ISN 9781907807640 (Mobi)
Coyrighl 2014 Mark Gardener
AII righls reserved. No arl of lhis documenl may be roduced, slored in a relrievaI
syslem, or lransmiued in any form or by any means, eIeclronic, mechanicaI,
holocoying, recording or olhervise vilhoul rior ermission from lhe ubIisher.
WhiIe every eorl has been made in lhe rearalion of lhis book lo ensure lhe accuracy
of lhe informalion resenled, lhe informalion conlained in lhis book is soId vilhoul
varranly, eilher exress or imIied. Neilher lhe aulhor, nor IeIagic IubIishing, ils agenls
and dislribulors viII be heId IiabIe for any damage or Ioss caused or aIIeged lo be caused
direclIy or indireclIy by lhis book.
Windovs, IxceI and Word and are lrademarks of lhe Microsofl Cororalion. Ior more
informalion visil vvv. microsofl.com. OenOce.org is a lrademark of OracIe. Ior
more informalion visil vvv.oenoce.org. LibreOce is a lrademark of The Documenl
Ioundalion. Ior more informalion visil vvv.Iibreoce.org. AIe Macinlosh is a
lrademark of AIe Inc. Ior more informalion visil vvv.aIe.com.
!"#$#%& (#)"*"+ ,*$*-./0#1/ #1 20)-#3*$#.1 4*$*
A calaIogue record for lhis book is avaiIabIe from lhe rilish Library.
Cover image: Over under valer iclure, shoving Iairy assIels (!"#$%&'()*&" ($,&)
amongsl Cabbage CoraI (-$./*'&.*& .#'*01.2*") and lroicaI isIand in lhe background.
Indo Iacihc. David IIeelham/OceanvideImages.com
About the author
Mark Gardener (vvv.gardenersovn.co.uk) is an ecoIogisl, Ieclurer and vriler vorking in
lhe UK. His rimary area of research vas in oIIinalion ecoIogy and he has vorked in lhe
UK and around lhe vorId (rinciaIIy AuslraIia and lhe Uniled Slales). Since his doclor-
ale he has vorked in many areas of ecoIogy, oflen as a leacher and suervisor. He beIieves
lhal ecoIogicaI dala, eseciaIIy communily dala, are lhe mosl comIicaled and iII-behaved
and are consequenlIy lhe mosl fun lo vork vilh. He vas inlroduced lo R by a Iike-minded
edanl vhiIsl vorking in AuslraIia during his doclorale. Learning R vas nol onIy fun bul
oened u a nev avenue, making lhe sludy of communily ecoIogy a vhoIe Iol easier. He
is currenlIy seIf-emIoyed and runs courses in ecoIogy, dala anaIysis and R for a variely of
organisalions. Mark Iives in ruraI Devon vilh his vife Chrisline, a biochemisl vho conse-
quenlIy has IillIe need of slalislics.
Acknowledgements
There are so many eoIe lo lhank lhal il is hard lo knov vhere lo begin. I am sure lhal
I viII Ieave some eoIe oul, so I aoIogise in advance. Thanks lo Richard Rove (}ames
Cook Universily) for insiring me lo use R. Dala vere conlribuled from various sources,
eseciaIIy from MSc sludenls doing ioIogicaI Recording, lhanks eseciaIIy lo Robin Cure,
}essie MacKay, Mark Lalham, }ohn HandIey and Hing Kin Lee for your hard-von dala.
The MSc rogramme heIed me lo see lhe olenliaI of 'roer' bioIogicaI records and
I lhank Sarah WhiId for giving me lhe oorlunily lo underlake some leaching on lhe
course. Thanks aIso lo lhe IieId Sludies CounciI in generaI: many dala examIes have
arisen from fieId courses I've been invoIved vilh.
Software used
SeveraI versions of Microsofl's IxceI
aIlhough
olher versions may aIso be iIIuslraled.
The main version of lhe R rogram used vas 2.12.1 for Macinlosh: The R Ioundalion
for SlalislicaI Comuling, Vienna, Auslria, ISN 3-900051-07-0, hll://vvv.R-ro|ecl.org/.
Olher versions vere used in lesling code.
Support material
Iree suorl maleriaI is avaiIabIe on lhe Communily IcoIogy comanion vebsile, vhich
can be accessed via lhe book's resources age: hll://vvv.eIagicubIishing.com/com-
munily-ecoIogy-resources.hlmI
Reader feedback
We veIcome feedback from readers Iease emaiI us al info+eIagicubIishing.com and
leII us vhal you lhoughl aboul lhis book. IIease incIude lhe book lilIe in lhe sub|ecl Iine
of your emaiI.
Publish with Pelagic Publishing
We ubIish scienlific books lo lhe highesl ediloriaI slandards in aII Iife science disciIines,
vilh a arlicuIar focus on ecoIogy, conservalion and environmenl. IeIagic IubIishing ro-
duces books lhal sel nev benchmarks, share advances in research melhods and encourage
and inform viIdIife invesligalion for aII.
If you are inleresled in ubIishing vilh IeIagic Iease conlacl edilor+eIagicubIish-
ing.com vilh a synosis of your book, a brief hislory of your revious vrillen vork and a
slalemenl describing lhe imacl you vouId Iike your book lo have on readers.
Contents
Introduction viii
1. Starting to look at communities 1
1.1 A scienlific aroach 1
1.2 The loics of communily ecoIogy 2
1.3 Gelling dala using a sreadsheel 4
1.4 Aims and hyolheses 5
1.5 Summary 5
1.6 Ixercises 7
2. Software tools for community ecology 8
2.1 IxceI 8
2.2 Olher sreadsheels 9
2.3 The R rogram 10
2.4 Summary 15
2.5 Ixercises 15
3. Recording your data 16
3.1 ioIogicaI dala 16
3.2 Arranging your dala 18
3.3 Summary 19
3.4 Ixercises 19
4. Beginning data exploration: using software tools 20
4.1 eginning lo use R 20
4.2 ManiuIaling dala in a sreadsheel 28
4.3 Gelling dala from IxceI inlo R 60
4.4 Summary 62
4.5 Ixercises 63
5. Exploring data: choosing your analytical method 64
5.1 Calegories of sludy 64
5.2 Hov 'cIassic' hyolhesis lesling can be used in communily sludies 66
vi
|
Contents
5.3 AnaIylicaI melhods for communily sludies 70
5.4 Summary 73
5.5 Ixercises 74
6. Exploring data: getting insights 75
6.1 Irror checking 75
6.2 Adding exlra informalion 78
6.3 Gelling an overviev of your dala 80
6.4 Summary 104
6.5 Ixercises 105
7. Diversity: species richness 106
7.1 Comaring secies richness 108
7.2 CorreIaling secies richness over lime or againsl an
environmenlaI variabIe 119
7.3 Secies richness and samIing efforl 123
7.4 Summary 148
7.5 Ixercises 149
8. Diversity: indices 151
8.1 Simson's index 151
8.2 Shannon index 160
8.3 Olher diversily indices 168
8.4 Summary 194
8.5 Ixercises 195
9. Diversity: comparing 196
9.1 GrahicaI comarison of diversily rofiIes 197
9.2 A lesl for differences in diversily based on lhe !-lesl 199
9.3 GrahicaI summary of lhe !-lesl for Shannon and Simson indices 212
9.4 oolslra comarisons for unreIicaled samIes 227
9.5 Comarisons using reIicaled samIes 252
9.6 Summary 269
9.7 Ixercises 270
10. Diversity: sampling scale 272
10.1 CaIcuIaling "#!$ diversily 272
10.2 Addilive diversily arlilioning 299
10.3 HierarchicaI arlilioning 303
10.4 Grou disersion 306
10.5 Iermulalion melhods 309
10.6 OverIa and simiIarily 315
10.7 &#!$ diversily using aIlernalive dissimiIarily measures 325
10.8 &#!$ diversily comared lo olher variabIes 327
10.9 Summary 331
10.10 Ixercises 333
Contents
|
vii
11. Rank abundance or dominance models 334
11.1 Dominance modeIs 334
11.2 Iisher's Iog-series 358
11.3 Ireslon's IognormaI modeI 360
11.4 Summary 363
11.5 Ixercises 365
12. Similarity and cluster analysis 366
12.1 SimiIarily and dissimiIarily 366
12.2 CIusler anaIysis 382
12.3 Summary 416
12.4 Ixercises 418
13. Association analysis: identifying communities 419
13.1 Area aroach lo idenlifying communilies 420
13.2 Transecl aroach lo idenlifying communilies 428
13.3 Using aIlernalive dissimiIarily measures for idenlifying communilies 431
13.4 Indicalor secies 436
13.5 Summary 444
13.6 Ixercises 445
14. Ordination 446
14.1 Melhods of ordinalion 447
14.2 Indirecl gradienl anaIysis 449
14.3 Direcl gradienl anaIysis 490
14.4 Using ordinalion resuIls 505
14.5 Summary 520
14.6 Ixercises 522
'((#)*+,#- 524
&+".+/01$(23 542
4)*#5 547
Introduction
Inleraclions belveen secies are of fundamenlaI imorlance lo aII Iiving syslems and lhe
framevork ve have for sludying lhese inleraclions is communily ecoIogy. This is imor-
lanl lo our underslanding of lhe Ianel's bioIogicaI diversily and hov secies inleraclions
reIale lo lhe funclioning of ecosyslems al aII scaIes. Secies do nol Iive in isoIalion and lhe
sludy of communily ecoIogy is of raclicaI aIicalion in a vide range of conservalion
issues.
The sludy of ecoIogicaI communily dala invoIves many melhods of anaIysis. In lhis
book you viII Iearn many of lhe mainslays of communily anaIysis incIuding: diversily,
simiIarily and cIusler anaIysis, ordinalion and muIlivariale anaIyses. This book is for
undergraduale and oslgraduale sludenls and researchers seeking a sle-by-sle melh-
odoIogy for anaIysing Ianl and animaI communilies using R and IxceI.
Microsofl's IxceI sreadsheel is virluaIIy ubiquilous and famiIiar lo mosl comuler
users. Il is a robusl rogram lhal makes an exceIIenl slorage and maniuIalion syslem for
many kinds of dala, incIuding communily dala. The R rogram is a overfuI and fIex-
ibIe anaIylicaI syslem abIe lo conducl a huge variely of anaIylicaI melhods, vhich means
lhal lhe user onIy has lo Iearn one rogram lo address many research queslions. Ils olher
advanlage is lhal il is oen source and lherefore free. NoveI anaIylicaI melhods are being
added conslanlIy lo lhe aIready comrehensive suile of looIs avaiIabIe in R.
What you will learn in this book
This book is inlended lo give you some insighls inlo some of lhe anaIylicaI melhods
emIoyed by ecoIogisls in lhe sludy of communilies. The book is nol inlended lo be a malh-
emalicaI or lheorelicaI lrealise bul inevilabIy lhere is some malhs! I've lried lo kee lhis
in lhe background and lo focus on hov lo underlake lhe aroriale anaIysis al lhe righl
lime. There are many ubIished vorks concerning ecoIogicaI lheory, lhis book is inlended
lo suorl lhem by roviding a framevork for Iearning hov lo anaIyse your dala.
The book does nol cover every asecl of communily ecoIogy. There are a fev minor
omissions I hoe lo cover some of lhese in Ialer vorks.
How this book is arranged
There are four main slrands lo scienlific sludy: Ianning, recording, anaIysis and reorl-
ing. The firsl fev chalers deaI vilh lhe Ianning and recording asecls of sludy. You
viII see hov lo use lhe main soflvare looIs, IxceI and R, lo heI you arrange and begin
lo make sense of your dala. Laler chalers deaI more exIicilIy vilh lhe grand lhemes of
communily ecoIogy, vhich are:
6+7#1-+!3 lhe sludy of diversily is sIil inlo severaI chalers covering secies
richness, diversily indices, "#!$ diversily and dominancediversily modeIs.
8+9+.$1+!3 $)* ,.:-!#1+)0 lhis is conlained in one chaler covering simiIarily, hier-
archicaI cIuslering and cIuslering by arlilioning.
'--/,+$!+/) $)$.3-+- lhis shovs hov you can idenlify vhich secies beIong lo
vhich communily by sludying lhe associalions belveen secies. The sludy of
associalions Ieads inlo lhe idenlificalion of indicalor secies.
;1*+)$!+/) lhere is a vide range of melhods of ordinalion and lhey aII have simiIar
aims, lo reresenl comIicaled secies communily dala in a more simIified form.
The reorling eIemenl is nol covered exIicilIy, hovever lhe resenlalion of resuIls is
shovn lhroughoul lhe book. A more dedicaled coverage of slalislicaI and scienlific reorl-
ing can be found in my revious vork, 8!$!+-!+,- </1 =,/./0+-!- >-+)0 ? $)* =5,#..
Throughoul lhe book you viII see examIe exercises lhal are inlended for you lo lry
oul. In facl lhey are exressIy aimed al heIing you on a raclicaI IeveI reading hov lo
do somelhing is fine bul you need lo do il for yourseIf lo Iearn il roerIy. The @$7# $ A/
exercises are hard lo miss.
Have a Go: Learn something by doing it
The Have a Go exercises are inlended lo give you raclicaI exerience al various
anaIylicaI melhods. Many viII refer lo suIemenlary dala, vhich you can gel from
lhe comanion vebsile. Some dala are inlended lo be used in IxceI and olhers are for
using vilh R.
Mosl of lhe @$7# $ A/ exercises uliIise dala lhal is avaiIabIe on lhe comanion vebsile. The
maleriaI on lhe vebsile incIudes various sreadsheels, some conlaining dala and some
aIIoving anaIylicaI rocesses. The B=?=C?6$!$ fiIe is lhe mosl heIfuI lhis is an R fiIe,
vhich conlains dala and cuslom R commands. You can use lhe dala for lhe exercises (and
for raclice) and lhe cuslom commands lo heI you carry oul a variely of anaIylicaI roc-
esses. The cuslom commands are menlioned lhroughoul lhe book and lhe vebsile con-
lains a comIele direclory.
You viII aIso see lis and noles, vhich viII sland oul from lhe main lexl. These are 'use-
fuI' ilems of delaiI erlaining lo lhe lexl bul vhich I feIl vere imorlanl lo highIighl.
Tips and Notes: Useful additional information
The comanion vebsile conlains suIemenlary dala, vhich you can use for lhe
exercises. There are aIso sreadsheels and usefuI cuslom R commands lhal you can
use for your ovn anaIyses.
Al lhe end of each chaler lhere is a summary labIe lo heI give you an overviev of lhe
maleriaI in lhal chaler. There are aIso some seIf-assessmenl exercises for you lo lry oul.
The ansvers are in Aendix 1.
Introduction
|
ix
Support files
The comanion vebsile (see resources age: hll://vvv.eIagicubIishing.com/commu-
nily-ecoIogy-resources.hlmI) conlains suorl maleriaI lhal incIudes sreadsheel caIcuIa-
lions and dala in IxceI and CSV (comma searaled vaIues) formal. There is aIso an R dala
fiIe, vhich conlains cuslom R commands and dalasels. Inslruclions on hov lo Ioad lhe R
dala inlo your coy of R are on lhe vebsile. In brief you need lo use lhe load() command,
for Windovs or Mac you can lye lhe foIIoving:
load(file.choose())
This viII oen a brovser vindov and you can seIecl lhe B=?=C?6$!$ fiIe. On Linux
machines you'II need lo reIace lhe file.choose() arl vilh lhe exacl fiIename in quoles,
see lhe vebsile for more delaiIs.
I hoe lhal you viII find lhis book heIfuI, usefuI and inleresling. Above aII, I hoe lhal
il heIs you lo discover lhal anaIysis of communily ecoIogy is nol lhe 'boring malhs' al lhe
end of your fieIdvork bul an en|oyabIe and enIighlening exerience.
Mark Gardener, Devon 2013
x
|
Introduction
11. Rank abundance or
dominance models
One vay of Iooking al lhe diversily of a communily is lo arrange lhe secies in order of
abundance and lhen Iol lhe resuIl on a grah. If lhe communily is very diverse lhen lhe
Iol viII aear 'fIal'. You mel lhis kind of aroach in Chaler 8 vhen Iooking al even-
ness and drev an evenness Iol in Seclion 8.3.4 using a TsaIIis enlroy rofiIe. In !"#$%&%'(
Iols lhe secies abundance is generaIIy reresenled as lhe Iog of lhe abundance.
Various modeIs have been roosed lo heI exIain lhe observed allerns of domi-
nance Iols. In lhis chaler you'II see hov lo creale lhese modeIs and lo visuaIise lhem
using commands in lhe *(+&% command ackage. Laler in lhe chaler you viII see hov lo
examine Iisher's Iog-series (Seclion 11.2) and Ireslon's IognormaI modeI (Seclion 11.3) bul
firsl you viII Iook al some dominance modeIs.
11.1 Dominance models
Rankabundance dominance (RAD) modeIs, or dominance/diversily Iols, shov Iogarilh-
mic secies abundances againsl secies rank order. They are oflen used as a vay lo anaIyse
lyes of communily dislribulion, arlicuIarIy in Ianl communilies.
The *(+&% ackage conlains severaI commands lhal aIIov you lo creale and visuaIise
RAD modeIs.
11.1.1 Types of RAD model
There are severaI modeIs in common use, each lakes lhe same inul dala (Iogarilhmic abun-
dance and rank of abundance) and uses various aramelers lo fil a modeI lhal describes
lhe observed allern.
There are five basic modeIs avaiIabIe via lhe *(+&% ackage:
LognormaI.
Ireemlion.
roken slick.
MandeIbrol.
Zif.
The radfit() command carries oul lhe necessary comulalions lo fil aII lhe modeIs lo a
communily dalasel. The resuIl is a comIicaled ob|ecl conlaining aII lhe modeIs aIied
11. Rank abundance or dominance models
|
335
lo each samIe in your dalasel. You can lhen delermine lhe 'besl' modeI for each samIe
lhal you have.
The *(+&% ackage aIso has searale commands lhal aIIov you lo inlerrogale lhe mod-
eIs and visuaIise lhem. You can aIso conslrucl a secific modeI for a samIe or enlire dala-
sel. The various modeIs are:
,"+%"-#&. Ianls are affecled by environmenl and each olher. The modeI viII
lend lo normaI, grovlh lends lo be Iogarilhmic so LognormaI modeI is IikeIy.