seqdef: Create a state sequence object

seqdefR Documentation

Create a state sequence object

Description

Create a state sequence object with attributes such as alphabet, colour palette, and state labels. This a minimalist copy of seqdef in the TraMineR package.

Usage

seqdef(data, ...)

Arguments

data

A data frame or matrix containing sequence data.

...

All other arguments; see seqdef in the TraMineR package.

Details

This function exists only so experienced users of MEDseq and TraMineR can use the former without explicitly requiring the latter to be loaded. In particular, MEDseq_fit requires a state-sequence object of class "stslist" (as created by seqdef) as input. Users are encouraged to see the documentation at TraMineR::seqdef for complete details and further examples.

Value

An object of class "stslist", for which dedicated print and summary methods are inherited from TraMineR.

Author(s)

Alexis Gabadinho and Gilbert Ritschard

References

Gabadinho, A., Ritschard, G., Mueller, N. S., and Studer, M. (2011). Analyzing and visualizing state sequences in R with TraMineR. Journal of Statistical Software, 40(4): 1-37.

Gabadinho, A., Ritschard, G., Studer, M., and Mueller, N. S. (2010). Mining sequence data in R with the TraMineR package: a user's guide. Department of Econometrics and Laboratory of Demography, University of Geneva.

See Also

TraMineR::seqdef, MEDseq_fit

Examples

data(mvad)
# Create a state sequence object with the first two (summer) time points removed
states   <- c("EM", "FE", "HE", "JL", "SC", "TR")
labels   <- c("Employment", "Further Education", "Higher Education", 
              "Joblessness", "School", "Training")
mvad.seq <- seqdef(mvad[,17:86], states=states, labels=labels, weights=mvad$weight)

MEDseq documentation built on Dec. 28, 2022, 2:35 a.m.