Inlcuding covariates in 2-sp models RPresence

posts related to the RPresence library, which may not be of general interest to users of 'classic' PRESENCE.

Inlcuding covariates in 2-sp models RPresence

Postby vls72 » Mon Nov 06, 2017 12:00 am

Hi,

I am hoping to get some clarity on how to incorporate covariates into 2-species (single season) occupancy models (psiBA conditional parameterization) in RPresence, specifically covariates on occupancy that have a by-species interaction.

If I want to include land cover covariates on occupancy (called NativeForest and Crops here) as well as an interaction by species, plus an occurrence-level interaction (psiBA not equal to psibA), would this be correct (for psi):
OccMod(model=list(psi~SP+INT+NativeForest+Crops+NativeForest*SP+Crops*SP,
p~SP)......

Or should the covariate interaction be between both SP and the occurrence-level interaction (INT)? would this just mean that in addition to an interaction by species, the covariate will interact with psiBA and psiBa differently? I imagine that would look something like this but I'm not sure...

OccMod(model=list(psi~SP+INT+NativeForest+Crops+NativeForest*SP*INT+Crops*SP*INT,
p~SP)......

Thanks for any/all help provided. Hopefully this question makes sense... In general I am just seeking clarification on the difference between covariate interactions with SP and INT, and whether/why it makes sense to include both in the same model or not.

-Vanessa
vls72
 
Posts: 1
Joined: Sun Nov 05, 2017 5:11 pm

Re: Inlcuding covariates in 2-sp models RPresence

Postby darryl » Mon Nov 06, 2017 2:39 am

Hi Vanessa
Here's the default coding for the SP and INT effects relative to the occupancy parameters for a 2 species model (although you can change it by specifying alternative contrasts):

parameter SP INT
psiA 0 0
psiBA 1 0
psiBa 1 1

If I just simplify it to one covariate, X, then:
psi~SP+X = effect of X is the same for both species, but with a consistent difference between species (on logit scale). Presence of species A has no effect on species B
psi~SP*X = effect of X different for both species (note we don't need to include main effects in the formula). Presence of species A has no effect on species B
psi~SP*X+INT = effect of X different for both species. Presence of species A has an effect on presence of species B, but the effect is constant with respect to X
psi~SP*X+INT*X = effect of X different for both species. Presence of species A has an effect on presence of species B, and the effect is difference with respect to X (ie the level of interaction depends on X).

Note that as INT is nested within SP, then any interaction model with SP*INT has undefined levels (ie the SPxINT interaction term = INT), so you wouldn't use SP*INT*X, but could do SP*X + INT*X.

Hope that helps!
Darryl
darryl
 
Posts: 495
Joined: Thu Jun 12, 2003 3:04 pm
Location: Dunedin, New Zealand

Re: Inlcuding covariates in 2-sp models RPresence

Postby Hsin Cheng » Wed Apr 12, 2023 10:02 pm

Hello!

I'm now facing a problem while building single-season 2-sp models. My research primarily aims to find whether dog RAI will influence the co-occurrence pattern of palm civet and badger.

However, when I'm trying to include multiple covariates that interact with SP or INT (e.g. SP*road density + SP*dogRAI, or SP*road density + SP*dogRAI + INT*road density + INT*dogRAI), the model output usually looks terrible, with high SE or even NA. :shock:

I wonder if including multiple covariates interacting with SP or INT is technically possible. If so, how to code it?

The dataset includes 171 units and 244 surveys, with Naive occ=0.9883041. This number is generated through summary(pao_data). I try to include about 6 environmental covariates in the model, with 4 of them interact with SP and INT. Is it too much? :(

Thank you!
Hsin Cheng
Hsin Cheng
 
Posts: 7
Joined: Wed Apr 12, 2023 11:25 am

Re: Inlcuding covariates in 2-sp models RPresence

Postby jhines » Thu Apr 13, 2023 1:06 pm

Hi Hsin,

The SP covariate means you have a different psi for each species, so SP*roaddensity means you have 4 parameters for psi: an intercept and slope for speciesA and a different intercept and slope for speciesB. If you want an additive effect of dogRAI, the formula would be SP*roaddensity+dogRAI. If you want dogRAI to effect psi differently for each species, you could use SP*roaddensity*dogRAI.

The INT covariate allows you to model psi for species B as different when species A is present or absent (psiBA vs psiBa). The beta estimates involving this parameter are of great interest for the two-species model as it describes the degree to which species B avoids or is attracted to sites where species A is located. If you have INT*roaddensity, it means species B avoids or is attracted to species A sites more/less, depending on roaddensity.

My point is that with the 2-species model, there are lots of possibilities for models, but you need to think hard about what you want the model to do. As a non-biologist, I can't think of a reason a species would avoid or be attracted to sites of another species because there are more/less roads around. The SP*roaddensity part of the formula already allows for different occupancy for each species depending on roaddensity.

One more thing, if naive occupancy for either or both species is 99%, then there can't be much variation possible in occupancy, so you won't be able to model it as a function of any covariates. In that case, the estimated occupancy will likely be 100% and the standard error "undefined". You didn't say whether that rate was for species A or B or combined, so this may only apply to one of them.
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Inlcuding covariates in 2-sp models RPresence

Postby Hsin Cheng » Sun Apr 16, 2023 10:45 am

Hi Jim,

Thank you for your reply! These two species are common. With each camera operating 3-4 years, capturing at least 1 picture of them during the survey period (a season) is very easy.

One more thing, if naive occupancy for either or both species is 99%, then there can't be much variation possible in occupancy, so you won't be able to model it as a function of any covariates. In that case, the estimated occupancy will likely be 100% and the standard error "undefined". You didn't say whether that rate was for species A or B or combined, so this may only apply to one of them.


I wonder if a multi-season 2-sp model will provide better SE estimates. Just thinking that if I divide the survey period into many seasons, maybe the probability for each species being pictured will be lower, and there will be more variation possible in occupancy?
(But I have no survey covariates for each season, I will simply use gamma~1, epsilon~1 instead.)

Again, thank you very much! None of my research advisors are familiar with occupancy models, so I felt anxious dealing with these errors by myself. Thank you!!!

Hsin Cheng
Hsin Cheng
 
Posts: 7
Joined: Wed Apr 12, 2023 11:25 am

Re: Inlcuding covariates in 2-sp models RPresence

Postby jhines » Mon Apr 17, 2023 11:58 am

One of the main assumptions of the single-season models is that the occupancy status of a site does not change over the course of the study. In 3-4 years, I suspect that assumption has been violated, and you need the multi-season model. The question is how to define seasons. The multi-season model assumes that occupancy status is constant within a "season" and can change between seasons. Ideally, the season should be a short period of time where the constant occupancy status assumption is likely to be valid, and the interval between seasons long enough for changes to occur. Shorter seasons should result in lower occupancy and more changes in occupancy with time, but make sure they are not so short they just reflect individual moving around over time.

Continuous data from camera traps makes defining seasons a challenge. The first thing to do is think of how to define a season which addresses your biological question. Another factor in determining seasons might be to look at the data to see where most of the detections occur. You could then include only data which occurs in those "seasons", although some folks have included all possible dates and re-defined "occupancy" as "site-use".
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Inlcuding covariates in 2-sp models RPresence

Postby Hsin Cheng » Tue Apr 18, 2023 10:18 am

Understood. That helps a lot. Thank you very much! <3
Hsin Cheng
 
Posts: 7
Joined: Wed Apr 12, 2023 11:25 am


Return to RPresence

Who is online

Users browsing this forum: No registered users and 12 guests

cron