occuMulti vs occu

428 views
Skip to first unread message

Ettore Fedele

unread,
Sep 7, 2021, 5:30:45 AM9/7/21
to unmarked
Hi All,

I am using occuMulti to investigate the effects of one species on the occupancy of another.

I am proceeding in two stages; firstly I compile a set of marginal occupancy models (where the two species occur independently), and then I proceed with a set of conditional occupancy models (assuming the occupancy of the two species depends on the presence or absence of the other species). These models are then analysed together in the same modelling framework (this is to compute the delta AIC to identify supported models). Having done this I can conclude that there is no conditional occupancy - meaning the two species occupancies are independent.

Just out of curiosity, I then decided to investigate each species independently using the occu function (hence one species at a time). These models however, gave me different results from what I was expecting. In fact, when following the approach described above (i.e. using the occuMulti function), I couldn't find any variable to have a significant impact on the occupancy of one of the two species. When I analysed the same species using the occu function, I got some significant effects on its occupancy. 

My question now is, shouldn't the two approaches (occuMulti and occu) - when considering species occupancy  independently from one another - yield the same, or at least, similar results?

From what I can tell there is no issue with the models or nothing that seems to suggest problems with convergence etc.

Does anyone have any info on this? 
Thank you all very much.

Ettore

Ken Kellner

unread,
Sep 7, 2021, 8:18:18 AM9/7/21
to unmarked
Hi Ettore,

If I understand you correctly, your intuition is right. An occuMulti model with no interactions should give similar results to separate single-species occupancy models. I can't really speculate on why your results are different without at least seeing some example code for each type of model you fit - can you post that?

Ken

Ettore Fedele

unread,
Sep 7, 2021, 9:10:06 AM9/7/21
to unmarked
Hi Ken,

thank you very much for your reply. Yes, you understood me correctly.

Below are the codes and results for the top supported (deltaAIC < 2) models using the occuMulti and the occu functions:

occuMulti approach:

species_list<-list(sp1=species1,sp2=species2)


sitecovs<-data.frame(Agricultural.areas=Agricultural.Areas,Sparsely.vegeteated.areas=Sparsely.vegetated.areas,Moors=Moors,Woodland=Woodland...)

umf<-unmarkedFrameOccuMulti(y=species_list,siteCovs= sitecovs,obsCovs=NULL)


occ_formulae<-c("~Agricultural.areas+Sparsely.veg.areas","~Agricultural.areas+Sparsely.veg.areas","~0")

 det_formulae<-c("~1","~cov1")

 fm<-occuMulti(det_formulae,occ_formulae,umf)

fm

 Call:

occuMulti(detformulas = det_formulae, stateformulas = occ_formulae, data = umf)


Occupancy:

                                     Estimate    SE        z           P(>|z|)

[sp1] (Intercept)         1.043474 0.407  2.56559  0.0103

[sp1] Agricultural.areas   1.164735 0.954  1.22129  0.2220

[sp1] Sparsely.veg.areas  0.000682 0.320  0.00213  0.9983

[sp2] (Intercept)         0.735277 0.525  1.40081  0.1613

[sp2] Agricultural.areas  0.078542 0.453  0.17345  0.8623

[sp2] Sparsely.veg.areas  -2.162241 0.956 -2.26242  0.0237


Detection:

                            Estimate     SE      z  P(>|z|)

[sp1] (Intercept)    -1.482 0.0939 -15.79 3.91e-56

[sp2] (Intercept)   -2.209 0.1413 -15.63 4.40e-55

[sp2] cov1         -0.336 0.1690  -1.99 4.69e-02


AIC: 1476.78 



occu approach:

umfsp1<-unmarkedFrameOccu(y=species1, siteCovs= sitecovs)

om<- occu(~1~Moors+Woodland,umfsp1)


Call:

occu(formula = ~1 ~ Moors + Woodland, data = om)


Occupancy:

            Estimate    SE     z P(>|z|)

(Intercept)    1.043 0.365  2.86 0.00428

Moors          -0.741 0.360 -2.06 0.03932

Woodland     -0.866 0.416 -2.08 0.03739


Detection:

 Estimate     SE     z  P(>|z|)

    -1.49 0.0947 -15.7 1.87e-55


AIC: 863.3132 


As you can see the two supported models give very different results.

