Dear Stan users,

I intend to use a prior distribution for some parameter theta that is continuous and piecewise-linear over a certain number of regions. Suppose that the prior is linear overt three regions for the sake of simplicity (see figure attached).

Since that prior distribution is non-differentiable, I thought I would split my prior into three prior distributions, one for each region where the prior is (locally) differentiable; let label the three regions R1, R2 and R3. I could then run a Stan algorithm where the prior is that over region R_i, i=1,2,3 and get a MCMC sample from the posterior distrn of theta over region R_i. It seems reasonable to argue that each output would give me a sample of values from the posterior over each corresponding region R_i; if that is right, I could then (somehow) sample values from each of the three posterior samples to get a sample from the (overall) posterior distribution of my original problem.

Does it seem to make sense? If so, I would I compute my resampling weights to get my final posterior sample?

Thanks in advance for any thoughts and guidance,

Patrick