R: Badness index

seqibad {TraMineR} | R Documentation

## 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, ...)

### 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.

### Value

A vector with the badness index for each sequence.

### Author(s)

Gilbert Ritschard

### References

Ritschard, G. (2020), "Measuring the nature of individual sequences", manuscript.

### See Also

`seqintegr`, `seqidegrad`, `seqprecarity`

### Examples

    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'))

[Package TraMineR version 2.2-2 Index]