Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Hessian is singular.

48 views
Skip to first unread message

Francisca Z.

unread,
Aug 29, 2024, 6:58:17 PM8/29/24
to unmarked

Hello, 

I have a database from camera traps and I have been trying to run the global model. My data includes sampling effort, number of observations, and environmental variables (where I considered elements such as % vegetation cover and activity rates of other predators). Everything was fine up to the null model; the problem appears in the global model.

I read some solutions in this forum, and I know that there are no NA values in any of my matrices... I also tried setting initial values similar to the estimation of "naive occupancy," but the warning still appears, and in the end, the model does not plot correctly.

Am I misunderstanding something? I imagine it must be a detail-oriented solution, but I can't figure it out. Could someone help me?

Attached are the data and codes:

> naive_occ [1] 0.3714286
> summary(null.mod) Call: occu(formula = ~1 ~ 1, data = unm_det.his) Occupancy (logit-scale): Estimate SE z P(>|z|) 0.326 0.68 0.48 0.631 Detection (logit-scale): Estimate SE z P(>|z|) -2.4 0.378 -6.34 2.32e-10 AIC: 155.1188 Number of sites: 35 optim convergence code: 0 optim iterations: 25 Bootstrap iterations: 0
> p Backtransformed linear combination(s) of Detection estimate(s) Estimate SE LinComb (Intercept) 0.0835 0.0289 -2.4 1 Transformation: logistic
> psi Backtransformed linear combination(s) of Occupancy estimate(s) Estimate SE LinComb (Intercept) 0.581 0.166 0.326 1 Transformation: logistic

From here until the construction of the global model, everything was fine. I added the covariates and standardized them...

> glob.mod <- occu(formula = ~effort + observers~z.X.Cob.Matorral + z.Rate_quique + z.Rate_guina + z.Rate_colocolo + z.Rate_culpeo, data = unm_cov)
Warning message: Hessian is singular. Try providing starting values or using fewer covariates.

I really don't know what to do. :c

Jeffrey Royle

unread,
Aug 29, 2024, 9:32:44 PM8/29/24
to unma...@googlegroups.com
hi Francisca,
 This happens if you have too many parameters, not enough data, bad starting values or complete separation (see here FAQ What is complete or quasi-complete separation in logistic regression and what are some strategies to deal with the issue? (ucla.edu)  ).  There is not enough information in your post to provide more information but I would first recommend building your model one variable at a time, getting estimates from that model, and use them as starting values in the next model. This will help you avoid bad starting value issues normally.  If one of your variables is a categorical variable with many levels this could be too many parameters for your particular data set.  
 But, first, try the step-wise model building.
regards
andy


--
*** Three hierarchical modeling email lists ***
(1) unmarked (this list): for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
---
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/0d9f75e7-7fa7-4577-a5cc-a65560c91945n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages