How to do centroid clustering of sequences? I want to cluster sequences using centroids. In the hclust package it is noted that "Method "centroid" is typically meant to be used with squared Euclidean distances". 
Further, it seems as if TraMineRextras allows for conversion of state sequence objects to euclidean distances using seqemlt(). However, these do not seem to be squared. So, to get hclust to work with centroids, do I simply square the output of seqemlt() like so:
euclidean.distances^2

...and then put this object through hclust()?
 A: The seqemlt function from the TraMineRextras package does not return a dissimilarity matrix, but a numerical representation (matrix coord) of the sequences such that the Euclidean distances between the numerical transformed representations (rows of coord) correspond to the distances between sequences proposed by Rousset, Giret & Grelet al. (2012). If you compute the Euclidean distances between the rows of coord with dist, the results are non squared distances.
However, Rousset et al's distance is a very specific distance (see Studer & Ritschard, 2014, p. 9) and you should not use it without having an idea of what you are measuring.
There are alternative ways of getting Euclidean distances. Using any dissimilarity measure ---such as optimal matching for example---you get numerical representations of the sequences by means of multidimensional scaling (e.g., see the R cmdscale function). You can then simply use the Euclidean distances between those numerical representations, which you obtain for instance with dist.
Hope this helps.
