I am trying to analyze multiple sequences using TraMineR at once. I looked at seqdef, but I'm struggling to figure out how to create a TraMineR dataset when dealing with multiple variables. I think I'm working with something similar to the dataset used by Aassve et al. (as mentioned in the textbook ), as a result of which each wave has information about several conditions (for example, children, marriage, employment). All my variables are binary. Here is an example dataset with three waves (D, W2, W3) and three variables.
D<-data.frame(ID=c(1:4),A1=c(1,1,1,0),B1=c(0,1,0,1),C1=c(0,0,0,1)) W2<-data.frame(A2=c(0,1,1,0),B2=c(1,1,0,1),C2=c(0,1,0,1)) W3<-data.frame(A3=c(0,1,1,0),B3=c(1,1,0,1),C3=c(0,1,0,1)) L<-data.frame(D,W2,W3)
I may be wrong, but the material that I found concerns only data management and analysis of one variable at a time (for example, employment status on several waves). My dataset is much larger than the one above, so I can’t actually impose this manually, as shown on page 48 of the tutorial. Has anyone dealt with this data type using TraMineR (or a similar package)?
1) How will you transfer the data above to TraMineR?
2) How would you calculate substitution costs and then group them?
Thank you very much