| entry.Lexis | R Documentation |
Extract the entry time, exit time, status or duration of follow-up from a
Lexis object. Classify states.
entry(x, time.scale = NULL, by.id=FALSE)
exit(x, time.scale = NULL, by.id=FALSE)
status(x, at="exit" , by.id=FALSE)
dur(x, by.id=FALSE)
transient(x)
absorbing(x)
preceding(x, states)
before(x, states)
succeeding(x, states)
after(x, states)
x |
an object of class |
time.scale |
a string or integer indicating the time scale. If omitted, all times scales are used. |
by.id |
Logical, if |
at |
string indicating the time point(s) at which status is to be measured. Possible values are "exit" or "entry". |
states |
Character vector of states. |
The entry and exit functions return a vector of
entry times and exit times, respectively, on the requested time
scale. If multiple time scales are requested, a matrix is
returned.
The status function returns a vector giving the status at
"at" (either 'entry' or 'exit') and dur
returns a vector with the lengths of the follow-up intervals.
entry, exit, status and dur return vectors
of length nrow(x) if by.id=FALSE; if by.id=TRUE a
vector of length length(unique(lex.id)).
The functions transient and absorbing return character
vectors of the transient, resp. absorbing states in x. These
are necessarily disjoint but the union may be a proper subset of
levels(x), since the latter may have levels that are never
assumed by either lex.Cst or lex.Xst.
preceding returns a character vector with names of the states
of the Lexis object x from which one of the states in
states can be reached directly - the preceding
states. before is just a synonym for preceding.
succeeding returns a character vector with names of the states
of the Lexis object x that can be reached directly from one of
the states in states. after is just a synonym for
succeeding.
Martyn Plummer & Bendix Carstensen
Lexis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.