WLF 448: Fish & Wildlife Population Ecology
Lab Notes 5, Fall 2004

In-class Exercise #5 (Lab 5)

Distance Sampling

Introduction

We will use the windows version of program DISTANCE 4.0 to analyze some line-transect data and estimate the density of rabbits.  The example contains data from cottontail rabbits (Sylvilagus floridanus) surveyed in two strata ("Good" and "Poor" Habitat) along lines varying from 1.2 to 4km long; distances were measured in meters (2 transects per stratum). The area of "good habitat" is 60 ha, of "poor" 100 ha.  You can find the MS Excel file in at K:\WLF\448\2004\Lab2004\distance2004.  It is called Rabbit_inclass.xls.  You will need to open it in MS Excel and then save it as a tab-delimited text file.  You will also need to remove the first row in the file that contains the column labels. 

Program Distance

Data Entry

1.  Open program DISTANCE 4 under the start menu and 'Analytical'.

    2.  Start a new project (In the file drop-down menu).

    3.  Name your project and select the appropriate directory (This will be your zip drive or your H: drive).

    4. The "New Project Setup Wizard" should appear. You are at Step 1: Type of project.  Read the through the instructions. 

     5. Choose "Analyze a survey that has been completed".  Click Next.

6.  Step 2:  Setup for Analyzing a Survey.  Read through the instructions and click Next.

7.  Step 3: Survey Methods.  Choose 'line transect' for Type of Survey, 'perpendicular distance' for Distance measurements, 'single objects' for Observations, (Note: this will estimate density of groups of animals and not individual animals. Selecting clusters would invoke a routine to estimate cluster size based on distances and related cluster sizes from your data set and inevitably multiply the average cluster size by the density estimate for groups to get the population density estimate.) and '1' for Sampling fraction (Note: Selecting 1 indicates that the entire line was sampled.  A smaller value would indicate only a portion of the line or point was sampled or could be seen.) Click Next.

    8.  Step 4: Measurement Units.  Enter the units in which the data were collected.  See the data description above or look in the MS Excel file.  Click Next.

    9.  Step 5: Multipliers.  The ‘multipliers’ screen allows you to correct for g(0) being less than 1 or for indirect surveys where single animals may leave multiple marks of their presence. Leave this screen the way it is and go on to the next one.  Click Next.

   10.  Step 6: Finished.  Select 'Proceed to Data Import Wizard'.  Click Finished.  You have now created a new project in DISTANCE.  The next step is to import your data. 

   11. You should now be in the 'Import Data Wizard' window at Step 1: Introduction.  Read through the instructions and then click Next.

   12. Step 2: Data Source.  When you click Next you will be directed to select the file that contains your data.  Navigate to the tab-delimited text file you created at the beginning of this exercise (see Introduction above).  It should either be on your zip or H: drive.  Select the correct file and click OK.  .

   13. Step 3: Data Destination.  Under 'Destination Data Layers' choose 'observation' as your 'Lowest data layer' and 'region' as your 'Highest data layer'.  Under 'Location of New Records' choose 'Add all new records under the first record in the parent data layer'. Under 'Creation of new records in lowest data layer' choose 'Create one new record for each line of the import file'.  Click Next.

   14.  Step 4: Data File Format.  You can check to see if your file has imported correctly.  If you forgot to delete the first line of your tab-delimited text file you can choose to not import the first line in the file.  There should be 110 rows and 5 columns imported.  When your file looks correct, click Next.   

   15. Step 5: Data File Structure.  You can either click 'Columns are in the same order as they appear on the data sheet.' Or you can specify layer name, field name, and field type for each column.  If you choose to do this the set up should be (in order of layer name, field name, and field type) First column: Region, Label, Label; Second column: Region, Area, Decimal; Third column: Line transect, Label, Label; Fourth column: Line transect, Line length, Decimal; Fifth column: Observation, Perp distance, Decimal.  Click Next when you are done.

    16.  Step 6: Finished.  Look over your 'Import specifications' to make sure they are correct.  And then choose 'Overwrite existing data' under 'Existing data'.  Then click Finish.

    17.  Now you have entered your data.

Data Analysis

  1. DISTANCE is designed for interactive modeling of your data, you can run multiple models and compare the results using information criterion.  In the 'Project Browser' window, click on the 'Aanlyses' tab.  You will see a New Analyses has been established, but we want to customize it. 

    2.  To customize our analyses, select 'Analysis Details' under the 'Analyses' menu on the top menu bar.   A new window should appear.

Analysis:  Give your analysis an appropriate name so that you can easily distinguish it from others. 

