The vector c
is usually called the vector of “cutpoints.” You might want to put a zero-avoiding prior on the differences to keep it from collapsing (having two identical entries). Something has to determine the scale between x * beta
and c
,and here you’re relying on a prior on beta
to do that.
The horseshoe can be difficult to fit. I’ve never coded horseshoe myself, but your definition matches the one that @avehtari seemed OK with in another post. The whole thing looks dicey because of the three-way multiplicative non-identiifiability (you can multiply all the tau
and divide the sigma
and get the same distribution for beta
). I’m actually surprised you can get anywhere with two standard half Cauchy multiplied like this.
The best thing to do in general to test models is to simulate data from them and see if you can recover the parameters. More formally, you can wrap this all up in simulation based calibration, but even an informal approach with one run can diagnose a lot of errors. And we usually recommend starting simple and building up. So maybe starting with a simple prior, then building up to horseshoe, but the whole code you have here isn’t too bad.