**1. Random effect with standard deviation = 0**

We use the same file generated in the http://occupancyinesurge.wikidot.com/site-level-covariate-on-extinction section, i.e. from a dynamic occupancy model with constant parameters except extinction which was written as a function of a site-specific covariate. There is no random effect here, therefore the variance of the random effect in E-SURGE should be estimated close to 0.

The analysis in E-SURGE follows exactly the same steps as in the example with a site covariate; the only thing to modify is the GEMACO syntax for the Transition step. This should be `f.open+[f(2).open]>xind+[f(2).open]>ind+closed` where the `ind` is for the random effect.

The results are:

Beta# 1# | 0.420053365 -0.685252704 -0.154854026 +0.135305785 **initial occupancy**

#####################################################################

Beta# 2# | -0.932848378 -1.210957510 -0.654739246 +0.141892414 **colonization**

Beta# 3# | +0.233818013 -0.330215495 +0.797851520 +0.287772198 **intercept extinction**

Beta# 4# | +0.580908961 -0.364667390 +1.526485312 +0.482436914 **slope extinction**

Beta# 5# | +0.023997056 -17.576251850 +17.624245962 +8.979718830 **sd random effect (sqrt scale)**

################### IND.R.E. ESTIMATES UNDER NORM. ASSUMPTIONS #############

Beta al. ind. # 1# SE | +0.000575859 -0.844132465 +0.845284182 +0.430973634 **sd random effect**

#####################################################################

Beta# 6# | +0.743070807 +0.588337321 +0.897804293 +0.078945656 **detection**

#####################################################################

**2. Random effect with standard deviation = 0.5**

We modify the code used to generate the dataset in the http://occupancyinesurge.wikidot.com/site-level-covariate-on-extinction section, i.e. from a dynamic occupancy model with constant parameters except extinction which was written as a function of a site-specific covariate. We remove the covariate, and replace the two lines of code that are used to create a covariate and specify the relationship with the extinction probability by:

RE <- rnorm(n = R, mean = 0, sd = .5)

epsilon <- plogis(0.1 + RE) # Apply inverse logit

The resulting file can be downloaded here.

The analysis in E-SURGE follows exactly the same steps as in the example with a site covariate; the only thing to modify is the GEMACO syntax for the Transition step. This should be `f.open+[f(2).open]>ind+closed` where the `ind` is for the random effect.

The results are:

Beta# 1# | +0.222219658 -0.035853274 +0.480292590 +0.131669863 **initial occupancy**

#####################################################################

Beta# 2# | -0.801243577 -1.071947427 -0.530539728 +0.138114209 **colonization**

Beta# 3# | +0.170837786 -0.187694962 +0.529370534 +0.182924872 **intercept extinction**

Beta# 4# | +0.696872765 -0.318286727 +1.712032256 +0.517938516 **sd random effect (sqrt scale)**

################### IND.R.E. ESTIMATES UNDER NORM. ASSUMPTIONS #############

Beta al. ind. # 1# SE | +0.485631650 -0.929242353 +1.900505654 +0.721874491 **sd random effect**

#####################################################################

Beta# 6# | +0.835777247 +0.684736941 +0.986817554 +0.077061381 **detection**

#####################################################################