Eigen error when initializing simplex parameter

I am getting and Eigen error when trying to provide initial chain values when using a simplex parameter:

ERRORAssertion failed: (index >= 0 && index < size()), function operator[], file stan/lib/stan_math/lib/eigen_3.3.3/Eigen/src/Core/DenseCoeffsBase.h, line 408.

Runs without the inits argument seem to start without issues, not using the simplex variable and providing inits also seems to start the chain. I am using CmdStanPy. Thanks.

1 Like

This implies that you are trying to acces elements wiht index out of bounds. Too many init values maybe?

I got that much from googling the error for Eigen, but the simplex documentation is not clear on that. Should the inits for a simplex of size K have K-1 elements?

K elements. But I’m afraid the problem is this bug which makes inits not work for some constrained types.


I see, it’s not something that can be fixed in the Stan code, then, I presume. Thanks.