However, when I look at the same model in the occuMulti set (i.e. model that i fit with the covariates i used to fit the supported model in occu set) the results are (almost) identical, but this is not supported (i.e. deltaAIC > 2):

Call:
occuMulti(detformulas = det_formulae, stateformulas = occ_formulae, data = umf)

Occupancy:
                                      Estimate    SE      z       P(>|z|)
[sp1] (Intercept)     1.048 0.367  2.856 0.00430
[sp1] Moors           -0.744 0.361 -2.060 0.03936
[sp1] Woodland      -0.870 0.418 -2.080 0.03757
[sp2] (Intercept)    1.317 0.501  2.631 0.00851
[sp2] Moors           0.358 0.559  0.641 0.52160
[sp2] Woodland     -0.189 0.387 -0.489 0.62504

Detection:
                                         Estimate     SE     z    P(>|z|)
[sp1] (Intercept)            -1.493 0.0951 -15.7 1.37e-55
[sp2] (Intercept)            -2.299 0.1431 -16.1 4.74e-58
[sp2] cov1                    -0.508 0.1637  -3.1 1.91e-03

AIC: 1482.49 

I hope this helps and doesn't add confusion.

Thanks,
Ettore

Ken Kellner

unread,
Sep 7, 2021, 10:40:02 AM9/7/21
to unmarked
Hi Ettore,

Thanks. I think I did misunderstand you a bit. When you compare an occuMulti model with no species interactions to the *same* single species model(s) (that is, identical covariates on occupancy and detection) you should get identical or very similar estimates for model parameters. It looks like this is the case with your data based on your final example. This is what I thought you meant. However what it seems like you mean, is that the top-ranked model for species 1, when fit in a multi-species model with no interactions, is not the same (i.e., in terms of covariates included) as the top-ranked model for species 1, when fit with a single-season model. Am I now understanding correctly?

This is not necessarily surprising to me. The likelihood, and thus AIC score, of the multi-species model depends on how well it works for *both* species, even if you are not estimating interactions. So it's possible that a given multi-species model could fit poorly for species 1 but really, really well for species 2 and so the overall AIC score for the model would be relatively good. However, if you fit the same model to just species 1 with a single species model, it would of course have a relatively poor AIC score. Thus, the results from the two approaches wouldn't match.

To get things to be consistent, you may need to expand your pool of candidate models for multispecies modeling. For example, do you have a candidate multispecies model that has sp1 occupancy as a function of moors/woodland, but sp2 occupancy as a function of agriculture/sparsely veg? Or are all your candidate models set up so that sp1 and sp2 always have the same occupancy covariates?

Ken

Ettore Fedele

unread,
Sep 7, 2021, 12:00:27 PM9/7/21
to unma...@googlegroups.com
Hi Ken,

thank you very much!

Yes, you are right. I see your point now, and I will do as you suggested and expand my pool of models. 

Thanks,
Ettore

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/59e9706e-4212-4894-bbe8-15da6e950765n%40googlegroups.com.

jega...@ncsu.edu

unread,
Sep 7, 2021, 12:19:01 PM9/7/21
to unmarked
I don't mean to inject myself here because I haven't really thought about this in great detail, but fwiw, I actually observed the opposite pattern - no significant effects of covariates in single species models fit for each of two species with occu(), but those same covariates had significant effects when fit with occuMulti(). 

Anna Drake

unread,
Sep 8, 2021, 4:08:48 PM9/8/21
to unmarked
This conversation caught my attention as I'm currently working on a similar problem to Ettore.  Following up with James' observation,  I've also have found differences in model output between the two approaches: occuMulti with no interactions and independent occu() models. As my data is borderline too sparse for occuMulti() and as I've found no evidence of species interactions, I've now switched back to occu(). 

Some example output. The detection portions of both models are more or less the same, it's only the occupancy portions that differ.

This is an occu() output with occupancy of one sparrow species as a function of elevation:

Call:
occu(formula = ~TempP + time + dateR + CANOPY_COV + I(CANOPY_COV^2) + 
    method ~ ElevS + I(ElevS^2) + Res_TempDtTmElev + BEC, data = A.frame[[1]], 
    control = list(maxit = 1000, trace = TRUE, REPORT = 1))

Occupancy:
                                     Estimate          SE          z                P(>|z|)
