Several Lag

I want to have "Lag" for several columns, and Lagged Columns should be input for "Partitioning" node, How it is possible? my workflow is attached....

 

Hi Jacob,

many "multiple lag"-type problems can be better solved with other nodes instead. But I can't give you general advice, as the possibilities are many.

If you can't find a more suitable way, you can use a loop of Lag Columns. If you want the same type and count of "lag" per column, a Column List Loop Start combined with a Loop End (Column Append) should suffice. If you only want several "lags" of a single column you can use the Lag Column node directly for simple cases, or split off this column, feed it into a Counting Loop Start with the same end, and recombine. For more complex cases, either combine/adapt the approaches, or use a recursive loop instead.

hi Marlin,

I have a time series data with columns of consumption of different appliance (eg, TV, Electric kettle, washing machine, and so on ) I would like to lag each of the columns by 3 steps.

I am expecting somthing like this

time | TV | TV(-1) | TV(-2) | TV(-3) | Kettle | Kettle(-1) | Kettle(-2) | Kettle(-3) | Washing Mach| Washing Mach(-1)| and so on.

i am getting somewhere from your above answer, but not like how i expected.

Can you to elaborate your answer or suggest a simple looped solution for this ?

Thank you,