Hi,
Recently I tried to extract the output of my Stan program using ‘summary()’ function in R but I found that for some quantity (prob_d, which is the probability of success in Bernoulli trial) in ‘Generated Quantities’ the se_mean, nn_eff and Rhat are all NaN while the mean is still number.
Then I checked the matrix of all simulated draws and found that the maximum of draws for prob_d is 1.0000000 and the minimum is 1.898636e-17. Also the program ran without error but had the following warning message(4 chains with 5000 iterations for each chain):
Warning messages:
1: In validityMethod(object) :
The following variables have undefined values: prob_d. Many subsequent functions will not work correctly.
2: There were 6381 divergent transitions after warmup. Increasing adapt_delta above 0.8 may help. See
http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
3: There were 2 chains where the estimated Bayesian Fraction of Missing Information was low. See
http://mc-stan.org/misc/warnings.html#bfmi-low
4: Examine the pairs() plot to diagnose sampling problems
5: The largest R-hat is NA, indicating chains have not mixed.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#r-hat
6: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#bulk-ess
7: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable.
Running the chains for more iterations may help. See
http://mc-stan.org/misc/warnings.html#tail-ess
I am wondering why this happened and does this relates to the arithmetic precision in Stan?
Thx!