Can't compute hessian mscjs model with sparse data

questions concerning analysis/theory using the R package 'marked'

Can't compute hessian mscjs model with sparse data

Postby sabrinamcnew » Wed May 29, 2024 1:38 pm

I'm trying to use mark-recapture data to estimate the effects of disease on bird survival for various species. I don't have any experience using Mark but have followed the vignettes/book chapters for both `RMark` and `marked` and marked is working ok for me.

The basic model I'm using is as follows:
Code: Select all
d.proc <- process.data(GAMO23, # data for mockingbirds
                       model="Mscjs",
                       strata.labels = c("A","B"), # infected = A; uninf = B
                       time.intervals = time_int_2023) # time interval
d.ddl <- make.design.data(d.proc)

# All model params = list(formula=~stratum)
gamomod <- crm(d.proc, d.ddl,
             model.parameters = list(S = S.stratum, p = p.stratum, Psi = Psi.stratum),
             hessian = TRUE, use.tmb =  TRUE, useHess = TRUE, debug = TRUE)


The issue is that the crm model won't complete and when it tries to compute the hessian it returns the error
Code: Select all
outer mgc:  0.004795544
Computing hessian...
Error in solve.default(f$he(par)) :
  system is computationally singular: reciprocal condition number = 4.87297e-27


The model will run if I set hessian = FALSE or if I remove the time intervals. I've also used crm.wrapper to compare all combinations of ~ intercept and ~ stratum models and the crm model returns the same singular error even with the "best" model.

I'm guessing that my issue is that my data are pretty sparse. I have data from 98 individual birds over 100 capture occasions. The intervals between occasions range from 1 to 19 days. Infected individuals were captured on average 1.28 times and uninfected individuals 1.74 times. Transitions between states were relatively rare.

For those who have more experience with capture-recapture data, is this why I'm having trouble getting the model to run? Are there any rules of thumb for how many captures per individual are needed to parameterize the models? Are there any arguments I can modify in crm() to get results?

TIA for any thoughts!
sabrinamcnew
 
Posts: 1
Joined: Fri May 24, 2024 6:54 pm

Re: Can't compute hessian mscjs model with sparse data

Postby jlaake » Thu Jun 06, 2024 1:44 pm

Not much you can do about sparse data other than to collect more and increase p. A couple of suggestions.

1) in call to crm use method="nlminb" and I would drop useHess=TRUE with so few parameters.
2) consider letting p be a function of time rather than stratum. Sometimes if you are using a model that doesn't fit the data then it can fit poorly and cause problems.
3) Try RMark which won't require much change in the code. A different optimization method may help and you can use the sin link if you specify that and use ~-1+stratum as the formula. The sin link will perform better when parameters are at a boundary (Psi 0 etc).

None of this may help but it is worth trying.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests