Dear Stan experts,
I followed the relevant manual chapter (p149 on Stan Reference 2.11) to reorganize my data to a database-like structure to handle missing responses.
The model works pretty well with the data when ignoring those missing trials (non-responses were automatically replaced by our experimental program, so those generated data were treated as if they were recorded in this case). This model ran pretty smoothly and it was able to reach convergence (r_hat in the worst case was <=1.05).
However, when I was taking those missing trials seriously, and reconstructed my data into the database-like structure, the model runs nearly 10 times slower and the chains do not converge, with neff <= 10, out of 1000 samples after warm-up per chain (4000 total valid samples).
The .stan models are nearly the same except that one is used for the whole dataset (when ignoring the missing data), and the other is used for the ragged dataset. There is another rescaling in the ragged dataset but this is mostly identical to the whole dataset.
My QUESTION is: since the only difference between this two models is the data organization/structure, should I conclude that the database-like reconstruction causes this problem? Or did I make some mistake? Note that for the whole dataset, every subject has 100 trials, while in the ragged data structure, the trial number varies between 71 and 100, mean = 92.2, SD = 6.9. Is the variance in the trial numbers a potential problem for Stan sampling?
I attached the two models for the whole dataset and the ragged dataset, respectively. I am estimating these models on a Linux server with RStan 2.8.2. and R3.2.0.
Any suggestion is appreciated!
Thanks a lot,
Lei