I added a ICAR component to logistic regression type model

(https://mc-stan.org/users/documentation/case-studies/icar_stan.html). However, all the transitions are divergent. Do you have any idea how to solve this problem?

```
functions{
real icar_normal_lpdf( vector phi, int N, int[] node1, int[] node2){
return -0.5 * dot_self(phi[node1] - phi[node2]) + normal_lpdf( sum(phi) | 0, 0.001 * N);
}
}
data{
int<lower=1> N;
int SUC[N];
int TRIAL[N];
int AGE1[N];
int AGE2[N];
int AGE3[N];
int AGE4[N];
int AGE5[N];
int AGE6[N];
int AGE7[N];
int AGE8[N];
int AGE9[N];
int AGE10[N];
int AGE11[N];
int AGE12[N];
int AGE13[N];
int AGE14[N];
int AGE15[N];
int AGE16[N];
int AGE17[N];
int AGE18[N];
int AGE19[N];
int AGE20[N];
int AGE21[N];
int AGE22[N];
int AGE23[N];
int AGE24[N];
int AGE25[N];
int AGE26[N];
int AGE27[N];
int AGE28[N];
int AGE29[N];
int AGE30[N];
int AGE31[N];
int AGE32[N];
int AGE33[N];
int AGE34[N];
int MALE[N];
int COMM_TYPE_F[N];
int<lower=0> N_age;
int<lower=0> N_edges;
int<lower=1, upper=N_age> node1[N_edges]; // node1[i] adjacent to node2[i]
int<lower=1, upper=N_age> node2[N_edges]; // and node1[i] < node2[i]
}
parameters{
real a;
real male;
vector[N_age] phi; // age coefficients
real fishing;
real<lower=0> dispersion;
real sigma;
}
transformed parameters{
vector[N] p_ni;
for ( i in 1:N ) {
p_ni[i] = inv_logit(a + male * MALE[i] + sigma * phi[1] * AGE1[i] + sigma * phi[2] * AGE2[i] + sigma * phi[3] * AGE3[i] + sigma * phi[4] * AGE4[i] +
sigma * phi[5] * AGE5[i] + sigma * phi[6] * AGE6[i] + sigma * phi[7] * AGE7[i] + sigma * phi[8] * AGE8[i] + sigma * phi[9] * AGE9[i] + sigma * phi[10] * AGE10[i] +
sigma * phi[11] * AGE11[i] + sigma * phi[12] * AGE12[i] + sigma * phi[13] * AGE13[i] + sigma * phi[14] * AGE14[i] + sigma * phi[15] * AGE15[i] + sigma * phi[16] * AGE16[i] +
sigma * phi[17] * AGE17[i] + sigma * phi[18] * AGE18[i] + sigma * phi[19] * AGE19[i] + sigma * phi[20] * AGE20[i] + sigma * phi[21] * AGE21[i] + sigma * phi[22] * AGE22[i] +
sigma * phi[23] * AGE23[i] + sigma * phi[24] * AGE24[i] + sigma * phi[25] * AGE25[i] + sigma * phi[26] * AGE26[i] + sigma * phi[27] * AGE27[i] + sigma * phi[28] * AGE28[i] +
sigma * phi[29] * AGE29[i] + sigma * phi[30] * AGE30[i] + sigma * phi[31] * AGE31[i] + sigma * phi[32] * AGE32[i] + sigma * phi[33] * AGE33[i] + sigma * phi[34] * AGE34[i] +
fishing * COMM_TYPE_F[i] );
}
}
model{
SUC ~ beta_binomial( TRIAL , p_ni*dispersion , (1-p_ni)*dispersion );
dispersion ~ exponential( 1 );
fishing ~ normal( 0 , 10 );
phi ~ icar_normal_lpdf(N_age,node1, node2);
sigma ~ cauchy(0, 1);
male ~ normal( 0 , 10 );
a ~ normal( 0 , 100 );
}
generated quantities{
int SUC_predict[N];
real log_lik[N];
for(i in 1:N){
SUC_predict[i] = beta_binomial_rng(TRIAL[i], p_ni[i] * dispersion,
(1-p_ni[i])*dispersion );
log_lik[i] = beta_binomial_lpmf(SUC[i] | TRIAL[i], p_ni[i] * dispersion,
(1-p_ni[i])*dispersion );
}
}
```