Hi,

Although the help file in Presence doesn't explicitly show how to build design matrices for every model, the procedure is the same for all models. If you look in the help section, "User-defined custom models", it shows how to build design matrices for detection probabilities in the single-season model.

To summarize the help section, it says to build a model, you list each real parameter in the model as an equation using optimization parameters (beta's). To set real parameters equal to each other, make the equations for those parameters equal. Once you have the equations, just use the coefficients of the beta's in the design matrix.

For the model you're currently trying, the equations would be:

psiA = 1 * beta1 + 0 * beta2

psiBA = 0 * betea1 + 1 * beta2

psiBa = 0 * betea1 + 1 * beta2

So, the design matrix for occupancy would be:

- Code: Select all
` beta1 beta2`

psiA 1 0

psiBA 0 1

psiBa 0 1

For detection, assuming all detection probabilities constant across surveys and pA not = rA, the design matrix would be:

- Code: Select all
` b1 b2 b3`

pA(1) 1 0 0

pA(2) 1 0 0

:

pA(10) 1 0 0

pB(1) 0 1 0

pB(2) 0 1 0

:

pB(10) 0 1 0

rA(1) 0 0 1

rA(2) 0 0 1

:

rA(10) 0 0 1

rBA(1) 0 1 0

rBA(2) 0 1 0

:

rBA(10) 0 1 0

rBa(1) 0 1 0

rBa(2) 0 1 0

:

rBa(10) 0 1 0

From the detection design matrix, pB, rBA and rBa all have the same equation which only involves beta2, so they will all be equal.

For a model with a parameter as a function of a covariate, you still write each parameter as an equation. You have psiA(Pc1), meaning psiA is a function of the covariate, Pc1. The equations would be:

- Code: Select all
`psiA = 1*beta1 + Pc1*beta2`

psiBA = 1*beta1 + Pc1*beta2

psiBa = 1*beta1 + Pc1*beta2

Note that we need an "intercept" beta (1*beta1) in the equation so that the real parameters are not forced to be zero when the covariate (Pc1) is zero.

That set of equations becomes this design matrix:

- Code: Select all
` beta1 beta2`

psiA 1 Pc1

psiBA 1 Pc1

psiBa 1 Pc1

In that design matrix, all 3 psi's are equal to each other (but still depend on the covariate). To make them different, you just need a different intercept (beta1) and effect (beta2) for each real parameter:

psiA = 1*beta1 + Pc1*beta2

psiBA = 1*beta3 + Pc1*beta4

psiBa = 1*beta5 + Pc1*beta6