On 9/1/12 5:13 PM, Michael Braun wrote:
> Fixed the problem. Once I exported the data, and ran stan from a shell, I got the following helpful message:
>
> Exception: INDEX OPERATOR [] OUT OF BOUNDS; index=5; lower bound=1; upper bound=4; index position=1; xi
>
> Diagnostic information:
> Dynamic exception type: std::out_of_range
> std::exception::what: INDEX OPERATOR [] OUT OF BOUNDS; index=5; lower bound=1; upper bound=4; index position=1; xi
>
> This told me that I was interpreting the statement
>
> vector[N] xi[k]
>
> incorrectly. I thought it meant a vector of N k-dimensional arrays, when in fact it is a vector of k N-dimensional
> arrays. Once I fixed that, it all worked.
Just the kind of thing we were worried people would confuse.
We just didn't want to go all the way to the more verbose
notation:
matrix<rows=M,columns=N> a;
vector<columns=N> xi[k];
row_vector<rows=M> psi[j];
or
matrix<rows=M,columns=N> a;
vector<size=N> xi[k];
row_vector<size=N> psi[j];
> It might be useful for those messages to pass through the rstan package somehow.
Absolutely. We'll work on making sure the errors
propagate appropriately.
- Bob