I have a 1 column, 2000 row dataframe. Each row contains a customer event sequence that concludes with a purchase of item X. The dataframe looks as follows:
call.agent -> schedule.appointment -> withdraw cash -> buy X enter branch -> call.agent -> enter branch -> enter branch -> buy X
There are up to 500 events in 1 sequence, and events like entering a branch or calling an agent can repeat in the sequence.
What type of analysis / package in R can I use to determine what patterns, event sequences or groups of events are most likely to lead to the purchase of X? The matrix is very sparse, so this is much more of an unsupervised learning problem.
I want to understand what combinations / sequences or itemsets appear most frequently -- leading to open account. What algorithm or R package can I use? Is this association rules? It is a little different since they all lead to open account and I don't want to know what drives any of the items prior to it.
I was thinking arules but they frequently do not allow for repeating items in a basket. I am also looking into the TramineR package...