I am modeling time-series data with a hierarchical model. The model fits a piecewise function to each time-series (400 total) and finds parent parameters of those functions. The result looks good when I use a Normal likelihood, but sampling a posterior distribution returns a lot of negative values.
My data is strictly positive, so ideally, I would like my posterior distribution to be all positive as well. My attempts to switch to Exponential, Gamma or Lognormal likelihoods produce poor fit on individual time-series and cause the hierarchical model to quit on Bad Initial Energy. Using zero TruncatedNormal seems to work on individual time-series (at least the few I tried it on) but produces a poor fit in the hierarchical model.
A lot of my data is close to zero (the truncation point), and I have a lot of missing values in my time-series as well. Are the truncated distributions inherently hard to fit because they introduce discontinuity into numerical optimization? Any advice is most welcome.