Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

time.scales

The time scales of a Lexis object


Description

Functions to get the names and type of the time scales of a Lexis object.

Usage

timeScales(x)
timeSince(x)
tsNA20( x, all.scales=FALSE )

Arguments

x

an object of class Lexis.

all.scales

Should NAs in all timescales be replaced by 0? If FALSE (the default) only timescales defined as time since entry to a state get NAs replaced by 0s

Value

timeScales returns a character vector containing the names of the variables in x that represent the time scales. Extracted from the time.scales attribute of the object.

timeSince returns a named character vector, the names being the names of the timescales and the content being the names of the states to which the corresponding timescale is defined as time since entry. For those time scales that are not defined as such an empty string is used. Hence, if none of the timescales are defined as time since entry to a state timeSince will return a vector of empty strings.

Author(s)

Martyn Plummer, Bendix Carstensen

See Also


Epi

Statistical Analysis in Epidemiology

v2.44
GPL-2
Authors
Bendix Carstensen [aut, cre], Martyn Plummer [aut], Esa Laara [ctb], Michael Hills [ctb]
Initial release
2021-02-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.