split.Lexis {Epi}R Documentation

Split follow-up time in a Lexis object

Description

The splitLexis function divides each row of a Lexis object into disjoint follow-up intervals according to the supplied break points.

Usage

splitLexis(lex, breaks)

Arguments

lex an object of class Lexis
breaks a named list of numeric vectors giving the break points on one or more time scales. Optionally, a single vector of break points may be given, in which case the first time scale is assumed.

Value

An object of class Lexis with multiple rows for each row of the argument lex. Each row of the new Lexis object contains the part of the follow-up interval that falls inside one of the time bands defined by the break points.
The variables representing the various time scales, are appropriately updated in the new Lexis object. The entry and exit status variables are also updated according to the rule that the entry status is retained until the end of follow-up. All other variables are considered to represent variables that are constant in time, and so are replicated across all rows having the same id value.

Author(s)

Martyn Plummer

See Also

timeBand


[Package Epi version 0.8.0 Index]