seqTrans: Spotting impossible transitions in longitudinal categorical...

View source: R/seqTrans.R

seqTransR Documentation

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)

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

Value

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

Author(s)

Andre Berchtold and Kevin Emery

Examples

data(gameadd)

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


seqimpute documentation built on May 29, 2024, 4:35 a.m.