Survey:  You should not have to change anything here.  You can click on 'Details' to check to make sure your data and survey methods are correct.

    Data Filter: This allows you to work with only portions of your data set. We will use the entire data set.  Select 'Properties' to see other options.  You can use intervals which allows you to transform your data set into intervals for analysis. This is appropriate for ocular distance estimates at large distances when realistically you could only estimate distances into intervals.  You can also truncate your data which allows you to specify your sighting width by truncating at the largest observation distance, discarding a given percentage of the largest distances, or by discarding observations beyond a specified distance. At the bottom of the screen you can change the name of the data filter to something meaningful to your analysis (e.g. entire).  Click OK when you are done to return to the 'Analysis Details' window.

    Model Definition: This is where we will select the models to be used.  Select 'Properties' and a new window should open.  At the top under 'Analysis Engine' select 'CDS - Conventional Distance Sampling'.  There are a series of tabs at the top corresponding to each of the sections discussed below.

    Estimates: Select 'No Stratification'.  This will estimate across strata instead of within strata.  At the bottom of the screen you can change the name of the data filter to something meaningful to your analysis and that should match with your data filter name.

    Detection Function: In this window, click on the + sign twice to add 2 models.  And then click on the model name to get a drop down list of the other models.  Do the same for the series expansion column.  Include the following models:

        Model 1: Half-normal key with a cosine series expansion.
        Model 2: Uniform key with a simple polynomial series expansion.
        Model 3: Hazard-rate key with a hermite polynomial series expansion.

    To select among models choose AIC.  You can look at the other options under this screen, but we will not be using any of them in the analysis.

    Cluster size:  We are not using clusters so we can ignore this screen.

    Multipliers:  We are not using multipliers so we can ignore this screen.

    Variance:  Select 'Estimate variance empirically' under 'Analytic variance estimate'.

    Misc.: Select 95% for two sided confidence intervals.  And select directory and name for results file.  Be sure to put your file either on your zip or H: drive.

    Select OK when you are done. 

    You should now be back at the Analysis screen.  You can now select 'Run'.

    3.  You should see a 'Log' screen and a ‘Results’ screen.  You can review your results using these screens or you can also open the file you saved with your results to review them.  Your T.A. will go through the results with you.  In addition the 'Project Browser' window will show you a summary of your run results.

Options summary
Model Fitting
    By detection function
    Model selection
Parameter Estimates—based on selected model
Detection Probability Plot
Probability Density Function Plot
Chi-square goodness-of-fit test
Density Estimates
Estimation Summary

What are the units on your estimate?  How good was your estimate? Think about potential problems with survey design and possible biases.

Stratified Example

Let's now analyze the same data, but stratify them by good and poor habitat.  In your DISTANCE Project Browser window, you should see the summary of your previous analysis.  You do not have to import your data again, but you do need to run a new analysis.  The instructions below will show you how to do a stratified analysis.

Stratified Analysis Procedure

  1. Start in your DISTANCE Project Browser window, which shows the summary of your unstratified analysis.  On the main menu bar at the top, go to 'New Analysis' under the 'Analyses' drop down menu. 
  2. A new line will appear in your Project Browser.  To modify this analysis to include stratum, select 'Analysis Details' under the 'Analyses' menu on the top menu bar.   A new window should appear (see #2 above under analysis for a detailed description of this window).  Under 'Analysis' in the new window, provide a new name for this analysis so it will not overwrite the previous one.
  3. To include good and poor habitat (the stratum), go down to 'Model Definition' and click 'Properties'.  Another new window will appear (see #2 under Model Definition for more details). 
  4. Click on the 'Estimate' tab. 
  5. Under 'Stratum Definition' select 'Use layer type' and then select 'Stratum' from the drop down menu. 
  6. Go down to the table entitled 'Quantities to estimate and level of resolution' and place a check mark in the Density by Stratum box.  This will give you a density estimate for the good and poor habitat.  When you do that the whole Stratum column will fill with check marks.
  7. Make sure the 'Global density estimate is 'mean' of stratum estimates weighted by 'stratum area'.  The good and poor habitat are different size areas so their density estimates need to be weighted accordingly.  Think about what a sum vs. a mean would indicate for your estimate.
  8. Next click on the 'Misc.' tab.  Change the name of the file to which you want to save your results. 
  9. Be sure to give this model definition a new name so that you do not overwrite your previous one.  Click OK.  You may get a 'Confirm change' window.  If you have changed the name of the analysis and the model definition and you saved your results from the previous analysis, then click 'Yes'.  If you did not change the names and did not save the results from your previous analysis you will lose all of that data if you click 'Yes'. 
  10. Back in your 'Analysis' window, click 'Run'.
  11. View the results in either the 'Results' window or in your saved results file.  Examine the differences between this and the first analysis. 
If you are going to use a word-processing program to view and edit your output (a good idea), change the font type and font size to a Courier font of size ~8pt. This will help keep numbers in tables aligned and also helps keep the histograms somewhat legible. Note: depending on what program you are using, you may have to highlight the text before selecting a new font type and size.

Think about the assumptions and underlying concepts when evaluating the validity of the results.

Was the estimate accurate and precise? Why or why not?

If not, what could or should have done to improve the accuracy and precision of our estimate? 

 

Return to Lab Notes



Revised: 15 September 2004