seqsmooth

0th

Percentile

Smoothing sequence data

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.

Keywords
state sequences, Longitudinal characteristics
Usage
seqsmooth(seqdata, diss, k=20, r=NULL)
Arguments
seqdata

a sequence object (see seqdef function).

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.

Value

A list with the following elements:

seqdata

a sequence object (see seqdef function)

R2

pseudo-R2 measure of the goodness of fit of the smoothing

S2

stress measure of the goodness of fit of the smoothing

References

Piccarreta R. (2012). Graphical and Smoothing Techniques for Sequence Analysis, Sociological Methods and Research, Vol. 41(2), 362-380.

Aliases
  • seqsmooth
Examples
# NOT RUN {
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)
# }
Documentation reproduced from package seqhandbook, version 0.1.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.