Returns the state frequencies, the number of valid states and the entropy of the state distribution at each position in the sequence.

1 |

`seqdata` |
a state sequence object as defined by the |

`weighted` |
if |

`with.missing` |
If |

`norm` |
if |

In addition to the state distribution at each position in the sequence, the `seqstatd`

function provides also for each time
point the number of valid states and the Shannon entropy of the observed state distribution. Letting *p_i* denote the
proportion of cases in state *i* at the considered time point, the entropy is

*
h(p_1,…,p_s) = -∑_{i=1}^{s} p_i \log(p_i)
*

where *s* is the size of the alphabet. The log is here the natural (base e) logarithm. The entropy is 0 when all cases are in the same state and is maximal when the same proportion of cases are in each state. The entropy can be seen as a measure of the diversity of states observed at the considered time point. An application of such a measure (but with aggregated transversal data) can be seen in Billari
(2001) and Fussell (2005).

Alexis Gabadinho (with Gilbert Ritschard for the help page)

Billari, F. C. (2001). The analysis of early life courses: complex descriptions of the transition to adulthood.
*Journal of Population Research* 18 (2), 119-24.

Fussell, E. (2005). Measuring the early adult life course in Mexico: An application of the entropy index. In R. Macmillan
(Ed.), *The Structure of the Life Course: Standardized? Individualized? Differentiated?*, Advances in Life Course
Research, Vol. 9, pp. 91-122. Amsterdam: Elsevier.

`plot.stslist.statd`

the plot method for objects of class `stslist.statd`

,

`seqdplot`

for higher level plot of transversal distributions and

`seqHtplot`

for plotting the transversal entropy over sequence positions.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
data(biofam)
biofam.seq <- seqdef(biofam,10:25)
sd <- seqstatd(biofam.seq)
## Plotting the state distribution
plot(sd, type="d")
## Plotting the entropy indexes
plot(sd, type="Ht")
## ====================
## example with weights
## ====================
data(ex1)
ex1.seq <- seqdef(ex1, 1:13, weights=ex1$weights)
## Unweighted
seqstatd(ex1.seq, weighted=FALSE)
seqstatd(ex1.seq, weighted=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.