Probit stick-breaking prior in stan

I am trying to model a covariate-dependent stick-breaking prior, specifically, a probit stick-breaking prior. I wanted to ask if it is possible to do in stan. I could not find many resources to refer to in this regard. I would be grateful if you could share with me any resource which helps me code it in stan. Also, if it is not possible to do in stan, kindly suggest any alternatives. Thank you.

I never tried. Cannot look into the actual implementation details, but in case you couldn’t find help yet, here’s a paper with the title Nonparametric Bayesian models through probit stick-breaking processes, maybe that helps?

Also, if you need random draws to implemented the stick-breaking process you cannot do it in Stan, as I said, I never went through it, and don’t know if it’s required.

I think here that you’ll want to declare the latent Gaussians as parameters, then do the deterministic mapping through the probits to the stick breaking weights.

Here’s how ChatGPT would approach it. I’ve given this a glance over but not tested it.