2-sample model exercise

This exercise is designed to show how to run program MARK to compute Capture-probability and abundance estimates from 'capture-recapture' data.

Input data consists of capture-histories of individual animals or Summarized frequencies of capture-histories.

To use program MARK, an input file must be prepared. This file must be an ASCII 'text' file (no word-processing or spreadsheet format codes). It can easily be created from Notepad or a word-processing program (like Word Perfect or MS Word). If a word-processor is used, it should be saved as a 'MSDOS text' or 'ASCII text' file.

The following is a of a sample data file:

/* 14.1.5 Example from Analysis and Management
of Animal Populations.  Williams et al. (2002) */
11  7;
10 80;
01  7;
In a MARK input file, each capture-history record must end with a ';'. Also, Any text enclosed between "/*" and "*/" is ignored. In this example, the First two lines are comments, but note there is no ";" at the end. To read The first capture-history, MARK will start reading the file and will not stop until it reaches the first ";".

The first record MARK reads contains a comment, followed by the capture-history "11", followed by a frequency count of "7". This means that there were 7 individuals who were captured on both occasions.

The second record contains the capture-history "10" and a frequency-count of "80", meaning that 80 individuals were captured on the first occasion, but not captured on the second occasion.

The third record contains the capture-history "01" and a frequency-count of "7", meaning that 7 individuals were not captured on the first occasion, but were captured on the second occasion.

One additional rule for MARK input files is that the filename must end with ".inp". So, after entering the above input with Word or WordPerfect, Click 'Save as', change the file type to 'text only (*.txt)', give it a meaningful name (eg. "2sample.inp") and click 'Save'. (Make sure to enclose the filename in double-quotes so Word does not add ".txt" to the end.), then close Word.

Running the program

Start MARK by clicking 'Start' button (lower left corner usually), 'Programs', 'MARK 4.2', then 'MARK'. Or, double-click the MARK icon on the desktop.

When the form appears, go to the 'File' menu and select 'New'.

A dialog window will appear where you can specify the data type, title, filename, and occasion. For this example, click 'Closed Captures' under 'Select Data Type' and 'Huggins closed captures' from the list of model sub-types. Click in the textbox under 'Title for this set of data', and type:'2-sample model exercise'. Next, click the button labelled 'Click to select file'.

The program will present a dialog box asking for the name of the input file. Find the folder containing the sample input file (2sample.inp), then click on the file (2sample.inp), then click 'Open'.

Next, change the number of Encounter occasions to 2 by clicking the 'down' button next to the textbox.

Click 'OK' and the program will create a database file containing the results for this data.

Once MARK gathers the necessary information about the input, it is ready to run the first model. By default, the first model is one where each parameter varies over time. For 'Closed captures', there are two sets of parameters: capture-probability(p), and recapture-probability (c). With only two capture occasions, the parameters which can (possibly) be estimated are p(time1), p(time2), and c(time2). MARK initially gives each parameter a different number (1,2,3), but allows you to change them through 'parameter index matrices' (PIM's). Initially, only the PIM for p is shown. To show the PIM's for c, go to the 'PIM' menu, select 'Open parameter index matrix', and click 'Select all'. MARK will then show a window for p and c.

For this example, we want to run a model where p(1), p(2), and c(2) are equal. To do this, click on the window containing the PIM for p (labelled 'Capture Probability (p) Group 1', then click the second textbox containing '2'. Change the '2' to a '1'. Next click on the window containing the PIM for c (labelled 'Recapture Probability (c) Group 1', then click the textbox containing '3'. Change the '3' to a '1'. Click the 'Close' button on each of the PIM windows.

Our model is now specified where p(1), p(2), and c(2) are all numbered parameter number 1. Run this model by going to the 'Run' menu and clicking 'Current model'.

A dialog box will appear allowing you to enter a model name and other information. Enter 'p(.)' in the 'Model Name' textbox, click the 'List Data' checkbox, then click 'OK to Run'.

After clicking 'Run', a window will appear briefly, then disappear. Then, a results dialog box will appear. Click 'Yes' to include the output from the model you just ran in the database file.

The MARK results browser window will now contain a line with the name of the model you just ran (p(.)) with some statistics. To view the parameter estimates for this model, click the fourth button from the left (the first button is the trash can).

A notepad window will open with the parameter estimates, standard errors and confidence limits.

Click 'File', and 'Exit' to exit the program.

Known example:

In this example, we'll simulate data (so we know what the parameters should be), then estimate the parameters with MARK.

To simulate data, run program GENPRES2_INT. (Find the icon with explorer and double-click.) This program was written as to simulate 'patch occupancy' data, but can also be used to simulate capture-recapture data.

For capture-recapture data, set the number of sites to the number of animals to be simulated. Let's set this to 400. Also, set 'Psi' (occupancy rate) to 1.0 and set the number of surveys to 2. Then, let's set the capture probabilities to .25 for both capture occasions.

This program was written to generate occupancy data, and analyze the data with MARK. For this exercise, we only want to generate data, so go to the 'Model' menu and uncheck the first model. Then, click 'Analyze with expected values' to generate data and exit the program. The data file generated by GENPRES2_INT will be stored in the 'My Documents' folder with the name 'mark.inp'.

You have now generated data for a 2-sample closed-capture experiment where the population size is 400 and the capture probability is 0.25.

Start program MARK, and select 'File', 'New' to start a new analysis. Click 'Closed captures' under the 'Select Data Type' section and select 'Huggins closed captures' from the list of model sub-types. Enter 'simulated data, N=400, p=0.25' for the title, then click 'Click to select file'. Find the file you created, (mark.inp), and click 'Open'.

Change the number of encounter occasions to 2 and click 'OK'. Click 'OK' when the info dialog box appears.

In this example, we want to run the same model as the first example: parameters p(1)=p(2)=c(2). So, change the '2' to '1' in the capture probability PIM, then open the other PIM's by going to the 'PIM' menu, selecting 'Open parameter index matrix', clicking 'Select all', then 'OK'.

Click the recapture probability (c) PIM window and change the '3' to '1'. Close each of the PIM windows and click 'Run', then 'Current Model'.

In the 'Model Name' textbox, enter 'p(.)'. Select 'List data', then click 'OK to run'. Click 'Yes' when prompted to append the results to the database. Then, click the 2nd button from the left to view the parameter estimates. How close are the estimates from the 'real' values (400, 0.25)?

A more general model

To build a more general model, one where capture probabilities are different for occasion 1 and occasion 2, we would need to give the parameter p(1) a different index number than p(2). To do this, open the parameter index matrix window for capture probabilities (click PIM menu, select Parameter index matrix, then click 'select all'.) click on the 2nd box in the capture probabilities window, and change the '1' to '2'. Next, we want the recapture probability in occasion 2 to be the same as the capture probability in occasion 2. To do this, click the 'recapture probabilities (c)' window and change the '1' to '2'.

Then, run this model, naming it 'p(t)'. Look at the output by clicking the 'output' button (2nd from left) and examine the estimates of capture probability.