I’m currently trying to fit a time varying coefficient linear regression model and exploring several alternatives including random walks and GPs.

I’ma a bit confused regarding the dimensionality in the case of GPs.

Assuming I have 2 covariates evaluated at T equally distanced time points, when parametrising the GPs should the dimensionality be declared as [n_covariates] (say 2), or [n_covariates], [timepoints] (that is 2 * T)? I’m probably getting confused by the fact that the GPs are just 2…

Thank you!

If you have two time varying covariates, I think you’ll need two GPs. You could feed both covariantes into one 2D GP though, but these are different models. So I think it just depends on what you’d like to capture exactly.

Thank you Bill for the reply. I’ll try and provide some background to my question.

I’m modelling the effects of a set of covariates on a response var.

There is substantial theoretical support for the following facts:

- at least some of the covariates have both short- and long-term effects on the response variable
- the effect of the covariates changes over time
- the long term effects accumulate on the “baseline level” of the response variable
- changes in the long term component (dynamic baseline) are expected to be smooth and over a long(ish) period

The response variable as well as all the other variables are measured on a weekly basis for about 4 years.

I’ve started with a basic linear regression to explore the data. Although I got some basic insights, because a linear regression results in a static baseline,it won’t allow for the disentanglement of the short term and the long term effects.

I have then specified a dynamic linear model with a time varying baseline and estimated the parameters through a kalman filter (cfr the set of equation below)

In the set of equations above, Xi are the covariates, Bi’s and Ci’s are assumed to capture the short term and the long term effects respectively. The autoregressive component captures a natural degradation in the baseline (i.e. 0<delta<1) .

The DLM provided a good amount of insights (please note that I used a frequentist approach so far), however, I feel the estimated time-varying intercept is *too* wiggly to faithfully represent a smooth long term component and the Bi’s and Ci’s are specified as being static.

I am now contemplating using a different approach to the DLM I’ve used so far.

Apart from using a full bayesian framework, I was thinking about specifying GPs to capture the time varying dynamics on the Bi’s (and from your reply I understand I need one GP for each Bi’s I want to model as time varying). I am still puzzled about the time varying intercept and its covariates (and the Ci’s) tho…

Any thought would be much appreciated!