[Traminer-users] Problems passing/using group command
hc at parisgeo.cnrs.fr
Wed Sep 19 08:33:33 CEST 2012
I think you don't have to merge your demographic data with your states/events data, it seems to me that it's the source of your problem. For my part, I always work with two objects: the state/event object (sts object) and a dataframe with individual's id and variables. Try to convert your spell data without the status variable (educ4), and to get your individual's data in a separate dataframe. Then you can try :
seqiplot(data.seq, group = individuals$group, ...)
Hope it helps.
----- Mail original -----
De: "Michael Corey" <michael.corey at gmail.com>
À: Traminer-users at lists.r-forge.r-project.org
Envoyé: Mercredi 19 Septembre 2012 02:17:05
Objet: [Traminer-users] Problems passing/using group command
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?
Traminer-users mailing list
Traminer-users at lists.r-forge.r-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Traminer-users