<div dir="ltr"><div><div><div><div>Dear TraMineR Users,<br><br></div>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. <br><br>I get stuck, however, when calculating the distance matrix. R issues the warning, "<span class="" style="color:rgb(197,6,11)"> [!] sequence objects have different numbers of rows</span><span class="" style="border-collapse:separate;color:rgb(0,0,0);font-family:"Lucida Console";font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:15px;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing:0px;background-color:rgb(225,226,229)"></span>".<br><br></div>Does anyone know a way to solve this problem? I have pasted some example code below.<br><br></div>Thanks,<br><br></div>Jeremy<br><div><div><div><div><div><div><div><br><br>data(biofam)<br><br>## Building one channel per type of event left, children or married<br>bf <- as.matrix(biofam[, 10:25])<br>head(bf)<br>children <- bf==4 | bf==5 | bf==6<br>children <- children*1<br>married <- bf == 2 | bf== 3 | bf==6<br>married <- married*1<br><br>#build aggregated sequence objects for children and married<br>aggchildren <- wcAggregateCases(children[,1:16]) # identify identical cases<br>aggchildren.seq <- seqdef(children[aggchildren$aggIndex, 1:16], weights = aggchildren$aggWeights)<br><br>aggmarried <- wcAggregateCases(married[,1:16]) # identify identical cases<br>aggmarried.seq <- seqdef(married[aggmarried$aggIndex, 1:16], weights = aggmarried$aggWeights)<br><br>## calculate multichannel distance matrix with aggregated sequences<br>mcdist <- seqdistmc(channels=list(aggchildren.seq, aggmarried.seq), method="OM", sm =list("TRATE", "TRATE")) <br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">********************<br>Dr. Jeremy Reynolds<br>Associate Professor<br>Department of Sociology<br>116 Baldwin Hall<br>University of Georgia<br>Athens, GA 30602-1611<br>Phone: (706) 583-8072<br>Web: <a href="http://uga.edu/soc/people/faculty/reynolds_jeremy.php" target="_blank">http://uga.edu/soc/people/faculty/reynolds_jeremy.php</a><br>Fax: (706) 542-4320</div></div>
</div></div></div></div></div></div></div></div>