Description Usage Arguments Value Note Author(s) References See Also Examples
Plots observations in age-time diagram for each category of categorical covariate (using the Lexis function of the Epi package)
1 | Lexispoints(Bdata, transition, title, cov,legend)
|
Bdata |
Biograph object |
transition |
The transition selected, e.g. "NJ" in GLHS data |
title |
Title of Lexis diagram |
cov |
Covariate. Observations are plotted for each category of this covariate. If observations should be plotted for the total sample population, cov = NA |
legend |
legend |
Lcoh |
Lexis object created to plot the observations |
requires Epi
Frans Willekens. The Epi package used to plot the Lexis diagram was developed by Carstensen.
Plummer, M. and B. Carstensen (2011) Lexis: an R class for epidemiolgoical studies with long-term follow-up. Journal of Statistical Software, 38(5):1-12
Carstensen, B. (2013) The Epi package.
Lexislines.episodes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Example 1: ages at labour market entry, by sex
library (Epi)
data(GLHS)
#y <- Parameters(GLHS)
t <- "Calendar time and age at labour market entry"
z <- Lexispoints (Bdata=GLHS,transition="NJ",title=t,cov="sex",legend="topleft")
# Example 2: ages at first birth among married women, by religious denomination
data(NLOG98)
y <- Parameters (NLOG98)
t <- "Calendar time and age at first birth (married women)"
z <- Lexispoints (NLOG98,"MK",t,"kerk")
# Example 3: ages at leaving home, by birth cohort (any destination)
t <- "Calendar time and age at leaving parental home"
z <- Lexispoints (NLOG98,"H*",t,"cohort","topleft")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.