Man pages for timriffe/DemoTools
Standardize, Evaluate, and Adjust Demographic Data

ADMMean absolute difference in survival rates.
age2ageNrepeat age lower bounds once for each single age
age2intInfer age class intervals from lower age bounds.
age_abridge_forceforce a (count) vector to abridged ages
AGENTrim two age vectors to matching N-year age groups.
ageRatioScoreCalculate the PAS age ratio score
ages_asfr_fiveAges between 15 and 45 in five year age groups
ages_asfr_singleSingle ages between 15 and 49
ageSexAccuracyCalculate an age-sex accuracy index
ageSexAccuracyDasGuptaCalculate Das Gupta's (1995) age sex accuracy index
ages_fiveAges between 0 and 100 abridged in five year age groups
agesmth1Generic smoother over age or time
ages_singleSingle ages between 0 and 100
asfr_mat_fiveAge-specific fertility rates for age groups 15 to 45 between...
asfr_mat_singleAge-specific fertility rates for single ages 15 to 49 between...
avg_adjcalculate average of vector elements adjacent to and...
basepop_fiveBPA and BPE methods for adjusting age groups under 10
birthCohortsCreate the historical birth cohorts for a census.
calcAgeAbrCalculate which abridged age group single ages belong to.
calcAgeNCalculate which large age group single ages belong to.
check_heaping_bachicalculate Bachi's index of age heaping
check_heaping_coale_liCoale-Li age heaping index
check_heaping_jdanovCalculate Jdanov's old-age heaping index
check_heaping_kannistoKannisto's age heaping index
check_heaping_myersCalculate Myer's blended index of age heaping
check_heaping_noumbissicalculate Noumbissi's digit heaping index
check_heaping_roughnessEvaluate roughness of data in 5-year age groups
check_heaping_sawtoothDetect if heaping is worse on terminal digits 0s than on 5s
check_heaping_spoorenbergSpoorenberg's total modified Whipple index
check_heaping_whippleCalculate Whipple's index of age heaping
dec.dateConvert date to decimal year fraction.
DemoTools-packageDemoTools: Standardize, Evaluate, and Adjust Demographic Data
downloadAsfrExtract ASFR estimates from WPP2019. Mainly an util function...
downloadnLxExtract Lx estimates from WPP2019. Mainly an util function...
downloadSRBExtract SRB estimates from WPP2019
dth5_zigzagDeaths by 5 year age groups
e0_sweSwedish life expectancy at birth
fetch_wpp_birthsextract births from wpp2019
find_my_caseFunction that determines the case/problem we have to solve It...
fitted_logquad_bLogQuad model for BOTH SEX fitted for all HMD life tables
fitted_logquad_fLogQuad model for FEMALES fitted for all HMD life tables
fitted_logquad_mLogQuad model for MALES fitted for all HMD life tables
getModelLifeTableWrapper to provide a single location to reference all model...
graduateGraduate grouped data
graduate_beersThe ordinary modified Beers splitting methods
graduate_beers_expandCreate the Beers ordinary or modified coefficient matrix
graduate_beers_johnsonAdjust ages under 10 using a modification of Beers
graduate_grabillThe basic Grabill age-splitting method
graduate_grabill_expandCreate the Grabill coefficient matrix.
graduate_monoGraduate age groups using a monotonic spline.
graduate_mono_closeoutblend the Sprague upper boundary age estimates into monotonic...
graduate_pclmwrapper for 'ungroup::pclm' method of splitting binned counts
graduate_spragueThe basic Sprague age-splitting method.
graduate_sprague_expandCreate the Sprague coefficient matrix.
graduate_uniformConvert arbitrary age groupings into single years of age.
groupAgesGroup single ages into equal age groups of arbitrary width
groupOAGGroup down to a new open age class.
heapifyInduce heaping on terminal digits 0 and 5
IDIndex of dissimilarity
inferAgeIntAbrInfer abridged age groups widths.
int2ageInfer lower age bounds from age class intervals.
int2ageNrepeat age lower bounds once for each single age
interpInterpolate between two population age distributions.
interp_cohCohort component intercensal interpolation
interp_lc_limLee-Carter method with limited data.
interp_lc_lim_abk_mwrapper fun for '"interp_lc_lim_estimate"' function
interp_lc_lim_estimateEstimate LC with limited data parameters
interp_lc_lim_groupLee-Carter method with limited data for groups.
interp_lc_lim_kt_minOptimize k
interpolatePopInterpolate between two population age distributions.
IRDIndex of relative difference.
is_abridgedDetect if a vector of lower age bounds is plausibly of...
is_age_coherentcheck for coherence within Age and between Age and AgeInt
is_age_redundantcheck for redundant age specification
is_age_sequentialis 'Age' sorted sequentially?
is_singleLogical checking of whether age classes appear single.
loess_smth1Wrapper to LOESS using demographic data.
lt_abridgedCalculate an abridged-age lifetable.
lt_abridged2singlecreate a life table by single year of age by graduating an...
lt_a_closeoutLife expectancy in the open age group.
lt_ambiguouscalculate an abridged or single age lifetable from abridged...
lt_a_pasPAS a(x) rule of thumb.
lt_a_unUN a(x) estimates from either M(x), q(x), or both
lthat.logquadEstimated life table using the log-quadratic model
lt_id_d_lDerive survivorship from lifetable deaths
lt_id_d_qDerive death probabilities from lifetable deaths
lt_id_l_dDerive lifetable deaths from survivorship.
lt_id_lda_LDerive lifetable exposure from lx, ndx and nax.
lt_id_Ll_SCalculate survivor ratios
lt_id_l_qDerive lifetable death probabilities from survivorship.
lt_id_L_TDerive lifetable total person years left to live from...
lt_id_ma_qCalculate conditional death probabilities from nMx and nax
lt_id_morq_awrapper to invoke PAS or UN ax methods given qx or mx
lt_id_morq_a_grevilleUN version of the Greville formula for a(x) from M(x)
lt_id_qa_mDerive nMx from nqx and nax.
lt_id_q_lDerive lifetable survivorship (lx) from death probabilities.
lt_id_qm_aDerive nax from nqx and nMx.
lt_model_lqEstimate Wilmoth Model Life Table
lt_rule_1a0calculate a0 in different ways
lt_rule_1a0_akAndreev-Kingkade approximation for a0
lt_rule_1a0_cdCoale-Demeny a(0) as function of m(0), region, and sex.
lt_rule_4a1_cdCoale-Demeny 4a1 as function of M(0), region, and sex.
lt_rule_4m0_D0rule of thumb for splitting infants from deaths under 5
lt_rule_4m0_m0rule of thumb for estimating infant mortality rate from under...
lt_rule_ak_m0_a0estimates a0 using the Andreev-Kingkade rule of thumb...
lt_rule_ak_q0_a0estimates a0 using the Andreev-Kingkade rule of thumb...
lt_rule_m_extrapolateExtrapolate old-age human mortality curve using mortality...
lt_single2abridgedcalculate an abridged life table that is consistent with a...
lt_single_mxcalculate a single age lifetable
lt_single_qxcalculate a single age lifetable from qx
lt_smooth_ambiguousSmooth and apply lt_ambiguous
maA simple centered moving average function.
mA_sweSwedish abridged mortality rates
mavCalculate the moving average (mav) over 3 or 5 years.
maxA2abridgedDetermine abridged ages up to a given maximum age group.
mig_betaEstimate intercensal migration by comparing census...
mig_calculate_rcCalculate Rogers-Castro migration age schedule
mig_estimate_rcEstimate Rogers-Castro migration age schedule
mig_residEstimate net migration using residual methods: stock change,...
mig_un_famNet migration by age for an UN family
mig_un_familiesProportion of net migrants by age and sex for considered...
mig_un_paramsParameters for considered migration profiles
names2agedetect ages from names of vector(s)
OPAGRedistribute population over a specified age based on a...
OPAG_fit_stable_standardcreates stable standard based on optimizing the growth rate
OPAG_nLx_warp_rWarps a given stationary population into a stable population
OPAG_r_mincalculates residual for optimizing growth rate r for OPAG...
OPAG_simpleredistribute an open age group count over higher ages...
pipePipe operator
poly_smth1Fit a polynomial to demographic data
pop1m_indIndian male population 1971
pop1m_pasexMale population by 1 year age groups
pop1m_rus2002Russian census 2002 male population by 1 year age groups
pop1m_rus2010Russian census 2010 male population by 1 year age groups
pop5_matMatrix of population over 5 years
pop5m_pasexMale population by 5 year age groups
popA_earlierAbridged population from PAS AGEINT - earlier
popA_laterAbridged population from PAS AGEINT - later
pop_f_mat_fivePopulation matrix for females five year age groups between...
pop_f_mat_singlePopulation matrix for females single ages between 1999 and...
pop_m_mat_fivePopulation matrix for males five year age groups between 1950...
pop_m_mat_singlePopulation matrix for males single ages between 1999 and 2019
ratxTake consecutive ratios of a vector.
RDMMean absolute difference in age-ratios of survival rates.
rescaleAgeGroupsrescale counts in age groups to match counts in different age...
rescale_vectorRescale a vector proportionally to a new sum.
rlogLogging that does not cause jams.
sexRatioScoreCalculate the PAS sex ratio score
shift_census_ages_to_cohortsshift census populations to match single year cohorts
shift.vectorShift a vector left or right.
simplify.textconvert strings to concatenation of lower case alphabet
single2abridgedConvert single age groups to five-year group abridged
smooth_age_5Smooth populations in 5-year age groups using various methods
smooth_age_5_arriagaE. Arriaga's method of population count smoothing
smooth_age_5_cfThe Carrier-Farrag method of population count smoothing
smooth_age_5_feeneyFeeney'S formula on 9 years to correct for heaping on...
smooth_age_5_kknKarup-King-Newton method of population count smoothing
smooth_age_5_mavSmooth in 5-year age groups using a moving average
smooth_age_5_strongA strong method of population count smoothing
smooth_age_5_unThe old United Nations method of population count smoothing
smooth_age_5_zigzagG. Feeney's method of smoothing counts in 5-year age groups.
smooth_age_5_zigzag_innerG. Feeney's method of removing the zigzag from counts in...
smooth_age_5_zigzag_minObjective function to minimize Feeney's zigzag method...
smooth_age_5_zigzag_pSmooth population counts using Feeney's zigzag method and...
spencerSmoothing of an age structure by single years using Spencer's...
splitOscillateAn oscillatory average of age splits.
srb_vec_fiveSex ratio at birth between 1950 and 2045
srb_vec_singleSex ratio at birth between 1999 and 2019
sr_f_mat_fiveSurvival rates matrix for females five year age groups...
sr_f_mat_singleSurvival rates matrix for females single ages between 1999...
sr_m_mat_fiveSurvival rates matrix for males five year age groups between...
sr_m_mat_singleSurvival rates matrix for males single ages between 1999 and...
surv10Estimate survival curve from censuses spaced 10 years apart.
surv5Estimate survival curve from censuses spaced 5 years apart.
survNEstimate survival curve from censuses spaced N years apart.
survRatioErrorCensus survival estimation
zelnikZelnik 11-term moving average to adjust for digit preference.
timriffe/DemoTools documentation built on Jan. 28, 2024, 5:13 a.m.