Hi everyone - I’m hoping to estimate a fused lasso using STAN as an alternative to `genlasso`

. My covariates consist of time spent at each degree of temperature, so that variables are in a sense ordered. Fused Lasso (pdf link to summary) imposes a penalty on parameter differences, so that estimates of coefficients are of the form

\hat{\beta} = \mbox{arg} \min \limits_{\beta} \frac{1}{2} \sum \limits_{i=1}^k (y_i - \beta_i)^2 + \lambda \sum \limits_{i=1}^{k-1} | \beta_{i+1} - \beta_i |

It seems like a (finnish) horseshoe prior works to regularize coefficients in a method somewhat analogous to a frequentist lasso (relevant blog post by Michael Betancourt), but is there an approach that captures the penalty on differences between ordered coefficients?

We can rewrite the Fused Lasso as

\hat{\beta} = \mbox{arg} \min \limits_{\beta} \frac{1}{2} || y - \beta ||_2^2 + \lambda || D \beta ||_1

where D is a (k-1) X k matrix of first differences.

Are there any suggestions on how best to approach this kind of problem? The ultimate goal is to find the “thresholds” at which the effect of time at temperatures above the threshold affect the outcomes differently in the same way we might from a spline regression.

Edit: I also found this post on these forums based on the same Betancourt article linked above that I will try to work with tomorrow.

Thanks!