# Rolling Regression with Time Blocks

**URL:** <https://discourse.pymc.io/t/rolling-regression-with-time-blocks/1117>\
**Category:** Questions\
**Created:** [April 22, 2018, 4:06pm UTC](https://discourse.pymc.io/t/rolling-regression-with-time-blocks/1117 "2018-04-22T16:06:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmrobert](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@nmrobert](https://discourse.pymc.io/u/nmrobert)\
**Post date:** [April 22, 2018, 4:06pm UTC](https://discourse.pymc.io/t/rolling-regression-with-time-blocks/1117/1 "2018-04-22T16:06:20Z")

</div>

Hi,  
I’m looking at this example of rolling regression in the Pymc3 documentation here: [https://docs.pymc.io/notebooks/GLM-rolling-regression.html](https://docs.pymc.io/notebooks/GLM-rolling-regression.html), and I’m wondering if there’s an easy way to modify this such that the parameters which are undergoing the random walk (alpha & beta) can be made to repeat themselves a certain number of times before allowing to take a walk ‘step’.

For example, instead of each timestep having it’s own unique walk-step of alpha & beta (in this example, corresponding to a day), could it be modified so that the time steps are at a rougher granularity, perhaps if you expected the time-dependent relationship to change more slowly?

---

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [April 22, 2018, 6:24pm UTC](https://discourse.pymc.io/t/rolling-regression-with-time-blocks/1117/2 "2018-04-22T18:24:39Z")

</div>

One idea is to model the alpha and beta as some gaussian process with a Periodic covariance matrix, or put some smoothing team on the random walk (which would be roughly equal to a gaussian process).
