Model averaging for estimating density from multiple models.

35 views
Skip to first unread message

Prashant Mahajan

unread,
Aug 23, 2025, 3:31:28 AM8/23/25
to oSCR

Hello everyone,

I am currently using the oSCR package to estimate the density of coyotes. I have fitted several models that include different combinations of covariates. However, there was no single top model identified based on AIC weights. I applied the ma.coef function to obtain model-averaged parameter estimates. I would like to know what is considered the best approach for estimating density when results are based on multiple models rather than relying only on the top model.

Thanks,
Prashant

Jeffrey Royle

unread,
Aug 23, 2025, 10:16:03 AM8/23/25
to oscr_p...@googlegroups.com
hi Prashant,
 If your density model has NO covariates _or_ if the covariates are all standardized then I think it makes sense to model average the  transformed intercepts (exp(d0)) of the density model, interpreting this then as the model-averaged mean density. You might have to do this by hand I think. 
regards
andy


--
You received this message because you are subscribed to the Google Groups "oSCR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to oscr_package...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/oscr_package/0f5ca394-6981-4c83-8417-d4ddf557a7dan%40googlegroups.com.

Prashant Mahajan

unread,
Aug 23, 2025, 12:54:19 PM8/23/25
to oSCR

Hi Andy,

Thank you for your response. My models include covariates, and I have run them with different combinations of these covariates. I would like to clarify whether I can use the get.real function (e.g., get.real(model, type = "dens")) to estimate density and SE for each model across the state space and then average the density and confidence intervals across all models. Or, should I calculate density and confidence intervals for each model directly from the beta estimates (e.g., exp(d0 + x1 + x2)) and then average those results?

Best,
Prashant

Jeffrey Royle

unread,
Aug 23, 2025, 2:48:03 PM8/23/25
to oscr_p...@googlegroups.com
I see -- so you want pixel-wise density estimates, model-averaged?    Then yes I think the get.real() function will produce pixel-wise estimates that you can just average using the AIC weights. 
I wouldn't recommend averaging the confidence intervals though, nor the SEs. 

regards
andy


Chris Sutherland

unread,
Aug 23, 2025, 3:08:42 PM8/23/25
to oSCR
Can you share a model table so we can see the support for the models you want to average over? 

You could produce model-specific estimated of total abundance and then model average those (Inc SEs) using standard approaches. To do this, you will need the new get.N() function that I have not pushed to the master repo yet as it's experimental. It's sums over all pixels of a spatially varying (or not) state space and returns SEs and CIs that appropriately handles the correlation structure of the landscape when calculating se(N). 

Let me know if you are interested in that and I can share the code.

Chris

Prashant Mahajan

unread,
Aug 24, 2025, 3:17:42 AM8/24/25
to oSCR

Thank you, Andy and Chris, for your suggestions. I would like to know which approach would provide a better representation of density, averaging pixel-wise densities in a model-averaged manner, or model-averaging densities derived from the beta estimates of each model? Also, what would be the most appropriate way to estimate confidence intervals for the model-averaged density?

I have attached an Excel file with all the models I ran. I would also be interested in exploring the get.N() function. 

Best,
Prashant
Models.xlsx

Chris Sutherland

unread,
Aug 24, 2025, 3:23:25 AM8/24/25
to oSCR
Hi Prashant, 

Thanks for the model table. Can I also ask one other thing: Have you checked for collinearity in the density covariates?


Prashant Mahajan

unread,
Aug 24, 2025, 4:02:05 AM8/24/25
to oSCR
Yes, I checked for collinearity among the density covariates before running the models, and the correlation among all covariates was below 0.70.

Prashant Mahajan

unread,
Sep 17, 2025, 7:42:24 AM9/17/25
to oSCR
Hello everyone,

I wanted to clarify something regarding density estimation with covariates. If I want to calculate the average density across all models, is it acceptable to take the model-averaged value of the transformed intercept, i.e., exp(d0), weighted by the AIC weights of each model? My goal is to obtain an overall density estimate for each model (not pixel-wise density), and since all my covariates are standardized, is this approach valid (including for SE/CI)? 

Additionally, since I have multiple sessions, I assume I would calculate density for each session as:

  • Session 1: exp(d0)

  • Session 2: exp(d0 + β.session2)

  • Session 3: exp(d0 + β.session3), and so on.

Finally, when estimating density using the get.real function across the state-space, what is the best way to compute SE/CI for these density estimates? The average of pixel values captures spatial variability, but it does not represent the uncertainty (error) around the density estimate.

Best Regards,
Prashant

Daniel Linden

unread,
Sep 18, 2025, 9:51:32 AM9/18/25
to oscr_p...@googlegroups.com
Hi Prashant,

Regarding calculations for d0, that all seems reasonable.  If you have standardized your covariates, then yes the intercept can be interpreted that way and model averaged in the manner you describe.  Session betas are indeed specified as effects parameters so they need to be added to d0.

When you calculate the state-space density estimates for each pixel, are you saying you want the uncertainty/error around the sum across all pixels?  Chris might have a solution for that...

chris...@gmail.com

unread,
Sep 18, 2025, 3:04:08 PM9/18/25
to oscr_p...@googlegroups.com

Hello Dan, Prashant, and the oSCR community,

 

For a while I have been (half) working on a function that will take a fitted model and compute total abundance for the state space (the easy part) and associated uncertainty (the bit that is a little more involved and that I needed some time to implement). I’ve been planning on finalising a completely tested version of this function, which I call get.N(), but haven’t got this far yet. I was involved in a recently submitted paper that used it and has it as a supplement, so I guess no reason not to share here. Note that this is, I believe, the equivalent to the region() function in *secr*.

 

I have attached the current working prototype that works for multi session models with density covariates. If you load it, then getting total N should be as easy as running the following code:

 

fit0 <- #your fitted model

get.N(fit0)

 

Finally, and specific to Prashant’s question, is that if you take this estimate and divide by the area of the state space, you have the landscape scale/average density.

 

Hope this is of some use folks 😊

 

Chris

get.Nms.R
Reply all
Reply to author
Forward
0 new messages