[Traminer-users] Problems passing/using group command

Michael Corey michael.corey at gmail.com
Wed Sep 19 02:17:05 CEST 2012


Hi All,


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?

Thanks,

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120918/c3cc60c1/attachment.html>


More information about the Traminer-users mailing list