Calculating average density

4 views
Skip to first unread message

Jayna Bergman

unread,
Feb 17, 2026, 3:28:26 PM (4 days ago) Feb 17
to secr

Hi Murray,

Hopefully I'm just over thinking this, but I’m trying to figure out the best way to calculate average density across my habitat mask for a single-session model.

I first found the best detection model, and then I fitted several density models using different combinations of habitat covariates.

I’ve looked at the model outputs, in particular from coef(). For some models, the SE of the density covariate beta is small and reasonable; for others, the SE is very large ( >1, for the covariate beta and the density beta). I’ve been interpreting this as the covariate is uninformative and the density beta is unstable as a result.

I’ve tried three approaches to calculate average density across the mask:

  1. Using the function predict() with the “newdata” argument equal to a data frame with the covariate values for all mask cells, then taking the mean of the predicted density values.
  2. Calculating the population size using the function region.N() and dividing this value by the area of the habitat mask.
  3. Generating a density surface using the function predictDsurface(), and taking the mean of the density values.

 

Approach (2) and (3) always agree. Approach (1) agrees when beta SE are small, but when beta SE are large the average density value calculated by approach (1) is much larger (and biologically unrealistic).


My questions are:

  1. Which approach, if any, is the correct way (or best way) to calculate average density across the habitat mask?
  2. I’ve been hesitant to rely on the results from the models with large beta SE, even though these models are the top ranked models by the AICc values. However, if we are getting similar (and biologically realistic) density estimates when using approaches 2 and 3, would these models be appropriate to use? 

Example outputs:

model 1: “good” estimates

beta SE.beta lcl ucl
D -7.55123 0.162496 -7.86972 -7.23274
D.linear_distance 0.194486 0.066501 0.064147 0.324825
lambda0 -4.64593 0.243622 -5.12342 -4.16844
sigma 7.879884 0.098107 7.687599 8.07217

  • Average density estimates: 1) 6.47 animals/100km, 2) 6.47 animals/100km, 3) 6.47 animals/100km

model 2: “poor” estimates

beta SE.beta lcl ucl
D -10.1368 0.984737 -12.0668 -8.20671
D.deciduous -8.39263 2.357813 -13.0139 -3.7714
lambda0 -4.2702 0.21867 -4.69878 -3.84161
sigma 7.692952 0.080508 7.535158 7.850746

  • Average density estimates using: 1) 25.05 animals/100km, 2) 6.18 animals/100km, 3) 6.18 animals/100km

Thanks in advance for any insights!

- Jayna 


Murray Efford

unread,
Feb 17, 2026, 5:13:37 PM (4 days ago) Feb 17
to secr
Hi Jayna
You are right that intuitively 1-3 should produce the same answer. There are some models for which predict (1) is wrong because it doesn't use the meanSD mask attribute for scaling x and y coordinates (when x or y coordinates appear directly in the model). That doesn't seem to explain your deciduous result, but it may do - I will investigate when I get a chance.
Murray.
Reply all
Reply to author
Forward
0 new messages