I'm having a problem using the group function in TraMineR. I have a data set that contains SPELL data, so multiple rows per case. I also have demographic data per case, at one row per case. I merge these together and end up with data that has a demographic covariate per row, so multiple rows per case. An example of this data would be:
id startmin stopmin activity educ4
4 1 20 work HS
4 20 40 play HS
8 1 15 sleep College
8 15 40 work College
I can make sequence data from this, but when I try to run a plot using the group command
seqiplot(atus.seq, group = atus.seqdata$educ4, border=NA,
withlegend="right", cex.plot=.55)
it tells me:
>"Error: group must contain one value for each row in the sequence object".
I have gotten this to work with the example of the mvad data in the training manual, but I can't seem to get it to work with the groups, whether I link to the original demographic data, the merged data, or try to pass the covariates by seqformat and seqdef. Ideas?