Closed TheaT21 closed 4 years ago
Can you try running with cores=1
and see if that gives more info in the error messages?
Can you try running with
cores=1
and see if that gives more info in the error messages?
I tried running with cores=1,error showed that: error occurred during calling the sampler; sampling not done
There is some information attached, which may help to understand: Chain 1: Rejecting initial value: Chain 1: Error evaluating the log probability at the initial value. Chain 1: Exception: binomial_lpmf: Successes variable is 176, but must be in the interval [0, 55] (in 'model7a72a5b9a43_af543013862bc307cac5e99e31ad53e6' at line 111)
Chain 1: Chain 1: Initialization between (-2, 2) failed after 100 attempts. Chain 1: Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model. [1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed." error occurred during calling the sampler; sampling not done
Chain 1: Rejecting initial value: Chain 1: Error evaluating the log probability at the initial value. Chain 1: Exception: binomial_lpmf: Successes variable is 176, but must be in the interval [0, 55] (in 'model7a72a5b9a43_af543013862bc307cac5e99e31ad53e6' at line 111)
Thanks, yeah this is the relevant info. It's having trouble initialize. In particular, from this message it looks like in the binomial you have number of successes greater than number of trials or something like that. So this isn't actually an rstan issue (it would be the same regardless of Stan interface), but a more general Stan question. I'm going to close this because this is really a question for the Stan forums instead. It's a totally valid question, but can you ask there?
If this is a duplicate, please apologize in advance. But I don’t seem to find other posts with the same problem here, although it seems that others have encountered similar situations.
Summary of the problem After compiling stan models, I get an error message at the beginning of sampling from the sampler.
Description Whenever I run a Stan model, I get the following message when sampling begins: [1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization failed." error occurred during calling the sampler; sampling not done here are whatever error messages were returned [[1]] Stan model 'af543013862bc307cac5e99e31ad53e6' does not contain samples.
[[2]] Stan model 'af543013862bc307cac5e99e31ad53e6' does not contain samples.
[[3]] Stan model 'af543013862bc307cac5e99e31ad53e6' does not contain samples.turned
The sampling process then terminates and Initialization failed. I reinstalled rstan following the directions on the rstan page. I also tried installing them from source and still the sample problem. I also have XCode and R tools installed.
Reproducible Steps
RStan Version 2.21.2
R Version 4.02
Operating System: MacOS Catalina 10.15.5