Can an ordinary least squares regression be used with time-series data?

1 Answer
Mar 3, 2016

Yes.

Explanation:

Least-squares regression is as applicable to time-series data as it is to data which is dependent on any other variable. One can use least-squares to find a best fit of a function of time to data gathered in a time series.

For example, imagine a pendulum swinging back a forth, and a measurement apparatus which gathers data on the position of the pendulum. This data has a time, #t#, and a position, #x#.

enter image source here

We can use a least-squares approach to determine the coefficients of a fit function, in this case we may be using the following function:

#x(t) = c_1*sin(c_2x-c_3)#

Where we adjust the coefficients #c_1, c_2,# and #c_3# to minimize the sum of squares of the error between the points and the function evaluated at those time values.