-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems uncovered by provisional StanHeaders #15
Comments
The reason there are Makevars in walker is that Regarding the error in the example, yes |
I took a very quick stab on this: The Makevars files are no longer modified manually, instead, I added a line to configure scripts that append the Makevars created by The prior parameters for zero-length gamma-distributed variables are now positive so in case there is a check regarding the parameters of |
Ok, my idea above didn't make sense (messes dimension checks), but I added checks to ensure that Stan never gets a zero value for parameters with positivity constraint. @bgoodri Let me know if there are still issues (or new issues arise). |
We are struggling to get a new version of StanHeaders onto CRAN and walker is one of several packages that we are having issues with.
First, walker has Makevars and Makevars.win files in src/ . Ordinarily, a package that uses rstantools like walker does should not have those files, since they get regenerated automatically by rstantools. That is why there is a comment at the top of them saying that they are autogenerated and should not be edited by hand. When those files are modified by hand, then rstantools does not overwrite them. However, that now means that the necessary changes to the build process are not picked up, which makes walker segfault when its namespace is loaded with the provisional StanHeaders. Just by deleting the src/Makevars and src/Makevars.win files, I was able to get walker to build and load, so I am not understanding why it was necessary to change them.
Second, after doing that, walker has some errors in its vignette and examples in situations where the provisional StanHeaders catches mistakes that are somehow not being caught with the StanHeaders / rstan that are on CRAN currently. For example, when you run
with the provisional StanHeaders, you get an exception
that prevents the Markov chains from initializing. If you look at the list of data being passed to your Stan program,
indeed both
sigma_rw1_shape
andsigma_rw1_rate
are zero, which is not a valid gamma distribution. If you want an improper uniform prior over the positive real numbers (which is not a very good idea), then just omit the prior for a parameter that has been declared withlower = 0
. But I think this is more likely a mistake, albeit one that Stan should have caught many versions ago.We really need you to upload a new walker to CRAN that fixes these issues, but before you do, let me know so that I can test it with the provisional StanHeaders. Thanks!
The text was updated successfully, but these errors were encountered: