I'm a brand new user, checking out NIMBLE for some crude hidden population models. My first attempt at compiling a model with a couple of 'custom' distributions (hypergeometric, discrete uniform) and one custom function (log binomial coefficient calculator) has run up against an error which I cannot interpret. Upon compilation, sometime during the later subfunction calls, the program fails with error "problem creating switch function for getParam...". See attached R markdown for the code used and the exact text of the error.Any pointers on what the problem is? Thanks in advance.
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/6c99706a-0c3d-4718-a624-486e61891847%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the reproducible example.Oops, it turns out there is a problem when parameters of a user-defined distribution are named "lower" or "upper". If you rename those parameters, it works. I'll file a github issue so we can fix that.In addition, dbin (aliased by dbinom) is an example of a distribution defined by BUGS with different default parameter order from R. So you'll want:S1_ct[v,t] ~ dbinom(size = Q[v,t], prob = p_S1)There remains a problem with some initial values yielding NaNs from your nlchoose function (I suspect n-k+1 <= 0), which I leave to you to resolve.Perry
On Wed, Nov 8, 2017 at 7:17 PM, <pcoll...@berkeley.edu> wrote:
I'm a brand new user, checking out NIMBLE for some crude hidden population models. My first attempt at compiling a model with a couple of 'custom' distributions (hypergeometric, discrete uniform) and one custom function (log binomial coefficient calculator) has run up against an error which I cannot interpret. Upon compilation, sometime during the later subfunction calls, the program fails with error "problem creating switch function for getParam...". See attached R markdown for the code used and the exact text of the error.Any pointers on what the problem is? Thanks in advance.
--
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.
for (i in whichUnits) {
ans[[i]] <- project$compileModel(units[[i]], control = control,
showCompilerOutput = showCompilerOutput)
if (names(units)[i] != "")
names(ans)[i] <- names(units)[i]
}
Error in max(a1nDim, a2nDim) : invalid 'type' (S4) of argument
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to nimble...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nimble-users/230cf073-5106-41e0-8ceb-5cbf334fb0fe%40googlegroups.com.