Dynamic index
Dynamic (i.e. successive) values of an individual index. For each sequence, the values of the selected index is computed on sliding windows.
seqindic.dyn(seqdata, indic="cplx", window.size = .2, sliding=TRUE, with.missing=FALSE, silent.indic=TRUE, ...)
seqdata |
state sequence object ( |
indic |
character string: the individual index. Can be any value supported by |
window.size |
integer or real. If an integer > 1, window size in number of positions. If real number in the range ]0,1), the window size is set as that proportion of the length of the longest sequence. |
sliding |
logical: Should indic be computed on sliding windows? If |
with.missing |
logical. Should the missing state be treated as a state of the alphabet? |
silent.indic |
logical. Should messages issued during computation of indic be suppressed? |
... |
additional arguments passed to |
The function implements the dynamic sequence analysis approach of Pelletier et al. (2020) and generalizes the method to any of the over 20 indicators provided by seqindic
.
The values of the indic
index are computed for each sequence either on sliding windows of size window.size
or on incremental windows starting from a first window of size window.size
.
Column names refer to the end the windows.
A matrix of class dynin
with attributes xtstep
, tick.last
, weights
, window.size
, sliding
, and indic
. The first three as well as the row and column names are taken from seqdata
.
There are print
and plot
methods for dynin
objects. See plot.dynin
.
Gilbert Ritschard
Pelletier, D.; Bignami-Van Assche, S. & Simard-Gendron, A. (2020) Measuring Life Course Complexity with Dynamic Sequence Analysis, Social Indicators Research doi: 10.1007/s11205-020-02464-y.
data(actcal) cases <- 1:100 actcal <- actcal[cases,] ## Here, only a subset actcal.seq <- seqdef(actcal[,13:24], alphabet=c('A','B','C','D')) a.dyn <- seqindic.dyn(actcal.seq, indic='cplx', with.missing=FALSE) plot(a.dyn, group=actcal[cases,'sex'], fstat=mean) ## Trimmed mean plot(a.dyn, group=actcal[cases,'sex'], fstat=function(x)mean(x, trim=.02))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.