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

Jeremy Reynolds jeremyr at uga.edu
Fri May 1 01:58:49 CEST 2015

```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.

Thanks,

Jeremy

data(biofam)

## 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/20150430/f60e3719/attachment.html>
```