ggbcoverageFromYear: estimate death registration coverage for a single...

View source: R/ggb.R

ggbcoverageFromYearR Documentation

estimate death registration coverage for a single year/sex/region using the GGB method

Description

Given two censuses and an average annual number of deaths in each age class between censuses, we can use stable population assumptions to estimate the degree of underregistration of deaths. The method is based on finding a best-fitting linear relationship between two modeled parameters (right term and left term), but the fit, and resulting coverage estimate, depend on exactly which age range is taken. This function either finds a nice age range for you automatically, or you can specify an exact vector of ages. Called by ggb(). Users probably don't need to call this directly. Just use ggb() instead.

Census dates can be given in a variety of ways: 1) using Date classes, and column names $date1 and $date2 (or an unambiguous character string of the date, like, "1981-05-13") or 2) by giving column names "day1","month1","year1","day2","month2","year2" containing integers. If only year1 and year2 are given, then we assume January 1 dates. If year and month are given, then we assume dates on the first of the month.

Usage

ggbcoverageFromYear(
  codi,
  exact.ages = NULL,
  minA = 15,
  maxA = 75,
  minAges = 8,
  deaths.summed = FALSE,
  mig.summed = deaths.summed,
  lm.method = "oldschool",
  opt.method = "RMSE",
  scale = 1,
  nx.method = 2
)

Arguments

codi

a chunk of data from a single id

exact.ages

optional. A user-specified vector of exact ages to use for coverage estimation

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.

mig.summed

logical. Is the (optional) net migration column mig given as the total per age in the intercensal period (TRUE). By default we assume FALSE, i.e. that the average annual was given.

lm.method

character, one of:

  • "oldschool" default sd ratio operation of still unknown origin

  • "lm" or "ols" for a simple linear model

  • "tls", "orthogonal", or "deming" for total least squares

  • "tukey", "resistant", or ""median" for Tukey's resistant line method

opt.method

what kind of residual do we minimize? choices "RMS","logRMS", "ORSS", "logORSS" (experimental)

scale

multiplicative scale factor for the minimized residual

nx.method

either 2 or 4. 4 is smoother.


albinomatheus/toolbox documentation built on June 13, 2024, 5:42 a.m.