Hi,
I’m getting the following syntax error in this model. How can I fix it?
parameters{
vector[N_cover] a_k;
}
transformed parameters{
vector[N] mu=exp(a + a_site[site_id]...);
vector<lower=0>[N] k = a_k[cover_id];
vector[N] lambda= mu / tgamma(1 + 1 /k);
}
Error:
Warning in '/tmp/RtmpTJuL4P/model-178a2ada9744.stan', line 2, column 24: Declaration
of arrays by placing brackets after a type 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
Semantic error in '/tmp/RtmpTJuL4P/model-178a2ada9744.stan', line 110, column 36 to column 40:
-------------------------------------------------
108: vector<lower=0>[N] k = a_k[cover_id];
109:
110: vector[N] lambda= mu / tgamma(1 + 1 /k);
^
111:
112: }
-------------------------------------------------
Ill-typed arguments supplied to infix operator /. Available signatures:
(row_vector, matrix) => row_vector
(matrix, matrix) => matrix
(int, int) => int
(real, real) => real
(vector, real) => vector
(complex, complex) => complex
(row_vector, real) => row_vector
(matrix, real) => matrix
Instead supplied arguments of incompatible type: int, vector.
make: *** [make/program:50: /tmp/RtmpTJuL4P/model-178a2ada9744.hpp] Error 1
Error: An error occured during compilation! See the message above for more information.