mslr#
- swordfish.function.mslr()#
Conduct the simple least-squares regressions of Y on X in a sliding window.
- Parameters:
Y (Constant) – A vector indicating the dependent variable.
X (Constant) – A vector indicating the independent variable.
window (Constant) – An integer no smaller than 2 or a scalar of DURATION type indicating the size of the sliding window. Note: The window size is capped at 102400 when m-functions are used in the streaming engines.
minPeriods (Constant, optional) – A positive integer indicating the minimum number of observations in a window required to be not null (otherwise the result is NULL).
- Returns:
A tuple of two vectors. The first vector is the intercepts and the second vector is the coefficient estimates of X.
- Return type: