__Title__

**[TS] _sep_varsylags** -- Return the lag structure of varlist

__Syntax__

**_sep_varsylags** *varlist*

__Description__

**_sep_varsylags** parses out and saves off the lag structure of a varlist.

__Stored results__

**_sep_varsylags** stores the following in **r()**:

Macros
**r(vars)** contains the varlist of base variables. Base variables may
contain time-series operators. The lag structure for each base
variable is stored in **r(lags)**.

**r(lags)** contains a colon-separated list of the lags for each base
variable.

**r(newlist)** contains an equivalent version of the original varlist.
The **newlist** has the structure broken out for each base variable.

Matrices
**r(lagsm)** contains the lag structure of the base variables. For each
base variable, there is a row in **r(lagsm)**. There are **mlag**
columns in **r(lagsm)**, where **mlag** is the longest lag over all the
base variables. If element **i,j** in **r(lagsm)** is 0, then the
coefficient on lag **j** of the **i**th variable was not estimated. If
element **i,j** in **r(lagsm)** is 1, then the coefficient on lag **j** of
the **i**th variable was estimated.