seqsmooth | R Documentation |
Smoothing of sequence data, using for each sequence the medoid of the sequences in its neighborhood. The results can be used to get a smoothed index plot.
seqsmooth(seqdata, diss, k=20, r=NULL)
seqdata |
a sequence object (see |
diss |
a dissimilarity matrix, giving the pairwise distances between sequences. |
k |
size of the neighborhood. Default is 20. |
r |
radius of the neighborhood. If NULL (default), the radius is not used for smoothing. |
A list with the following elements:
seqdata |
a sequence object (see |
R2 |
pseudo-R2 measure of the goodness of fit of the smoothing |
S2 |
stress measure of the goodness of fit of the smoothing |
Nicolas Robette
Piccarreta R. (2012). Graphical and Smoothing Techniques for Sequence Analysis, Sociological Methods and Research, Vol. 41(2), 362-380.
data(trajact)
seqact <- seqdef(trajact)
dissim <- seqdist(seqact, method="LCS")
mds <- cmdscale(dissim, k=1)
smoothed <- seqsmooth(seqact, dissim, k=30)$seqdata
seqIplot(smoothed, sortv=mds, xtlab=14:50, with.legend=FALSE, yaxis=FALSE, ylab=NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.