md.death | R Documentation |
Creates information of a time of death variable distributed according to the specified population mortality table and demographic information.
This function call must be added to the md.simparams
object.
md.death(name, poptable, sexcol, birthcol, startcol)
name |
name of the column |
poptable |
population mortality table used to simulate times od death |
sexcol |
name of the column (covariate) specifying birth date |
birthcol |
name of the column (covariate) specifying birth date |
startcol |
name of the column (covariate) specifying the start date from which to calculate time of death |
## Not run:
library(missDeaths)
sim = md.simparams() +
md.sex("sex", 0.5) +
md.uniform("birth", as.Date("1930-1-1"), as.Date("1970-1-1")) +
md.uniform("start", as.Date("2005-1-1"), as.Date("2010-1-1")) +
md.death("death", survexp.us, "sex", "birth", "start")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.