Single-Season, Two-Species: How to add covariates

questions concerning analysis/theory using program PRESENCE

Single-Season, Two-Species: How to add covariates

Postby AESWildlife » Mon Sep 14, 2015 12:23 pm

Hello All,
This is my first post, but I am sure it will not be my last.
I have worked through single species models for all of the species of interest from my study and I have moved on to attempt to do two-species models in Presence.
I had been told that using the two species models, you need to put in the important covariates found in each species occupancy and detection. I unfortunately do not know how to do this.

I would appreciate any help in understanding how to enter covariate data for density and occupancy for both species in the two-species model.

Thank you so much, looking forward to hearing from you!
-Arthur Scully
AESWildlife
 
Posts: 2
Joined: Thu Sep 10, 2015 3:41 pm

Re: Single-Season, Two-Species: How to add covariates

Postby Eurycea » Mon Sep 14, 2015 2:09 pm

I usually have my final data set in an Excel file, so I copy and paste into the input data form. You can access this from View -> Data if you've already set up your project. From there, just go to the site covs tab and paste the values. Make sure you name the covariates and remember them, you'll need this for the design matrix input. If the covariate tabs aren't there, then input the number of covariates in the top row above the Presence/Absence data tab. This should generate the tabs for you, and then you can paste or manually enter the covariate info. Keep in mind they must be in the exact same site order as your Presence/Absence data. Save as, overwriting your old file, if you want to keep it within the same project.

From there, you'll input your covariate names directly into the DM. I'm not familiar with the single season multi species formulation specifically, but for whatever covariate you are interested in you'll simply type its name instead of the "1" in the appropriate cell.

See the PRESENCE help menu for additional details. There are links to worked examples and explanations of model parameters that should explain the basics to you.

Nathan
Eurycea
 
Posts: 99
Joined: Thu Feb 25, 2010 11:21 am

Re: Single-Season, Two-Species: How to add covariates

Postby AESWildlife » Mon Sep 14, 2015 2:28 pm

Thank you for the prompt response Nathan, I will see if I can get that to work.
AESWildlife
 
Posts: 2
Joined: Thu Sep 10, 2015 3:41 pm

Re: Single-Season, Two-Species: How to add covariates

Postby darryl » Mon Sep 14, 2015 8:58 pm

Hi Arthur
Just to follow up on Nathan's response...

