Shifted Variables


For more information, see the online learning platform

For each selected variable, Shifted variables creates new variables shifted up or down a certain number of records within a defined window. The window is specified with a Lower and Upper shift and, a step. 

Shifted Variables can help account for time delays or buffers in production processes. For example, if raw materials enter the process several hours before our KPI is measured (like production, yield or quality), then Shifted Variables can help align data in time to analyse the influence of input raw materials on our KPI.

To create a shifted variable:

  1. Click Transform > Shifted variable in the menu.
  2. Enter a name for the new variable set. 

    Variable set

    Note that Shifted Variables creates a Variable set, containing several shifted new variables. Therefore, to check your shifted variables you can go to the third icon on the left bar.

  3. Enter Lower shift, negative integer value for backward index, default value: - 10.

    Lower shift

    It specifies the lower bound of the shift window. This may be a positive or negative integer. A lower shift of -1 would create an additional variable in the data set that has its rows shifted down one row compared to the original variable.

    For more information, see Lower shift

  4. Enter Upper shift, positive integer value for forward index, default value: 0. 

    Upper shift

    It specifies the upper bound of the shift window. This may be a positive or negative integer. An upper shift of 1 would create an additional variable in the data set that has its rows shifted up one row compared to the original variable.

    For more information, see Upper shift

  5. Enter Step, integer positive value, default: 1. For more information, see Step

    Step

    It specifies the step size (number of rows) between upper and lower shifts (step window). A step equivalent to the step window will result in only one new variable being calculated, whereas a step less than the step window will result in N new variables being created. For example, a step window of 5 (lower shift = -5 & upper shift =0), with a step = 1, results in 5 new variables (-1, -2, -3, -4, -5).

  6. Select Input variables or variable set. 
  7. Click Save.


In the example below, the variable chosen to be shifted is Meal_Feed_B. The lower shift chosen was - 10 which specifies the lower bound of the shift window. A lower shift of -10 would create an additional variable in the data set that has its rows shifted down ten lines compared to the original variable. The upper bond was specified as zero, therefore no upper bond additional variable will be created.  The step is defined as 10, which specifies the step size (number of rows of 10) between the upper and lower shifts (step window). As the  step is equivalent to the step window it will result in only one new variable being calculated (Meal_Feed_B -10). 



All rows of the new variable are shifted down 10 lines compared to the original variable. The previous records of the new variable Meal_Feed_B -10 , from 1 to 10, are empty (missing values).