simPop: Population simulation

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/simPop.R

Description

Simulate population with birthdate and gender

Usage

1
simPop(n, min.age = 20, max.age = 90, sex = 0.5, mortality = 0.05)

Arguments

n

Number of subjects

min.age

minimal age

max.age

maximal age

sex

gender distribution: value between 0 and 1

mortality

risk of death: value between 0 and 1

Details

Sample data for illustration, i.e., vignettes and example sections of the package.

Value

data.table with columns: pnr, sex, birthdate, status, doddate where doddate is the date of death for subjects with status = 1 and the current date for subjects with status = 0.

Author(s)

Thomas A. Gerds <[email protected]>

See Also

simPrescriptionData, simAdmissionData

Examples

1
2

tagteam/heaven documentation built on Feb. 16, 2019, 8:21 p.m.