Description Usage Arguments Details Value Author(s) References See Also Examples

Returns a matrix with transition rates between states, computed from a set of sequences.

1 2 |

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

`sel.states` |
a list of states or events for which the transition rates will be computed. If omitted (default), transition rates are computed between the distinct states in seqdata (obtained with the |

`time.varying` |
Logical. If |

`weighted` |
Logical. If |

`lag` |
Integer. Time between the two states considered to compute transition rates (one by default). |

`with.missing` |
Logical. If |

`count` |
Logical. Should counts of transition be returned instead of transition probabilities. Default is |

`statl` |
Deprecated. Use |

Transition rates are the probabilities of transition from one state to another observed in the sequence data. Substitution costs based on transition rates can be used when computing distances between sequences with the optimal matching method (see seqdist).

a matrix of dimension *ns*ns*, where *ns* is the number of states in the alphabet of the sequence object.

Matthias Studer, Alexis Gabadinho, and Gilbert Ritschard

Gabadinho, A., G. Ritschard, N. S. M<c3><bc>ller and M. Studer (2011). Analyzing and Visualizing State Sequences in R with TraMineR. *Journal of Statistical Software* **40**(4), 1-37.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
## Loading the 'actcal' example data set
data(actcal)
## Defining a sequence object with data in columns 13 to 24
## (activity status from January to December 2000)
actcal.seq <- seqdef(actcal[,13:24])
## Computing transition rates
seqtrate(actcal.seq)
## Computing transition rates between states "A" and "B" only
seqtrate(actcal.seq, c("A","B"))
## ====================
## Example with weights
## ====================
data(ex1)
ex1.seq <- seqdef(ex1[,1:13], weights=ex1$weights)
seqtrate(ex1.seq, weighted=FALSE)
seqtrate(ex1.seq, weighted=FALSE, count=TRUE)
## weights are accounted for by default
seqtrate(ex1.seq)
seqtrate(ex1.seq, count=TRUE)
``` |

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.