Learn R Programming

TraMineR (version 2.2-10)

seqibad: Badness index

Description

Badness index of each sequence, i.e. the sum of undesirableness of each state weighted by the potential to integrate that state in the sequence.

Usage

seqibad(seqdata, pow=1, with.missing=FALSE, ...)

Value

A vector with the badness index for each sequence.

Author

Gilbert Ritschard

Arguments

seqdata

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

pow

real. Exponent applied to the position in the sequence. Higher value increase the importance of recency (see seqintegration). Default is 1.

with.missing

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

...

arguments such as stprec or state.order required by seqprecstart to determine/normalize the state undesirableness degrees.

Details

For each sequence, the badness is the sum of the undesirableness of each state weighted by the potential to integrate the state. As long as pow is strictly greater than zero, the undesirableness of states occurring at the end of the sequence get higher weights than those at the beginning. The index reaches its maximum 1 for a sequence made of a single spell in the worst state and the minimum 0 for a sequence made of a single spell is the most favorable state.

References

Ritschard, G. (2023), "Measuring the nature of individual sequences", Sociological Methods and Research, 52(4), 2016-2049. tools:::Rd_expr_doi("10.1177/00491241211036156").

See Also

seqintegr, seqidegrad, seqprecarity

Examples

Run this code
data(ex1)
sx <- seqdef(ex1[,1:13], right="DEL")

seqibad(sx) ## using original alphabet order
seqibad(sx, stprec=c(1,2,3,6)) ## user defined undesirableness values
seqibad(sx, with.missing=TRUE, state.order=c('A','B','C','D'))

Run the code above in your browser using DataLab