There's 2 ways you can set your data up for a 2-species analysis. The first is to take the regular detection/nondetection data for each species, and just append the values for species B below species A. ie if you have data from s sampling units, your 2-species data will have 2*s rows, with rows 1-s being for species A and rows (s+1)-2*s for species B. For the covariates, PRESENCE is going to be expecting that you're going to paste in 2*s rows of values for the data file, but for a 2-species models, only the covariate values in the first s rows actually get used (as covariate values shouldn't be species specific).

The other way to set up your data is to use only s rows, but code the data with 0, 1, 2, or 3 to indicate which combinations of species got detected in a survey (instead of using 2 sets of 0 or 1). I'm not 100% certain of the coding Jim Hines uses, but I think its; 0= both undetected, 1=sp A detected only, 2=sp B detected only, 3= species A and B detected in the survey. There may be more in the PRESENCE help file or even in other posts in this forum. Covariates are then set up as normal for a single-species analysis.

Setting models up in the design matrix is the same regardless of how you set up your data file. As Nathan said, you can type the covariate names in directly to the design matrix, but if you do so you do need to make sure you get the name exactly right (including the case). The safer way is to go to the 'Init' menu option in the design matrix window, and select the covariate from there.

You really need to make sure you understand how design matrices work. One trap that I've seen people fall into is that they want to include a covariate on occupancy (for example) for both species, so put the covariate name in the respective 2 rows in the same column. That says the effect of the covariate is the same for both species. If you want it to be different, you need to put the covariate name in different columns.

Good luck!
Darryl
darryl
 
Posts: 495
Joined: Thu Jun 12, 2003 3:04 pm
Location: Dunedin, New Zealand

Re: Single-Season, Two-Species: How to add covariates

Postby Paul Pop » Mon May 07, 2018 10:31 am

Here's the user manual for PRSENCE: https://www.mbr-pwrc.usgs.gov/software/ ... e_doc.html Under the Two-Species Model heading, you can find your answer. I was trying to find out how, as well. The numbering system of 0, 1, 2 and 3 as mentioned in one of the responses is an easier way to do it. I will be using that technique.
Paul Pop
 
Posts: 1
Joined: Mon May 07, 2018 3:19 am

Re: Single-Season, Two-Species: How to add covariates

Postby CalebBomske » Mon Jan 24, 2022 12:27 pm

Hi everyone
I have a follow up question. Similar to Arthur, I am trying to run a set of single-season, two-species occupancy models and I want to be sure I’ve set up my design matrixes properly in program PRESENCE. In the parameterization I’m using (phi/delta), I have 20 rows and five columns initially (without using the “Full Identity” option). To add a covariate for both species A and species B, I would need to add two new columns, if I understand Darryl’s response to Arthur’s question correctly. However, wouldn’t I need to have four rows with the covariate (pA[1], pA[2], pA[3], pA[4]) for each species? Wouldn’t all other rows in that column be set to 0? Additionally, if I’d like to look at rA and rB with pA and pB in a model, wouldn’t they need separate columns?
I’ve seen surprisingly few examples in the literature where full model sets were examined for two species simultaneously. Most researchers appear to run single-species models first, then they look at the interaction factor for a model without covariates. When I run models with detection covariates for two species, I often end up with strangely large beta estimates or -1.#IND00 for the standard error. My guess is this has to do with overparameterization of the model (we have about 200 sites with a naïve occupancy of about 0.20 [n = ~40]).
Thanks in advance for any advice you can offer,
Caleb
CalebBomske
 
Posts: 5
Joined: Fri Jan 21, 2022 1:57 pm

Re: Single-Season, Two-Species: How to add covariates

Postby jhines » Mon Jan 24, 2022 2:08 pm

Hi Caleb,
The two-species model has many parameters and you can come up with many, many models of how the species occupy the area and how they are detected. The default design matrix that appears has no covariates and 1’s in different columns for the different detection parameters

The simplest model with covariates would be to add a column, with the covariate name. This would create a model where the detection parameters are all affected by the covariate in the same way, but are different from each other. So, if the covariate positively affects pA, it would also positively affect pB, rA and rB. If you want a model where the covariates affect the species differently, then you could add another column which has the covariate name for rows pB and rB and zeros for rows pA and rA. Here’s an example:

,b1,b2,b3,b4,b5,b6,b7
pA[1] 1 0 0 0 0 hab 0
pA[2] 1 0 0 0 0 hab 0
pA[3] 1 0 0 0 0 hab 0
pA[4] 1 0 0 0 0 hab 0
pB[1] 0 1 0 0 0 hab hab
pB[2] 0 1 0 0 0 hab hab
pB[3] 0 1 0 0 0 hab hab
pB[4] 0 1 0 0 0 hab hab
rA[1] 0 0 1 0 0 hab 0
rA[2] 0 0 1 0 0 hab 0
rA[3] 0 0 1 0 0 hab 0
rA[4] 0 0 1 0 0 hab 0
rB[1] 0 0 0 1 0 hab hab
rB[2] 0 0 0 1 0 hab hab
rB[3] 0 0 0 1 0 hab hab
rB[4] 0 0 0 1 0 hab hab
dlta[1] 0 0 0 0 1 0 0
dlta[2] 0 0 0 0 1 0 0
dlta[3] 0 0 0 0 1 0 0
dlta[4] 0 0 0 0 1 0 0

The 6th column represents the effect of habitat on detection, and the 7th column is the difference in the effect between species A and species B (or “interaction effect”). This example does not show any difference between detection when both species are present (rA, rB) versus when only one species is present (pA, pB).

You could build a model where detection depends on the covariate and the covariate affects detection differently, depending on whether both species are present by adding another column which has the covariate name in the rA and rB rows (zero elsewhere).

These examples are based on the default design matrix where detection doesn’t depend on survey. You can build the same sort of models where detection is survey-specific by using the full-identity option. That would start with 20 rows and 20 columns and you can add a column for the covariate, giving a model where detection is different for each species, survey, and occupancy of the other species. With the 1 additional column, the model would assume the effect of the covariate is the same for all 20 parameters. You can then add columns for interaction effects. Again, there are many combinations of interactions which can be created which you can build to fit how you think the world works.

I did not mention the delta parameters above because they must be treated differently than the p’s and r’s. The delta parameters are ratios, not limited to zero to one like the p’s and r’s. So, they must not be modelled the same as the p’s and r’s (rows for delta’s must not equal any rows for p’s and r’s.).

With so many parameters, it is easy to overparameterize models. Modelling each detection probability to be different and have interaction effects could easily generate 40, 60 or more parameters in this case and there needs to be enough data for the model to work. If all detection parameters are different (full-identity), there needs to be cases in the data with detections for each species, and both species with/without occupancy of the other species. If you add a covariate with interaction for all parameters, you need more detections for each combination. When you see the large standard errors (or -1.#iIND00), it is a sign that the model is over-parameterized.
jhines
 
Posts: 598
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Single-Season, Two-Species: How to add covariates

Postby CalebBomske » Thu Feb 24, 2022 10:49 am

Hello Dr. Hines
Thank you for your response. I recently encountered a paper (Kupferman et al. 2021) which used detection and occupancy covariates from their top single-species model for species interaction models. The parameterization is the psiBa/rBa parameterization. We want to run four separate species interaction models, where detection and occupancy of spB are dependent or independent of the detection and occupancy of a dominant species (spA). We want to nail down the design matrices for the four models without covariates, since, so far, overparameterization is an issue. How should I change the default design matrix to make detection of spB dependent or independent of spA? I’ve tried setting both columns at rBA and rBa to 1, and I’ve tried leaving only a single column with 1s from rBA[1] to rBa[4], but both of these changes completely remove parameters. I don’t expect removing parameters equates to making one dependent or independent of another. I have the same kind of problem with the design matrix for occupancy.
As always, any guidance is much appreciated.
Caleb
CalebBomske
 
Posts: 5
Joined: Fri Jan 21, 2022 1:57 pm

Re: Single-Season, Two-Species: How to add covariates

Postby jhines » Thu Feb 24, 2022 1:22 pm

For detection probabilities in the two-species model we have 5 parameters:
pA – prob detection, given only species A is present
pB – prob detection, given only species B is present
rA – prob detection of A, given both species present
rBA – prob detection of B, given both species present and species A detected
rBa – prob detection of B, given both species present and species A not detected

There are two types of dependence here. Detection could depend on whether only one species is present, or both species are present. Alternatively, detection for species B could depend on whether species A is detected when both are present.

The default design matrix which appears has dependence in both occupancy and detection. Detection is different if both species are present versus only one species present, and detection of species B is different when species A is detected versus when species A is not detected.
Code: Select all
            ,b1,b2,b3,b4,b5
pA[1]         1 0 0 0 0
pB[1]         0 1 0 0 0
rA[1]         0 0 1 0 0
rBA[1]        0 0 0 1 0
rBa[1]        0 0 0 0 1


To make detection of species B independent of the occupancy of species A, the rows for rBA and rBa would be the same as the rows for pB (rB. = pB).
Code: Select all
             b1 b2 b3
pA[1]         1 0 0
pB[1]         0 1 0
rA[1]         0 0 1
rBA[1]        0 1 0
rBa[1]        0 1 0

In the design matrix above, detection for species A when species B is not present is estimated using beta1. Detection for species A when species B is present (rA) is estimated using beta3. Detection of species B, regardless of the occupancy and detection of species A is estimated using beta2.

To make detection of species B independent of detection of species A, it means rBA is the same as rBa, so the rows of the design matrix for rBA should be the same as the rows for rBa.
Code: Select all
             b1 b2 b3 b4
pA[1]         1 0 0 0
pB[1]         0 1 0 0
rA[1]         0 0 1 0
rBA[1]        0 0 0 1
rBa[1]        0 0 0 1

In the matrix above, detection of species B is dependent on the occupancy of species A (pB not = rB), but independent on the detection of species A (rBA = rBa). Detection for species A when species B is not present is estimated using beta1. Detection for species A when species B is present (rA) is estimated using beta3. Detection of species B, when species A is present is estimated using beta2. Detection of species B when species A is present is estimated using beta4.

The idea is to arrange the 1’s in the matrix such that parameters which you would like to be different have 1’s in different columns. Parameters which you would like to be the same will have rows which are the same.

See the Presence help file for more info on design matrices.
jhines
 
Posts: 598
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Single-Season, Two-Species: How to add covariates

Postby CalebBomske » Mon Feb 28, 2022 3:44 pm

Thank you so much! I was able to see exactly where I went wrong in my design matrix and the beta estimates are now much more acceptable.
Thanks again!
Caleb
CalebBomske
 
Posts: 5
Joined: Fri Jan 21, 2022 1:57 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 1 guest