Closed bgoodri closed 3 years ago
Hi Ben! Thanks so much for this. The c(0,0,0) is faulty R code, I must have broken it with a recent update. Will look into conditional bounds, but will start with a quick fix to R code alone---will submit to CRAN next week with some other bug fixes. Cheers, Witold
@bgoodri the new version is on CRAN, I think this should work fine going forward; thanks again for letting me know! W
Currently,
example(baggr)
somehow works with the StanHeaders / rstan on CRAN but it really should not becausebaggr
tries to use a uniform prior on the coefficients with both the lower bound and the upper bound equal to zero. Specifically,stan_data
isthe last line for
prior_beta_val
is a vector of three zeros and the line before that indicates that the uniform prior is being used. When all that gets passed to youryou get an exception from the new version of StanHeaders that we are struggling to get onto CRAN:
So, the R code should be fixed so that it specifies a non-degenerate prior. But even if you specified a lower bound that was lower than the upper bound, the Stan code is subject to exceptions and / or poor sampling because leapfrog steps can go outside those bounds. To overcome that, you need to change the declaration in the
parameters
block of your Stan programs to have bounds that are conditional onprior_beta_fam
like:Even though this is not a bug with StanHeaders >= 2.26, it is a bug that prevents StanHeaders_2.26.x from passing the automatic reverse dependency checks. So please upload a new baggr to CRAN that fixes is this as soon as you possibly can.