I have data that describe the number of days that a car should be tested before using it. There are different predictors which measure the complexity of the car (more complexity, more days will be need).

The main goal of my multiple regression model is to predict the number of days for new data.

I used a robust regression model but I think there is one thing I forgot to consider here:

The data are sampled over the last 3 years. I guess that there could be a time trend in terms of efficiency (ususally every year one tries to reduce the costs of testing and a car with same complexity would get in 2015 only 90 percent of test days as in 2014).

How can I capture the time trend?

  • $\begingroup$ Was my answer helpful? I see you have neither commented nor accepted it. $\endgroup$ Apr 13, 2021 at 6:44

1 Answer 1


You could simply consider including a time variable indicating the year of the observation (either 1, 2 or 3). That would give you a linear time trend. If the efficiency is increasing, the associated regression coefficient should be negative: the further into the future, the fewer days used for testing. Since you only have three years, going beyond linearity would be risky and likely prone to overfitting. However, if you assume the testing time to decrease exponentially (such as 10% every year), linear trend would not be what you need. Still, I am not sure how to obtain a good estimate of an exponential trend given only three years of data.

If you have a finer-than-yearly time scale, you would use the same idea. Regarding nonlinearity, technically you would now be less prone to overfitting if you tried estimating a nonlinear time trend -- but in practical terms this is still a concern; I doubt the progress is fast enough to be measurable as a nonlinear function of time, given a data set spanning only three years.

  • $\begingroup$ when you say time variable is it something like 1,2,3...n or should it be yearly or monthly flags ? if you were telling about monthly or yearly flags, it captures seasonality not trend ? correct me if misunderstood. Thanks $\endgroup$ Jun 18, 2020 at 9:34
  • 1
    $\begingroup$ @yogeshagrawal, my answer assumes the data only includes a year variable but nothing on a finer scale. Then one thing you can do is add a linear yearly trend as I proposed. If the data is, say, a daily time series, a linear trend would correspond to the number of the day starting from day 1. In either case, this would not capture seasonality. If you want to capture seasonality, you need seasonal dummies, Fourier terms or something like that. But I wonder if there should be any seasonality in car testing. If a typical test period is on the order of 2 years, I doubt there will be seasonality. $\endgroup$ Jun 18, 2020 at 9:48
  • $\begingroup$ Thanks @Richard Hardy for your answer. appreciate $\endgroup$ Jun 18, 2020 at 17:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.