This function simulates a synthetic DHS survey dataset, generating age distribution parameters, coordinates, and metadata. It mimics typical DHS/MICS output and saves the result to disk. The metadata includes: - `country`: Name of the country ("Gambia" by default) - `country_code_iso3`: ISO3 country code ("GMB" by default) - `country_code_dhs`: DHS country code ("GM" by default) - `year_of_survey`: Year of the simulated survey (2024 by default)
simulate_dummy_dhs_pr(
country = "Gambia",
country_code_iso3 = "GMB",
country_code_dhs = "GM",
year_of_survey = 2024,
total_population = 266,
urban_proportion = 0.602,
lon_range = c(-16.802, -13.849),
lat_range = c(13.149, 13.801),
mean_web_x = -1764351,
mean_web_y = 1510868,
log_scale_mean = 2.82,
log_scale_sd = 0.2,
log_shape_mean = 0.331,
log_shape_sd = 0.1,
b1_mean = 0.0142,
b1_sd = 0.002,
c_mean = -0.00997,
c_sd = 0.001,
b2_mean = 0.00997,
b2_sd = 0.002,
nsampled_range = c(180, 220),
output_path = here::here("01_data", "1a_survey_data", "processed",
"dhs_pr_records_combined.rds"),
seed = 123
)
Saves a list containing a tibble (`age_param_data`) to the specified path.
Character. Country name. Default is "Gambia".
Character. ISO3 country code. Default is "GMB".
Character. DHS country code. Default is "GM".
Integer. Year of the survey. Default is 2024.
Integer. Total number of individuals to simulate. Default is 266.
Numeric. Proportion of the population in urban areas. Default is 0.602.
Numeric vector of length 2. Longitude bounds for simulation. Default is c(-16.802, -13.849).
Numeric vector of length 2. Latitude bounds for simulation. Default is c(13.149, 13.801).
Numeric. Mean Web Mercator X coordinate. Default is -1764351.
Numeric. Mean Web Mercator Y coordinate. Default is 1510868.
Numeric. Mean of log-scale parameter. Default is 2.82.
Numeric. SD of log-scale parameter. Default is 0.2.
Numeric. Mean of log-shape parameter. Default is 0.331.
Numeric. SD of log-shape parameter. Default is 0.1.
Numeric. Mean of b1. Default is 0.0142.
Numeric. SD of b1. Default is 0.002.
Numeric. Mean of c. Default is -0.00997.
Numeric. SD of c. Default is 0.001.
Numeric. Mean of b2. Default is 0.00997.
Numeric. SD of b2. Default is 0.002.
Integer vector of length 2. Range of sample sizes per cluster. Default is c(180, 220).
Character. Path to save the resulting RDS file.
Integer. Random seed for reproducibility. Default is 123.