# mslr {#mslr}

## Syntax {#syntax}

`mslr(Y, X, window, [minPeriods])`

Please see [mFunctions](../Themes/mFunctions.md) for the parameters and windowing logic.

## Details {#details}

Conduct the simple least-squares regressions of *Y* on *X* in a sliding window.

The result is a tuple of two vectors. The first vector is the intercepts and the second vector is the coefficient estimates of *X*.

## Examples {#examples}

```
Y=1 4 3 9 5 4
X=12 31 29 88 67 76
mslr(Y,X,4);
// output: ([,,,0.177052,0.712557,0.15],[,,,0.101824,0.084418,0.078462])
```

