Closed luchinoprince closed 11 months ago
@luchinoprince There's no error here. The output displays that categorical samplers are assigned to all 100 elements of s[]
, it is indeed being updated by the MCMC. The Montiors section of the output also shows you that monitors are assigned (to record the values of) pi_0
, pi_1
, and Z
, but not s
, since s
is latent. You can add a monitor to s
if you want to record those samples also, using conf$addMonitors("s")
before calling buildMCMC
.
Ok this was faster than expected :). I wasted so much time on it that it is a little embarassing ahahaha. Thanks! Maybe add this in the documentation, as reading trough it did not jump out to me that this was going to happen.
Thanks again!
Hi @luchinoprince, in case you have not found your way there yet, I'll point you to r-nimble.org and the user manual there. The best place for support requests is the nimble-users list. A good strategy if you're getting started is to reduce the size of your example to something small that still displays the problem or question and post that on nimble-users. In this case, it looks like everything is working fine. Not every dimension is monitored by default because for large models doing so could be huge and undesirable. As @danielturek pointed out, the output displayed did tell you what was being monitored and what not, and did show that samplers were assigned to s
. Thanks and good luck.
Hello to everyone.
I am a new user of Nimble, but with some experience in other sampling software(Stan for example). I have been trying to sample from a model for the last days, but somehow the model just samples(or reports samples) for just a subset of the variables. The sampler and model do not give any warning/error message for why it is doing so, which makes it very disappointing from a software point of view as I truly have no idea where to turn to solve this problem. The code to generate the model with the toy data is the following:
The above code copied and pasted in R should run. I get no warning, nor error messages, but when I then look at
mcmc.out$samples
I have onlypi_0, pi_1, Z
and no trace of the matrixs
, as can be seen from here:If I check the MCMC configuration I get
So the model correctly sees the variables, and also their type, but then just avoids sampling or does not report it. Should
s
also be in monitor? I doubt that is the problem though.Any idea on how to solve this? I really don't know how to solve it since I have no error messages form Nimble.
Also as I side note for Nimble developers, which I hope you take as constructive criticism. I really want to stress that I find it very bad that a code runs, gives no warning nor error, when clearly there is. So I would try to improve the error/warning messaging.