[Traminer-users] multi-channel sequence analysis with aggregated sequences

Matthias Studer Matthias.Studer at unige.ch
Fri May 1 08:26:17 CEST 2015

Dear Jeremy,

The problem is that you will need to identify unique sequences as the combination of your channels. You cannot look for unique sequences separately for each channels (otherwise we do not know how to matches the different sequences for a given individual). Unfortunately, there is no easy way to do that. Moreover, it is highly likely that you don’t have many replicates once you combine the sequences.


De : traminer-users-bounces at lists.r-forge.r-project.org [mailto:traminer-users-bounces at lists.r-forge.r-project.org] De la part de Jeremy Reynolds
Envoyé : vendredi 1 mai 2015 01:59
À : traminer-users at lists.r-forge.r-project.org
Objet : [Traminer-users] multi-channel sequence analysis with aggregated sequences

Dear TraMineR Users,
I would like to perform a multi-channel sequence analysis with cases that are aggregated using the WeightedCluster procedure.  It appears that I have too many cases to perform the analysis without aggregation.

I get stuck, however, when calculating the distance matrix.  R issues the warning, " [!] sequence objects have different numbers of rows".
Does anyone know a way to solve this problem?  I have pasted some example code below.


## Building one channel per type of event left, children or married
bf <- as.matrix(biofam[, 10:25])
children <-  bf==4 | bf==5 | bf==6
children <- children*1
married <- bf == 2 | bf== 3 | bf==6
married <- married*1

#build aggregated sequence objects for children and married
aggchildren <- wcAggregateCases(children[,1:16]) # identify identical cases
aggchildren.seq <- seqdef(children[aggchildren$aggIndex, 1:16], weights = aggchildren$aggWeights)

aggmarried <- wcAggregateCases(married[,1:16]) # identify identical cases
aggmarried.seq <- seqdef(married[aggmarried$aggIndex, 1:16], weights = aggmarried$aggWeights)

## calculate multichannel distance matrix with aggregated sequences
mcdist <- seqdistmc(channels=list(aggchildren.seq, aggmarried.seq), method="OM", sm =list("TRATE", "TRATE"))

Dr. Jeremy Reynolds
Associate Professor
Department of Sociology
116 Baldwin Hall
University of Georgia
Athens, GA 30602-1611
Phone: (706) 583-8072
Web: http://uga.edu/soc/people/faculty/reynolds_jeremy.php
Fax: (706) 542-4320
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20150501/f6f338f3/attachment.html>

More information about the Traminer-users mailing list