Model Averaging in unmarkedMultFrame

41 views
Skip to first unread message

Leah Bayer

unread,
Apr 25, 2024, 1:06:19 PMApr 25
to unmarked
Hi all,

I have run a dynamic occupancy analysis to determine colonization and extinction probabilities of a crayfish population using a suite of environmental covariates. In my top models, the AIC weights end up being very similar for each. So, I wanted to model average to see if I could attain a clearer picture of what the models show; however, I cannot find any model averaging code that works with the dynamic occupancy parameterization (I am model averaging covariates for colonization or for extinction). 

Does anyone know if the AICcmodavg package works for a dynamic occupancy framework (unmarkedMultFrame) or if I would have to hard code this? 

Thanks in advance, 
Leah

Marc J. Mazerolle

unread,
Apr 25, 2024, 3:16:57 PMApr 25
to unma...@googlegroups.com
Hi Leah,

Yes, dynamic occupancy models are supported by the AICcmodavg package,
including functions that model-average betas (modavgShrink( )) and
predictions (modavgPred( )). For some generic examples of using the
package with unmarked objects, you can check out the AICcmodavg-
unmarked vignette, with:
> vignette("AICcmodavg-unmarked")

Best,

Marc
--
____________________________________
Marc J. Mazerolle
Professeur agrégé et directeur du bac. en environnements naturels et
aménagés
Département des sciences du bois et de la forêt
2405 rue de la Terrasse
Université Laval
Québec, Québec G1V 0A6, Canada
Tel: (418) 656-2131 ext. 407120
Email: marc.ma...@sbf.ulaval.ca

-------- Message initial --------
De: Leah Bayer <leahb...@gmail.com>
Répondre à: unma...@googlegroups.com
À: unmarked <unma...@googlegroups.com>
Objet: [unmarked] Model Averaging in unmarkedMultFrame
Date: Thu, 25 Apr 2024 10:06:19 -0700

Leah Bayer

unread,
Apr 25, 2024, 8:23:13 PMApr 25
to unmarked
Hi Marc,

Thanks so much for your response - I found the syntax in the vignette. I did get the model averaging to work for the most part; however, I receive the same error message every time I try to use a categorical covariate as my parameter of interest. Any idea why this might be? I do have this parameter in many of the candidate extinction models within "frmodlist".

Leah
> frmodavg <- modavgShrink(cand.set = frmodlist, parm = "Flow_Regime", + modnames = frmodnames, + parm.type = "epsilon", second.ord = TRUE, nobs = NULL, + uncond.se = "revised", conf.level = 0.95, c.hat = 1) Error in modavgShrink.AICunmarkedFitColExt(cand.set = frmodlist, parm = "Flow_Regime", : Parameter not found in any of the candidate models

Marc J. Mazerolle

unread,
Apr 25, 2024, 9:17:16 PMApr 25
to unma...@googlegroups.com
Leah,

You should take a look at the syntax when you have a categorical
variable. Check the AICcmodavg vignette:
> vignette("AICcmodavg")

Marc
--
____________________________________
Marc J. Mazerolle
Professeur agrégé et directeur du bac. en environnements naturels et
aménagés
Département des sciences du bois et de la forêt
2405 rue de la Terrasse
Université Laval
Québec, Québec G1V 0A6, Canada
Tel: (418) 656-2131 ext. 407120
Email: marc.ma...@sbf.ulaval.ca

-------- Message initial --------
De: Leah Bayer <leahb...@gmail.com>
Répondre à: unma...@googlegroups.com
À: unmarked <unma...@googlegroups.com>
Objet: Re: [unmarked] Model Averaging in unmarkedMultFrame
Date: Thu, 25 Apr 2024 17:23:12 -0700

Hi Marc,
Thanks so much for your response - I found the syntax in the vignette.
I did get the model averaging to work for the most part; however, I
receive the same error message every time I try to use a categorical
covariate as my parameter of interest. Any idea why this might be? I do
have this parameter in many of the candidate extinction models within
"frmodlist".

Leah
> frmodavg <- modavgShrink(cand.set = frmodlist, parm = "Flow_Regime",+
modnames = frmodnames,+ parm.type = "epsilon", second.ord = TRUE, nobs
= NULL, + uncond.se = "revised", conf.level = 0.95, c.hat = 1)Error in

Leah Bayer

unread,
Apr 29, 2024, 11:13:10 AMApr 29
to unmarked
Thanks again Marc - these are fantastic vignettes!
Reply all
Reply to author
Forward
0 new messages