Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

seqistatd

State frequencies in each individual sequence


Description

Returns the state frequencies (total durations) for each sequence in the sequence object.

Usage

seqistatd(seqdata, with.missing=FALSE, prop=FALSE)

Arguments

seqdata

a sequence object (see seqdef function).

with.missing

logical: if set as TRUE, total durations are also computed for the missing status (gaps in the sequences). See seqdef on options for handling missing values when creating sequence objects.

prop

logical: if TRUE, proportions of time spent in each state are returned instead of absolute values. This option is specially useful when sequences contain missing states, since the sum of the state durations may not be the same for all sequences.

Author(s)

Alexis Gabadinho

References

Gabadinho, A., G. Ritschard, N. S. Müller and M. Studer (2011). Analyzing and Visualizing State Sequences in R with TraMineR. Journal of Statistical Software 40(4), 1-37.

Examples

data(actcal)
actcal.seq <- seqdef(actcal,13:24)
seqistatd(actcal.seq[1:10,])

## Example using "with.missing" argument
data(ex1)
ex1.seq <- seqdef(ex1, 1:13, weights=ex1$weights)

seqistatd(ex1.seq)
seqistatd(ex1.seq, with.missing=TRUE)

TraMineR

Trajectory Miner: a Toolbox for Exploring and Rendering Sequences

v2.2-1
GPL (>= 2)
Authors
Alexis Gabadinho [aut, cph], Matthias Studer [aut, cph] (<https://orcid.org/0000-0002-6269-1412>), Nicolas M"{u}ller [aut], Reto B"{u}rgin [aut], Pierre-Alexandre Fonta [aut], Gilbert Ritschard [aut, cre, cph] (<https://orcid.org/0000-0001-7776-0903>)
Initial release
2020-10-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.