Divergent Transitions


#1

I want to remove the following warning.
There were 43 divergent transitions after warmup. Increasing adapt_delta above 0.9999 may help. See

I want to includ my Stan code, but my statistical model is very complicated and thus I cannot exhibit here. The above warning is always occur and its number of divergent transitions is very near to the number of iterations iter in the rstan::stan(). How to remove this warning ?

I think that in the model block, the descriptions for model is not unique since , e.g., by the additive property of Poisson distributions:

X \sim Poisson(\lambda) , Y \sim Poisson(\mu) \text{ implies } X+Y \sim Poisson(\lambda + \mu)

yields non-unique representations for my statistical model. I am not sure, but I think using such changing of representations are only methods to avoid the warnings. Or are there any other methods to eliminate this warning ? I am not sure.
My attempt is e.g., the following idea:

I have tried the following:
Suppose that if random variables X_1,X_2,... is distributed by Poisson(\sum_{i \geq 1} \lambda_i), Poisson(\sum_{i \geq 2} \lambda_i) where \lambda_1,\lambda_2,... are parameters of a model…

There are two representations in model block in stan file.

(1)
one way is the sequence such as:
X_1 \sim Poisson(\sum_{i \geq 1} \lambda_i)
X_2 \sim Poisson(\sum_{i \geq 2} \lambda_i)

(2) …
And the other way is a sequence
X_1-X_2\sim Poisson( \lambda_1)
X_2-X_3\sim Poisson( \lambda_2)

This change of expression cannot remove the above warning.
I am not sure these treatment is appropriate or its efficacy.

The follwoing web page says that

" If the divergent transitions cannot be eliminated by increasing the adapt_delta parameter, we have to find a different way to write the model that is logically equivalent but simplifies the geometry of the posterior distribution."

I am not sure, e.g., which writing way[(1) and (2) ] is more simpler. Or both is wrong ?


#2

I cannot delete this topic, so, I write how I solved divergent transitions.

My method does not depend centering. Merely exclude some parameters which are theoretically infinity.
If we include such parameters whose estimates are large, then almost all iterations become divergent transitions.

Please delete this .