if (FALSE) {
geo <- getDHSgeo(country = "Zambia", year = 2018)
data(ZambiaAdm1)
data(ZambiaAdm2)
data(ZambiaPopWomen)
cluster.info<-clusterInfo(geo=geo, poly.adm1=poly.adm1, poly.adm2=poly.adm2,
by.adm1 = "NAME_1",by.adm2 = "NAME_2")
dhsData <- getDHSdata(country = "Zambia",
indicator = "ancvisit4+",
year = 2018)
data <- getDHSindicator(dhsData, indicator = "ancvisit4+")
res_ad1 <- directEST(data = data,
cluster.info = cluster.info,
admin = 1,
aggregation = FALSE)
res_ad1
# compare with the DHS direct estimates
dhs_table <- get_api_table(country = "ZM",
survey = "ZM2018DHS",
indicator = "RH_ANCN_W_N4P",
simplify = TRUE)
subset(dhs_table, ByVariableLabel == "Five years preceding the survey")
}
Run the code above in your browser using DataLab