here are whatever error messages were returned[[1]]Stan model '775b8fa18dd0085db432687f0b77614a' does not contain samples.
Warning message:In .local(object, ...) : some chains had errors; consider specifying chains = 1 to debug
> On Aug 26, 2015, at 12:43 PM, Lei Zhang <bnuzhan...@gmail.com> wrote:
>
> Hi,
>
> I've encountered the same error message several times, even when I've already set chain=1. After careful debug (mostly by hand), I figured them out.
> In short, I agree with Bob, and several mis-declaration could cause this error. Plus, This error message is really not informative, is it possible to make it more specific in future versions of Stan?
Absolutely --- could you let us know exactly what the error message
was and what you'd like it to say? We want to make these interpretable
to our users.
> Either way, I would share my own experience with this error message.
>
> EX1. beta(a,b) does not allow a (or/and b) = 0
Correct --- it's undefined.
> EX2. x[i]/sum(x) when sum(x)=0, in this case, you could try x[i]/ (sum(x) + machine_precision() )
Divide by zero creates NaN. But you probably do not want to do
x[i] / machine_precision() as that will just produce
roughly 1e15 * x[i], which is probably not what you want.
> EX3. the dimension of your parameters is ill specified
Not sure what you mean here. Our vectorization requires all args to
be either scalars or the same size container.
- Bob
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/1k2gIjxn2GI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+...@googlegroups.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/1k2gIjxn2GI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
I use RStudio on Windows. And on Linux, I just use shell.The error message is still the same as in the OP:here are whatever error messages were returned[[1]]Stan model '[MODEL NAME]' does not contain samples.Warning message:In .local(object, ...) :some chains had errors; consider specifying chains = 1 to debug
--
The problem here seems to be that mc.cores is set to be larger than 1, so setting chains=1 is not enough to disable creating multiple processes.It looks like we need to change this line of code (from chains > 0 to chains > 1):
The problem here seems to be that mc.cores is set to be larger than 1, so setting chains=1 is not enough to disable creating multiple processes.It looks like we need to change this line of code (from chains > 0 to chains > 1):
Ok - when I do the following, a text box pops up, but it doesn't contain anything other than 'Refresh to see progress'.Any ideas?
What is Refresh? Is there a keyboard shortcut for this?
SAMPLING FOR MODEL 'janu_stan_v2' NOW (CHAIN 1).
Chain 1, Iteration: 1 / 2000 [ 0%] (Warmup)Chain 1, Iteration: 200 / 2000 [ 10%] (Warmup)Chain 1, Iteration: 400 / 2000 [ 20%] (Warmup)Chain 1, Iteration: 600 / 2000 [ 30%] (Warmup)Chain 1, Iteration: 800 / 2000 [ 40%] (Warmup)Chain 1, Iteration: 1000 / 2000 [ 50%] (Warmup)Chain 1, Iteration: 1001 / 2000 [ 50%] (Sampling)Chain 1, Iteration: 1200 / 2000 [ 60%] (Sampling)Chain 1, Iteration: 1400 / 2000 [ 70%] (Sampling)Chain 1, Iteration: 1600 / 2000 [ 80%] (Sampling)Chain 1, Iteration: 1800 / 2000 [ 90%] (Sampling)Chain 1, Iteration: 2000 / 2000 [100%] (Sampling)# Elapsed Time: 5834.62 seconds (Warm-up)# 3763.76 seconds (Sampling)# 9598.38 seconds (Total)SAMPLING FOR MODEL 'janu_stan_v2' NOW (CHAIN 1).
SAMPLING FOR MODEL 'janu_stan_v2' NOW (CHAIN 2).
SAMPLING FOR MODEL 'janu_stan_v2' NOW (CHAIN 3).
SAMPLING FOR MODEL 'janu_stan_v2' NOW (CHAIN 4).
Chain 4, Iteration: 1 / 10000 [ 0%] (Warmup)Chain 3, Iteration: 1 / 10000 [ 0%] (Warmup)Chain 1, Iteration: 1 / 10000 [ 0%] (Warmup)Chain 2, Iteration: 1 / 10000 [ 0%] (Warmup)Chain 3, Iteration: 2000 / 5000 [ 40%] (Warmup)Chain 3, Iteration: 2500 / 5000 [ 50%] (Warmup)Chain 3, Iteration: 2501 / 5000 [ 50%] (Sampling)Chain 3, Iteration: 3000 / 5000 [ 60%] (Sampling)Chain 2, Iteration: 1000 / 10000 [ 10%] (Warmup)Chain 3, Iteration: 3500 / 5000 [ 70%] (Sampling)Chain 3, Iteration: 1000 / 10000 [ 10%] (Warmup)Chain 4, Iteration: 1000 / 10000 [ 10%] (Warmup)Chain 1, Iteration: 1000 / 10000 [ 10%] (Warmup)Chain 3, Iteration: 4000 / 5000 [ 80%] (Sampling)Chain 2, Iteration: 2000 / 10000 [ 20%] (Warmup)[1] "Error : model7791606bf1b1_janu_stan_v2_namespace::write_array: x_hat[k0__] is -1, but must be greater than or equal to 0"error occurred during calling the sampler; sampling not doneError in serialize(data, node$con, xdr = FALSE) : ignoring SIGPIPE signalCalls: <Anonymous> ... doTryCatch -> sendData -> sendData.SOCK0node -> serializeExecution halted
Chain 4, Iteration: 2000 / 10000 [ 20%] (Warmup)Chain 3, Iteration: 2000 / 10000 [ 20%] (Warmup)Chain 2, Iteration: 3000 / 10000 [ 30%] (Warmup)Chain 1, Iteration: 2000 / 10000 [ 20%] (Warmup)Chain 3, Iteration: 3000 / 10000 [ 30%] (Warmup)Chain 4, Iteration: 3000 / 10000 [ 30%] (Warmup)Chain 2, Iteration: 4000 / 10000 [ 40%] (Warmup)Chain 3, Iteration: 4000 / 10000 [ 40%] (Warmup)Chain 4, Iteration: 4000 / 10000 [ 40%] (Warmup)[1] "Error : model7791264ad09f_janu_stan_v2_namespace::write_array: v_hat[k0__] is -1, but must be greater than or equal to 0"error occurred during calling the sampler; sampling not done
Chain 1, Iteration: 3000 / 10000 [ 30%] (Warmup)Chain 4, Iteration: 5000 / 10000 [ 50%] (Warmup)Chain 4, Iteration: 5001 / 10000 [ 50%] (Sampling)Chain 2, Iteration: 5000 / 10000 [ 50%] (Warmup)Chain 2, Iteration: 5001 / 10000 [ 50%] (Sampling)Chain 1, Iteration: 4000 / 10000 [ 40%] (Warmup)Chain 2, Iteration: 6000 / 10000 [ 60%] (Sampling)Chain 1, Iteration: 5000 / 10000 [ 50%] (Warmup)Chain 1, Iteration: 5001 / 10000 [ 50%] (Sampling)Chain 4, Iteration: 6000 / 10000 [ 60%] (Sampling)Chain 2, Iteration: 7000 / 10000 [ 70%] (Sampling)Chain 1, Iteration: 6000 / 10000 [ 60%] (Sampling)Chain 2, Iteration: 8000 / 10000 [ 80%] (Sampling)Chain 1, Iteration: 7000 / 10000 [ 70%] (Sampling)Chain 4, Iteration: 7000 / 10000 [ 70%] (Sampling)Chain 2, Iteration: 9000 / 10000 [ 90%] (Sampling)Chain 1, Iteration: 8000 / 10000 [ 80%] (Sampling)Chain 2, Iteration: 10000 / 10000 [100%] (Sampling)# Elapsed Time: 30470.4 seconds (Warm-up)# 39078.4 seconds (Sampling)# 69548.8 seconds (Total)
Chain 1, Iteration: 9000 / 10000 [ 90%] (Sampling)Chain 4, Iteration: 8000 / 10000 [ 80%] (Sampling)Chain 1, Iteration: 10000 / 10000 [100%] (Sampling)# Elapsed Time: 40647.2 seconds (Warm-up)# 37930.2 seconds (Sampling)# 78577.4 seconds (Total)
Chain 4, Iteration: 9000 / 10000 [ 90%] (Sampling)
Chain 4, Iteration: 10000 / 10000 [100%] (Sampling)# Elapsed Time: 28786.6 seconds (Warm-up)# 67963.2 seconds (Sampling)# 96749.8 seconds (Total)
here are whatever error messages were returned[[1]]Stan model 'janu_stan_v2' does not contain samples.
Warning messages:1: In .local(object, ...) : some chains had errors; consider specifying chains = 1 to debug2: There were 29 divergent transitions after warmup. Increasing adapt_delta may help.3: Examine the pairs() plot to diagnose sampling problemsChain 2, Iteration: 2000 / 10000 [ 20%] (Warmup)[1] "Error : model7791606bf1b1_janu_stan_v2_namespace::write_array: x_hat[k0__] is -1, but must be greater than or equal to 0"