Learn R Programming

seqimpute (version 2.2.1)

seqTrans: Spotting impossible transitions in longitudinal categorical data

Description

The purpose of seqTrans is to spot impossible transitions in longitudinal categorical data.

Usage

seqTrans(data, var = NULL, trans)

Value

It returns a matrix where each row is the position of an impossible transition.

Arguments

data

a data frame containing sequences of a multinomial variable with missing data (coded as NA)

var

the list of columns containing the trajectories. Default is NULL, i.e. all the columns.

trans

character vector gathering the impossible transitions. For example: trans <- c("1->3","1->4","2->1","4->1","4->3")

Author

Andre Berchtold and Kevin Emery

Examples

Run this code
data(gameadd)

seqTransList <- seqTrans(data = gameadd, var = 1:4, trans = c("yes->no"))

Run the code above in your browser using DataLab