> On Dec 11, 2014, at 4:21 AM, Elisa Borella <
elisa.b...@universitadipavia.it> wrote:
>
> Even if I translate the time vector of a certain constant, i.e. t=t+10, Stan requires me to set a t0 minor then 10. So, is it right that t0 can't be fixed at the first element of the time vector?
Correct. All elements of the time vector must be strictly
greater than t0.
> As regarding the initial condition y0, in my case I want to fix the amount in the compartment equal to the dose amount to simulate a bolus injection.
That's what we've done, as well.
That means that y0 is the value for t0. There's nothing
to solve, which is why it's not in the list of times.
> Neverthless when I run the script, the algorithm seems not to move from the first iteration also after a long time.
> This is the message that appears:
>
> Iteration: 1 / 10000 [ 0%] (Warmup)
>
> Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
> stan::prob::normal_log(N4stan5agrad3varE): Location parameter is 1.#INF:0, but must be finite!
> If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
> but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
This message is saying that you have a normal(...) somewhere that
is getting an infinite mean. Sorry we don't have line-by-line
error messages yet --- it's on our to-do list.
It's hard to say more without seeing the model. You might want to
try running in diagnostic mode just to make sure your init is
well formed.
Then, try running with a small initial step size, like 0.001 to see
if that helps you move. It controls the discretization of the
Hamiltonian simulation (itself solving an ODE within an iteration),
and making it smaller lets it follow the curvature of the posterior
more closely.
A problem that can arise is that the parameters will wander into
values that cause the ODE to become stiff. Stan's going to grind to
a halt when that happens, at least until we add a stiff solver, which
is one of our highest priorities at the moment and should happen in
the next six to nine months if not sooner. The smaller initial step
size can help (as can a higher target acceptance rate for adaptation,
which will keep the step size smaller).
Also, the more informative you can make the priors, the better --- it
will help prevent the parameters from wandering into stiff territory.
- Bob