{smcl} {* 25march2006}{...} {cmd:help sqclusterdat}{right:(SJ6-4: st0111)} {hline} {title:Title} {p2colset 5 21 23 2}{...} {p2col :{hi:sqclusterdat} {hline 2}}Connect sequence data to cluster analysis of sequence dissimilarity matrix{p_end} {p2colreset}{...} {title:Syntax} {p 8 17 2} {cmd:sqclusterdat} [{cmd:, return} {cmd:keep(}{varlist}{cmd:)}] {title:Description} {pstd}If the command {helpb sqom} was performed with option {cmd:full}, further analysis of the resulting dissimilarity matrix becomes indispensable. Cluster analysis is the most common technique for this step. Unfortunately, sequence data and the resulting dissimilarity matrices have different dimensions, so that the cluster variables cannot easily be attached to the sequence data on a row-by-row basis. {cmd:sqclusterdat} allows linking the results of user-specified cluster commands to the original sequence data. {pstd}Without {cmd:return}, the command constructs a dataset that is built from instructions left over from the last {cmd:sqom} command. The user may then specify arbitrary {helpb clustermat} commands, as well as applicable {help cluster:postclustering commands} in this dataset. After performing the cluster analysis, {cmd:sqclusterdat, return} brings the cluster results back into the original sequence data. {pstd} The option {cmd:keep(}{varlist}{cmd:)} is usable for {cmd:clusterdat, return} only. It is used to specify a list of hand-made variables that should be merged to the original dataset as well. This is especially useful for variables created with {helpb cluster generate}. {pstd}The convenience command {helpb sqclustermat} allows performing the three steps with one single command. Cluster postestimation commands do not work in this case, however. {title:Author} {pstd}Ulrich Kohler, WZB, kohler@wz-berlin.de{p_end} {title:Examples} {phang}{cmd:. sqom, full k(2)}{p_end} {phang}{cmd:. sqclusterdat}{p_end} {phang}{cmd:. clustermat singlelinkage SQdist, add name(mydist1)}{p_end} {phang}{cmd:. clustermat singlelinkage SQdist, add name(mydist2)}{p_end} {phang}{cmd:. cluster tree mydist1}{p_end} {phang}{cmd:. cluster generate gr = groups(2)}{p_end} {phang}{cmd:. sqclusterdat, return keep(gr)}{p_end} {title:Also see} {psee} Manual: {bf:[MV] clustermat} {psee} Online: {helpb sq}, {helpb sqdemo}, {helpb sqset}, {helpb sqdes}, {helpb sqegen}, {helpb sqstat}, {helpb sqindexplot}, {helpb sqparcoord}, {helpb sqom}, {helpb sqclusterdat}, {helpb sqclustermat} {p_end}