Reputation: 41
could you please advise on restructuring the data so to get the data structure that can be used for time series modeling in SPSS Modeler?
E.g. (currently having the below structure)
ID Period Value
ABC 1 100
ABC 2 110
DEF 1 50
DEF 2 50
DEF 3 60
GHJ 5 200
(needed structure)
Period ABC DEF GHJ
1 100 50
2 110 50
3 60
5 200
I have been thinking to use Transpose node but it does not work for such a case, so I have used SetToFlag node and afterwards Transpose one but then need to replace somehow T / F values with the values for the respective period / ID.
I greatly appreciate any help / advice. Thanks a lot in advance.
Upvotes: 2
Views: 2847
Reputation: 141
I suggest following procedure with restructure+aggregate:
Note: 3rd row of your example should be:
GHJ 1 50
or else it doesn't correspond to desired structure.
Upvotes: 3