Coding a translated / 3-parameter Weibull

It would be better to have constraint set so that you can make a parameter transformation without the constraint. Your current approach causes sharp boundary, which is difficult for HMC. Could you tell more about your data and the data analysis problem, because I don’t understand in which kind of case you would assume different lower boundary of the distribution for different y.

You could also check the draft case study Case study: Extreme value analysis and user defined probability functions in Stan for how to implement the distribution as user defined function, which would make it easier to test that distribution and make the model code prettier.

1 Like