detectAgeInterval {DDM}R Documentation

Detect the age interval for some demographic data

Description

Since death distribution methods are primarily used in adult ages, it's OK to chop off the irregular infant and child age intervals (0,1], (1,5]. Further, if high ages are in different intervals this might also be a non-issue. In principal, the user should set MinAge and MaxAge to the same values used in the death distribution methods. Here we have some defaults that should almost always return the result 5 for standard abridged data, or 1 for single age data. Really there are not any other common age-specifications, but it is best to identify these and be explicit about them. We return a warning and NA if more than one age interval is used. It is assumed that ages refer to the lower bounds of age intervals, as is the standard in demography.

Usage

detectAgeInterval(Dat, MinAge = 5, MaxAge = 70, ageColumn = "Age")

Arguments

Dat

a data.frame containing a column called Age, or codeage.

MinAge

integer ignore ages below this age.

MaxAge

integer ignore ages above this age.

ageColumn

character string giving the name of the Age column "Age" assumed.

Value

integer the age interval. NA if this is not unique.


[Package DDM version 1.0-0 Index]