**1. Simulate data**

We use program GENPRES developed by Jim Hines to simulate data from a two-species occupancy model.

These data were simulated with the following parameter values:

psiA = 0.6 - the probability that species A is present, regardless species B =

psiB = 0.775 - the probability that species B is present, regardless species A =

phi = 1.032258 - species interaction factor = psiAB/(psiA*psiB) where psiAB (= 1.032258*0.6*0.775 = 0.48) is the probability that both species A and B are present.

pA = 0.1 - the probability of detecting A, given A is present only

pB = 0.2 - the probability of detecting B, given B is present only

rAb = 0.3 - the probability of detecting only species A, given that both are present

raB = 0.47 - the probability of detecting only species B, given that both are present

delta = 0.85 - prob interaction factor = rAB/(rA*rB) where rAB (= 0.85*0.3*0.47 = 0.11985) is the probability of detecting both species, given that both are present

number of sites R = 500.

The states are:

1 = unoccupied

2 = only species A present

3 = only species B present

4 = both species present

(5 = dead in E-SURGE).

The observations are:

0 = none species observed

1 = only A is observed

2 = only B is observed

3 = both species are observed.

The data are available here.

**2. Analysis in E-SURGE**

Vector of initial state probabilities:

[1-ψA-ψB+ψAB, psiA-psiAB, psiB-psiAB, psiAB]

Matrix of transition probabilities:

[1 0 0 0 0

0 1 0 0 0

0 0 1 0 0

0 0 0 1 0

0 0 0 0 1

]

Matrix of observation probabilities:

[1 0 0 0

1-pA pA 0 0

1-pB 0 pB 0

1-sum rAb raB rAB

1 0 0 0]

- 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 5 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 p`*Transition*`* - - - -`

`- * - - -`

`- - * - -`

`- - - * -`

`- - - - *`*Event*`* - - -`

`* b - -`

`* - b -`

`* b b 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*`from.to`

- 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:

IS( 1, 2) **psiA-psiAB** | 0.082361083 0.011674797 0.405451151 0.078195519

*psiA = 0.082361083+0.484325063 = 0.5666861*

IS( 1, 3) **psiB-psiAB** | 0.268225638 0.192869472 0.359895998 0.042844068

*psiB = 0.268225638+0.484325063 = 0.7525507*

IS( 1, 4) **psiAB** | 0.484325063 0.412370925 0.556935006 0.037138512

E( 2, 2) **pA** | 0.138014502 0.004852403 0.840192052 0.211926522

E( 4, 2) **rAb** | 0.194361200 0.157687123 0.237163175 0.020261888

E( 3, 3) **pB** | 0.239070100 0.146819221 0.364519945 0.055872680

E( 4, 3) **raB** | 0.314616570 0.271831238 0.360799416 0.022743519

E( 4, 4) **rAB** | 0.116657609 0.094223928 0.143585799 0.012547130

**3. Alternative parameterisation**

An implementation in E-SURGE of the alternative parameterisation proposed by Waddle et al. (2010) can found in Cayuela et al. (2013).

Cayuela, H., Besnard, A. & Joly, P. (2013) Multi-event models reveal the absence of intraction between an invasive frog and a native endangered amphibian. Biological Invasions, 15, 2001–2012.

Waddle, J.H., Dorazio, R.M., Walls, S.C., Rice, K.G., Beauchamp, J., Schuman, M.J. & Mazzotti, F.J. (2010) A new parameterization for estimating co-occurrence of interacting species. Ecological Applications, 20, 1467–1475.