**1. Simulated data**

We use the simulated dataset provided in Exercise 16 'Multiple occupancy states models' in Donovan, T. M. and J. Hines (2007) Exercises in occupancy modeling and estimation.

The states are 1 = site unoccupied, 2 = occupied with no production of young ('uncertain' non-breeding state) and 3 = occupied with successful reproduction ('certain' breeding state), while the observations are 0 = species not observed, 1 = species observed and 2 = species observed with young.

These data were simulated with the following parameter values:

probability that the site is occupied by non-breeders psi1 = 0.3;

probability that the site is occupied by breeders psi2 = 0.5;

detection probability of non-breeders p1 = 0.5;

detection probability of breeders p2 = 0.7;

probability of detecting evidence of reproduction, given the site is occupied with young delta = 0.8;

number of sites R = 250.

The data are available here.

**2. Analysis in E-SURGE**

- Start » New session
- Data » Load data (Mark); click OK in the window that pops up asking 'How many columns do we extract from the data?'
- In the 'DATA' section in the main window, click the 'Modify' button and use 4 states and 1 age class
- Models » Markovian states only » Occupancy
- In the 'Advanced Numerical' section in the main window, tick the 'Compute C-I (Hessian)' box to get confidence intervals
- In the 'COMPUTE A MODEL' section in the main window, click on the 'Gepat' yellow button and use the following Matrix Patterns:

*Initial State*`* p p`*Transition*`* - - -`

`- * - -`

`- - * -`

`- - - *`*Event*step 1, the detection matrix`* - - -`

`* b - -`

`* - b -`

`* - - -`*Event*step 2, the assignment matrix`* - -`

`- * -`

`- * b`

`* - -`

- Click Exit to go to the next step.
- In the 'COMPUTE A MODEL' section in the main window, click on the 'Gemaco' green button and use the following syntax in the Model definition dialog box:

*Init state*`to`*Transition**Event*step 1`from`*Event*step 2`i`

- Gemaco » Call Gemaco (all phrases) or Ctr+G, then click Exit
- In the 'COMPUTE A MODEL' section in the main window, click on the 'IVFV' pink button. Exit.
- In the 'COMPUTE A MODEL' section in the main window, click on the 'RUN' red button to fit the model to the simulated dataset.
- When the dialog box pops up, modify the model name if needed, then click OK
- In the 'Output' section of the main window, click on 'Selected Model Results (.out)' to get the results. More precisely, check out the 'Reduced set of parameters' section in the output file. The three lines below are organised as follows: initial state, transition and event parameters, with the maximum likelihood estimates, the limits of the 95% confidence interval and the SE:

Par# 2# IS( 1, 2)( 1, 1)( 1 1) | 0.295674999 **psi1** 0.228163996 0.373495359 0.037265126

Par# 3# IS( 1, 3)( 1, 1)( 1 1) | 0.502904937 **psi2** 0.432898323 0.572797837 0.035924248

Par# 24# E( 2, 2)( 1, 1)( 1 1) | 0.515786096 **p1** 0.425952230 0.604611235 0.046070203

Par# 25# E( 3, 3)( 1, 1)( 1 1) | 0.704231715 **p2** 0.646969850 0.755712647 0.027819907

Par# 54# C( 3, 3)( 1, 1)( 1 2) | 0.794364460 **delta** 0.731225549 0.845798972 0.029218536