ggbgetAgesFit {DDM}R Documentation

determine the age range that minimizes the mean squared error

Description

Called by ggbcoverageFromYear() whenever exact.ages are not given. This automates what one typically does visually.

Usage

ggbgetAgesFit(codi, minA = 15, maxA = 75, minAges = 8,
  deaths.summed = FALSE)

Arguments

codi

a chunk of data (single sex, year, region, etc) with all columns required by ggb()

minA

the lowest age to be included in search

maxA

the highest age to be included in search (the lower bound thereof)

minAges

the minimum number of adjacent ages to be used in estimating

deaths.summed

logical. is the deaths column given as the total per age in the intercensal period (TRUE). By default we assume FALSE, i.e. that the average annual was given.

Value

a vector of ages that minimizes the RMSE

See Also

codeggbChooseAges


[Package DDM version 1.0-0 Index]