Creating Code writing algorithms for producing n-lagged variables
Matt Bates · 2014
As a predictive modeler with time-series data there is a continuous search for new and “better” techniques to produce more precise forecasts. One of these techniques is to include lagged values as predictors in a model which leads to a technical coding question. How does one produce an n-number (large number of) of lagged variables without having to type every single lagged instance?