Presence tutorial #1

This exercise is designed to show how to run programs PRESENCE to compute species presence and detectability estimates from 'presence-absence' data.

Input data consists of 'detection-histories' of individuals at survey sites.

Running the program

Start program PRESENCE. The program is designed to work like program MARK (with the hope that it will not take long to learn how to use). Models are built and run, with model-results saved in output files and a summary table of the models displayed in the main window.

Click 'File/New Project' to start a new analysis. A dialog box will appear asking for a title, filename, number of sites,etc. Click the 'Input Data Form' button.

Now, start your spreadsheet program, and load the sample data file named 'Blue_Ridge.csv'. Select all cells ('Cntl-A'), and copy to the clipboard ('Edit'/'Copy').

Next, return to program PRESENCE and click in the first cell of the input data form (site 1, 1-1). Go to the 'Edit' menu, and click 'Paste', 'paste values'.

Save the input by clikcing 'File/Save as' and name the file 'blue_Ridge_salamander.pao'. Enter a title (eg., "blue ridge salamander analysis"), then close the Input Data Form window by clicking the X in the upper right corner or clicking 'File/Close'.

Next, click the 'OK' button to create a project folder.

You're now presented with a 'Results Browser' window where a summary of each model will be saved. To run our first model, click 'Run>Analysis:single-season>Simple single-season' from the menu-bar.

When the 'Setup Numerical Estimation Run' window appears, click 'OK to Run' to run the default pre-defined model. A summary window should appear showing the AIC value and number of parameters estimated for that model. Click 'OK' to make the program save the results to the Results Browser window.

To view the estimates from this model, click on the model name 'psi(.),p(.)' with the right mouse button, then click 'view model output' using the left mouse button. (Shortcut: click the 2nd button from the left: )

Scroll down in the output to find the estimate of occupancy, labelled "Individual Site estimates if ". The estimate of occupancy is approximately 59%. The "naive" estimate of occupancy (disregarding the possibility of imperfect detection) appears near the beginning of the output as is 46% (18 out of 39 sites had at least one detection).

Building a model

Models are built in PRESENCE by specifying equations for each parameter. In the single-season model, there is one parameter for occupancy, psi, and 5 parameters for detection (one for each survey). So, we need 6 equations with the left-hand side containing the parameters, and the right-hand side containing one or more "beta-parameters". The way it works is PRESENCE will estimate the "beta-parameters" and compute the occupancy and detection parameters from those equations.

In the previous model, occupancy was a single-constant, so the equation would be:

psi = beta1
PRESENCE will estimate beta1, then print psi, which is equal to beta1. For this simple model, this might seem silly, but the advantages of this will become apparent later.

For detection, the model only estimated a single value and set all 5 detection probabilities to that value.

p(1) = beta2
p(2) = beta2
p(3) = beta2
p(4) = beta2
p(5) = beta2

To see how these equations are entered into PRESENCE, look at the output file, near the beginning with lines containing, 'Matrix 1:' and 'Matrix 2'. The rows of these matrices represent the 'real' parameters we're interested in, and the columns represent the 'beta-parameters'. In Matrix 1, there is 1 beta-parameter, named 'a1'. The equation for psi can be obtained from the matrix by multiplying the values in the matrix ('1' is the only value in this 1x1 matrix) by the beta-parameter name:

psi = 1 * a1

The equations for the 5 detection probabilities (p(1) to p(5)) are:

p(1) = 1 * b1
p(2) = 1 * b1
p(3) = 1 * b1
p(4) = 1 * b1
p(5) = 1 * b1

So, when we tell PRESENCE to run a model, two windows are generated: one allows input of the model name, and options, and the other allows you to specify the equations (in the "design-matrix" window).

As an example, let's build a model where detection probabilities are one value for the first two surveys, and another value for the last three surveys. (We'll use the same equations for psi and only change the p's.)

So, we'll need two beta-parameters for the two p's (and one for psi). Here are the equations to build this model:

p(1) = 1 * b1
p(2) = 1 * b1
p(3) = 1 * b2
p(4) = 1 * b2
p(5) = 1 * b2

Before entering these equations into PRESENCE, each equation must contain all of the beta-parameters.

p(1) = 1 * b1 + 0 * b2
p(2) = 1 * b1 + 0 * b2
p(3) = 0 * b1 + 1 * b2
p(4) = 0 * b1 + 1 * b2
p(5) = 0 * b1 + 1 * b2

The values which are entered into the design-matrix are just the coefficients of the beta-parameters. Let's try this model by clicking the Run>Analysis:single-season>Simple single-season' from the menu-bar. Notice that the design matrix window has 2 tabs: one for occupancy, and one for detection. Click the 'detection' tab, and you'll see the matrix from the last model:

Right-click on the 1st cell, then click 'Add col' to add a column to the matrix. Then, change the last 3 rows from '1 0' to 0 1'.

Before running this model, we need to change the model-name in the other window. We cannot have two models with the same name. Also, by specifying a descriptive model name, it will be easier to know how we built the model without looking at the design-matrices. We'll name this model, "psi(.),p(1-2,3-5)" to indicate that detection probabilities are the same for surveys 1 and 2, and a different value for surveys 3,4 and 5. (You can make up any name you want.)

To run our second model, click the "OK to Run" button on the other window (no need to close the design-matrix window).

To view the estimates from this model, click on the model name with the right mouse button, then click 'view model output' using the left mouse button.

Look at the output for the real parameters, psi and p. There are now two different estimates for p: p1=p2=.1539, and p3-5=.3371.

To summarize...

Using equations, you can build many different models to match how you think the parameters are affected by various things. Also, there are many different ways to build the same model. For example, we could build the last model using these equations for p:

p(1) = 0 * b1 + 1 * b2
p(2) = 0 * b1 + 1 * b2
p(3) = 1 * b1 + 0 * b2
p(4) = 1 * b1 + 0 * b2
p(5) = 1 * b1 + 0 * b2

Here, we've just swapped b1 and b2, so p1 and p2 are computed using b2 and p3-5 are computed using b1.

Or...

p(1) = 1 * b1 + 1 * b2
p(2) = 1 * b1 + 1 * b2
p(3) = 1 * b1 + 0 * b2
p(4) = 1 * b1 + 0 * b2
p(5) = 1 * b1 + 0 * b2

Here, b1 represents the real parameters, p3-5, and b2 represents the difference between p1-2 and p3-5. These still yield the same real parameter estimates (p).

One last thing...

The beta-parameters estimated by PRESENCE are not limited to be between zero and one. Since we always want psi and p to be constrained to be between zero and one, a transformation function is applied to the equations to get the real parameters. So, instead of:

p(1) = 1 * b1 + 0 * b2
PRESENCE uses:

           exp(1*b1 + 0*b2)
p(1) = ------------------------------
          1 + exp(1*b1 + 0*b2)

Exercise

Can you generate the equations and PRESENCE input for a model where all 5 surveys have different detection probabilities?