Hi nimble team,
I’m trying to run simulations for an Integrated Population Model (IPM). I simulate data from the nimble model, and this step seems to work fine. But then, when I try to analyze the data with the same IPM (except for one difference, the capture-recapture likelihood is marginalized in the model code I use to analyze the data), I get initialization problems (warning: problem initializing stochastic node N_DS_not_aged[2, 1, 1]: logProb is -Inf), followed by warnings that the slice sampler has reached the maximum number of contractions for various nodes.
What I can’t make sense of is that I’m using as initial values the values extracted from the nimble object used to generate the data. I manually checked initial values that are not correctly initialized, and I can’t see any issue with them. Another surprising outcome is that the nodes with initialization problems are not the same from one run to the next, although I provide fixed initial values for all demographic rates and initial population size.
Any idea what can cause that? Attached is a code to generate a dummy-sized dataset and to fit the IPM, that produces the above-mentioned problems (with potential lucky runs without any initialization issues).
Also, if anyone has a follow-up on how to use a nimble function to calculate the marginalized likelihood of a capture-recapture dataset without creating the transition and detection matrices (https://groups.google.com/g/nimble-users/c/aal_iug1J1k/m/8Eqyx-UoAgAJ), I’d be very grateful.
Many thanks in advance,
Marwan
N_post_remov[2, 1, 1] <- N_CR[2, 1, 1] - N_ad_age_2_remov[1, 1] --
You received this message because you are subscribed to the Google Groups "nimble-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nimble-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/nimble-users/e1c65b54-177c-478c-8463-22c7e3699653n%40googlegroups.com.