Implementing DS(G,m) custom prior for STAN

Just code it up manually! Check chapter 23, “Custom Probability Functions” of the users manual (edit: this is the 2.17.0 manual – things are changing soon).

You’ll probably have to just code in all m Legendre polynomials that you want and that’ll be very manual, but it souldn’t be too bad.