and would like to have the starting point of the time span ts to be random draws from a posterior/prior distribution. Is it possible to do this in stan?
Not yet, but I have filed a pr for this to make it possible… feel free to review that pr if you can oe looby for it… this would be a very convenient for a few applications.
Thanks @wds15.
Would you mind explaining what you meant by pr and oe and looby? I do not understand these and where do i look for to review the pr? Sorry I am learning Stan and all these terms are not familiar to me at present.
Oh…sorry for the slamg.
Oe = or
Pr = pull request on github
Looby = make other people review the pr
Unless you are very versed in c++, then just ignore this. As you are just getting started with things All of this is a bit too advanced… so in short, your wish for the time vector being parameters is being worked on.
Another question. Is it possible for STANs ODE solver to produce nonnegative solutions? I know Matlab has this facility.
I work with an ODE model and use the likelihood as
y_hat ~ lognormal(log(y[,5]), std);
Where y[ ] is solutions to an ODE. In order for the above likelihood to work, the y[, 5] must be nonnegative.
So far, reading through STans documentation, I cannot see how this is possible. There may be a way to do this and I may have missed finding how to do this.
Without nonnegativety of y, my code is throwing an error: about the location parameter of the likelihood being NaN.
Any help is appreciated.