Trace plot and mcmc diagnostics

Hello,

I have a question about the diagnostics about the MCMC result.

The traceplot is as following, it did come with some strange straight line. I am not sure why it happened?

traceplot

And the stan analysis is as following:

Inference for Stan model: tweedie.
12 chains, each with iter=9000; warmup=4500; thin=2; 
post-warmup draws per chain=2250, total post-warmup draws=27000.

          mean se_mean   sd  2.5%   25%   50%   75%
alpha[1] -1.23    0.56 1.69 -4.14 -2.52 -1.46  0.92
alpha[2] -1.71    0.75 2.16 -5.28 -3.32 -2.17  1.30
alpha[3] -1.51    0.22 1.10 -3.81 -2.25 -1.60 -0.76
         97.5% n_eff Rhat
alpha[1]  1.49     9 1.73
alpha[2]  1.56     8 1.91
alpha[3]  0.22    25 1.16

Samples were drawn using NUTS(diag_e) at Mon Dec 24 18:16:28 2018.
For each parameter, n_eff is a crude measure of effective sample size,
and Rhat is the potential scale reduction factor on split chains (at 
convergence, Rhat=1).

Thank you very much for your help. Merry Christmas.

What happened there is that some chains got stuck in a region of parameter space and mixed poorly. If you plot those “straight lines” on their own, they might not be exactly straight, just display much smaller variance. You might want to do more diagnostics, as exemplified here.

Thank you very much for your help, Luiz. What is the main reason for the stuck? It is my first to observe this situation. Should I reconsider my modeling? Or anything else I need to do? This model works well for the simulation study. But when it comes to the real data, this issue happens.

Probably, yes, cf. the folk theorem. Things you can do involve: reconsidering your priors (do they offer enough regularisation?) and considering a reparametrisation.
Before you delve into that, however, I’d strongly advise you to look at the diagnostics I pointed to above and see if they give you a hint about what’s going wrong.

Thank you very much for your help, Luiz. Last night I updated my model and resubmitted it. I am now waiting for the result. If thing goes bad again, I will carefully check the diagnostics. I will keep you update.