Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Dynamic occupancy

93 views
Skip to first unread message

xinzhu zhang

unread,
Aug 26, 2024, 12:58:09 PM8/26/24
to unmarked
Hello
I'm exploring dynamic occupancy using unmarked package. I just read the help document written by you and I have some questions regarding "year".  Correct me if I'm wrong. I think the year effect allow you to look at detection, colonization, and extinction per year. But what I'm having trouble to understand is how to combine the year effect with other covariates. For example, how forest impact colonization each year. I saw people write it as year + forest in the model, like an additive effect. However, I'm wondering why this is not an interactive effect. I mean, write it like year + forest + year:forest. More specifically, how am I supposed to interpret the results of year + covariate? I tried it with my own data. It seems to generate the estimate for the covariate itself as well as the estimate for the first year all the way to the last year.  Also, it seems that we can either consider the year effect or not. I mean, I want to test how forest impact bobcat colonization. I can write the colonization part as Forest, or Forest + year. Is one of them better than the other? 

Marc Kery

unread,
Aug 26, 2024, 2:30:53 PM8/26/24
to unmarked
Dear Xinzhu,

the formula language in unmarked is identical to the formula language in many other model-fitting packages in R. Thus, in your case, writing '~ forest' estimates the logit-linear effect of forest cover, averaging over, or ignoring, any differences in the modelled parameter over years. When you write '~year', you ignore any forest effects and just estimate a different constant for every year. '~ year + forest' gives a different intercept in every year, plus an average (over years) effect of forest cover (that's the additive model), while'~ year * forest' (which is the same as '~ year + forest + year:forest') fits a separate regression of the parameter on forest cover in every single year.

Without knowing the goals of your study, it is (near-)impossible to know which model is better. Which models to consider will have to depend in a large part on your biological hypotheses and on your goals.

However, assuming for now that you're mostly interested in the effect of forest cover, you might choose to just fit the model '~forest'. However, if there is substantial variation in the parameter among years, ignoring this variability will lead to an over-confident assessment of the effect of forest cover. So, even if you're not particularly interested in any effects of year, it might be prudent to add a year effect, though possibly in an additive way rather than as an interaction. A common approach then would be to treat the year effects as random, something which can now be done in unmarked owing to the power of the underlying TMB engine.

Best regards  --- Marc



From: unma...@googlegroups.com <unma...@googlegroups.com> on behalf of xinzhu zhang <xinz...@gmail.com>
Sent: Monday, August 26, 2024 18:53
To: unmarked <unma...@googlegroups.com>
Subject: [unmarked] Dynamic occupancy
 
Hello
I'm exploring dynamic occupancy using unmarked package. I just read the help document written by you and I have some questions regarding "year".  Correct me if I'm wrong. I think the year effect allow you to look at detection, colonization, and extinction per year. But what I'm having trouble to understand is how to combine the year effect with other covariates. For example, how forest impact colonization each year. I saw people write it as year + forest in the model, like an additive effect. However, I'm wondering why this is not an interactive effect. I mean, write it like year + forest + year:forest. More specifically, how am I supposed to interpret the results of year + covariate? I tried it with my own data. It seems to generate the estimate for the covariate itself as well as the estimate for the first year all the way to the last year.  Also, it seems that we can either consider the year effect or not. I mean, I want to test how forest impact bobcat colonization. I can write the colonization part as Forest, or Forest + year. Is one of them better than the other? 
--
*** Three hierarchical modeling email lists ***
(1) unmarked (this list): for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
---
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/1c79af4d-9978-4298-9a28-c05106d75767n%40googlegroups.com.

xinzhu zhang

unread,
Aug 27, 2024, 10:23:02 AM8/27/24
to unmarked
Hi Marc
Thanks for your quick reply. Here's what I'm doing. My thesis focuses on the recolonization/extinction process of bobcat in Ohio (a recovering species). I have 5 years of data, and I'm treating each year as a different season, and I'm using different landscape covariate, predator and prey abundance to test if any of them have a strong impact on colonization/extinction process. I feel like detection, colonization, and extinction all involve year effect, right? I think the covariates might impact detection, colonization, and extinction differently per year. For example, forest has a strong impact on colonization between year 1 and year 2. And it has a weak impact on colonization between year 2 and year 3. Does it make sense? I feel like the interactive effect between year and forest makes sense. Or should I apply additive effect? Again, I don't know how I'm supposed to interpret the results from additive effect. Like you mentioned earlier, it returns an estimate for each year plus an estimate for the covariate. In my case, it'll have 4 different estimates for year and an estimate for forest. Should I read into the different intercepts of each year or just forest itself? 
Xinzhu

Marc Kery

unread,
Aug 28, 2024, 11:04:03 AM8/28/24
to unma...@googlegroups.com
Dear Xinzhu,

thanks for the additional information. Couple comments/questions back:
  • No, I do not see why forest cover should affect colonization differently in different annual intervals ? Can you envision any biological mechanism that might lead to such a pattern ?
  • If you don't understand the interpretation of the parameters in a linear model ("I don't know how I'm supposed to interpret the results from additive effect"), then I suggest you do some serious homework on linear modeling. There are LOTS of resources around, just google "interpretation of parameters in general linear model" or something the like. You can also check out chapter 3 in this book.

Best regards  --- Marc


Sent: Tuesday, August 27, 2024 16:23
To: unmarked <unma...@googlegroups.com>
Subject: Re: [unmarked] Dynamic occupancy
 

xinzhu zhang

unread,
Aug 29, 2024, 3:36:02 PM8/29/24
to unmarked
Hi Marc
Thanks. I'll definitely read more into linear model. Could you tell me what function would allow me to add random effect in unmarked package? Did you actually mean the package ubms? For forest, I was just thinking what if forest impact colonization differently each year? But I agree that they're very likely to be the same.
Best,
Xinzhu

Marc Kery

unread,
Sep 1, 2024, 3:23:16 AM9/1/24
to unmarked
Dear Xinzhu,

I am not sure unmarked::colext actually allows random effects, but the analogous function in ubms should definitely.

Best regards  --- Marc


Sent: Thursday, August 29, 2024 21:36
Reply all
Reply to author
Forward
0 new messages