Learn R Programming

lllcrc (version 1.2)

age.sex.zip: Simulate CRC data with age, sex, and zip code

Description

Generate a fake data set with covariates age, sex, and zip code.

Usage

age.sex.zip(n)

Arguments

n
The number of population units.

Value

pop
A data.frame containing the covariates and capture histories associated with each observed unit.

Details

This simulation is vaguely inspired by the French dataset on multiple sclerosis prevalence (El Adssi et. al., 2012). It is used to create a three-list capture-recapture system with unit-level independence between lists. Capture probabilities are constant (for simplicity!) across lists, but not across population units. The heterogeneity is a function of the covariates: age, sex, and zip code. We code zip here as `a', `b', `c', `d'.