### Navigation

- index
- modules |
- next |
- previous |
- statsmodels v0.2.0 documentation »
- Sandbox »

# scikits.statsmodels.sandbox.tools.tools_tsa.lagmat

`scikits.statsmodels.sandbox.tools.tools_tsa.``lagmat`(x, maxlag, trim='forward')

  create 2d array of lags

  Parameters: | x : array_like, 1d or 2d data; if 2d, observation in rows and variables in columns maxlag : int all lags from zero to maxlag are included trim : string ‘forward’ : trim invalid observations in front ‘backward’ : trim invalid initial observations ‘both’ : trim invalid observations on both sides ‘none’ : no trimming of observations
  Returns: | lagmat : 2d array array with lagged observations

  Notes

  TODO: * allow list of lags additional to maxlag * create varnames for columns

### Navigation

- index
- modules |
- next |
- previous |
- statsmodels v0.2.0 documentation »
- Sandbox »