md.eval: md.eval

Description Usage Arguments Examples

View source: R/library.R

Description

Creates information of a covariate that is calculated (from other covariates) by evaluating a specified formula. This function call must be added to the md.simparams object.

Usage

1

Arguments

name

name of the covariate

eval

string specifying the formula to calculate the covariate

center

expected value of the calculated covariate

invisible

specifies whether the calculated covariate is included in the simulated dataset

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
library(missDeaths)

sim = md.simparams() +
    md.uniform("birth", as.Date("1915-1-1"), as.Date("1930-1-1")) +
      md.uniform("start", as.Date("2000-1-1"), as.Date("2005-1-1")) +
          md.eval("age", "as.numeric(start - birth)/365.2425", 80, FALSE)

## End(Not run)

missDeaths documentation built on Oct. 23, 2020, 6:39 p.m.