Analisys Diversity

Embed Size (px)

Citation preview

  • 7/29/2019 Analisys Diversity

    1/207

    Roeland Kindt and Richard Coe

    Tree diversityanalysisA manual and software for common statistical methods for

    ecological and biodiversity studies

    includes

    CD with

    software

    S1S2

    Site A

    S1

    Site B

    S3 S3S1

    S1

    S1

    Depth = 1 m Depth = 2 m

    Site C

    Site D

    Depth = 0.5 m Depth = 1.5 m

    S2 S2

    S2

    S3

    S3S1

    S1

    BF

    HF

    NM

    SF

    Tree diversity

    analysis Wor ldAgrof ores try

    C e ntre

    ,

    2005 . T hi s

    CD

    R O Mm

    a y

    b e

    re

    pr

    o d u

    cedwit hout char gepr ovided t heso

    urceis

    ackn

    owled

    ged.

  • 7/29/2019 Analisys Diversity

    2/207

  • 7/29/2019 Analisys Diversity

    3/207

    Tree diversityanalysis

    A manual and software for common statistical

    methods for ecological and biodiversity studies

    Roeland Kindt and Richard Coe

    World Agroforestry Centre, Nairobi, Kenya

  • 7/29/2019 Analisys Diversity

    4/207

    Published by the World Agroforestry Centre

    United Nations Avenue

    PO Box 30677, GPO 00100

    Nairobi, Kenya

    Tel: +254(0)20 7224000, via USA +1 650 833 6645

    Fax: +254(0)20 7224001, via USA +1 650 833 6646

    Email: [email protected]

    Internet:www.worldagroforestry.org

    World Agroforestry Centre 2005

    ISBN: 92 9059 179 X

    This publication may be quoted or reproduced without charge, provided the source is

    acknowledged. Permission for resale or other commercial purposes may be granted under

    select circumstances by the Head of the Training Unit of the World Agroforestry Centre.

    Proceeds of the sale will be used for printing the next edition of this book.

    Design and Layout: K. Vanhoutte

    Printed in Kenya

    Suggested citation: Kindt R and Coe R. 2005. Tree diversity analysis. A manual and software for

    common statistical methods for ecological and biodiversity studies. Nairobi: World Agroforestry

    Centre (ICRAF).

  • 7/29/2019 Analisys Diversity

    5/207

    ContentsAcknowledgements iv

    Introduction v

    Overview of methods described in this manual vi

    Chapter 1 Sampling 1

    Chapter 2 Data preparation 19

    Chapter 3 Doing biodiversi ty analysis with Biodiversity.R 31

    Chapter 4 Analysis of species r ichness 39

    Chapter 5 Analysis of diversity 55

    Chapter 6 Analysis of counts of trees 71

    Chapter 7 Analysis of presence or absence of species 103

    Chapter 8 Analysis of differences in species composition 123

    Chapter 9 Analysis of ecological distance by clustering 139

    Chapter 10 Analysis of ecological distance by ordination 153

    Contents

  • 7/29/2019 Analisys Diversity

    6/207

    iv

    Acknowledgements

    We warmly thank all that provided inputs thatlead to improvement of this manual. We especiallyappreciate the comments received during trainingsessions with draft versions of this manual and theaccompanying software in Kenya, Uganda andMali. We are equally grateful to the thoughtfulreviews by Dr Simoneta Negrete-Yankelevich(Instituto de Ecologa, Mexico) and Dr RobertBurn (Reading University, UK) of the draft version

    of this manual, and to Hillary Kipruto for help inediting of this manual.

    We highly appreciate the support of theProgramme for Cooperation with InternationalInstitutes (SII), Education and DevelopmentDivision of the Netherlands Ministry of ForeignAffairs, and VVOB (The Flemish Associationfor Development Cooperation and TechnicalAssistance, Flanders, Belgium) for funding the

    development for this manual. We also thankVVOB for seconding Roeland Kindt to the WorldAgroforestry Centre (ICRAF).

    This tree diversity analysis manual was inspiredby research, development and extension activitiesthat were initiated by ICRAF on tree and landscapediversification. We want to acknowledge thevarious donor agencies that have funded theseactivities, especially VVOB, DFID, USAID and

    EU.We are grateful for the developers of the RSoftware for providing a free and powerfulstatistical package that allowed developmentof Biodiversity.R. We also want to give specialthanks to Jari Oksanen for developing the veganpackage and John Fox for developing the Rcmdrpackage, which are key packages that are used byBiodiversity.R.

  • 7/29/2019 Analisys Diversity

    7/207

    v

    Introduction

    This manual was prepared during training eventsheld in East- and West-Africa on the analysis of treediversity data. These training events targeted dataanalysis of tree diversity data that were collected byscientists of the World Agroforestry Centre (ICRAF)and collaborating institutions. Typically, data werecollected on the tree species composition of quadratsor farms. At the same time, explanatory variablessuch as land use and household characteristics were

    collected. Various hypotheses on the influenceof explanatory variables on tree diversity can betested with such datasets. Although the manualwas developed during research on tree diversityon farms in Africa, the statistical methods can beused for a wider range of organisms, for differenthierarchical levels of biodiversity, and for a widerrange of environments.

    These materials were compiled as a second-generation development of the Biodiversity AnalysisPackage, a CD-ROM compiled by Roeland Kindt

    with resources and guidelines for the analysis ofecological and biodiversity information. Whereasthe Biodiversity Analysis Package provided a rangeof tools for different types of analysis, this manualis accompanied by a new tool (Biodiversity.R)that offers a single software environment for allthe analyses that are described in this manual.This does not mean that Biodiversity.R is theonly recommended package for a particular typeof analysis, but it offers the advantage for trainingpurposes that users only need to be introduced to

    one software package for statistically sound analysisof biodiversity data.

    It is never possible to produce a guide to allthe methods that will be needed for analysis ofbiodiversity data. Data analysis questions arecontinually advancing, requiring ever changingdata collection and analysis methods. Thismanual focuses on the analysis of species surveydata. We describe a number of methods that canbe used to analyse hypotheses that are frequentlyimportant in biodiversity research. These are not

    the only methods that can be used to analyse thesehypotheses, and other methods will be neededwhen the focus of the biodiversity research isdifferent.

    Effective data analysis requires imagination andcreativity. However, it also requires familiaritywith basic concepts, and an ability to use a setof standard tools. This manual aims to providethat. It also points the user to other resources thatdevelop ideas further.

    Effective data analysis also requires a sound and

    up to date understanding of the science behindthe investigation. Data analysis requires clearobjectives and hypotheses to investigate. Thesehave to be based on, and push forward, currentunderstanding. We have not attempted to link themethods described here to the rapidly changingscience of biodiversity and community ecology.Data analysis does not end with productionof statistical results. Those results have to beinterpreted in the light of other information aboutthe problem. We can not, therefore, discuss fully

    the interpretation of the statistical results, or thefurther statistical analyses they may lead to.

  • 7/29/2019 Analisys Diversity

    8/207

    vi

    Overview of methods described in

    this manual

    On the following page, a general diagram isprovided that describes the data analysis questionsthat you can ask when analysing biodiversitybased on the methodologies that are provided inthis manual. Each question is discussed in furtherdetail in the respective chapter. The arrowsindicate the types of information that are usedin each method. All information is derived from

    either the species data or the environmental dataof the sites. Chapter 2 describes the species andenvironmental data matrices in greater detail.

    Some methods only use information on species.These methods are depicted on the left-hand sideof the diagram. They are based on biodiversitystatistics that can be used to compare the levelsof biodiversity between sites, or to analyse howsimilar sites are in species composition.

    The other methods use information on bothspecies and the environmental variables of thesites. These methods are shown on the right-hand side of the diagram. These methods provideinsight into the influence of environmental

    variables on biodiversity. The analysis methodscan reveal how much of the pattern in speciesdiversity can be explained by the influence of theenvironmental variables. Knowing how much ofa pattern is explained will especially be useful ifthe research was conducted to arrive at optionsfor better management of biodiversity. Notethat in this context, environmental variables

    can include characteristics of the social andeconomic environment, not only the biophysicalenvironment.

    You may have noticed that Chapter 3 didnot feature in the diagram. The reason is thatthis chapter describes how the Biodiversity.Rsoftware can be installed and used to conductall the analyses described in the manual, whereasyou may choose to conduct the analysis withdifferent software. For this reason, the commandsand menu options for doing the analysis inBiodiversity.R are separated from the descriptionsof the methods, and placed at the end of eachchapter.

  • 7/29/2019 Analisys Diversity

    9/207

    vii

  • 7/29/2019 Analisys Diversity

    10/207

  • 7/29/2019 Analisys Diversity

    11/207

    1

    CHAPTER 1

    Sampling

    Sampling

    Choosing a way to sample and collect data can bebewildering. If you find it hard to decide exactlyhow it should be done then seek help. Questionsabout sampling are among the questions that aremost frequently asked to biometricians and the

    time to ask for assistance is while the samplingscheme is being designed. Remember: if you gowrong with data analysis it is easy to repeat it, butif you collect data in inappropriate ways you canprobably not repeat it, and your research will notmeet its objectives.

    Although there are some particular methodsthat you can use for sampling, you will need tomake some choices yourself. Sample design is theart of blending theoretical principles with practicalrealities. It is not possible to provide a catalogue of

    sampling designs for a series of situations simplytoo much depends on the objectives of the surveyand the realities in the field.

    Sampling design has to be based on specificresearch objectives and the hypotheses that youwant to test. When you are not clear about whatit is that you want to find out, it is not possible todesign an appropriate sampling scheme.

    Research hypotheses

    The only way to derive a sampling scheme is tobase it on a specific research hypothesis or researchobjective. What is it that you want to find out?Will it help you or other researchers when youfind out that the hypothesis holds true? Will theresults of the study point to some managementdecisions that could be taken?

    The research hypotheses should indicate the 3basic types of information that characterize eachpiece of data: where the data were collected,

    when the data were collected, and what type ofmeasurement was taken. The where, when and

    what are collected for each sample unit. A sampleunit could be a sample plot in a forest, or a farm ina village. Some sample units are natural units suchas fields, farms or forest gaps. Other sample unitsare subsamples of natural units such as a forestplot that is placed within a forest. Your samplingschemewill describe how sample units are definedand which ones are selected for measurement.

    The objectives determinewhatdata, thevariablesmeasured on each sampling unit. It is helpful tothink of these as response and explanatory variables,

    as described in the chapter on data preparation.The response variables are the key quantities thatyour objectives refer to, for example tree speciesrichness on small farms. The explanatory variablesare the variables that you expect, or hypothesize,to influence the response. For example, yourhypothesis could be that tree species richness onsmall farms is influenced by the level of marketintegration of the farm enterprise because marketintegration determines which trees are planted and

    retained. In this example, species richness is theresponse variable and level of market integrationis an explanatory variable. The hypothesis refersto small farms, so these should be the study units.The because part of the hypothesis adds muchvalue to the research, and investigating it requiresadditional information on whether species wereplanted or retained and why.

  • 7/29/2019 Analisys Diversity

    12/207

    2 CHAPTER 1

    Note that this manual only deals with survey data.The only way of provingcause-effectrelationshipsis by conducting well-designed experiments something that would be rather hard for this

    example! It is common for ecologists to drawconclusions about causation from relationshipsfounding surveys. This is dangerous, but inevitablewhen experimentation is not feasible. The risk ofmaking erroneous conclusions is reduced by: (a)making sure other possible explanations have beencontrolled or allowed for; (b) having a mechanistictheory model that explains why the cause-effectmay apply; and (c) finding the same relationshipin many different studies. However, in the endthe conclusion depends on the argument of the

    scientist rather than the logic of the researchdesign. Ecology progresses by scientists findingnew evidence to improve the inevitably incompleteunderstanding of cause and effect from earlierstudies.

    When data are collected is important, both tomake sure different observations are comparableand because understanding change trends, orbefore and after an intervention is often part ofthe objective. Your particular study may not aimat investigating trends, but investigating changes

    over time may become the objective of a laterstudy. Therefore you should also document whendata were collected.

    This chapter will mainly deal with where dataare collected. This includes definition of thesurvey area, of the size and shape of sample unitsand plots and of how sample plots are located

    within the survey area.

    Survey areaYou need to make a clear statement of the surveyarea for which you want to test your hypothesis.The survey area should have explicit geographical(and temporal) boundaries. The survey areashould be at the ecological scale of your researchquestion. For example, if your research hypothesis

    is something like diversity of trees on farmsdecreases with distance from Mount KenyaForest because seed dispersal from forest trees islarger than seed dispersal from farm trees, then

    it will not be meaningful to sample trees in astrip of 5 metres around the forest boundary andmeasure the distance of each tree from the forestedge. In this case we can obviously not expect toobserve differences given the size of trees (even ifwe could determine the exact distance from theedge within the small strip). But if the 5 m stripis not a good survey area to study the hypothesis,which area is? You would have to decide that onthe basis of other knowledge about seed dispersal,about other factors which dominate the process

    when you get too far from Mt Kenya forest, andon practical limitations of data collection. Youshould select the survey area where you expect toobserve the pattern given the ecological size ofthe phenomenon that you are investigating.

    If the research hypothesis was more general, forexample diversity of trees on East African farmsdecreases with distance from forests because moreseeds are dispersed from forest trees than from farmtrees, then we will need a more complex strategyto investigate it. You will certainly have to study

    more than one forest to be able to conclude thisis a general feature of forests, not just Mt Kenyaforest. You will therefore have to face questionsof what you mean by a forest. The samplingstrategy now needs to determine how forests areselected as well as how farms around each forestare sampled.

    A common mistake is to restrict data collectionto only part of the study area, but assume theresults apply to all of it (see Figure 1.1). You cannot be sure that the small window actually sampledis representative of the larger study area.

    An important idea is that bias is avoided. Thinkof the case in which samples are only located insites which are easily accessible. If accessibilityis associated with diversity (for example becausefewer trees are cut in areas that are more difficultto access), then the area that is sampled will not

  • 7/29/2019 Analisys Diversity

    13/207

    SAMPLING 3

    be representative of the entire survey area. Anestimate of diversity based only on the accessiblesites would give biased estimates of the wholestudy area. This will especially cause problems ifthe selection bias is correlated with the factors thatyou are investigating. For example, if the higherdiversity next to the forest is caused by a largerproportion of areas that are difficult to access andyou only sample areas that are easy to access, thenyou may not find evidence for a decreasing trendin diversity with distance from the forest. In thiscase, the dataset that you collected will generateestimates that are biased since the sites are notrepresentative of the entire survey area, but onlyof sites that are easy to access.

    The sample plots in Figure 1.1 were selectedfrom a sampling window that covers part of thestudy area. They were selected using a methodthat allowed any possible plot to potentiallybe included. Furthermore, the selection wasrandom. This means that inferences based onthe data apply to the sampling window. Anyparticular sample will not give results (such asdiversity, or its relationship with distance toforest) which are equal to those from measuringthe whole sampling window. But the samplingwill not predispose us to under- or overestimatethe diversity, and statistical methods will generallyallow us to determine just how far from the trueanswer any result could be.

    10 15 20 25 30 35 40

    5

    10

    15

    20

    25

    30

    35

    horizontal position

    verticalposition

    Landuse 1

    Landuse 2

    Landuse 3

    Figure 1.1 When you sample within a smaller window, you may not have sampled the entire range of conditions ofyour survey area. The sample may therefore not be representative of the entire survey area. The areas shown arethree types of landuse and the sample window (with grey background). Sample plots are the small rectangles.

  • 7/29/2019 Analisys Diversity

    14/207

    4 CHAPTER 1

    Size and shape of sample units or

    plots

    A sample unit is the geographical area or plot onwhich you actually collected the data, and thetime when you collected the data. For instance,a sample unit could be a 50 10 m2 quadrat (arectangular sample plot) in a forest sampled on 9th

    May 2002. Another sample unit could be all theland that is cultivated by a family, sampled on 10th

    December 2004. In some cases, the sample plotmay be determined by the hypothesis directly. Ifyou are interested in the influence of the wealthof farmers on the number of tree species on theirfarm, then you could opt to select the farm as the

    sample plot. Only in cases where the size of thissample plot is not practical would you need tosearch for an alternative sample plot. In the lattercase you would probably use two sample unitssuch as farms (on which you measure wealth) andplots within farms (on which you measure treespecies, using the data from plots within a farm toestimate the number of species for the whole farmto relate to wealth).

    The size of the quadrat will usually influencethe results. You will normally find more species

    and more organisms in quadrats of 100 m2 thanin quadrats of 1 m2. But 100 dispersed 1 m2 plotswill probably contain more species than a single100 m2 plot. If the aim is not to find species butunderstanding some ecological phenomenon, theneither plot size may be appropriate, depending onthe scale of the processes being studied.

    The shape of the quadrat will often influencethe results too. For example, it has been observedthat more tree species are observed in rectangularquadrats than in square quadrats of the same area.The reason for this phenomenon is that tree speciesoften occur in a clustered pattern, so that moretrees of the same species will be observed in squarequadrats. When quadrats are rectangular, then theorientation of the quadrat may also become anissue. Orienting the plots parallel or perpendicularto contour lines on sloping land may influence

    the results, for instance. As deciding whether treesthat occur near the edge are inside or outside thesample plot is often difficult, some researchers findcircular plots superior since the ratio of edge-to-area is smallest for circles. However marking out acircular plot can be much harder than marking arectangular one. This is an example of the trade offbetween what may be theoretically optimal andwhat is practically best. Balancing the trade off is amatter of practical experience as well as familiaritywith the principles.

    As size and shape of the sample unit caninfluence results, it is best to stick to one size andshape for the quadrats within one study. If you

    want to compare the results with other surveys,then it will be easier if you used the same sizesand shapes of quadrats. Otherwise, you will needto convert results to a common size and shape ofquadrat for comparisons. For some variables, suchconversion can easily be done, but for some othersthis may be quite tricky. Species richness anddiversity are statistics that are influenced by thesize of the sample plot. Conversion is even morecomplicated since different methods can be used tomeasure sample size, such as area or the number of

    plants measured (see chapter on species richness).The average number of trees is easily convertedto a common sample plot size, for example 1 ha,by multiplying by the appropriate scaling factor.This can not be done for number of species ordiversity. Think carefully about conversion, andpay special attention to conversions for speciesrichness and diversity. In some cases, you may notneed to convert to a sample size other than the oneyou used you may for instance be interested inthe average species richness per farm and not inthe average species richness in areas of 0.1 ha infarmland. Everything will depend on being clearon the research objectives.

    One method that will allow you to do some easyconversions is to split your quadrat into sub-plotsof smaller sizes. For example, if your quadrat is 40 5 m2, then you could split this quadrat into eight

  • 7/29/2019 Analisys Diversity

    15/207

    SAMPLING 5

    5 5 m2 subplots and record data for each subplot.This procedure will allow you to easily convert toquadrat sizes of 5 5 m2, 10 5 m2, 20 5 m2 and40 5 m2, which could make comparisons withother surveys easier.

    Determining the size of the quadrat is one of thetricky parts of survey design. A quadrat should belarge enough for differences related to the researchhypothesis to become apparent. It should alsonot be too large to become inefficient in termsof cost, recording fatigue, or hours of daylight.As a general rule, several small quadrats will givemore information than few large quadrats ofthe same total area, but will be more costly to

    identify and measure. Because differences needto be observed, but observation should also useresources efficiently, the type of organism that isbeing studied will influence the best size for thequadrat. The best size of the quadrat may differbetween trees, ferns, mosses, butterflies, birdsor large animals. For the same reason, the sizeof quadrat may differ between vegetation types.When studying trees, quadrat sizes in humidforests could be smaller than quadrat sizes in semi-arid environments.

    As some rough indication of the size of the sampleunit that you could use, some of the sample sizesthat have been used in other surveys are providednext. Some surveys used 100 100 m2 plots fordifferences in tree species composition of humidforests (Pyke et al. 2001, Condit et al. 2002), orfor studies of forest fragmentation (Laurance et al.1997). Other researchers used transects (sampleplots with much longer length than width) such as500 5 m2 transects in western Amazonian forestsfor studies of differences in species compositionfor certain groups of species (Tuomisto et al.2003). Yet other researchers developed methodsfor rapid inventory such as the method withvariable subunits developed at CIFOR that has amaximum size of 40 40 m2, but smaller sizeswhen tree densities are larger (Sheil et al. 2003).

    Many other quadrat sizes can be found in otherreferences. It is clear that there is no commonor standard sample size that is being usedeverywhere. The large range in values emphasizesour earlier point that there is no fixed answer towhat the best sampling strategy is. It will dependon the hypotheses, the organisms, the vegetationtype, available resources, and on the creativity ofthe researcher. In some cases, it may be worthusing many small sample plots, whereas in othercases it may be better to use fewer larger sampleplots. A pilot survey may help you in decidingwhat size and shape of sample plots to use forthe rest of the survey (see below: pilot testing of

    the sampling protocol). Specific guidelines onthe advantages and disadvantages of the variousmethods is beyond the scope of this chapter (anentire manual could be devoted to samplingissues alone) and the best advise is to consult abiometrician as well as ecologists who have donesimilar studies.

    Simple random sampling

    Once you have determined the survey area andthe size of your sampling units, then the nextquestion is where to take your samples. There aremany different methods by which you can placethe samples in your area.

    Simple random sampling involves locatingplots randomly in the study area. Figure 1.2 givesan example where the coordinates of every sampleplot were generated by random numbers. In thismethod, we randomly selected a horizontal andvertical position. Both positions can be calculatedby multiplying a random number between 0and 1 with the range in positions (maximum minimum), and adding the result to theminimum position. If the selected position fallsoutside the area (which is possible if the area isnot rectangular), then a new position is selected.

  • 7/29/2019 Analisys Diversity

    16/207

    6 CHAPTER 1

    10 15 20 25 30 35 40

    5

    10

    15

    20

    25

    30

    35

    horizontal position

    vertica

    lposition

    Landuse 1

    Landuse 2

    Landuse 3

    Figure 1.2 Simple random sampling by using random numbers to determine the position of the sample plots. Usingthis method there is a risk that regions of low area such as that under Landuse 1 are not sampled.

    Figure 1.3 For simple random sampling, it is better to first generate a grid of plots that covers the entire area suchas the grid shown here.

  • 7/29/2019 Analisys Diversity

    17/207

    SAMPLING 7

    Simple random sampling is an easy method toselect the sampling positions (it is easy to generaterandom numbers), but it may not be efficient inall cases. Although simple random sampling is thebasis for all other sampling methods, it is rarely

    optimal for biodiversity surveys as described next.Simple random sampling may result in selectingall your samples within areas with the sameenvironmental characteristics, so that you can nottest your hypothesis efficiently. If you are testing ahypothesis about a relationship between diversityand landuse, then it is better to stratify by thetype of landuse (see below: stratified sampling).You can see in Figure 1.2 that one type of landusewas missed by the random sampling procedure.A procedure that ensures that all types of landuseare included is better than repeating the randomsampling procedure until you observe that allthe types of landuse were included (which is notsimple random sampling any longer).

    It may also happen that the method of usingrandom numbers to select the positions ofquadrats will cause some of your sample units tobe selected in positions that are very close to eachother. In the example of Figure 1.2, two sampleplots actually overlap. To avoid such problems,

    it is theoretically better to first generate thepopulation of all the acceptable sample plots,and then take a simple random sample of those.When you use random numbers to generate thepositions, the population of all possible sample

    plots is infinite, and this is not the best approach.It is therefore better to first generate a grid ofplots that covers the entire survey area, and thenselect the sample plots at random from the grid.

    Figure 1.3 shows the grid of plots from which

    all the sample plots can be selected. We madethe choice to include only grid cells that fellcompletely into the area. Another option wouldbe to include plots that included boundaries,and only sample the part of the grid cell that fallscompletely within the survey area and otheroptions also exist.

    Once you have determined the grid, thenit becomes relatively easy to randomly selectsample plots from the grid, for example by givingall the plots on the grid a sequential number andthen randomly selecting the required numberof sample plots with a random number. Figure1.4 shows an example of a random selection ofsample plots from the grid. Note that althoughwe avoided ending up with overlapping sampleplots, some sample plots were adjacent to eachother and one type of landuse was not sampled.

    Note also that the difference between selectingpoints at random and gridding first will only benoticeable when the quadrat size is not negligible

    compared to the study area. A pragmatic solutionto overlapping quadrats selected by simplerandom sampling of points would be to rejectthe second sample of the overlapping pair andchoose another random location.

  • 7/29/2019 Analisys Diversity

    18/207

    8 CHAPTER 1

    10 15 20 25 30 35 40

    5

    10

    15

    20

    25

    30

    3

    5

    horizontal osition

    verticalposition

    Landuse 1

    Landuse 2

    Landuse 3

    Figure 1.5 Systematic sampling ensures that data are collected from the entire survey area.

    Figure 1.4. Simple random sampling from the grid shown in Figure 1.3.

  • 7/29/2019 Analisys Diversity

    19/207

    SAMPLING 9

    Systematic sampling

    Systematic or regular sampling selects sampleplots at regular intervals. Figure 1.5 providesan example. This has the effect of spreading the

    sample out evenly through the study area. A squareor rectangular grid will also ensure that sampleplots are evenly spaced.

    Systematic sampling has the advantage overrandom sampling that it is easy to implement,that the entire area is sampled and that it avoidspicking sample plots that are next to each other.The method may be especially useful for findingout where a variable undergoes rapid changes.This may particularly be interesting if you samplealong an environmental gradient, such as altitude,

    rainfall or fertility gradients. For such problemssystematic sampling is probably more efficient but remember that we are not able in this chapterto provide a key to the best sampling method.

    Figure 1.6 Random selection of sample plots from a grid. The same grid was used as in Figure 1.5.

    You could use the same grid depicted in Figure1.5 for simple random sampling, rather than thecomplete set of plots in Figure 1.3. By using thisapproach, you can guarantee that sample plots will

    not be selected that are too close together. Thegrid allows you to control the minimum distancebetween plots. By selecting only a subset of sampleplots from the entire grid, sampling effort isreduced. For some objectives, such combinationof simple random sampling and regular samplingintervals will offer the best approach. Figure 1.6shows a random selection of sample plots from thegrid depicted in Figure 1.5.

    If data from a systematic sample are analysedas if they came from a random sample, inferences

    may be invalidated by correlations betweenneigbouring observations. Some analyses ofsystematic samples will therefore require anexplicitly spatial approach.

  • 7/29/2019 Analisys Diversity

    20/207

    10 CHAPTER 1

    Figure 1.8 Stratified sampling ensures that observations are taken in each stratum. Sample plots are randomlyselected for each landuse from a grid.

    Figure 1.7. Systematic sampling after random selection of the position of the first sample plot.

  • 7/29/2019 Analisys Diversity

    21/207

    SAMPLING 11

    Another problem that could occur with systematicsampling is that the selected plots coincide with aperiodic pattern in the study area. For example,you may only sample in valley bottoms, or you may

    never sample on boundaries of fields. You shoulddefinitely be alert for such patterns when you dothe actual sampling. It will usually be obvious if alandscape can have such regular patterns.

    Systematic sampling may involve norandomization in selecting sample plots. Somestatistical analysis and inference methods are notthen suitable. An element of randomization canbe introduced in your systematic sampling byselecting the position of the grid at random.Figure 1.7 provides an example of selecting sample

    plots from a sampling grid with a random originresulting in the same number of sample plots andthe same minimum distance between sample plotsas in Figure 1.6.

    Stratified sampling

    Stratified sampling is an approach in whichthe study area is subdivided into differentstrata, such as the three types of landuses of the

    example (Landuse 1, Landuse 2 and Landuse 3,figures 1.1-1.9). Strata do not overlap and coverthe entire survey area. Within each stratum, arandom or systematic sample can be taken. Anyof the sampling approaches that were explainedearlier can be used, with the only difference thatthe sampling approach will now be applied toeach stratum instead of the entire survey area.Figure 1.8 gives an example of stratified randomsampling with random selection of maximum 10sample plots per stratum from a grid with randomorigin.

    Stratified sampling ensures that data arecollected from each stratum. The method will alsoensure that enough data are collected from eachstratum. If stratified sampling is not used, then arare stratum could be missed or only provide oneobservation. If a stratum is very rare, you have a

    high chance of missing it in the sample. A stratumthat only occupies 1% of the survey area will bemissed in over 80% of simple random samples ofsize 20.

    Stratified sampling also avoids sample plotsbeing placed on the boundary between the strataso that part of the sample plot is in one stratumand another part is in another stratum. You couldhave noticed that some sample plots included theboundary between Landuse 3 and Landuse 2 inFigure 1.7. In Figure 1.8, the entire sample plotoccurs within one type of landuse.

    Stratified sampling can increase the precisionof estimated quantities if the strata coincide withsome major sources of variation in your area.

    By using stratified sampling, you will be morecertain to have sampled across the variation inyour survey area. For example, if you expect thatspecies richness differs with soil type, then youbetter stratify by soil type.

    Stratified sampling is especially useful whenyour research hypothesis can be described interms of differences that occur between strata. Forexample, when your hypothesis is that landuseinfluences species richness, then you should stratifyby landuse. This is the best method of obtaining

    observations for each category of landuse that willallow you to test the hypothesis.

    Stratified sampling is not only useful for testinghypotheses with categorical explanatory variables,but also with continuous explanatory variables.Imagine that you wanted to investigate theinfluence of rainfall on species richness. If youtook a simple random sample, then you wouldprobably obtain many observations with nearaverage rainfall and few towards the extremes ofthe rainfall range. A stratified approach couldguarantee that you take plenty of observations athigh and low rainfalls, making it easier to detectthe influence of rainfall on species richness.

    The main disadvantage of stratified sampling isthat you need information about the distributionof the strata in your survey area. When thisinformation is not available, then you may need

  • 7/29/2019 Analisys Diversity

    22/207

    12 CHAPTER 1

    to do a survey first on the distribution of thestrata. An alternative approach is to conductsystematic surveys, and then do some gap-fillingafterwards (see below: dealing with covariates and

    confounding).A modification of stratified sampling is to usegradient-oriented transects or gradsects (Gillisonand Brewer 1985; Wessels et al. 1998). Theseare transects (sample plots arranged on a line)that are positioned in a way that steep gradientsare sampled. In the example of Figure 1.8, youcould place gradsects in directions that ensurethat the three landuse categories are included.The advantage of gradsects is that travelling time(cost) can be minimized, but the results may not

    represent the whole study area well.

    Sample size or the number of

    sample units

    Choosing the sample size, the number of samplingunits to select and measure, is a key part of planninga survey. If you do not pay attention to this thenyou run two risks. You may collect far more datathan needed to meet your objectives, wasting time

    and money. Alternatively, and far more common,you may not have enough information to meetyour objectives, and your research is inconclusive.Rarely is it possible to determine the exact samplesize required, but some attempt at rational choiceshould be made.

    We can see that the sample size required mustdepend on a number of things. It will depend onthe complexity of the objectives it must take moredata to unravel the complex relationships betweenseveral response and explanatory variables than it

    takes to simply compare the mean of two groups. Itwill depend on the variability of the response beingstudied if every sample unit was the same we onlyneed to measure one to have all the information!It will also depend on how precisely you need toknow answers getting a good estimate of a smalldifference between two strata will require more datathan finding out if they are roughly the same.

    If the study is going to compare different strataor conditions then clearly we need observationsin each stratum, or representing each set ofconditions. We then need to plan for repeated

    observations within a stratum or set of conditionsfor four main reasons:

    1. In any analysis we need to give some indicationof the precision of results and this will depend onvariances. Hence we need enough observationsto estimate relevant variances well.

    2. In any analysis, a result estimated from more datawill be more precise than one estimated fromless data. We can increase precision of results byincreasing the number of relevant observations.

    Hence we need enough observations to getsufficient precision.

    3. We need some insurance observations, so thatthe study still produces results when unexpectedthings happen, for example some sample unitscan not be measured or we realize we will haveto account for some additional explanatoryvariables.

    4. We need sufficient observations to properlyrepresent the study area, so that results we hope

    to apply to the whole area really do have supportfrom all the conditions found in the area.

    Of these four, 1 and 2 can be quantified insome simple situations. It is worth doing thisquantification, even roughly, to make sure thatyour sample size is at least of the right order ofmagnitude.

    The first, 1, is straightforward. If you canidentify the variances you need to know about,then make sure you have enough observations to

    estimate each. How well you estimate a varianceis determined by its degrees of freedom (df), anda minimum of 10 dfis a good working rule. Gethelp finding the degrees of freedom for yoursample design and planned analysis.

    The second is also straightforward in simplecases. Often an analysis reduces to comparingmeans between groups or strata. If it does, then the

  • 7/29/2019 Analisys Diversity

    23/207

    SAMPLING 13

    Two-sample t test power calculation

    n = 16.71477delta = 1

    sd = 1sig.level = 0.05

    power = 0.8alternative = two.sided

    NOTE: n is number in *each* group

    mathematical relationship between the numberof observations, the variance of the populationsampled and the precision of the mean can beexploited. Two approaches are used. You can either

    specify how well you want a difference in means tobe estimated (for example by specifying the widthof its confidence interval), or you can think of thehypothesis test of no difference. The former tendsto be more useful in applied research, when we aremore interested in the size of the difference thansimply whether one exists or not. The necessaryformulae are encoded in some software products.

    An example from R is shown immediatelybelow, providing the number of sample units (n)that will provide evidence for a difference between

    two strata for given significance and power of thet-test that will be used to test for differences, andgiven standard deviation and difference betweenthe means. The formulae calculated a fractionalnumber of 16.71 sample units, whereas it is notpossible in practice to take 16.71 sample units pergroup. The calculated fractional number couldbe rounded up to 17 or 20 sample units. Werecommend interpreting the calculated sample sizein relative terms, and concluding that 20 sampleswill probably be enough whereas 100 samples

    would be too many.

    Sample size in each stratum

    A common question is whether the survey shouldhave the same number of observations in eachstratum. The correct answer is once again that it

    all depends. A survey with the same number ofobservations per stratum will be optimal if theobjective is to compare the different strata andif you do not have additional information orhypotheses on other sources of variation. In manyother cases, it will not be necessary or practical toensure that each stratum has the same number ofobservations.

    An alternative that is sometimes useful is tomake the number of observations per stratumproportional to the size of the stratum, in ourcase its area. For example, if the survey area isstratified by landuse and one category of landuseoccupies 60% of the total area, then it gets 60% ofsample plots. For the examples of sampling givenin the figures, landuse 1 occupies 3.6% of thetotal area (25/687.5), landuse 2 occupies 63.6%(437.5/687.5) and landuse 3 occupies 32.7%(225/687.5). A possible proportional samplingscheme would therefore be to sample 4 plots inLanduse 1, 64 plots in Landuse 2 and 33 plots in

    Landuse 3.One advantage of taking sample sizes

    proportional to stratum sizes is that the averagefor the entire survey area will be the average ofall the sample plots. The sampling is described asself-weighting. If you took equal sample size ineach stratum and needed to estimate an averagefor the whole area, you would need to weight eachobservation by the area of each stratum to arrive atthe average of the entire area. The calculations arenot very complicated, however.

  • 7/29/2019 Analisys Diversity

    24/207

    14 CHAPTER 1

    rainfall are said to be confounded.The solution in such cases is to attempt to

    break the strong correlation. In the examplewhere landuse is correlated with rainfall, then

    you could attempt to include some sample plotsthat have another combination of landuse andrainfall. For example, if most forests have highrainfall and grasslands have low rainfall, you maybe able to find some low rainfall forests and highrainfall grasslands to include in the sample. Anappropriate sampling scheme would then be tostratify by combinations of both rainfall andlanduse (e.g. forest with high, medium or lowrainfall or grassland with high, medium or lowrainfall) and take a sample from each stratum. If

    there simply are no high rainfall grasslands or lowrainfall forests then accept that it is not possibleto understand the separate effects of rainfall andlanduse, and modify the objectives accordingly.

    An extreme method of breaking confoundingis to match sample plots. Figure 1.9 gives anexample.

    The assumption of matching is thatconfounding variables will have very similarvalues for paired sample plots. The effects fromthe confounding variables will thus be filtered

    from the analysis.The disadvantage of matching is that you will

    primarily sample along the edges of categories.You will not obtain a clear picture of the overallbiodiversity of a landscape. Remember, however,that matching is an approach that specificallyinvestigates a certain hypothesis.

    You could add some observations in the middleof each stratum to check whether sample plots atthe edges are very different from sample plots atthe edge. Again, it will depend on your hypothesiswhether you are interested in finding this out.

    Some researchers have suggested that takinglarger sample sizes in larger strata usually resultsin capturing more biodiversity. This need notbe the case, for example if one landuse which

    happens to occupy a small area contains much ofthe diversity. However, most interesting researchobjectives require more than simply finding thediversity. If the objective is to find as many speciesas possible, some different sampling schemescould be more effective. It may be better to usean adaptive method where the position of newsamples is guided by the results from previoussamples.

    Simple random sampling will, in the long run,give samples sizes in each stratum proportional to

    the stratum areas. However this may not happenin any particular selected sample. Furthermore,the strata are often of interest in their own right,and more equal sample sizes per stratum may bemore appropriate, as explained earlier. For thesereasons it is almost always worth choosing strataand their sample sizes, rather than relying onsimple random sampling.

    Dealing with covariates andconfounding

    We indicated at the beginning of this chapter thatit is difficult to make conclusions about cause-effect relationships in surveys. The reason thatthis is difficult is that there may be confoundingvariables. For example, categories of landuse couldbe correlated with a gradient in rainfall. If youfind differences in species richness in differentlanduses it is then difficult or impossible todetermine whether species richness is influencedby rainfall or by landuse, or both. Landuse and

  • 7/29/2019 Analisys Diversity

    25/207

    SAMPLING 15

    Figure 1.9 Matching of sample plots breaks confounding of other variables.

    Pilot testing of the sampling

    protocolThe best method of choosing the size and shape ofyour sample unit is to start with apilot phase inyour project. During the pilot phase all aspects ofthe data collection are tested and some preliminarydata are obtained.

    You can evaluate your sampling protocol afterthe pilot phase. You can see how much variationthere is, and base some modifications on thisvariation. You could calculate the required samplesizes again. You could also opt to modify the shape,size or selection of sample plots.

    You will also get an idea of the time data collectiontakes per sample unit. Most importantly, youcould make a better estimation of whether youwill be able to test your hypothesis, or not, byalready conducting the analysis with the data thatyou already have.

    Pilot testing is also important for finding outall the non-statistical aspects of survey design andmanagement. These aspects typically also have animportant effect on the overall quality of the datathat you collect.

  • 7/29/2019 Analisys Diversity

    26/207

    16 CHAPTER 1

    References

    Condit R, Pitman N, Leigh EG, Chave J, TerborghJ, Foster RB, Nuez P, Aguilar S, Valencia R,Villa G, Muller-Landau HC, Losos E, and

    Hubbell SP. 2002. Beta-diversity in tropicalforest trees. Science295: 666669.

    Feinsinger P. 2001. Designing field studies forbiodiversity conservation. Washington: TheNature Conservancy.

    Gillison AN and Brewer KRW. 1985. The use ofgradient directed transects or gradsects in naturalresource surveys. Journal of Environmental

    Management20: 103-127.

    Gotelli NJ and Ellison AM. 2004. A primer

    of ecological statistics. Sunderland: SinauerAssociates. (recommended as first priority forreading)

    Hayek LAC and Buzas MA. 1997. Surveyingnatural populations. New York: ColumbiaUniversity Press.

    Laurance WF, Laurance SG, Ferreira LV, Rankin-de Merona JM, Gascon C and Loverjoy TE.1997. Biomass collapse in Amazonian forestfragments. Science278: 1117-1118.

    Pyke CR, Condit R, Aguilar S and Lao S. 2001.Floristic composition across a climatic gradientin a neotropical lowland forest. Journal ofVegetation Science12: 553-566.

    Quinn GP and Keough MJ. 2002. Experimentaldesign and data analysis for biologists. Cambridge:Cambridge University Press.

    Sheil D, Ducey MJ, Sidiyasa K and SamsoedinI. 2003. A new type of sample unit for theefficient assessment of diverse tree communitiesin complex forest landscapes.Journal of TropicalForest Science15: 117-135.

    Sutherland WJ. 1996. Ecological census techniques:a handbook. Cambridge: Cambridge UniversityPress.

    Tuomisto H, Ruokolainen K and Yli-Halla M.2003. Dispersal, environment and floristicvariation of western Amazonian forests. Science299: 241-244.

    Underwood AJ. 1997. Experiments in ecology: theirlogical design and interpretation using analysis ofvariance. Cambridge: Cambridge UniversityPress.

    Wessels KJ, Van Jaarsveld AS, Grimbeek JD andVan der Linde MJ. 1998. An evaluation of the

    gradsect biological survey method. Biodiversityand Conservation 7: 1093-1121.

  • 7/29/2019 Analisys Diversity

    27/207

    SAMPLING 17

    Examples of the analysis with the command options of Biodiversity.R

    See in chapter 3 how Biodiversity.R can be loaded onto your computer.

    To load polygons with the research areas:

    area

  • 7/29/2019 Analisys Diversity

    28/207

    18 CHAPTER 1

    To randomly select sample plots from a grid:

    spatialsample(area, method=random grid, n=20, xwidth=1,ywidth=1, plotit=T, xleft=10.5, ylower=5.5, xdist=1, ydist=1)

    spatialsample(area, method=random grid, n=20, xwidth=1,

    ywidth=1, plotit=T, xleft=12, ylower=7, xdist=4, ydist=4)

    To select sample plots from a grid with random start:

    spatialsample(area, method=random grid, n=20, xwidth=1,ywidth=1, plotit=T, xdist=4, ydist=4)

    To randomly select maximum 10 sample plots from each type of landuse:

    spatialsample(landuse1, n=10, method=random, plotit=T)

    spatialsample(landuse2, n=10, method=random, plotit=T)

    spatialsample(landuse3, n=10, method=random, plotit=T)

    To randomly select sample plots from a grid within each type of landuse. Within each landuse, the gridhas a random starting position:

    spatialsample(landuse1, n=10, method=random grid, xdist=2,ydist=2, plotit=T)

    spatialsample(landuse2, n=10, method=random grid, xdist=4,ydist=4, plotit=T)

    spatialsample(landuse3, n=10, method=random grid, xdist=4,

    ydist=4, plotit=T)

    To calculate sample size requirements:

    power.t.test(n=NULL, delta=1, sd=1, sig.level=0.05, power=0.8,type=two.sample)

    power.t.test(n=NULL, delta=0.5, sd=1, sig.level=0.05,power=0.8, type=two.sample)

    power.anova.test(n=NULL, groups=4, between.var=1, within.var=1,power=0.8)

    power.anova.test(n=NULL, groups=4, between.var=2, within.var=1,power=0.8)

    To calculate the area of a polygon:

    areapl(landuse1)

  • 7/29/2019 Analisys Diversity

    29/207

    19

    CHAPTER 2

    Data preparation

    Preparing data before analysis

    Before ecological data can be analysed, they needto be prepared and put into the right format. Datathat are entered in the wrong format cannot beanalysed or will yield wrong results.

    Different statistical programs require data in

    different formats. You should consult the manualof the statistical software to find out how data needto be prepared. Alternatively, you could checkexample datasets. An example of data preparationfor the R package is presented at the end of thissession.

    Before you embark on the data analysis, it isessential to check for mistakes in data entry. If youdetect mistakes later in the analysis, you wouldneed to start the analysis again and could havelost considerable time. Mistakes in data entry can

    often be detected as exceptional values. The bestprocedure of analysing your results is therefore tostart with checking the data.

    An example of species survey data

    Imagine that you are interested in investigatingthe hypothesis that soil depth influences treespecies diversity. The data that will allow you totest this hypothesis are data on soil depth anddata on diversity collected for a series of sample

    plots. We will see in a later chapter that diversitycan be estimated from information on the speciesidentity of every tree. Figure 2.1 shows speciesand soil depth data for the first four sample plotsthat were inventoried (to test the hypothesis, weneed several sample plots that span the range fromshallow to deep soils). For site A, three specieswere recorded (S1, S2 and S3) and a soil depthof 1 m. For site B, only two species were recorded(S1 with four trees and S3 with one tree) and a soildepth of 2 m.

    Figure 2.1 A simplified example of informationrecorded on species and environmental data.

  • 7/29/2019 Analisys Diversity

    30/207

    20 CHAPTER 2

    Site Species S1(count)

    Species S2(count)

    Species S3(count)

    A 1 1 1

    B 4 0 1

    C 2 2 0

    D 0 1 2

    This chapter deals with the preparation of data

    matrices as the two matrices given above. Notethat the example of Figure 2.1 is simplified:typical species matrices have more than 100 rowsand more than 100 columns. These matrices canbe used as input for the analyses shown in thefollowing chapters. They can be generated by adecent data management system. These matricesare usually not the ideal method of capturing,entering and storing data. Recording species datain the field is typically done with data collectionforms that are filled for each site separately and

    that contain tables with a single column forthe species name and a single column for theabundance. This is also the ideal method ofstoring species data.

    The species information from Figure 2.1 can berecorded as follows:

    A general format for species

    survey data

    As seen above, all information can be recordedin the form of data matrices. All the types of

    data that are described in this manual can beprepared as two matrices: the species matrixandthe environmental matrix. Table 2.1 shows a partof the species matrix for a well-studied dataset incommunity ecology, the dune meadow dataset.This dataset contains 30 species of which only13 are presented. The data were collected onthe vegetation of meadows on the Dutch islandof Terschelling (Jongman et al. 1995). Table 2.2shows the environmental data for this dataset.

    You can notice that the rows of both matriceshave the same names they reflect the datathat were collected for each site or sample unit.Sites could be sample plots, sample sites, farms,biogeographical provinces, or other identities.Sites are defined as the areas from which data werecollected during a specific time period. We willuse the term site further on in this manual. Siteswill always refer to the rows of the datasets.

    Some studies involve more than one type ofsampling unit, often arranged hierarchically. For

    example, villages, farms in the village and plotswithin a farm. Sites of different types (such as plots,villages and districts) should not be mixed withinthe same data matrix. Each site of the matrix shouldbe of the same type of sampling unit.

    The columns of the matrices indicate thevariables that were measured for each site. The cellsof the matrices contain observations bits of datarecorded for a specific site and a specific variable.

    We prefer using rows to represent samples andcolumns to represent variables to the alternative

    form where rows represent variables. Our preferenceis simply based on the fact that some generalstatistical packages use this format. Data can bepresented by swapping rows and columns, since thecontents of the data will remain the same.

    Site Soil depth (m)

    A 1.0

    B 2.0

    C 0.5

    D 1.5

    The environmental information from Figure 2.1can be recorded in a similar fashion:

  • 7/29/2019 Analisys Diversity

    31/207

    DATA PREPARATION 21

    Table

    2.

    1

    Anexampleof

    aspeciesmatrix,

    whererowscorresp

    ondtosites,

    columnscorrespondtos

    peciesandcellentriesaretheabunda

    nceofthe

    speciesataparticularsit

    e

    Site

    Achmil

    Agrsto

    Airpra

    Alogen

    Antodo

    Belper

    Brarut

    Brohor

    Calc

    us

    Chealb

    Cirarv

    Elepal

    E

    lyrep

    X1

    1

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    0

    4

    X2

    3

    0

    0

    2

    0

    3

    0

    4

    0

    0

    0

    0

    4

    X3

    0

    4

    0

    7

    0

    2

    2

    0

    0

    0

    0

    0

    4

    X4

    0

    8

    0

    2

    0

    2

    2

    3

    0

    0

    2

    0

    4

    X5

    2

    0

    0

    0

    4

    2

    2

    2

    0

    0

    0

    0

    4

    X6

    2

    0

    0

    0

    3

    0

    6

    0

    0

    0

    0

    0

    0

    X7

    2

    0

    0

    0

    2

    0

    2

    2

    0

    0

    0

    0

    0

    X8

    0

    4

    0

    5

    0

    0

    2

    0

    0

    0

    0

    4

    0

    X9

    0

    3

    0

    3

    0

    0

    2

    0

    0

    0

    0

    0

    6

    X10

    4

    0

    0

    0

    4

    2

    2

    4

    0

    0

    0

    0

    0

    X11

    0

    0

    0

    0

    0

    0

    4

    0

    0

    0

    0

    0

    0

    X12

    0

    4

    0

    8

    0

    0

    4

    0

    0

    0

    0

    0

    0

    X13

    0

    5

    0

    5

    0

    0

    0

    0

    0

    1

    0

    0

    0

    X14

    0

    4

    0

    0

    0

    0

    0

    0

    4

    0

    0

    4

    0

    X15

    0

    4

    0

    0

    0

    0

    4

    0

    0

    0

    0

    5

    0

    X16

    0

    7

    0

    4

    0

    0

    4

    0

    3

    0

    0

    8

    0

    X17

    2

    0

    2

    0

    4

    0

    0

    0

    0

    0

    0

    0

    0

    X18

    0

    0

    0

    0

    0

    2

    6

    0

    0

    0

    0

    0

    0

    X19

    0

    0

    3

    0

    4

    0

    3

    0

    0

    0

    0

    0

    0

    X20

    0

    5

    0

    0

    0

    0

    4

    0

    3

    0

    0

    4

    0

  • 7/29/2019 Analisys Diversity

    32/207

    22 CHAPTER 2

    Table 2.2 An example of an environmental matrix , where rows cor respond to sites and columns correspond tovariablesSite A1 Moisture Management Use Manure

    X1 2.8 1 SF Haypastu 4X2 3.5 1 BF Haypastu 2

    X3 4.3 2 SF Haypastu 4X4 4.2 2 SF Haypastu 4

    X5 6.3 1 HF Hayfield 2X6 4.3 1 HF Haypastu 2

    X7 2.8 1 HF Pasture 3X8 4.2 5 HF Pasture 3

    X9 3.7 4 HF Hayfield 1

    X10 3.3 2 BF Hayfield 1X11 3.5 1 BF Pasture 1

    X12 5.8 4 SF Haypastu 2X13 6 5 SF Haypastu 3

    X14 9.3 5 NM Pasture 0X15 11.5 5 NM Haypastu 0

    X16 5.7 5 SF Pasture 3

    X17 4 2 NM Hayfield 0X18 4.6 1 NM Hayfield 0X19 3.7 5 NM Hayfield 0

    X20 3.5 5 NM Hayfield 0

    The species matrix

    The species data are included in the species

    matrix. This matrix shows the values for eachspecies and for each site (see data collection forvarious types of samples). For example, the valueof 5 was recorded for species Agrostis stolonifera(coded as Agrsto) and for site 13. Another namefor this matrix is the community matrix.

    The species matrix often contains abundancevalues the number of individuals that werecounted for each species. Sometimes species datareflect the biomass recorded for each species.Biomass can be approximated by percentage

    cover (typical for surveys of grasslands) or bycross-sectional area(the surface area of the stem,typical for forest surveys). Some survey methodsdo not collect precise values but collect values thatindicate arange of possible values, so that datacollection can proceed faster. For instance, thevalue of 5 recorded for speciesAgrostis stolonifera

    and for site 13 indicates a range of 5-12.5% incover percentage. The species matrix should notcontain a range of values in a single cell, but a

    single number (the database can contain the rangethat is used to calculate the coding for the range).An extreme method of collecting data that onlyreflect a range of values is the presence-absencescale, where a value of 0 indicates that the specieswas not observed and a value of 1 shows that thespecies was observed.

    A site will often only contain a small subset ofall the species that were observed in the wholesurvey. Species distribution is often patchy. Speciesdata will thus typically contain many zeros. Some

    statistical packages require that you are explicitthat a value of zero was collected otherwise thesoftware could interpret an empty cell in a speciesmatrix as amissing value. Such a missing valuewill not be used for the analysis, so you couldobtain erroneous results if the data were recordedas zero but treated as missing.

  • 7/29/2019 Analisys Diversity

    33/207

    DATA PREPARATION 23

    The environmental matrix

    The environmental dataset is more typical of thetype of dataset that a statistical package normallyhandles. The columns in the environmental dataset

    contain the various environmental variables. Therows indicate the sites for which the values wererecorded. The environmental variables can bereferred to as explanatory variables for the typesof analysis that we describe in this manual. Somepeople prefer to call these variables independent

    variables, and others prefer the term x variables.For instance, the information on the thicknessof the A1 horizon of the dune meadow datasetshown in Table 2.2 can be used as an explanatoryvariable in a model that explains where species

    Agrostis stoloniferaoccurs. The research hypotheseswill have indicated which explanatory variableswere recorded, since an infinite number ofenvironmental variables could be recorded at eachsite.

    The environmental dataset will often containtwo types of variables: quantitative variables andcategorical variables.

    Quantitative variables such as the thickness ofthe A1 horizon of Table 2.2 contain observationsthat are measured quantities. The observation for

    the A1 horizon of site 1 was for example recordedby the number 2.8. Various statistics can becalculated for quantitative variables that cannot becalculated for categorical variables. These include:

    The mean or average value

    The standard deviation (this value indicates howclose the values are to the mean)

    The median value (the middle value when valuesare sorted from low to high) (synomyms for thisvalue are the 50% quantile or 2nd quartile)

    The 25% and 75% quantiles = 1st and 3rd

    quartiles (the values for which 25% or 75% ofvalues are smaller when values are sorted fromlow to high)

    The minimum value

    The maximum value

    For the thickness of A1 horizon of Table 2.2, weobtain following summary statistics.

    Min. 1st Qu. Median Mean 3rd Qu. Max.2.800 3.500 4.200 4.850 5.725 11.500

    These statistics summarize the values that wereobtained for the quantitative variable. Anothermethod by which the values for a quantitativevariable can be summarized is a boxplot graphas shown in Figure 2.2. The whiskers show theminimum and maximum of the dataset, except ifsome values are farther than 1.5 the interquartilerange (the difference between the 1st and 3rdquartile) from the median value. Note that varioussoftware packages or options within such packagewill result in different statistics to be portrayedin boxplot graphs you may want to checkthe documentation of your particular softwarepackage. An important feature of Figure 2.2 isthat it shows that there are some outliers in thedataset. If your data are normally distributed,then you would only rarely (less than 1% of thetime) expect to observe an outlier. If the boxplotindicates outliers, check whether you entered the

    data correctly (see next page).

  • 7/29/2019 Analisys Diversity

    34/207

    24 CHAPTER 2

    Figure 2.2 Summary of a quantitative variable as a boxplot. The variable that is summarized is the thickness of theA1 horizon of Table 2.2 .

    Figure 2.3 Summary of a quantitative variable as a Q-Q plot. The variable that is summarized is the thickness of theA1 horizon of Table 2.2 . The two outli ers (upper right-hand side) cor respond to the outliers of Figure 2.2.

  • 7/29/2019 Analisys Diversity

    35/207

    DATA PREPARATION 25

    There are other graphical methods for checkingfor outliers for quantitative variables. One ofthese methods is the Q-Q plot. When data are

    normally distributed, all observations should beplotted roughly along a straight line. Outliers willbe plotted further away from the line. Figure 2.3gives an example. Another method to check foroutliers is to plot a histogram. The key point is tocheck for the exceptional observations.

    Categorical variables (or qualitative variables)are variables that contain information on datacategories. The observations for the type ofmanagement for the dune meadow dataset

    (presented in Table 2.2) have four values: standardfarming, biological farming, hobby farmingand nature conservation management. Theobservation for the type of management is thusnot a number. In statistical textbooks, categoricalvariables are also referred to as factors. Factors canonly contain a limited number offactor levels.

    The only way by which categorical variablescan be summarized is by listing the numberof observations or frequency of each category.For instance, the summary for the management

    variable of Table 2.2 could be presented as:

    Category

    BF HF NM SF

    3 5 6 6

    Figure 2.4 Summary of a categorical variable by a barplot. The management of Table 2.2 is summarized.

    Graphically, the summary can be represented asa barplot. Figure 2.4 shows an example for themanagement of Table 2.2.

    Some researchers record observations of

    categorical variables as a number, where thenumber represents the code for a specific typeof value for instance code 1 could indicatestandard farming. We do not encourage theusage of numbers to code for factor levels sincestatistical software and analysts can confuse thevariable with a quantitative variable. The statisticalsoftware could report erroneously that the averagemanagement type is 2.55, which does not makesense. It would definitely be wrong to concludethat the average management type would be 3 (the

    integer value closest to 2.55) and thus be hobby-farming. A better way of recording categoricalvariables is to include characters. You are thenspecific that the value is a factor level you couldfor instance use the format of c1, c2, c3 andc4 to code for the four management regimes.Even better techniques are to use meaningfulabbreviations for the factor levels or to just usethe entire description of the factor level, sincemost software will not have any problems withlong descriptions and you will avoid confusion of

    collaborators or even yourself at later stages.Ordinal variables are somewhere between

    quantitative and categorical variables. The manurevariable of the dune meadow dataset is an ordinalvariable. Ordinal variables are not measured ona quantitative scale but the order of the valuesis informative. This means for manure thatprogressively more manure is used from manureclass 0 until 4. However, since the scale is notquantitative, a value of 4 does not mean that fourtimes more manure is used than for value 1 (if itwas, then we would have a quantitative variable).For the same reason manure class 3 is not theaverage of manure class 2 and 4.

    You can actually choose whether you treatordinal variables as quantitative or categorical

    observations

  • 7/29/2019 Analisys Diversity

    36/207

    26 CHAPTER 2

    variables in the statistical analysis. In manystatistical packages, when the observations ofa variable only contain numbers, the packagewill assume that the variable is a quantitative

    variable. If you want the variable to be treatedas a categorical variable, you will need to informthe statistical package about this (for example byusing a non-numerical coding system). If you arecomfortable to assume for the analysis that theordinal variables were measured on a quantitativescale, then it is better to treat them as quantitativevariables. Some special methods for ordinal dataare also available.

    Checking for exceptionalobservations that could be

    mistakes

    The methods of summarizing quantitativeand categorical data that were described inthe previous section can be used to check forexceptional data. Maximum or minimum valuesthat do not correspond to the expectations willeasily be spotted. Figure 2.5 for instance showsa boxplot for the A1 horizon that contained a

    data entry error for site 3 as the value 43 was

    entered instead of 4.3. Compare with Figure 2.2.You should be aware of the likely ranges of allquantitative variables.

    Some mistakes for categorical data can easily

    be spotted by calculating the frequencies ofobservations for each factor level. If you had enteredNN instead of NM for one managementobservation in the dune meadow dataset, thena table with the number of observations foreach management type would easily reveal thatmistake. This method is especially useful whenthe number of observations is fixed for eachlevel. If you designed your survey so that eachtype of management should have 5 observations,then spotting one type of management with 4

    observations and one type with 1 observationwould reveal a data entry error.

    Some exceptional observations will only bespotted when you plot variables against eachother as part of exploratory analysis, or even laterwhen you started conducting some statisticalanalysis. Figure 2.6 shows a plot of all possiblepairs of the environmental variables of the dunemeadow dataset. You can notice the two outliersfor the thickness of the A1 horizon, which occurat moisture category 4 and manure category 1,

    for instance.

    Figure 2.5 Checking for exceptional observations.

  • 7/29/2019 Analisys Diversity

    37/207

    DATA PREPARATION 27

    After having spotted a potential mistake, you needto record immediately where the potential mistakeoccurred, especially if you do not have time todirectly check the raw data. You can include a text

    file where you record potential mistakes in thefolder where you keep your data. Alternatively,you could give the cell in the spreadsheet whereyou keep a copy of the data a bright colour. Yetanother method is to add an extra variable in yourdataset where comments on potential mistakes arelisted. However the best method is to directly checkand change your raw data (if a mistake is found).Always record the changes that you have made andthe reasons for them. Note that an observation thatlooks odd but which can not be traced to a mistake

    should not be changed or assumed to be missing.If it is clearly a nonsense value, but no explanationcan be found, then it should be omitted. If it isjust a strange value then various courses are open

    to you. You can try analysing the data with andwithout the observation to check if it makes a bigdifference to results. You might have to go back tothe field and take the measurement again, finding afield explanation if the odd value is repeated.

    Do not get confused when you have variousdatasets in various stages of correction. Commonlyscientists end up with several versions of each datafile and loose track of which is which. The bestmethod is to have only one dataset, of which youmake regular backups.

    Figure 2.6 Checking for exceptional data by pairwise comparisons of the variables of Table 2.2.

  • 7/29/2019 Analisys Diversity

    38/207

    28 CHAPTER 2

    Methods of transforming the

    values in the matrices

    There are many ways in which the values of

    the species and environmental matrices can betransformed. Some methods were developedto make data more conform to the normaldistribution. What transformation you use willdepend on your objectives and what you wantto assume about the data. For several types ofanalysis described in later chapters you do notneed to transform the species matrix, and mostanalyses do not actually require the explanatoryvariables to be normally distributed. It istherefore not good practice to always transform

    explanatory variables to be normally distributed.Moreover, in many cases it will not be possible tofind a transformation that will result in normallydistributed data.

    We recommend only transforming variables ifyou have a good reason to investigate a particularpattern that will be revealed by the transformation.For example, an extreme way of transforming the

    species matrix is to change the values to 1 if thespecies is present and 0 if the species is absent. Thesubsequent analysis will thus not be influenced bydifferences in species abundances. By comparingthe results of the analysis of the original data withthe results from the transformed data, you can getan idea of the influence of differences in abundanceon the results. If one species dominates and theordination results are only influenced by that onespecies, then you could use a logarithmic or square-root transformation to diminish the influence of

    the dominant species again this means that thereis a good reason for the transformation and suchshould not be a standard approach. The fact thatthe results are influenced by the dominant speciesis actually a clear demonstration of an importantpattern in your dataset.

  • 7/29/2019 Analisys Diversity

    39/207

    DATA PREPARATION 29

    Examples of the analysis with the menu options of Biodiversity.R

    See in chapter 3 how data can be loaded from an external file:

    Data > Import data > from text file

    Enter name for dataset: data (choose any name)Click OK

    Browse for the file and click on it

    To save data to an external file:

    Data > Active Dataset > export active dataset

    File name: export.txt (choose any name)

    Select the species and environmental matrices:

    Biodiversity > Environmental Matrix > Select environmental matrix

    Select the dune.env dataset

    Biodiversity > Community matrix > Select community matrix

    Select the dune dataset

    To summarize the data and check for exceptional cases:

    Biodiversity > Environmental Matrix > Summary

    Select variable: A1

    Click OK

    Click Plot

  • 7/29/2019 Analisys Diversity

    40/207

    30 CHAPTER 2

    Examples of the analysis with the command options of Biodiversity.R

    To load data from an external file:

    data

  • 7/29/2019 Analisys Diversity

    41/207

    31

    CHAPTER 3

    Doing biodiversity analysis

    with Biodiversity.R

    Doing biodiversity analysis with

    Biodiversity.R

    This chapter describes how the analyses presentedin this manual can be performed with theBiodiversity.R software.

    This special attention to Biodiversity.R does not

    mean that other software packages can not be usedfor biodiversity analysis. In 2003, a BiodiversityAnalysis Package CD-ROM was produced toprovide several software packages that are verygood for biodiversity analysis. However, some ofthe software packages had a more limited scopein the analyses that they supported. Some of thesoftware packages had not developed a graphicaluser interface, which caused some problems forteaching the analysis. Some types of analysis couldnot be performed in the software provided on theCD-ROM. For these reasons, the Biodiversity.Rsoftware was developed, including a graphical userinterface. All the analyses described in this manualcan be conducted with Biodiversity.R.

    What is Biodiversity.R?

    Biodiversity.R is software that does all thebiodiversity analyses described in this manual. It

    needs to be loaded into the R statistical software.R is a software that was developed to allow formany different types of statistical analysis. It is verysimilar to the S and S-Plus statistical software. It isfree software, as is Biodiversity.R. The software isalso open, so that you can check how calculationsare done, and the graphics are quite advanced.

    How do I run Biodiversity.R?

    The CD-ROM that is provided with this manualcontains an installed version of Biodiversity.R.You can run Biodiversity.R from the CD-ROMby clicking on the file Run-Biodiversity.bat inthe Biodiversity.R folder on the CD-ROM.

    Alternatively you need to install Biodiversity.R onanother location on your computer first.

    Each time that you run R, you need to loadthe Rcmdr package (see below: how do I runBiodiversity.R) to access the Biodiversity.Rgraphical user interface.

    How do I install Biodiversity.R?

    Two options are provided for installingBiodiversity.R. When you click on Install-Biodiversity.bat, then all files will be installed underthe Program Filesfolder of your C drive.

    The alternative method is to install Biodiversity.Rin steps. The files that are used during installationare all listed on the CD-ROM in the Biodiversity.R/installation files folder (Figure 3.1, see nextpage).

    The first thing that you need to do is to installthe R software. You can also obtain the software

    from the following website: http://cran.r-project.org. If you are using Windows, then you candownload R from: http://cran.r-project.org/bin/windows/base. You will find a file there with aname similar to rw2010-1.exe. You need to runthe file to install R. Note that it may be safer toclose all other programs when you install R.

  • 7/29/2019 Analisys Diversity

    42/207

    32 CHAPTER 3

    During the installation, make sure that you opt

    to install the support files for library(tcltk).After you have installed R, then you can run it.

    R is a language that is run by typing in commands.It does not have an extensive user interface.

    Some additional software can be loaded ontoR. These addins are called packages or libraries.Some packages already come with the installationversion of R. Some other packages need to bedownloaded.

    You have various options to install theseadditional packages. The first option is install theadditional packages from the CD-ROM. Within

    the R program, you need to go to the top menu,

    choose Packages, and then choose menu option:Install packages from local zip files. Figure 3.2shows how this can be done.

    Note that we will not put many images of menusin this manual, so that some space will be saved.We will describe the selection shown in Figure3.2 as: You select the R menu option: Packages >Install package(s) from local zip files.

    You will obtain a list of available packages underthe Installation filesfolder of the CD-ROM. Youcan install all the packages by selecting all ofthem at the same time (click on the CTRL and Akeys simultaneously).

    Figure 3.1. All the files used during installation are provided in the Installation files folder

  • 7/29/2019 Analisys Diversity

    43/207

    DOING BIODIVERSITY ANALYSIS WITH BIODIVERSITY.R 33

    Figure 3.2. Installing other packages onto R. This menu option is described in the text as: Packages > Installpackage(s) from local zip files.

    The alternatives are to download the packagesfrom R and then install them manually afterwards,or to install the packages directly from the CRANwebsite. You can download the files for the differentpackages from the same website you downloadedthe R package itself from: http://cran.r-project.org. You will see a link to contributed packages.If you are using Windows, then you can downloadthe packages from: http://cran.r-project.org/bin/

    windows/contrib.You only need to install a package once after

    installing R. When you run R, you will not be ableto access the functions of contributing packages,unless you follow the menu option of: Packages> Load package, or if you give the appropriatecommand in R of loading the package. For thevegan library, you need to select this packageafter menu option: Packages > Load package oryou need to type library(vegan) each timethat you started using R and wanted to access the

    functions of this library.Note that we will use a different font for

    results and commands in R and Biodiversity.R. For example, library(vegan)points to acommand in R. Any information in this font willappear in the R console.

    The packages that you need to install into R are: abind

    akima

    car

    combinat

    effects

    ellipse

    lmtest

    maptree

    multcomp

    mvtnorm

    rcmdr

    relimp

    rgl

    sandwich

    splancs

    strucchange vegan

    zoo

    These are quite a few packages, but this alsomeans that various types of analysis can be donein R. Especially important is vegan as it allows

  • 7/29/2019 Analisys Diversity

    44/207

    34 CHAPTER 3

    for many of the analyses of Biodiversity.R. Rcmdris also an important package as it allows for the R-commander graphical interface. (For the advanceduser: The R-commander runs best under Single-Document Interface. You can set this option by

    setting MDI = no in file C:\Program Files\R\rw2010\etc\Rconsole.)

    The final (and probably most complicated) stepin installing Biodiversity.R is to copy two filesinto the library\Rcmdr\etcfolder of R. In case thatyou installed R under the program files of yourC drive, then you can find the Rcmdr directoryunder C:\Program files\R\rw2010\library\Rcmdr\etc. You need to put the following files into thisdirectory: Biodiversity.Rand Rcmdr-menus.txt. TheRcmdr-menus.txtwill already exist in the library, soyou need to replace the Rcmdr-menus.txtwith thefile that is provided on the CD-ROM. You coulduse a program such as the Windows Explorer tocopy the files.

    When you will have completed all these steps,Biodiversity.R will have been installed.

    In short, you need to follow these steps to installand run Biodiversity.R:

    1. Install R

    2. Install the required contributing packages

    3. CopyBiodiversity.Rand Rcmdr-menus.txtintolibrary\Rcmdr\etc

    How do I run Biodiversity.R?

    Obviously you need to run R first.To run Biodiversity.R with the menu options,

    you will need to load the R-commander, either by

    the command library(Rcmdr) or by menuoption: Packages > Load packageEach time that you want to use Biodiversity.R,

    you need to load the Rcmdr package again afterlaunching R.

    The species and environmental

    datasets

    After you have loaded Biodiversity.R, you will notbe able to conduct any type of analysis before you

    have chosen the species and environmental datasets.As we saw in chapter 2 on data preparation, theanalyses in this manual will be conducted withthese two datasets.

    The R-commander was designed to only use onedataset. This dataset is called the active dataset.Biodiversity.R uses two datasets, the species andenvironmental datasets. When developing it thedecision was taken to make the environmentaldataset of Biodiversity.R always to be the activedataset of the R-commander. When a new dataset

    is chosen to be the new active dataset for theR-commander, then it also becomes the newenvironmental dataset of Biodiversity.R. Withthe menu options of the R-commander, variousmanipulations can be done on the active dataset,including importing an active dataset and saving anactive dataset. You can do the same manipulationsto the species dataset, but first you need to set thespecies dataset to also be the active dataset (andthus also the environmental dataset).

    An example of an analysis in

    Biodiversity.R

    Descriptions of the way in which each type ofanalysis can be done in R are provided at the endof each chapter. As an example and a test whetheryou installed Biodiversity.R correctly, you couldrun following analysis. This example calculates a

    species accumulation curve for the dune dataset.This dataset is provided with vegan. The resultthat you will obtain is shown in the chapter onspecies richness.

  • 7/29/2019 Analisys Diversity

    45/207

    DOING BIODIVERSITY ANALYSIS WITH BIODIVERSITY.R 35

    You need to follow these menu options:

    Biodiversity > Environmental Matrix > Selectenvironmental matrix

    Select the dune.env dataset

    Biodiversity > Community Matrix > Selectcommunity matrix

    Select the dune dataset

    Biodiversity > Analysis of biodiversity > Speciesaccumulation curves

    Accumulation method: exact

    Press on the OK button

    Press on the Plot button

    The last window that allows you to calculate aspecies accumulation curve is shown in Figure 3.3.

    Note that there are separate OK and Plotoptions for different menus. When you pressOK, then the analysis is calculated and the

    results are saved under name the specified for theresult. The Plot options apply to the name ofthe result that appears on top. It is not necessary toredo the analysis to plot results, and you can alsoplot information from earlier analyses by changingthe name of the result on top.

    Figure 3.3. The window interface for the calculation of species accumulation curves

  • 7/29/2019 Analisys Diversity

    46/207

    36 CHAPTER 3

    The alternative option to using the menu interfaceis to type in the following commands:

    Accum.1 Saveas and then putting text (tab delimited).

    Be aware that text fields (also names of variablesand sites) can only contain one continuous textwithout spaces. If you have words separatedby spaces (such as the genus and species of aplant name), then you need to change theseinto a continuous text such as changed_into_continuous_text, changedintocontinuoustext orchanged.into.continuous.text.

    Datasets in R have one particular feature in nothaving a name for the column that contains therow names of the data. So if your first column ofdata determines the name of each site, then youshould not have any contents in the first rowof data with the column names. As a result, thenumber of fields in the first row of the file willbe one less than the other rows of the file. Youcan check for this feature by looking at the filesdune.t