I am trying to update my code to address this error:
Warning in '/tmp/RtmpH9sgz3/model-3b673bc8c67.stan', line 38, column 2: Declaration
of arrays by placing brackets after a variable name is deprecated and
will be removed in Stan 2.32.0. Instead use the array keyword before the
type. This can be changed automatically using the auto-format flag to
stanc
and found the documentation page: 13.10 Brackets array syntax | Stan Reference Manual (mc-stan.org), but I am still confused. Specifically, I do not understand the double declaration of dimensions such as
matrix[7, 2] mu[15, 12];
becoming
array[15, 12] matrix[7, 2] mu;
Why are there two dimensions? [15,12]
and [7,2]
? And why don’t they match?
For example, how do I change
matrix[total_observations, m_delta] v_p;
to avoid this errors?