Yes, looks like it was assuming the third parameter is lam instead of sigma. Changing that improves the result but still a bit different than stan. I am seeing some convergence issues. I tried upto 3000 warmup iterations and some different initializations. Still same thing. Any suggestions?
I checked that If i start with start={'b': -1.2}, then it converges.
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions. Multiprocess sampling (4 chains in 4 jobs)
NUTS: [b, w]
Sampling 4 chains for 1_000 tune and 2_000 draw iterations (4_000 + 8_000 draws total) took 30 seconds.
There were 977 divergences after tuning. Increase `target_accept` or reparameterize.
The acceptance probability does not match the target. It is 0.48232653725158614, but should be close to 0.8. Try to increase the number of tuning steps.
The acceptance probability does not match the target. It is 0.8824357326401848, but should be close to 0.8. Try to increase the number of tuning steps.
The rhat statistic is larger than 1.05 for some parameters. This indicates slight problems during sampling.
The estimated number of effective samples is smaller than 200 for some parameters.
mean sd hdi_3% hdi_97% mcse_mean mcse_sd ess_bulk ess_tail r_hat
w[0] 11.310 7.584 -3.291 26.709 0.299 0.212 599.0 1098.0 1.17
w[1] -17.178 6.528 -29.643 -4.340 0.510 0.362 136.0 1135.0 1.16
w[2] 5.728 6.095 -6.222 17.727 0.247 0.175 569.0 1042.0 1.18
w[3] 4.186 4.133 -2.835 12.340 0.541 0.384 62.0 1225.0 1.04
w[4] -1.028 3.401 -7.670 4.739 0.669 0.479 26.0 896.0 1.10
w[5] 25.289 6.999 11.551 38.553 0.373 0.264 357.0 879.0 1.14
w[6] 20.020 6.852 6.446 33.544 0.252 0.178 701.0 925.0 1.18
w[7] 4.631 2.951 -1.629 9.870 0.157 0.111 317.0 1258.0 1.08
w[8] -3.700 2.586 -8.616 1.778 0.082 0.074 888.0 1305.0 1.17
w[9] -0.751 1.833 -4.126 3.072 0.120 0.085 289.0 2021.0 1.11
b -0.181 8.509 -17.118 16.054 0.329 0.857 631.0 1140.0 1.14