Hi everyone,
I am trying to fit a quite complex model in Nimble, and when trying to improve the convergence of certain parameters I encountered a problem with the slice sampler.
The response is a multivariate (3 responses) constrained dataset (represents percentage of people using object A,B,C so should sum to < 1). I am modelling it by transforming into count data and using a beta-binomial distribution.
I have tried simplifying the model so that it contains only an intercept and a spline for GDP, but the problem persisted.
As a last resort, I am simulating response data using a known intercept, standard deviation (which is then used to simulate known spline coefficients), and concentration (to control the variability of the beta-binomial).
I am then fitting the model. The error message still comes up. Most parameters are retrieved correctly from the model. The first standard deviation (which penalizes the wigglines of the non-linear basis functions) always ends up converging at 0 though.
I have included the Rscript with the simulated code. Can anyone spot any mistakes or find a cause of the problems with the slice sampler? I have noticed that it fails when the current value is a point of maximum of the posterior density but can't really find a theoretical justification for that.
Many thanks,
Sara