Package: surveyPrev 1.0.0

Qianyu Dong

surveyPrev: Mapping the Prevalence of Binary Indicators using Survey Data in Small Areas

Provides a pipeline to perform small area estimation and prevalence mapping of binary indicators using health and demographic survey data, described in Fuglstad et al. (2022) <doi:10.48550/arXiv.2110.09576> and Wakefield et al. (2020) <doi:10.1111/insr.12400>.

Authors:Qianyu Dong [cre, aut], Zehang R Li [aut], Yunhan Wu [aut], Andrea Boskovic [aut], Jon Wakefield [aut]

surveyPrev_1.0.0.tar.gz
surveyPrev_1.0.0.zip(r-4.5)surveyPrev_1.0.0.zip(r-4.4)surveyPrev_1.0.0.zip(r-4.3)
surveyPrev_1.0.0.tgz(r-4.5-any)surveyPrev_1.0.0.tgz(r-4.4-any)surveyPrev_1.0.0.tgz(r-4.3-any)
surveyPrev_1.0.0.tar.gz(r-4.5-noble)surveyPrev_1.0.0.tar.gz(r-4.4-noble)
surveyPrev_1.0.0.tgz(r-4.4-emscripten)surveyPrev_1.0.0.tgz(r-4.3-emscripten)
surveyPrev.pdf |surveyPrev.html
surveyPrev/json (API)
NEWS

