Hi all,
I suppose this question best fits in chapter 3 of AHM but uses ch. 10. I am fitting a model set of single-season occ. models across several species, a set which includes a global model (a model including all explanatory variables - which, btw, are all continuous). I have two species with very similar detection histories:
Species 1: detected at 40 / 150 sites, 481 zeros, 54 ones
Species 2: detected at 51/150 sites, 462 zeros, 73 ones
The global model for species 1 fit with no fusses:
Call:
occu(formula = ~det1 ~ var1 + var2 + VAR3 + var4 + var5 + var6 +
var7 + var13 + var8 + var9 + var10 +
var11 + var12, data = umf)
Occupancy:
Estimate SE z P(>|z|)
(Intercept) -0.1550 0.414 -0.3748 0.708
var1 -0.0297 0.342 -0.0869 0.931
var2 -0.4312 0.315 -1.3699 0.171
VAR3 0.1128 0.327 0.3445 0.730
var4 -0.2006 0.318 -0.6305 0.528
var5 -0.1519 0.233 -0.6509 0.515
var6 0.5961 0.379 1.5745 0.115
var7 0.2753 0.381 0.7224 0.470
var13 -0.2396 0.323 -0.7408 0.459
var8 0.1796 0.500 0.3595 0.719
var9 0.5406 0.432 1.2525 0.210
var10 -0.2779 0.383 -0.7254 0.468
var11 0.6595 0.748 0.8819 0.378
var12 0.4991 0.586 0.8512 0.395
Detection:
Estimate SE z P(>|z|)
(Intercept) -1.302 0.268 -4.85 1.24e-06
det1 -0.407 0.176 -2.32 2.06e-02
AIC: 352.9489
However, NaNs were produced in the global model for species 2 (the species with a greater number of detections and a higher naïve occupancy).
Call:occu(formula = ~det2 ~ var1 + var2 + VAR3 + var4 + var5 + var6 + var7 + var13 + var8 + var9 + var10 + var11 + var12, data = umf) Occupancy: Estimate SE z P(>|z|)(Intercept) 122.975 NaN NaN NaNvar1 -0.538 2669 -0.000202 1.000var2 40.897 6957 0.005879 0.995VAR3 -117.846 2693 -0.043768 0.965var4 17.093 6595 0.002592 0.998var5 13.977 2363 0.005916 0.995var6 -7.164 NaN NaN NaNvar7 15.911 NaN NaN NaNvar13 98.123 NaN NaN NaNvar8 -145.494 877 -0.165915 0.868var9 -181.482 NaN NaN NaNvar10 -17.550 5493 -0.003195 0.997var11 -114.546 NaN NaN NaNvar12 -80.370 1706 -0.047121 0.962 Detection: Estimate SE z P(>|z|)(Intercept) -1.526 0.133 -11.46 1.99e-30det2 -0.328 0.131 -2.51 1.22e-02 AIC: 405.0236
I’ve tried reducing the number of covariates to pinpoint where the wacky output starts, and, out of desperation, I ran the model again but this time holding the intercept at 0. When I held the intercept at 0, the global model for species 2 ran with no problem:
Call:occu(formula = ~det2 ~ var1 + var2 + VAR3 + var4 + var5 + var6 + var7 + var13 + var8 + var9 + var10 + var11 + var12 - 1, data = umf) Occupancy (logit-scale): Estimate SE z P(>|z|)var1 0.06263 0.320 0.1958 0.84475var2 0.68789 0.379 1.8134 0.06977VAR3 -0.38993 0.343 -1.1381 0.25507var4 0.30458 0.325 0.9379 0.34829var5 0.51705 0.430 1.2026 0.22913var6 -0.00634 0.375 -0.0169 0.98652var7 0.21567 0.307 0.7020 0.48269var13 0.34075 0.332 1.0257 0.30503var8 -1.49152 0.648 -2.3004 0.02142var9 -1.60966 0.570 -2.8259 0.00472var10 -0.45697 0.471 -0.9705 0.33180var11 -1.92808 0.926 -2.0811 0.03742var12 -1.41571 0.683 -2.0721 0.03826 Detection (logit-scale): Estimate SE z P(>|z|)(Intercept) -1.179 0.158 -7.46 8.53e-14det2 -0.403 0.144 -2.79 5.27e-03 AIC: 422.7991
WHY did this happen? Why was everything okay without an intercept? And why did this happen with the species which had a greater number of detections and a higher naïve occupancy? (Dr. Kéry, if you are seeing this, I saw your reply on a thread in the unmarked group stating we should never hold the intercept to 0 when dealing with continuous explanatory variables. Can you elaborate?)
I was also curious how holding the intercept at 0 would change the estimates produced in the global model of species 1…the output is almost identical to that of species 1 with an intercept.
Species 1’s global model WITHOUT an intercept:
Call:occu(formula = ~det1 ~ var1 + var2 + VAR3 + var4 + var5 + var6 + var7 + var13 + var8 + var9 + var10 + var11 + var12 - 1, data = umf) Occupancy (logit-scale): Estimate SE z P(>|z|)var1 -0.0297 0.375 -0.0793 0.9368var2 -0.4493 0.336 -1.3360 0.1816VAR3 0.1143 0.352 0.3245 0.7455var4 -0.1809 0.345 -0.5238 0.6004var5 -0.1709 0.237 -0.7225 0.4700var6 0.6414 0.384 1.6688 0.0951var7 0.3245 0.444 0.7315 0.4645var13 -0.2534 0.348 -0.7288 0.4661var8 0.1963 0.545 0.3602 0.7187var9 0.5640 0.479 1.1780 0.2388var10 -0.3136 0.407 -0.7699 0.4413var11 0.6703 0.823 0.8143 0.4155var12 0.5144 0.664 0.7743 0.4387 Detection (logit-scale): Estimate SE z P(>|z|)(Intercept) -1.37 0.185 -7.44 1.00e-13det1 -0.40 0.173 -2.31 2.07e-02 AIC: 351.0696
Thank you very much for your time and input.
Best,
Brent
Hi Brent,
I don’t know that this is the answer but I would be curious to know how correlated you covariates are.
HR
--
*** Three hierarchical modeling email lists ***
(1) unmarked: for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology (this list): for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2015)
---
You received this message because you are subscribed to the Google Groups "hmecology: Hierarchical Modeling in Ecology" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
hmecology+...@googlegroups.com.
To post to this group, send email to
hmec...@googlegroups.com.
Visit this group at https://groups.google.com/group/hmecology.
To view this discussion on the web visit
https://groups.google.com/d/msgid/hmecology/b6ef3582-056f-46da-85ef-54d13bb99fcb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
My thoughts as well looking at the huge estimate values, both positive and negative.
In my experience that's usually related to highly correlated covariates.
Cheers,
Richard
Sent from TypeApp
To view this discussion on the web visit https://groups.google.com/d/msgid/hmecology/6D08812255DBE7418F723D9E71F45D2F31881D5C%40srv-mbx01.Panthera.local.
Thank you for the response - I really appreciate it!
Brent
Thanks for the response. Species 2's observed occupancy is 0.34 (51 / 150)
________________________________________
From: hmec...@googlegroups.com [hmec...@googlegroups.com] on behalf of Brent P [bpe...@siu.edu]
Sent: 23 September 2016 14:05
To: hmecology: Hierarchical Modeling in Ecology
Subject: AW: Question about GLM: NaNs produced in global model
Marc,
Thanks for the response. Species 2's observed occupancy is 0.34 (51 / 150)
--
*** Three hierarchical modeling email lists ***
(1) unmarked: for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology (this list): for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2015)
---
You received this message because you are subscribed to the Google Groups "hmecology: Hierarchical Modeling in Ecology" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hmecology+...@googlegroups.com.
To post to this group, send email to hmec...@googlegroups.com.
Visit this group at https://groups.google.com/group/hmecology.
To view this discussion on the web visit https://groups.google.com/d/msgid/hmecology/cc8d4646-97ff-4db1-aafa-5ad1e3376d94%40googlegroups.com.