--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
- Bob
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
Of note, I now get the following error message numerous times as Stan iterates through. I have checked through and cannot see how the variable fc_all takes on a negative value (it is a linear combination of things which are defined to be non-negative, unless I am missing a coding error), but was hoping that it will go away once I have gotten to the point where I can run the model with realistic inputs.Informational Message: The parameter state is about to be Metropolis rejected due to the following underlying, non-fatal (really) issue (and please ignore that what comes next might say 'error'): Invalid value of fc_all: Error in function validate transformed params N4stan5agrad3varE: fc_all is -1.#IND:0, but must be greater than 0If the problem persists across multiple draws, you might have a problem with an initial state or a gradient somewhere.If the problem does not persist, the resulting samples will still be drawn from the posterior.
I tried adding epsilon() , and even 0.5 (i.e. below), to sum that defines fc_all , but no change.fc_all <- V1[4]*f0c+V1[5]*fic[1]+V1[6]*fic[2]+V1[7]*fic[3]+V1[8]*fic[4]+V1[9]*fic[5]+V1[10]*fic[6]+V1[11]*fic[7]+V1[12]*fic[8]+V1[13]*fic[9]++0.5; # adding small pos value to see if error code goes away... does not.
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
At this point, I'm not sure how to help you model as it currently stands. If you can break it down into a simpler model, I might be able to make more progress.
I would approach it in this order: 1) put the likelihood in a model alone to make sure its sampling from the correct distribution, 2) make sure temporary variables are scoped as tight as possible to decouple the transformed parameters block, 3) build up the model starting with a parameter at a time.
If you want help breaking down the model, we can do that on the list. I'm willing to help, I just think I'm stuck with the current incarnation of the model.
Daniel
PS. Try out the Stan emacs mode. https://github.com/stan-dev/stan-mode. It handles indentation and code highlighting for Stan models.
--
You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
Can you try setting the max tree depth to something lower
and see if you still get memory spikes? That'll control
the number of leapfrog steps per iteration.
Could I ask again which version of Stan or RStan you're using?
If the problem's really hard and requires involved code in submodules,
then you probably should do it in C++. It's what we're doing
right now for pharmacokinetic models requiring diff eq solvers.
We use C++ for the solvers. Of course, our plan's to get this all
into the Stan language eventually, but for now, the only option is
to write custom C++ functions based on solving diff-eqs then plug
them into Stan.
> *2. Lots of data:* in the full model I would be evaluating 4.9 x10^5 likelihoods. I assume this will just make
> iterations run more slowly, but otherwise things will still work (it seemed to when I just ran a toy model to estimate
> the overall mean).
Correct. You mean 50K data points contributing to the total likelihood?
If you need each likelihood to be saved (say for doing something like WAIC),
then it won't be a computational problem, just an I/O or memory size
problem if you're caching the results.
> My poorly-informed guess, as the model seems to run sometimes but not others, is that things are going awry when the
> sampler gets too far into the tail of the posterior. Does this sound possible?
Yes. Have you tried initializing with something more
reasonable. We have an init=0 option that will set all
the init values to 0 in the unconstrained space (simplexes
are uniform, positive-constrained variables initialized to 1,
unbounded parameters initialized to 0, bounded parameters
initialized to middle of the bound).
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/os-sGfUglBo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.