1
$\begingroup$

I'd like to model $$y_t = X \beta_t + \epsilon$$ where the predictors are powers of a single variable $x$ (this should be polynomial regression), and I have data for multiple time points $t$. I know that the polynomial fit should vary "smoothly" through time. I'm trying to model something natural where no abrupt, discrete changes would be observed.

Even though time is clearly discretised, and I am not seeking to interpolate between time points, I mean that the change over time should be gradual: if we look at the polynomial fit at times $t_i$ and $t_j$, the fit at a time $t_{i \lt k \lt j}$ should be between the other two.

An example is shown below. The fits vary gradually over time as their colour too, depicting time, varies gradually. Here I made the coefficients vary by an amount $\approx \Delta t$ for illustrative purposes. In general it could vary more freely.

Multiple fits varying over time (shown as different shades)

Responses could be grouped into an $N \times T$ matrix, the coefficients too, turning this into multivariate regression. But how would I ensure that the coefficients vary "smoothly" through time?

I would hope that relating the coefficients to each other could also help share information and make the model more robust to noise.

I imagine this is done all the time, but I can't seem to find something fitting. (Not knowing the name of this type of analysis does not help.)

$\endgroup$
7
  • $\begingroup$ A nice but non-trivial problem. May I ask you what kind of data are you applying it to? $\endgroup$
    – utobi
    Aug 9, 2023 at 15:12
  • $\begingroup$ Because the values of $t$ are always going to be finite, and thereby form a discrete subset of times, there is no meaningful general sense of "varying smoothly." As a practical matter you can compute $\beta_t$ separately for each $t$ and interpolate them as smoothly as you want. Please, then, elaborate on what you mean by smooth variation. One way, for instance, would be to formulate (quantitatively!) a tradeoff between the quality of the individual regressions and the integrated degree of smoothness of the interpolator -- which sounds exactly like a GAM or multivariate spline. $\endgroup$
    – whuber
    Aug 9, 2023 at 15:13
  • $\begingroup$ @utobi Biological data. It could be the change of some phenotype such as gene expression after a stimulus. $\endgroup$
    – fm361
    Aug 9, 2023 at 19:09
  • $\begingroup$ @whuber You're right, my use of "smoothly" is an abuse of terminology, I will try to clarify in the main question. $\endgroup$
    – fm361
    Aug 9, 2023 at 19:10
  • 1
    $\begingroup$ One common way of doing something like this is to use a state space model where the states are the $\beta_t$ and are modelled by a random walk (or a twice-integrated random walk). It's not going to be "smooth" in the sense that others have interpreted the question, but it will allow you to correlate coefficient estimates across time and share information between nearby time periods in a principled way. $\endgroup$
    – Chris Haug
    Aug 9, 2023 at 21:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.