Page 1 of 1

Example code for random effect in Nest Survival?

PostPosted: Fri Dec 01, 2017 6:45 pm
by meagan
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

Re: Example code for random effect in Nest Survival?

PostPosted: Sat Dec 02, 2017 11:42 am
by jlaake
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.

Re: Example code for random effect in Nest Survival?

PostPosted: Mon Feb 14, 2022 10:31 am
by lmdouglas45
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.

Re: Example code for random effect in Nest Survival?

PostPosted: Tue Feb 15, 2022 1:15 pm
by jlaake
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

Re: Example code for random effect in Nest Survival?

PostPosted: Tue Feb 15, 2022 1:56 pm
by cooch
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.

Re: Example code for random effect in Nest Survival?

PostPosted: Tue Feb 15, 2022 6:08 pm
by lmdouglas45
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.

Re: Example code for random effect in Nest Survival?

PostPosted: Wed Feb 16, 2022 5:24 am
by B.K. Sandercock
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.