HOME is an R package designed to implement, compare, and diagnose indirect mortality estimation methods based on orphanhood data.
45q15: Probability of dying between ages 15 and 60 (Standard).30q30: Probability of dying between ages 30 and 60 (Robust).e30: Life expectancy at age 30 (Policy-relevant).You can install the development version of HOME directly from GitHub:
# If you do not have devtools installed:
# install.packages("devtools")
devtools::install_github("tamaravaz/HOME", dependencies = T)
# Input data: Respondent age, Proportion of mothers alive (Sn), Mean age of childbearing (Mn)
df_input <- data.frame(
age_n = seq(15,60,5),
Sn = c(0.95772787,0.94418605,0.89402174,0.84395199,0.77974435,0.67717391,0.49225268,0.33670034,0.20071685,0.09517426),
Mn = rep(24,10)
)
# Run the estimation using the Luy (2012) method
# This creates an 'OrphanhoodEstimate' object containing metadata and inputs
est <- om_estimate_index(
method = "luy",
sex_parent = "Female",
age_respondent = df_input$age_n,
p_surv = df_input$Sn,
mean_age_parent = df_input$Mn,
surv_date = 2024.75,
model_family = "General"
)
# Plots the logit-transformed residuals (Alpha) across age groups
om_plot_linearity(est)
# Re-runs the model with perturbed M values
sens_m <- om_sensitivity_Mn(est, range_m = seq(-1.5, 1.5, 0.5))
plot(sens_m, index = "e30")
# Re-runs the model using all UN families (General, South Asian, etc.)
sens_fam <- om_sensitivity_modelLT(est, type = "UN")
plot(sens_fam, index = "30q30")
# Generates a composite view of linearity and sensitivity
om_dashboard(est, index = "e30", family_type = "UN")
The built-in Luy coefficients were derived for Italy. om_calibrate_luy()
derives W(n), a(n), b(n) and the mean-age conversion table from your own
data, following Luy (2009). You prepare four data frames in long format
(asfr: age, year, rate; cohort_qx: age, cohort, qx; pop_age: age,
year, n; period_lx: year, age, lx):
om_luy_data_needs(2003.9, "Female") # years, ages and cohorts needed
om_luy_validate_inputs(asfr, cohort_qx, pop_age, period_lx,
survey_date = 2003.9, sex_parent = "Female")
cal <- om_calibrate_luy("Female", asfr = asfr, cohort_qx = cohort_qx,
pop_age = pop_age, period_lx = period_lx,
survey_date = 2003.9)
est <- om_estimate_index(method = "luy", sex_parent = "Female",
age_respondent = df_input$age_n,
p_surv = df_input$Sn, mean_age_parent = df_input$Mn,
surv_date = 2024.75, custom_coef_luy = cal)
library(HOME)
# This will open the dashboard in your default web browser
app_HOME()
The package operationalizes the diagnostic framework described in the accompanying working paper. It addresses the trade-off between stability (favored by bounded metrics like 30q30|45q15) and communicability (favored by e30). Key diagnostic plots included in the package allow users to assess