# In longitudinal data, what can be gained from modelling "time" as a covariate?

Imagine some data set where subjects $1, ..., K$ had a response $Y$ measured repeatedly over a period of time (say, 2000-2015).

Now, in order to study effects like "does the month of the measurement matter?", or "is there a trend over the years?", or "does the day of the week matter?", we can of course use these variables (month, year, weekday) as covariates with fixed effects. For example, "month" and "weekday" could be a factor, and "year" could be a continuous covariate with some slope parameter to be estimated.

However, online, I have found many examples of people suggesting that we also include a time $t$ variable which measures the continuous change in time, i.e., "days passed since the start of the experiment".

My question is, why? What is the use of such a variable? If there are some time effects, then they are going to be captured by the aforementioned fixed effects, no?

So what would be the point of complicating things by introducing a "days"-variable, which presumably does not matter too much in the determination of the response variable $Y$, and which also is not going to be a "nice" covariate, in the sense that there are probably going to be many days which has no responses (e.g., entire months during the 15 year period where the experiment was on a break, usually during the summer period).

• A monotonically increasing series with equal steps as regressor = a linear trend. In this panel data setting perhaps you can include a dummy for each time step, otherwise this would be a very parsimonous way of modelling it if the data seems to exhibit a trend May 2, 2017 at 22:34
• Generally I keep the most granular time period you possibly can. It's easy to make estimates to high level time frames if your model includes a more granular time variable, but the converse is impossible without strong assumptions. May 2, 2017 at 22:41