Example code for random effect in Nest Survival?

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Example code for random effect in Nest Survival?

Postby meagan » Fri Dec 01, 2017 6:45 pm

Hello,

Does anyone have code to include a random effect (in my case, year) in a Nest Survival model that they're willing to share? An example such as in ??mallard would be so helpful.

I've read in several places that the Nest Survival model can accept a random effect now, but am having a heck of a time figuring it out. I'm pouring over the resources and might try the 'bootstrap' method mentioned here: "http://www.phidot.org/forum/viewtopic.php?f=1&t=1812".

Thanks,
Emily
meagan
 
Posts: 2
Joined: Sun Mar 12, 2017 6:42 pm

Re: Example code for random effect in Nest Survival?

Postby jlaake » Sat Dec 02, 2017 11:42 am

If Gary has added random effects to nest survival then it is a new model and would need to be added to RMark. Each model type in MARK needs to be added individually to RMark.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Example code for random effect in Nest Survival?

Postby lmdouglas45 » Mon Feb 14, 2022 10:31 am

Hello everyone,

I know this thread is from 2017, but I wanted to follow up on it given that I have the same question. Does RMark now support random effects for nest survival models (and if so, how are they coded?)? Or is the best way to accomplish this sort of thing to run a a bootstrap on the estimate (See third post: viewtopic.php?f=1&t=1812) or to opt for Cox Proportional Hazards models in the survival package in R (See final post of above link)? Thank you in advance for any input.
lmdouglas45
 
Posts: 6
Joined: Tue Sep 22, 2020 11:24 am

Re: Example code for random effect in Nest Survival?

Postby jlaake » Tue Feb 15, 2022 1:15 pm

I have never analyzed any nest survival data so I won't be much help. But until there is a nest survival model with random effects in MARK there cannot be one in RMark which is ONLY an interface to MARK. As far as I know, none exists in MARK. But I remember an article awhile back that showed how to do nest survival with standard statistical software. Sorry but I can't remember the reference. Maybe others that are more familiar with nest survival can respond.

Jeff
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Example code for random effect in Nest Survival?

Postby cooch » Tue Feb 15, 2022 1:56 pm

If by 'random effects' you mean estimating the mu and sigma for a parameter over time, then that is available for any of the models in MARK (it is known by another name -- 'variance components'). You can do this in MARK (using the classic GUUI) using either (i) method of moments (Ken Burnham's contribution, which has as two of its advantages: speed, and a likelihood framework which make multi-model inference using AIC straightforward), or (ii) MCMC.

Appendix D and E, respectively.

Having said that, RE for nest survival models can be 'twitchy', especially if survival over an interval is close to 1. You'll see this right away with the mallard example, where the interval-specific survival is very high. MARK throws all sorts of 'failure to converge' errors and the like. In theory, though, it should be doable. Again, if thats what you mean by 'random effects' -- years sampled from a distribution? yes. Nests as RE? no.
cooch
 
Posts: 1628
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: Example code for random effect in Nest Survival?

Postby lmdouglas45 » Tue Feb 15, 2022 6:08 pm

Thank you for your responses. I should clarify that I'm trying to use the nest survival models in RMark to model fledgling survival, using Nest ID as a random effect to account for the fact that there are some cases where we have survival histories for multiple fledglings from the same nest. (We tracked the fledglings every day.) Based on the above responses, it sounds like this is not possible in RMark, though a revisitation of the literature suggests that Generalized Linear Mixed Models can be used for modeling survival by using mortality/fate (y/n = 1/0) as the response variable, and allow for the inclusion of nest ID as a random effect.
lmdouglas45
 
Posts: 6
Joined: Tue Sep 22, 2020 11:24 am

Re: Example code for random effect in Nest Survival?

Postby B.K. Sandercock » Wed Feb 16, 2022 5:24 am

It's possible to include random effects in nest survival models using other packages in R. The same models can also be used to estimate survival from telemetry data with unequal check intervals, such as your example of survival of fledglings.

If you are new to the topic, this paper provides a nice review comparing the alternative models and software for nest survival (see Table 7). The logistic exposure models were originally developed in SAS.
Shaffer, T.L. 2004 A unified approach to analyzing nest success. Auk 121:526–540
https://doi.org/10.1093/auk/121.2.526

Ben Bolker posted a helpful essay with some different options for the logistic exposure models in R, including splines for environmental predictors in ggplot and random effects for nestID in lme4:
https://www.rpubs.com/bbolker/logregexp

Good luck with your analysis.

Regards, Brett.
B.K. Sandercock
 
Posts: 48
Joined: Mon Jun 02, 2003 4:18 pm
Location: Norwegian Institute of Nature Research


Return to RMark

Who is online

Users browsing this forum: No registered users and 15 guests