Lexispoints: Plot event dates and ages in Lexis diagram

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Plots observations in age-time diagram for each category of categorical covariate (using the Lexis function of the Epi package)

Usage

1
Lexispoints(Bdata, transition, title, cov,legend)

Arguments

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

Value

Lcoh

Lexis object created to plot the observations

Note

requires Epi

Author(s)

Frans Willekens. The Epi package used to plot the Lexis diagram was developed by Carstensen.

References

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.

See Also

Lexislines.episodes

Examples

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

Biograph documentation built on May 1, 2019, 8:48 p.m.