(Intercept)                   -1.592           2.702      -0.589        0.55562
ElevS                             8.614          3.585       2.403         0.01627
I(ElevS^2)                      -1.104           0.397     -2.781       0.00543
Res_TempDtTmElev    0.746          0.354        2.106        0.03519
BECESSF                      -4.977           8.191      -0.608        0.54342

Detection:
                                                  Estimate                 SE                z             P(>|z|)
(Intercept)                         -0.4686            0.32427            -1.45            1.48e-01
TempP                                0.8214            0.30666             2.68            7.39e-03
time                                     -0.1925            0.07375            -2.61            9.06e-03
dateR                                   0.0224            0.00707             3.16            1.56e-03
CANOPY_COV                    6.2349            1.32246             4.71            2.42e-06
I(CANOPY_COV^2)           -8.4863            1.54508            -5.49            3.96e-08
method1                             1.0698            0.18396             5.82            6.04e-09


Now the same species in a occuMulti() model with 4 other sparrows, but all 2-way interactions set to 0:

ocElevT <- c(rep('~ ElevS + I(ElevS^2) + Res_TempDtTmElv + BEC',5), rep(0,10))
ElevTemp<-occuMulti(detFormulas, ocElevT, data=occuframe ,maxOrder = 2, control = list(maxit = 1000, trace = TRUE, REPORT = 1))

Occupancy:
 
(Intercept)                               -8.3496         15.684         -0.532         0.59448
[DEJU] ElevS                          28.0511         33.249          0.844         0.39886
[DEJU] I(ElevS^2)                    -4.1686          5.068         -0.823         0.41076
[DEJU] Res_TempDtTmElv     4.1144          5.480          0.751         0.45275
[DEJU] BECESSF                    21.7132         36.309          0.598         0.5498

Detection:
[DEJU] (Intercept)                   -0.69848         0.24369         -2.866         4.15e-03
[DEJU] TempP                           1.11956         0.21618          5.179         2.23e-07
[DEJU] time                               -0.22037         0.05553         -3.969         7.23e-05
[DEJU] dateR                             0.02371         0.00620          3.827         1.30e-04
[DEJU] CANOPY_COV              7.33935         1.11223          6.599         4.15e-11
[DEJU] I(CANOPY_COV^2)     -9.86159         1.33318         -7.397         1.39e-13
[DEJU] method                          0.94144         0.15340          6.137         8.39e-10


With occuMulti() I've also found that changes to the detection model for "species A" can result in NAs being produced within the occupancy effects in "Species B" even when the interactions terms are set to 0. I assumed the fits were run independently when interactions were absent so I was confused that changes to one model impacted the others...

Ken Kellner

unread,
Sep 8, 2021, 4:34:13 PM9/8/21
to unmarked
When you set interactions to 0 that doesn't result in completely separate occupancy model fits. The likelihood is still the same (combined over multiple species) just with some of the natural parameters forced to 0. In most cases this should be equivalent to the results of multiple separate models. However in some cases such as when you have sparse data and/or complex models with many covariates you may get messier/more imprecise results with occuMulti than with the separate occu models due to the added overhead. I would agree with you that the occuMulti results you've pasted definitely shouldn't be used given the very high SEs. I wouldn't trust any of the estimates. In this case I'd say you made the right choice to fall back to separate occu models.

However if you haven't done so already, there are some steps that might improve your occuMulti fit. First, I would try some less complex models or even one covariate at a time to see if there is a particular covariate driving the poor results. Second, and more importantly, I would try standardizing all your continuous covariates. Based on the large parameter estimates in both your occu and occuMulti models that suggests to me that these covariates are not standardized. I've found occuMulti sometimes struggles when covariates are not standardized and as a result the corresponding regression coefficients are forced to large absolute values.

Ken

Anna Valdez Drake

unread,
Sep 8, 2021, 4:56:27 PM9/8/21
to unma...@googlegroups.com
Hi Ken - thanks for this, that makes the model behaviour much clearer to me.  I'll try the adjustments you suggest, and you've actually flagged an error for me. Some of my covariates are % values (e.g. canopy) that I had converted to proportions, but it seems that the dataset I'm running does not have that adjustment and my canopy values are ranging from 0-100 and not 0-1.  My elevation metric was not standardized, but was scaled. It ranges from 0-8.

Cheers!
Anna
Reply all
Reply to author
Forward
0 new messages