TraMineR (version 2.2-0.1)

seqindic: Sequence indicators

Description

Table of per sequence values of selected indicators.

Usage

seqindic(seqdata, indic=c("visited","trans","entr","cplx"), with.missing=FALSE,
    ipos.args=list(), integr.args=list(), prec.args=list(), w=1)

Arguments

seqdata

a state sequence object (class stslist) as returned by seqdef.

indic

vector of character strings. List of selected indicators among "lgth" (sequence length), "nonm" (number of non-missing elements), "dlgth", (number of successive distinct states), "visited" (number of visited states), "trans" (number of state changes), "transp" (number of state changes as a proportion of maximum possible transitions), "entr" (longitudinal normalized entropy), "volat" (objective volatility), "cplx" (complexity index), "turbn" (normalized turbulence), "turb" (turbulence), "integr" (integrative potential), "ppos" (proportion of positive states), "vpos" volatility of positive-negative state sequences, "inpos" (potential to integrate a positive state"), "prec" (precarity index). Setting indic="all" selects all indicators but "integr", "ppos", "vpos", "inpos", and "prec" that require an additional argument list.

with.missing

logical: should non-void missing values be treated as a regular state? If FALSE (default) missing values are ignored.

ipos.args

list: when any of "ppos", "vpos", or "inpos" is requested, the arguments passed to seqipos together with seqdata and with.missing. See seqipos

integr.args

list: when "integr" requested, the arguments passed to seqintegration together with seqdata and with.missing. See seqintegration

prec.args

list: when "prec" requested, the arguments passed to seqprecarity together with seqdata and with.missing. See seqprecarity

w

real in range [0,1]: when volat weight coefficient passed to seqivolatility. Default is 1.

Value

A data frame with the selected indicators. Names are: Lght: Length of the sequence NonM: Number of non missing elements Dlgth: Length of the sequence of distinct successive states (DSS) Visited: Number of visited states Trans: Number of state changes Transp: Number of state changes as a proportion of maximum number of transitions Entr: Longitudinal entropy Volat: Objective volatility Cplx: Complexity Turbn: Normalized turbulence Turb: Turbulence Integr: Integrative capacity Ppos: Proportion of positive states Vpos: Volatility of positive-negative state sequences Inpos: Potential to integrate a positive state Prec: Precarity

Details

The number of visited states is the number of different elements in the sequence, e.g. 2 for aababba.

The sequence length, number of transitions, longitudinal entropy, complexity, turbulence, proportion of positive states, and precarity are computed respectively with functions seqlength, seqtransn, seqient, seqici, seqST, seqipos, and seqprecarity. See corresponding help pages for details.

The with.missing argument applies to all indicators but the length. lgth returns the length obtained with with.missing=TRUE, and nonm the length obtained with with.missing=FALSE.

See Also

seqlength, seqtransn, seqient, seqici, seqST, seqipos, and seqprecarity

Examples

Run this code
# NOT RUN {
data(ex1)
sx <- seqdef(ex1[,1:13], right="DEL")
print(sx, format='SPS')
seqindic(sx, indic=c("lgth","nonm","visited","turbn","cplx"))
seqindic(sx, indic=c("lgth","nonm","visited","turbn","cplx"), with.missing=TRUE)
seqindic(sx, indic=c("lgth","dlgth","ppos","inpos","prec"), with.missing=TRUE,
          ipos.args=list(pos.states=c("A","B")),
          prec.args=list(state.order=c("A","B","C"), state.equiv=list(c("C","D"))))
seqindic(sx, indic=c("volat","integr"), integr.args=list(state="D"))
# }

Run the code above in your browser using DataLab