Deterministic nodes cannot be specified as 'data' or 'constants'

14 views
Skip to first unread message

Dan Linden

unread,
Jun 5, 2023, 8:52:23 AM6/5/23
to nimble-users
I realize the paint is still drying on version 1 so I apologize for discussing this bug that has already been identified (https://github.com/nimble-dev/nimble/issues/1324).

I attempted Perry's proposed solution but it did not work so thought I would start a conversation here.  This issue affects models with variables that have a mix of RHSonly and stochastic nodes, which is obviously pretty common for BUGS-style approaches to partially latent variables in ecology (capture-recapture, etc.).  My application is a multi-event model conditioning on first capture which worked without error in NIMBLE before version 1 (which is not to say the model was ideal or without flaws!).

I probably made a mistake trying to implement Perry's fix.  Either way, hoping a conversation may be helpful.

Daniel Turek

unread,
Jun 5, 2023, 10:04:43 AM6/5/23
to Dan Linden, nimble-users
Dan, are you able to share reproducible code implementing your attempt at the workaround - that which is still not working correctly for you?  That would certainly help us take a look at what's going awry.

Cheers,
Daniel




--
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 on the web visit https://groups.google.com/d/msgid/nimble-users/84adec98-d4a5-4d16-9cb6-ca96dde346cdn%40googlegroups.com.

Dan Linden

unread,
Jun 5, 2023, 12:34:40 PM6/5/23
to nimble-users
Hi Daniel, it does look like Perry's solution works.  This was a model translated from JAGS and the actual problem was that the latent state at first capture was being assigned in the model.  This assignment is what NIMBLE version 1.0 did not like, and the fix is easy.  Taking that statement out and using data and initial values (absent any NAs) to inform the latent states works fine.

It does give me the following note, but clearly this is expected:
[Note] Ignoring non-NA values in inits for data nodes: Z
Reply all
Reply to author
Forward
0 new messages