Learn R Programming

TraMineR (version 1.0)

seqient: Sequence entropy

Description

Returns the within sequences entropy.

Usage

seqient(seqdata, norm=TRUE)

Arguments

seqdata
a sequence object (see seqdef function).
norm
by default (TRUE), entropy is normalized, ie divided by the maximum entropy. The maximum entropy is computed as the entropy of the alphabet, ie an hypothetic sequence having all the states in the alphabet with equal length. Note that if for example the se

Details

Computes the entropy within each sequence (row) in the dataframe or matrix. The entropy of a sequence equals 0 if all states in the sequence are the same. The function returns a vector with the same number of rows (= the number of sequences) as it's argument. Other measures of entropy are available: 'seqstatd' returns the entropy of the distribution of states for each time unit.

See Also

seqstatd.

Examples

Run this code
data(actcal)
actcal.seq <- seqdef(actcal,13:24)

## Summarize and plots an histogram 
## of the within sequence entropy 
actcal.ient <- seqient(actcal.seq)
summary(actcal.ient)
hist(actcal.ient)

Run the code above in your browser using DataLab