# Install 'surveyPrev' in R:
install.packages('surveyPrev', repos = c('https://richardli.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/richardli/surveyprev/issues

Datasets:

On CRAN:

5.70 score 1 stars 9 scripts 309 downloads 173 exports 156 dependencies

Last updated 2 days agofrom:1e031e3dea. Checks:1 OK, 7 WARNING. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKJan 31 2025
R-4.5-winWARNINGJan 31 2025
R-4.5-macWARNINGJan 31 2025
R-4.5-linuxWARNINGJan 31 2025
R-4.4-winWARNINGJan 31 2025
R-4.4-macWARNINGJan 31 2025
R-4.3-winWARNINGJan 31 2025
R-4.3-macWARNINGJan 31 2025

Exports:adminInfoaggPopulationaggSurveyWeightAH_TOBC_W_OTHAH_TOBU_M_ASMAH_TOBU_M_SNNAH_TOBU_W_SNMAH_TOBU_W_SNNAN_NUTS_W_OVWch_allvac_eitherCH_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KMTA_W_IMPFP_KMTA_W_INJFP_KMTA_W_IUDFP_KMTA_W_MSTFP_KMTA_W_OMDFP_KMTA_W_PILFP_KMTA_W_STDFP_KMTA_W_TRAFP_KMTA_W_WTHfp_unmet_totget_api_tablegetDHSdatagetDHSgeogetDHSindicatorgetURHA_AFSY_M_A15HA_AFSY_M_A18HA_AFSY_W_A18HA_ANSS_M_CNDHA_ANSS_W_CNDHA_ANSS_W_RSXHA_CATH_W_ATNHA_CATH_W_NRSHA_HRSX_W_CNDHA_HVST_M_HRDHA_HVST_M_USDHA_HVTY_M_TRRHA_HVTY_W_TRRHA_KAID_W_HRDHA_STIS_M_DISHA_STIS_M_SORHA_STIS_W_STIHC_AGEG_P_ADLHC_ELEC_H_ELCHC_FLRM_H_CERHC_HEFF_H_RDOhv_hiv_posintervalPlotMA_CWIV_W_CWVMA_MBAG_W_B15MA_MBAG_W_B18MA_MBAY_W_B15MA_MBAY_W_B18MA_MSTA_W_NMAml_hhaccessNMRnt_ch_any_anemnt_ch_stuntnt_ch_wastnt_ebfnt_wm_any_anemnt_wm_thinph_sani_basicph_sani_improvePR_DESL_W_WNMrankPlotrh_anc_4vsRH_ANCN_W_N01rh_del_pvskillRH_DELP_C_DHFRH_PCCT_C_DY2scatterPlotwatersource_adjWE_AWBT_M_ARGWE_AWBT_M_BFDWE_AWBT_M_OUTWE_AWBT_M_REFWE_AWBT_W_ARGWE_AWBT_W_BFDWE_AWBT_W_NEGWE_AWBT_W_OUTWE_AWBT_W_REFWS_SRCE_H_USGWS_WTRT_P_BLCWS_WTRT_P_BOLWS_WTRT_P_SOLWS_WTRT_P_STN

Dependencies:askpassbackportsbase64encbitbit64blobbootbriobroombslibcachemcallrcellrangerclassclassIntclicliprcolorspaceconflictedcpp11crayoncurldata.tabledatawizardDBIdbplyrdeldirdigestdotCall64dplyrdtplyre1071evaluatefansifarverfastmapfieldsfontawesomeforcatsforeignfsgarglegenericsgetPassggplot2ggridgesgluegoogledrivegooglesheets4gridExtragtablehavenhighrhmshtmltoolshttridsinsightiotoolsisobandjquerylibjsonliteKernSmoothknitrlabelinglabelledlatticelifecyclelubridatemagrittrmapsMASSMatrixmatrixStatsmemoisemgcvmimeminqamitoolsmodelrmunsellnaniarnlmenormnumDerivopensslpillarpkgconfigplyrprettyunitsprocessxprogressproxypspurrrqdapRegexR6raggrappdirsrasterRColorBrewerRcppRcppArmadillordhsreadrreadxlrematchrematch2reprexreshape2rlangrmarkdownrstudioapirvests2sassscalesselectrsfshadowtextsjlabelledspspamspDataspdepstorrstringistringrSUMMERsurveysurvivalsyssystemfontsterratextshapingtibbletidyrtidyselecttidyversetimechangetinytextzdbunitsUpSetRutf8uuidvctrsviridisviridisLitevisdatvroomwithrwkxfunxml2yaml

Create customized indicators

Rendered fromvignette-data-preparation.html.asisusingR.rsp::asison Jan 31 2025.

Last update: 2024-03-20
Started: 2024-03-05

Prevalence mapping using DHS data

Rendered fromvignette-main.html.asisusingR.rsp::asison Jan 31 2025.

Last update: 2024-03-20
Started: 2024-03-20

Readme and manuals

Help Manual

Help pageTopics
Get admin informationadminInfo
Get population informationaggPopulation
Get survey weight by admin levelsaggSurveyWeight
AH_TOBC_W_OTHAH_TOBC_W_OTH
AH_TOBU_M_ASMAH_TOBU_M_ASM
AH_TOBU_M_SNNAH_TOBU_M_SNN
AH_TOBU_W_SNMAH_TOBU_W_SNM
AH_TOBU_W_SNNAH_TOBU_W_SNN
AN_NUTS_W_OVW Women who are overweight according to BMI (25.0-29.9) nt_wm_ovwt in github IRAN_NUTS_W_OVW
CH_VACS_C_BAS Children with all 8 basic vaccinations (age 12-23) "All basic vaccinations according to either source"ch_allvac_either
CH_ARIS_C_ADV Children with ARI for whom advice or treatment was sought; ch_ari_care in github KRCH_ARIS_C_ADV
CH_DIAT_C_ORT KR Diarrhea treatment (Children under five with diarrhea treated with either ORS or RHF)ch_diar_ors_rhf
CH_DIAT_C_ABICH_DIAT_C_ABI
CH_DIAT_C_ADV Treatment of diarrhea: Advice or treatment was sought; ch_diar_care in github KRCH_DIAT_C_ADV
CH_DIAT_C_AMOCH_DIAT_C_AMO
CH_DIAT_C_NOTCH_DIAT_C_NOT
CH_DIAT_C_ORSCH_DIAT_C_ORS
CH_DIAT_C_ORTCH_DIAT_C_ORT
CH_DIAT_C_OSICH_DIAT_C_OSI
CH_DIAT_C_RHFCH_DIAT_C_RHF
CH_DIFP_C_FALCH_DIFP_C_FAL
CH_FEVR_C_FEVCH_FEVR_C_FEV
CH_FEVT_C_ADV Children with fever for whom advice or treatment was sought ch_fev_care in github ml_fev_care should produce the same data KRCH_FEVT_C_ADV
CH_VACC_C_MSL MCV: Measles Measles vaccination received Percentage of children (age 12-23) ch_meas_either CH_VAC.do KR "Measles vaccination according to either source"ch_meas_either
CH_VACS_C_NON KR Children with no vaccinations (age 12-23)ch_novac_either
CH_VACC_C_DP1 KR Percentage of children (age 12-23) Pentavalent 1rd dose vaccination according to either source"ch_pent1_either
CH_VACC_C_DP3 DPT3 KR Percentage of children (age 12-23) Pentavalent 3rd dose vaccination according to either source"ch_pent3_either
CH_SZWT_C_L25CH_SZWT_C_L25
CH_VACC_C_BCG Percentage of children 12-23 months who had received BCG vaccination ms_afm_15 in github KRCH_VACC_C_BCG
Get cluster informationclusterInfo
Calculate cluster model estimates using beta binomial modelclusterModel
CM_ECMR_C_NNF NMR five years prior to survey.CM_ECMR_C_NNF
CN_BRFI_C_EVRCN_BRFI_C_EVR
CN_IYCF_C_4FA Percentage of children age 6-23 months fed five or more food groups. The food groups are a. breastmilk b. infant formula, milk other than breast milk, cheese or yogurt or other milk products; c. foods made from grains, roots, and tubers, including porridge and fortified baby food from grains; d. vitamin A-rich fruits and vegetables (and red palm oil); e. other fruits and vegetables; f. eggs; g. meat, poultry, fish, and shellfish (and organ meats); h. legumes and nuts. nt_mdd in github KRCN_IYCF_C_4FA
CN_NUTS_C_HA2CN_NUTS_C_HA2
CN_NUTS_C_HA3CN_NUTS_C_HA3
CN_NUTS_C_WA2CN_NUTS_C_WA2
CN_NUTS_C_WA3CN_NUTS_C_WA3
CN_NUTS_C_WAPCN_NUTS_C_WAP
CN_NUTS_C_WH2CN_NUTS_C_WH2
CN_NUTS_C_WH3CN_NUTS_C_WH3
CN_NUTS_C_WHPCN_NUTS_C_WHP
CO_INUS_W_EVUCO_INUS_W_EVU
CO_INUS_W_U12CO_INUS_W_U12
CO_MOBB_W_BNKCO_MOBB_W_BNK
CO_MOBB_W_MBFCO_MOBB_W_MBF
CO_MOBB_W_MOBCO_MOBB_W_MOB
CP_BREG_C_CRTCP_BREG_C_CRT
CP_BREG_C_NCTCP_BREG_C_NCT
CP_BREG_C_REGCP_BREG_C_REG
Calculate direct estimatesdirectEST
DV_AFSV_W_A10DV_AFSV_W_A10
DV_AFSV_W_A12DV_AFSV_W_A12
DV_EXPV_W_12M Percentage of women who have experienced physical violence in the past 12 months often or sometimes dv_phy_12m in github IRDV_EXPV_W_12M
DV_EXSV_W_12M Percentage of women who ever experienced sexual violence dv_sex_12m in github IRDV_EXSV_W_12M
DV_EXSV_W_EVR Percentage of women who ever experienced sexual violence dv_sex in github IRDV_EXSV_W_EVR
DV_PCPV_W_CBFDV_PCPV_W_CBF
DV_PCPV_W_CHDDV_PCPV_W_CHD
DV_PCPV_W_EMPDV_PCPV_W_EMP
DV_PCPV_W_FLWDV_PCPV_W_FLW
DV_PCPV_W_OLWDV_PCPV_W_OLW
DV_STPS_W_BFRDV_STPS_W_BFR
DV_VPRG_W_VPGDV_VPRG_W_VPG
ED_LITR_W_LITED_LITR_W_LIT
ED_MDIA_W_3MDED_MDIA_W_3MD
ED_MDIA_W_N3MED_MDIA_W_N3M
ED_MDIA_W_NWSED_MDIA_W_NWS
ED_MDIA_W_RDOED_MDIA_W_RDO
ED_MDIA_W_TLVED_MDIA_W_TLV
EM_EMPM_W_EMPEM_EMPM_W_EMP
Plot exceedance probability of model resultsexceedPlot
Calculate smoothed direct estimatesfhModel
FP_CUSM_W_MOD IRdata Modern contraceptive prevalence rate (Married women currently using any modern method of contraception)fp_cruse_mod
FP_CUSA_W_ANYFP_CUSA_W_ANY
FP_CUSA_W_EMCFP_CUSA_W_EMC
FP_CUSA_W_FCNFP_CUSA_W_FCN
FP_CUSA_W_FSTFP_CUSA_W_FST
FP_CUSA_W_IMPFP_CUSA_W_IMP
FP_CUSA_W_INJFP_CUSA_W_INJ
FP_CUSA_W_IUDFP_CUSA_W_IUD
FP_CUSA_W_MCNFP_CUSA_W_MCN
FP_CUSA_W_MSTFP_CUSA_W_MST
FP_CUSA_W_PILFP_CUSA_W_PIL
FP_CUSA_W_STDFP_CUSA_W_STD
FP_CUSA_W_TRAFP_CUSA_W_TRA
FP_CUSA_W_WTHFP_CUSA_W_WTH
FP_EFPM_M_NWSFP_EFPM_M_NWS
FP_EFPM_M_TLVFP_EFPM_M_TLV
FP_EFPM_W_NWSFP_EFPM_W_NWS
FP_EFPM_W_RDOFP_EFPM_W_RDO
FP_EFPM_W_TLVFP_EFPM_W_TLV
FP_EVUM_W_MODFP_EVUM_W_MOD
FP_KMTA_W_ANYFP_KMTA_W_ANY
FP_KMTA_W_EMCFP_KMTA_W_EMC
FP_KMTA_W_FCNFP_KMTA_W_FCN
FP_KMTA_W_FSTFP_KMTA_W_FST
FP_KMTA_W_IMPFP_KMTA_W_IMP
FP_KMTA_W_INJFP_KMTA_W_INJ
FP_KMTA_W_IUDFP_KMTA_W_IUD
FP_KMTA_W_MSTFP_KMTA_W_MST
FP_KMTA_W_OMDFP_KMTA_W_OMD
FP_KMTA_W_PILFP_KMTA_W_PIL
FP_KMTA_W_STDFP_KMTA_W_STD
FP_KMTA_W_TRAFP_KMTA_W_TRA
FP_KMTA_W_WTHFP_KMTA_W_WTH
FP_NADA_W_UNT #unmet_family IRdata women with an unmet need for family planning for spacing and limitingfp_unmet_tot
Function to obtain subnational estimates from DHS APIget_api_table
Download DHS survey datagetDHSdata
Download DHS geo datagetDHSgeo
Process DHS datagetDHSindicator
Function to threshold population raster to obtain urban/rural fractions by Admin1 and Admin2 areasgetUR
HA_AFSY_M_A15HA_AFSY_M_A15
HA_AFSY_M_A18HA_AFSY_M_A18
HA_AFSY_W_A18HA_AFSY_W_A18
HA_ANSS_M_CNDHA_ANSS_M_CND
HA_ANSS_W_CNDHA_ANSS_W_CND
HA_ANSS_W_RSXHA_ANSS_W_RSX
HA_CATH_W_ATNHA_CATH_W_ATN
HA_CATH_W_NRSHA_CATH_W_NRS
HA_HRSX_W_CNDHA_HRSX_W_CND
HA_HVST_M_HRDHA_HVST_M_HRD
HA_HVST_M_USDHA_HVST_M_USD
HA_HVTY_M_TRRHA_HVTY_M_TRR
HA_HVTY_W_TRRHA_HVTY_W_TRR
HA_KAID_W_HRD Percentage of women who have heard of HIV or AIDS hk_ever_heard in github IRHA_KAID_W_HRD
HA_STIS_M_DISHA_STIS_M_DIS
HA_STIS_M_SORHA_STIS_M_SOR
HA_STIS_W_STI Percentage of women reporting a sexually transmitted infection in the 12 months preceding the survey among women who ever had sexual intercourse hk_sti in github IRHA_STIS_W_STI
HC_AGEG_P_ADLHC_AGEG_P_ADL
HC_ELEC_H_ELC Percentage of households with electricity ph_electric in github HRHC_ELEC_H_ELC
HC_FLRM_H_CER Percentage of households with ceramic tile floors ph_floor in github HRHC_FLRM_H_CER
HC_HEFF_H_RDO Percentage of households possessing a radio ph_radio in github HRHC_HEFF_H_RDO
HA_HIVP_W_HIV hv_hiv_pos "HIV positive test result"hv_hiv_pos
Get scatter plot for any two model resultsintervalPlot
MA_CWIV_W_CWVMA_CWIV_W_CWV
MA_MBAG_W_B15 Women first married by exact age 15 ms_afm_15 in github IRMA_MBAG_W_B15
##' MA_MBAG_W_B18 Percentage of women first married by exact age 18 ms_afm_18 in github IRMA_MBAG_W_B18
MA_MBAY_W_B15 Young women age 20-24 first married by exact age 15 ms_afm_15 in github IRMA_MBAY_W_B15
MA_MBAY_W_B18 Percentage of Young women age 20-24 first married by exact age 18 ms_afm_18 in github IRMA_MBAY_W_B18
MA_MSTA_W_NMAMA_MSTA_W_NMA
ML_ITNA_P_ACC Households with at least one insecticide-treated mosquito net (ITN) for every two persons who stayed in the household the previous night Persons with access to an insecticide-treated mosquito net (ITN) ML_NETS_HH.do HR Households with >1 ITN per 2 household members Percentage of households with at least one ITN for every 2 persons who stayed in the household last nightml_hhaccess
CM_ECMR_C_NNR nmr CM_ECMR_C_NNR BR (not from dhs github) Neonatal mortality rate !!!!!!NMR
CN_ANMC_C_ANY Children with any anemia "Any anemia - child 6-59 months" PR NT_CH_NUT.do Children under five with any anemiant_ch_any_anem
CN_NUTS_C_HA2 stunting Children stunted NT_CH_NUT.do PR "Stunted child under 5 years" Stunting rate (Prevalence of stunted (HAZ < -2) children under five (0-59 months)) Percentage of children under age five stunted (below -2 standard deviations of height-for-age according to the WHO standard).nt_ch_stunt
CN_NUTS_C_WH2 wasting Children wasted NT_CH_NUT.do PR "Wasted child under 5 years" Wasting rate (Prevalence of wasted (HAZ < -2) children under five (0-59 months)) Percentage of children under age five with a weight-for-height z-score (WHZ) more than two standard deviations below the median WHO growth standards.nt_ch_wast
CN_BRFS_C_EXB Children exclusively breastfed NT_IYCF.do KR "Exclusively breastfed - last-born under 6 months" Children exclusively breastfed (Prevalence of exclusive breastfeeding of children under six months of age)nt_ebf
AN_ANEM_W_ANY womananemia nt_wm_any_anem "Any anemia - women" NT_WM_NUT.do Percentage of women aged 15-49 classified as having any anemiant_wm_any_anem
AN_NUTS_W_THN Women who are thin according to BMI (<18.5) NT_WM_NUT.do "Thin BMI - women" IR !!!!!!!! Underweight (Prevalence of underweight (BMI < 18.5) women of reproductive age)nt_wm_thin
WS_TLET_P_BAS Population with access to a basic sanitation service WS_TLET_P_BAS in DHS API PH_SANI.do PR ph_sani_basic "Basic sanitation facility"ph_sani_basic
WS_TLET_H_IMP Percentage of households using an improved sanitation facility PH_SANI.do PR ph_sani_improve "Access to improved sanitation" country-specificph_sani_improve
PR_DESL_W_WNMPR_DESL_W_WNM
Get ranking plot of model resultsrankPlot
RH_ANCN_W_N4P ancvisit4+ RH_ANCN_W_N4P IR Antenatal visits for pregnancy: 4+ visitsrh_anc_4vs
AH_TOBC_W_OTHRH_ANCN_W_N01
RH_DELA_C_SKP IR or BR Assistance during delivery from a skilled providerrh_del_pvskill
RH_DELP_C_DHFRH_DELP_C_DHF
RH_PCCT_C_DY2 Newborn's first postnatal checkup: 1-2 days rh_pnc_nb_2days in github IRRH_PCCT_C_DY2
Get scatter plot for any two model resultsscatterPlot
Table of built-in indicators.surveyPrevIndicators
WS_SRCE_P_BAS Population using a basic water source PH_WATER.do ph_wtr_basic "Basic water service" PRwatersource_adj
WE_AWBT_M_ARGWE_AWBT_M_ARG
WE_AWBT_M_BFDWE_AWBT_M_BFD
WE_AWBT_M_OUTWE_AWBT_M_OUT
WE_AWBT_M_REFWE_AWBT_M_REF
WE_AWBT_W_ARGWE_AWBT_W_ARG
WE_AWBT_W_BFDWE_AWBT_W_BFD
WE_AWBT_W_NEGWE_AWBT_W_NEG
WE_AWBT_W_OUTWE_AWBT_W_OUT
WE_AWBT_W_REFWE_AWBT_W_REF
WS_SRCE_H_USG Percentage of households whose main source of drinking water is an unprotected spring ph_wtr_source in github "unprotected spring" = 42, HRWS_SRCE_H_USG
WS_WTRT_P_BLCWS_WTRT_P_BLC
WS_WTRT_P_BOLWS_WTRT_P_BOL
WS_WTRT_P_SOLWS_WTRT_P_SOL
WS_WTRT_P_STNWS_WTRT_P_STN
Admin 1 Polygon Map for Zambia.ZambiaAdm1
Admin 2 Polygon Map for Zambia.ZambiaAdm2
Population estimates for Women of age 15 to 49 in Zambia in 2018.ZambiaPopWomen