Hello All,
I am working on a zero-inflated Weibull model. When I run the model with fake data, I am able to recover the proper coefficients by using both variational bayes and regular sampling. However, when I move to use my actual data, VB works and the PP checks look good, but the sampler stops immediately after warmup, even with very few numerical problems. In order to troubleshoot, I have simplified by using 100 warmup and 100 iter with only an intercept in the model. I have attached the model code, and this is the (standard, and quite embarrassing) numerical problem message I get:
Chain 1, Iteration: 1 / 100 [ 1%] (Warmup)
Chain 1, Iteration: 10 / 100 [ 10%] (Warmup)
Chain 1, Iteration: 20 / 100 [ 20%] (Warmup)
Chain 1, Iteration: 30 / 100 [ 30%] (Warmup)
Chain 1, Iteration: 40 / 100 [ 40%] (Warmup)
Chain 1, Iteration: 50 / 100 [ 50%] (Warmup)
Chain 1, Iteration: 60 / 100 [ 60%] (Warmup)
Chain 1, Iteration: 70 / 100 [ 70%] (Warmup)
Chain 1, Iteration: 80 / 100 [ 80%] (Warmup)
Chain 1, Iteration: 90 / 100 [ 90%] (Warmup)
Chain 1, Iteration: 100 / 100 [100%] (Warmup)
Elapsed Time: 22.9021 seconds (Warm-up)
2e-06 seconds (Sampling)
22.9021 seconds (Total)
The following numerical problems occured the indicated number of times after warmup on chain 1
count
Exception thrown at line 32: weibull_log: Shape parameter is 0, but must be > 0! 10
When a numerical problem occurs, the Metropolis proposal gets rejected.
However, by design Metropolis proposals sometimes get rejected even when there are no numerical problems.
Thus, if the number in the 'count' column is small, do not ask about this message on stan-users.
Also, here is my R session info:
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] splines stats4 stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] fitdistrplus_1.0-7 survival_2.39-5 MASS_7.3-45
[4] VGAM_1.0-2 shinystan_2.2.0 shiny_0.13.2
[7] rstan_2.10.1 StanHeaders_2.10.0-2 ggplot2_2.1.0
[10] data.table_1.9.6
I'm sorry if this is a ridiculous issue!
Best,
Drew