Skip to contents

This function draws ages using the inverse CDF method from empirical density data.

Usage

drawEmpirical(empirical_density, sex = NA)

Arguments

empirical_density

A density object or a list of density objects (if sex-specific) containing the empirical density of ages.

sex

Numeric, the sex of the individual (1 for male, 2 for female). Required if empirical_density is a list.

Value

A single age value drawn from the empirical density data.