Dear all,
My name is Alejandro, I am trying to run the stan routine in the archives below, but I am getting the following error:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1).
Chain 1: Unrecoverable error evaluating the log probability at the initial value.
Chain 1: Exception: Found negative dimension size in variable declaration; variable=nei; dimension size expression=N_edges; expression value=-2147483648 (in 'string', line 127, column 11 to column 18)
[1] "Error : Exception: Found negative dimension size in variable declaration; variable=nei; dimension size expression=N_edges; expression value=-2147483648 (in 'string', line 127, column 11 to column 18)"
[1] "error occurred during calling the sampler; sampling not done"
The error is saying that N_edges
, an index, is negative with this value, value=-2147483648
, which is very weird because I am adding all the elements of a matrix with just zeros and ones. In the reproductible example I tested the function and it was ok. I do not know what else to do to fix this bug, I would appreciate any suggestions.
Thanks in advance,
Att,
Alejandro.
reproductible_example_stan_forums_2.R (3.1 KB)
dagar_poisson_no_covariates_p_random_2_prac.stan (5.0 KB)
sourcegraphs.R (6.0 KB)