linearTimeTrend#

swordfish.function.linearTimeTrend()#

Calculate the moving linear regression for X.

Parameters:
  • X (Constant) – A vector/matrix/table.

  • window (Constant) – A positive integer indicating the size of the sliding window.

Returns:

A tuple with 2 elements, alpha (the Linear regression intercept LINEARREG_INTERCEPT) and beta (the linear regression slope LINEARREG_SLOPE).

Return type:

Constant