# How to model a stochastic trend in the response variable of a regression?

Each time an individual arrives at random, we register a response variable, many covariates and the day of arrival. The response variable is continuous and unbounded (Reals), there are both categorical and continuous covariables. The same individual may arrive more than once, but the response and some covariates vary. More than one individual may arrive on the same date. The arrivals aren't equally spaced and there are days without arrivals. There is an underlying stochastic trend in the response variable that can't be explained with my predictors. At least one predict have a stochastic trend as well.

Here is a quick plot of some sample data. For the sake of simplicity, only two predictors -one continuous and the other categorical- are shown. Although not show in the picture, the covariate is non-stationary as well.

I need to predict the response variable for the next individual, given that I know beforehand when he arrives and what their covariates are. Just to be clear: I don't need to predict when the next individual will arrive or how many will show. I know that a new individual will arrive next and I know their characteristics beforehand, I need to predict their response.

The model needs to consider the 'unobserved trend' as well as the effect of some covariates.

1. I can't pool the individuals and run a regression since this would overlook the trend. The effect of some covariates may change over time.
2. This isn't exactly a time series since more than one individual may arrive at given time. 34% of the days with arrivals register more than one individual.
3. This isn't exactly panel data since an individual may never come back again. 91% of the measurements correspond to an individual that showed between 2 as 12 times.

So, how to model a stochastic trend in the response variable of a regression?

First of all, I considered adding a fixed effect into a linear regression to capture unobserved time effects. Coding time periods (say, weeks) with dummies doesn't seem a very efficient solution in terms of estimation.

Second, I considered running regressions on a rolling window. The parameters would work as "estimates" for the trend and could be plugged in as a new covariable in a pooled model. Similarly, I could estimate the trend through smoothing. In both cases, this implies error in variables in the pooled model. I discarded this idea quickly as it feels more like a hack instead of a model.

Third, I could use time series models for non-stationary response and explanatory variables, but that would overlook the fact that a) observations aren't equally spaced and b) there might be more than one observation at a given time.

Gooling a bit further I found time-varying parameter models (TVP) under the dynamic linear models (DLM) framework. A time varying intercept may model the (additive) trend. See Zivot and Yollin 2012 on pages 37-44 for more information. At first sight, adding fixed effects to account for repeated individuals would be less burdensome than using time-effects.