Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


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. 

To create a shifted variable:

  1. Click Transform > Shifted variable in the menu.
  2. Enter a name for the new variable set.
  3. Enter Lower shift, negative integer value for backward index, default value: - 10.

    Lower shift

    Specifies the lower bound of the shift window. A lower shift of -1 would create an additional variable in the data set that has its rows shifted down one line 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

    Specifies the upper bound of the shift window. An upper shift of 1 would create an additional variable in the data set that has its rows shifted up one line 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

    Specifies the step size (number of rows) between the 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 10 (lower shift = 0 and upper shift =10), with a step of 2, results in five new variables (+2, +4, +6, +8, +10).

  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). 


  • No labels