'trend' predictor in time-series modelling

Dear everyone,

I have a small question regarding the role of 'trend' predictor in tslm() function. As explained in Hyndman and Athanasopoulos (2020): "A linear trend can be modelled by simply using x1,t = t as a predictor," where t is the time unit of the time-series.
1

However, when I try to use trend in time to predict performance in the dataset 'mens400', using trend as a predictor provides a suspicious result:

b2 <- tslm(mens400 ~ trend, data = mens400)

b2$coefficients[2]
trend
-0.2582954

Using time(mens400) makes the result seem more reasonable:

b2.time$coefficients[2]
time(mens400)
-0.06457385

From the authors' explanation, I expected the trend predictor to perform exactly as the time() function but it actually not. Can someone explain what is happening here?
Thank you,
Thai.

The trend term in tslm() will create a predictor equal to (1,2,3,...). But time(mens400) will create a predictor equal to (1896,1900,1904,...) because the Olympics are held every four years. So the coefficient of time(mens400) will be 1/4 of the coefficient of trend. Note that -0.2582954/4 = -0.06457385.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

thank you so much! It makes sense now