The error is : Error in mod$fit_ptr() :
Exception: mismatch in number dimensions declared and found in context; processing stage=data initialization; variable name=N; dims declared=(); dims found=(1) (in ‘model465060f286c_model’ at line 4)
failed to create the sampler; sampling not done
stan_data = list(N=N,…, )
Regarding convergence, that’s a big topic! If you search online for “Stan convergence diagnostics” or something similar you’ll find a lot of materials and here’s a video from Stan youtube that discusses that briefly:
If you have specific questions about convergence feel free to open new topics here on the forum.