# Zero-one-inflated beta regression time series model in stan

Hi,

Did anybody had a chance to implement in stan zero-one-inflated beta regression time series model? While I found separate implementations in stan of zero-one-inflated beta regression (markhw) and time series, I have hard time to understand how to combine both. The paper “Beta autoregressive moving average models” combines beta regression with time series (https://link.springer.com/article/10.1007/s11749-008-0112-z) but doesn’t discuss 0-1-inflated beta regression. I appreciate any suggestions.

I guess the big thing you gotta decide is which parameters you want to depend on time.

With respect to this zero inflated beta thread: Zero one inflated beta regression in STAN, I guess you could make either \alpha (the mixing distribution) or \gamma (the bernoulli probability) depend on time.

At that point you can pick a time series model for that parameter and rock and roll maybe? If the underlying time series is written in terms of normals, then maybe you gotta add a link function in there like:

\gamma_t = \text{inv_logit}(\mu_t)

if \mu_t is your time series model.

1 Like

Awesome. Thank you very much.

Do you mind if I ask a follow up question? My data set contains time series of 5 years for 200 individuals (one data point for each year). Should I consider them as repeated measurements?

One more. If I define mu_t as in https://link-springer-com.ezproxy.lib.purdue.edu/article/10.1007/s11749-008-0112-z

then mu_t is not defined for AR term since link g(y_{t-i}) is inf if g is logit. What mu_t you have in mind?

Suppose I pick up bernoulli probability gamma to depend on time and gamma_t=inv_logit(mu_t). I am struggling to understand what should be mu_t. Is it x_t*b where x_t is covariate and b is coefficient? Or something more elaborate?

I was just making something up, honestly :D.

The assumption was that \mu_t represents some sort of underlying time series process (maybe a Gaussian process, maybe a random walk), and that it lived on an unconstrained space. If you wanted that to determine a probability parameter then you’d have to throw a link function in there.

So that time series could include regression terms and such depending on what type of time series it was. That make sense?

Yes, it does. Something like \mu_t=x_t^T\beta+...?
What I am missing is how to cast random walk y_t=y_{t−1}+\epsilon_t or AR y_t=ϕy_{t−1}+\epsilon_t into this. Perhaps y_t=x_t^T\beta+ϕ(y_{t−1}-x_{t-1}^T\beta)+\epsilon_t? In this case \mu_t=x_t^T\beta? Or something else? Bit confused…

Good question. I’m not sure. Maybe something like:

\theta_t \sim N(\theta_{t - 1}, \sigma)\\ \mu_t = x_t^T \beta + \theta_t

So you have a bit driven by measured covariates and then some unexplained time series term. But this probably warrants and poke around the forums for specific time series models.