linearTimeTrend#

swordfish.function.linearTimeTrend()#

Calculate the moving linear regression for X.

参数:
  • X (Constant) -- A vector/matrix/table.

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

返回:

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

返回类型:

Constant