design matrix for category covariate in detection probabilit

questions concerning analysis/theory using program PRESENCE

design matrix for category covariate in detection probabilit

Postby Prashant_mahajan » Fri Feb 24, 2023 9:38 am

Hello,

I am running single species, single season occupancy models in PRESENCE. I have certain categorical covariates for which I need to see the effect on detection probability. However, I am having issue in design matrix for entering data for categorical covariates in detection probability matrix. Suppose I have 4 habitat types and I know to know the effect of habitat on detection probability, how should I enter data for the following in PRESENCE:
Rep1 Rep2 Rep3 Rep4
A1 hab1 hab3 hab1 hab2
A2 hab3 hab4 hab1 hab3
A3 hab2 hab1 hab4 hab1
A4 hab1 hab1 hab4 hab3

If someone can guide me in how should I enter the data in design matrix.

Regards,
Prashant
Prashant_mahajan
 
Posts: 21
Joined: Wed Mar 31, 2021 11:14 am

Re: design matrix for category covariate in detection probab

Postby jhines » Sun Mar 12, 2023 9:53 am

Sorry I didn't see this sooner. If you have 4 habitat types, you need 3 "indicator" covariates. Each indicator covariate is 1 if the site is in that habitat-type, and 0 if not. Then, your design-matrix for detection would look like this:

Code: Select all
                b0   b1    b2   b3
p1               1  hab1  hab2 hab3
p2               1  hab1  hab2 hab3
p3               1  hab1  hab2 hab3
p4               1  hab1  hab2 hab3
p5               1  hab1  hab2 hab3
p6               1  hab1  hab2 hab3


If a site is in habitat-type 4, then hab1,hab2 and hab3 will be 0, making p1 = logit(b0).
If a site is in habitat-type 1, then hab1=1, hab2 and hab3 will be 0, making p1 = logit(b0+b1). So, b1 is the difference between the "reference" habitat-type (hab4) and hab1.
If a site is in habitat-type 2, then hab1=0, hab2=1 and hab3=0, making p1 = logit(b0+b2). So, b2 is the difference between the "reference" habitat-type (hab4) and hab2.
If a site is in habitat-type 4, then hab1=0, hab2=0 and hab3=1, making p1 = logit(b0+b3). So, b3 is the difference between the "reference" habitat-type (hab4) and hab3.
The other p's are computed the same way.
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: design matrix for category covariate in detection probab

Postby Prashant_mahajan » Thu Mar 16, 2023 3:39 am

Hi,

Thank you for your reply. So in the case where I have two different categorical covariates, four habitat types and four terrain types, and I want to know the effect of both the covariates with different combinations on detection probability, in that case, how can we enter the data? We will have 3 indicator covariates for each of the variables. Suppose my model for detection probability is:

p(hab1 + terrain1)psi(.)

How will I add data in the matrix for such type of model in PRESENCE? Will it be like this:

b0 b1 b2 b3 b4 b5 b6
p1 1 hab1 hab2 hab3 terr1 terr2 terr3
p2 1 hab1 hab2 hab3 terr1 terr2 terr3
p3 1 hab1 hab2 hab3 terr1 terr2 terr3
p4 1 hab1 hab2 hab3 terr1 terr2 terr3
p5 1 hab1 hab2 hab3 terr1 terr2 terr3
p6 1 hab1 hab2 hab3 terr1 terr2 terr3

Then, what will be the equation for p(hab4 + terr4), and will it be just the intercept (logit(b0))? Then, what will be the equation for the model p(hab4 + terr1), if it will be logit(b0 + b4), then in that case what does intercept represent?

Also, on another note, suppose in a model I have multiple covariates (psi(a1+ a2 +a3)), the beta coefficient of one covariate is negative and when a model with single covariate (psi(a2)) is run, the beta coefficient value shows a positive effect. What does this means, and which effect (positive or negative) should I consider or is there any other way to calculate the beta coefficient value in the multi covariate model?

Thank You
Prashant_mahajan
 
Posts: 21
Joined: Wed Mar 31, 2021 11:14 am


Return to analysis help

Who is online

Users browsing this forum: No registered users and 7 guests