| Title: | Mapping the Prevalence of Binary Indicators using Survey Data in Small Areas |
|---|---|
| Description: | Provides a pipeline to perform small area estimation and prevalence mapping of binary indicators using health and demographic survey data, described in Dong et al. (2026) <doi:10.1093/jssam/smaf048>, Wakefield et al. (2025) <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], Jieyi Xu [aut], Andrea Boskovic [aut], Jon Wakefield [aut] |
| Maintainer: | Qianyu Dong <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 2.0.0 |
| Built: | 2026-07-09 16:55:45 UTC |
| Source: | https://github.com/richardli/surveyprev |
Create new row to add in indicatorList.
addNewIndicator( new_id, dictionary, IR = FALSE, PR = FALSE, KR = FALSE, BR = FALSE, HR = FALSE, MR = FALSE, AR = FALSE, CR = FALSE )addNewIndicator( new_id, dictionary, IR = FALSE, PR = FALSE, KR = FALSE, BR = FALSE, HR = FALSE, MR = FALSE, AR = FALSE, CR = FALSE )
new_id |
The ID of the new indicator (e.g., "FE_FRTR_W_A10"). |
dictionary |
The DHS indicator dictionary data frame, e.g.sae4health::DHS_ind_dictionary |
IR |
Logical flag indicating whether the IR recode file is required. |
PR |
Logical flag indicating whether the PR recode file is required. |
KR |
Logical flag indicating whether the KR recode file is required. |
BR |
Logical flag indicating whether the BR recode file is required. |
HR |
Logical flag indicating whether the HR recode file is required. |
MR |
Logical flag indicating whether the MR recode file is required. |
AR |
Logical flag indicating whether the AR recode file is required. |
CR |
Logical flag indicating whether the CR recode file is required. |
The a row to rbind into indicator_df
Qianyu Dong
## Not run: newrow=addNewIndicator(new_id="RH_DELP_C_HOM", dictionary= sae4health::DHS_ind_dictionary, IR=FALSE, PR=FALSE, KR=FALSE, BR=TRUE, HR=FALSE, MR=FALSE, AR=FALSE, CR=FALSE ) newrow <- newrow[, names(indicatorList)] indicatorList <- rbind(indicatorList, newrow) ## End(Not run)## Not run: newrow=addNewIndicator(new_id="RH_DELP_C_HOM", dictionary= sae4health::DHS_ind_dictionary, IR=FALSE, PR=FALSE, KR=FALSE, BR=TRUE, HR=FALSE, MR=FALSE, AR=FALSE, CR=FALSE ) newrow <- newrow[, names(indicatorList)] indicatorList <- rbind(indicatorList, newrow) ## End(Not run)
Maps each polygon in a lower administrative layer (e.g., ADM2) to its containing polygon in an upper layer (e.g., ADM1), populating an upper-level name column. If containment fails for some polygons (e.g., due to slivers or minor topology issues), a nearest-centroid fallback is used.
addUpper( poly.adm.upper, poly.adm, by.adm, by.adm.upper, out_lower = "NAME_2", out_upper = "NAME_1", sort = TRUE )addUpper( poly.adm.upper, poly.adm, by.adm, by.adm.upper, out_lower = "NAME_2", out_upper = "NAME_1", sort = TRUE )
poly.adm.upper |
Spatial polygons for the *upper* admin level
(e.g., Admin 1 when the desired output is Admin 2). Can be an
|
poly.adm |
Spatial polygons for the *target* admin level you want
returned (e.g., Admin 2). Can be an |
by.adm |
Character scalar. Column name in |
by.adm.upper |
Character scalar. Column name in |
out_lower |
Character scalar. Name of the output column to hold the
lower-level names in the returned object. Defaults to |
out_upper |
Character scalar. Name of the output column to hold the
upper-level names in the returned object. Defaults to |
sort |
Logical. If |
Inputs may be either sf or sp polygon data. If sp inputs
are provided, they are converted to sf internally. Containment is
determined via sf::st_within(). For polygons not matched by containment,
the function uses sf::st_nearest_feature() on centroids
(sf::st_centroid()) to assign an upper-level name.
An sf object at the target (lower) admin level containing:
out_lower: lower-level admin name (copied from by.adm)
out_upper: upper-level admin name (derived via spatial matching)
geometry: polygon geometry
admin2.name.full: convenience concatenation
paste0(out_upper, "_", out_lower)
## Not run: library(sf) adm1 <- st_read("geoBoundaries/geoBoundaries-NGA-ADM1-all/geoBoundaries-NGA-ADM1.shp") adm2 <- st_read("geoBoundaries/geoBoundaries-NGA-ADM2-all/geoBoundaries-NGA-ADM2.shp") # If both layers use "shapeName" but you want outputs named NAME_1/NAME_2: res <- addUpper( poly.adm.upper = adm1, poly.adm = adm2, by.adm = "shapeName", # lower-level names by.adm.upper = "shapeName", # upper-level names out_lower = "NAME_2", out_upper = "NAME_1", sort = TRUE ) # If the columns are already NAME_1 / NAME_2: res2 <- addUpper( poly.adm.upper = adm1, poly.adm = adm2, by.adm = "NAME_2", by.adm.upper = "NAME_1" ) ## End(Not run)## Not run: library(sf) adm1 <- st_read("geoBoundaries/geoBoundaries-NGA-ADM1-all/geoBoundaries-NGA-ADM1.shp") adm2 <- st_read("geoBoundaries/geoBoundaries-NGA-ADM2-all/geoBoundaries-NGA-ADM2.shp") # If both layers use "shapeName" but you want outputs named NAME_1/NAME_2: res <- addUpper( poly.adm.upper = adm1, poly.adm = adm2, by.adm = "shapeName", # lower-level names by.adm.upper = "shapeName", # upper-level names out_lower = "NAME_2", out_upper = "NAME_1", sort = TRUE ) # If the columns are already NAME_1 / NAME_2: res2 <- addUpper( poly.adm.upper = adm1, poly.adm = adm2, by.adm = "NAME_2", by.adm.upper = "NAME_1" ) ## End(Not run)
This function get admin information including name, character, population and unban/rural proportion.
adminInfo( poly.adm, by.adm, admin, by.adm.upper = NULL, agg.pop = NULL, proportion = NULL )adminInfo( poly.adm, by.adm, admin, by.adm.upper = NULL, agg.pop = NULL, proportion = NULL )
poly.adm |
spatial polygons dataframe for Admin levels such as Admin 1 or Admin 2. This object can be either an sp::SpatialPolygonsDataFrame object or an sf object. |
by.adm |
the column name of column for Admin names for desired output Admin level, can be such as "NAME_1" or "NAME_2". |
admin |
desired admin level for the output, can be 1 or 2. |
by.adm.upper |
the column name of column for Admin names for upper level of your desired output Admin level when admin=2, can be "NAME_1" when by.adm="NAME_2". |
agg.pop |
data frame of aggregated poplulation from aggPopulation function. It should have two columns: "admin2.name.full" and "population". |
proportion |
data frame of urban/rural proportions. For admin1, is should have two columns: "admin1.name" and "urban". For admin2, in order to avoid issues merging datasets with duplicated admin2 names, either of the following two formats can be used: (a) three columns: "admin1.name", "admin2.name", and "urban"; and (b) two columns: "admin2.name.full" and "urban", where "admin2.name.full" takes both the admin1 and admin2 name and connect them with an "_", i.e., "Lusaka_Chilanga". |
This function returns the 1. dataframe that contains admin 1 and admin 2 information and coordinates for each cluster and 2. Adjacency matrix.
Qianyu Dong
# For sp::SpatialPolygonsDataFrame object data(ZambiaAdm1) class(ZambiaAdm1) info <- adminInfo(poly.adm=ZambiaAdm1, admin = 1, by.adm="NAME_1") data(ZambiaAdm2) class(ZambiaAdm2) info2 <- adminInfo(poly.adm=ZambiaAdm2, admin = 2,by.adm="NAME_2",by.adm.upper="NAME_1") # For sf object geo.sf <- sf::st_as_sf(ZambiaAdm1) info <- adminInfo(poly.adm=geo.sf, admin = 1,by.adm="NAME_1") # To include the population information data(ZambiaPopWomen) info <- adminInfo(poly.adm = ZambiaAdm1, admin = 1,by.adm="NAME_1", agg.pop = ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban )# For sp::SpatialPolygonsDataFrame object data(ZambiaAdm1) class(ZambiaAdm1) info <- adminInfo(poly.adm=ZambiaAdm1, admin = 1, by.adm="NAME_1") data(ZambiaAdm2) class(ZambiaAdm2) info2 <- adminInfo(poly.adm=ZambiaAdm2, admin = 2,by.adm="NAME_2",by.adm.upper="NAME_1") # For sf object geo.sf <- sf::st_as_sf(ZambiaAdm1) info <- adminInfo(poly.adm=geo.sf, admin = 1,by.adm="NAME_1") # To include the population information data(ZambiaPopWomen) info <- adminInfo(poly.adm = ZambiaAdm1, admin = 1,by.adm="NAME_1", agg.pop = ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban )
This function aggregate population to particular admin levels
aggPopulation(tiff, fact = 10, poly.adm, by.adm, by.adm.upper = NULL)aggPopulation(tiff, fact = 10, poly.adm, by.adm, by.adm.upper = NULL)
tiff |
spatial raster of population estimates. |
fact |
factor to aggregate pixels. Default to be 10, i.e., the population estimates will be saved on 1km by 1km grids if the input is 100m by 100m tiff. Larger values of aggregation factor improves the computation speed, but can introduce more errors when the regions defined by the polygon are small in size. |
poly.adm |
spatial polygons dataframe. |
by.adm |
the column name of column for Admin names for desired output Admin level, can be such as "NAME_1" or "NAME_2". Duplicated admin names are handled internally when by.adm.upper is specified |
by.adm.upper |
the column name of column for Admin names for upper level of your desired output Admin level when admin=2, can be "NAME_1" when by.adm="NAME_2". |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level
Qianyu Dong
## Not run: library(raster) # Download and find total population in age group 0 to 12 months pre <- "https://data.worldpop.org/GIS/AgeSex_structures/" f <- paste0(pre, "Global_2000_2020/2018/ZMB/zmb_f_0_2018.tif") m <- paste0(pre, "Global_2000_2020/2018/ZMB/zmb_m_0_2018.tif") pop_f_0 <- raster(f) pop_m_0 <- raster(m) pop_raster <- pop_f_0 + pop_m_0 # admin1 population agg.pop1 <- aggPopulation( tiff = pop_raster, poly.adm = ZambiaAdm1, by.adm = "NAME_1") # admin2 population agg.pop2 <- aggPopulation( tiff = ZambiaPopWomen_raster, poly.adm = ZambiaAdm2, by.adm = "NAME_2", by.adm.upper="NAME_1") ## End(Not run)## Not run: library(raster) # Download and find total population in age group 0 to 12 months pre <- "https://data.worldpop.org/GIS/AgeSex_structures/" f <- paste0(pre, "Global_2000_2020/2018/ZMB/zmb_f_0_2018.tif") m <- paste0(pre, "Global_2000_2020/2018/ZMB/zmb_m_0_2018.tif") pop_f_0 <- raster(f) pop_m_0 <- raster(m) pop_raster <- pop_f_0 + pop_m_0 # admin1 population agg.pop1 <- aggPopulation( tiff = pop_raster, poly.adm = ZambiaAdm1, by.adm = "NAME_1") # admin2 population agg.pop2 <- aggPopulation( tiff = ZambiaPopWomen_raster, poly.adm = ZambiaAdm2, by.adm = "NAME_2", by.adm.upper="NAME_1") ## End(Not run)
This function aggregate survey weight to particular admin levels
aggSurveyWeight( data, cluster.info, admin, poly.adm = NULL, by.adm = NULL, by.adm.upper = NULL )aggSurveyWeight( data, cluster.info, admin, poly.adm = NULL, by.adm = NULL, by.adm.upper = NULL )
data |
dataframe that contains the indicator of interests, output of getDHSindicator function |
cluster.info |
list that contains admin 1 and admin 2 information and coordinates for each cluster, output of clusterinfo function |
admin |
desired admin level for aggregation |
poly.adm |
spatial polygons dataframe |
by.adm |
the column name of column for Admin names for desired output Admin level, can be such as "NAME_1" or "NAME_2". |
by.adm.upper |
the column name of column for Admin names for upper level of your desired output Admin level when admin=2, can be "NAME_1" when by.adm="NAME_2". |
This function returns the dataset that contain admin name and survey weight.
Qianyu Dong
## Not run: # admin1 population year <- 2018 country <- "Zambia" indicator="nmr" geo <- getDHSgeo(country = country, year = year) dhsData <- getDHSdata(country = country, indicator=indicator, year = year) data<- getDHSindicator(dhsData, indicator = indicator) poly.adm1=ZambiaAdm1 poly.adm2=ZambiaAdm2 cluster.info<-clusterInfo(geo=geo, poly.adm1=poly.adm1, poly.adm2=poly.adm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") agg.survey1<-aggSurveyWeight(data=data,cluster.info=cluster.info,admin=1) agg.survey2<-aggSurveyWeight(data=data,cluster.info=cluster.info,admin=2, poly.adm = poly.adm2, by.adm="NAME_2", by.adm.upper ="NAME_1") ## End(Not run)## Not run: # admin1 population year <- 2018 country <- "Zambia" indicator="nmr" geo <- getDHSgeo(country = country, year = year) dhsData <- getDHSdata(country = country, indicator=indicator, year = year) data<- getDHSindicator(dhsData, indicator = indicator) poly.adm1=ZambiaAdm1 poly.adm2=ZambiaAdm2 cluster.info<-clusterInfo(geo=geo, poly.adm1=poly.adm1, poly.adm2=poly.adm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") agg.survey1<-aggSurveyWeight(data=data,cluster.info=cluster.info,admin=1) agg.survey2<-aggSurveyWeight(data=data,cluster.info=cluster.info,admin=2, poly.adm = poly.adm2, by.adm="NAME_2", by.adm.upper ="NAME_1") ## End(Not run)
Percentage of women with any health insurance
AH_HINS_W_ANY(IRdata)AH_HINS_W_ANY(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
AH_TOBC_W_OTH
AH_TOBC_W_OTH(IRdata)AH_TOBC_W_OTH(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBC_W_OTH", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBC_W_OTH", year = 2018) ## End(Not run)
AH_TOBU_M_ASM
AH_TOBU_M_ASM(MRdata)AH_TOBU_M_ASM(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_M_ASM", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_M_ASM", year = 2018) ## End(Not run)
AH_TOBU_M_SNN
AH_TOBU_M_SNN(MRdata)AH_TOBU_M_SNN(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_M_SNN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_M_SNN", year = 2018) ## End(Not run)
AH_TOBU_W_SNM
AH_TOBU_W_SNM(IRdata)AH_TOBU_W_SNM(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_W_SNM", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_W_SNM", year = 2018) ## End(Not run)
AH_TOBU_W_SNN
AH_TOBU_W_SNN(IRdata)AH_TOBU_W_SNN(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_W_SNN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AH_TOBU_W_SNN", year = 2018) ## End(Not run)
AN_ANEM_W_ANY IRdata Percentage of women aged 15-49 classified as having any anemia
AN_ANEM_W_ANY(Rdata)AN_ANEM_W_ANY(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_ANEM_W_ANY", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::AN_ANEM_W_ANY) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_ANEM_W_ANY", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::AN_ANEM_W_ANY) ## End(Not run)
AN_NUTS_W_OVW Women who are overweight according to BMI (25.0-29.9) nt_wm_ovwt in github IR
AN_NUTS_W_OVW(Rdata)AN_NUTS_W_OVW(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_NUTS_W_OVW", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_NUTS_W_OVW", year = 2018) ## End(Not run)
AN_NUTS_W_THN IRdata Women who are thin according to BMI (<18.5)
AN_NUTS_W_THN(Rdata)AN_NUTS_W_THN(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_NUTS_W_THN", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::AN_NUTS_W_THN) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "AN_NUTS_W_THN", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::AN_NUTS_W_THN) ## End(Not run)
CH_ARIS_C_ADV Children with ARI for whom advice or treatment was sought; ch_ari_care in github KR
CH_ARIS_C_ADV(Rdata)CH_ARIS_C_ADV(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_ARIS_C_ADV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_ARIS_C_ADV", year = 2018) ## End(Not run)
CH_DIAT_C_ABI
CH_DIAT_C_ABI(KRdata)CH_DIAT_C_ABI(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ABI", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ABI", year = 2018) ## End(Not run)
CH_DIAT_C_ADV Treatment of diarrhea: Advice or treatment was sought; ch_diar_care in github KR
CH_DIAT_C_ADV(Rdata)CH_DIAT_C_ADV(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ADV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ADV", year = 2018) ## End(Not run)
CH_DIAT_C_AMO
CH_DIAT_C_AMO(KRdata)CH_DIAT_C_AMO(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_AMO", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_AMO", year = 2018) ## End(Not run)
CH_DIAT_C_NOT
CH_DIAT_C_NOT(KRdata)CH_DIAT_C_NOT(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_NOT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_NOT", year = 2018) ## End(Not run)
CH_DIAT_C_ORS
CH_DIAT_C_ORS(KRdata)CH_DIAT_C_ORS(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ORS", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ORS", year = 2018) ## End(Not run)
CH_DIAT_C_ORT
CH_DIAT_C_ORT(KRdata)CH_DIAT_C_ORT(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ORT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_ORT", year = 2018) ## End(Not run)
CH_DIAT_C_OSI
CH_DIAT_C_OSI(KRdata)CH_DIAT_C_OSI(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_OSI", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_OSI", year = 2018) ## End(Not run)
CH_DIAT_C_RHF
CH_DIAT_C_RHF(KRdata)CH_DIAT_C_RHF(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_RHF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIAT_C_RHF", year = 2018) ## End(Not run)
CH_DIFP_C_FAL
CH_DIFP_C_FAL(KRdata)CH_DIFP_C_FAL(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIFP_C_FAL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_DIFP_C_FAL", year = 2018) ## End(Not run)
CH_FEVR_C_FEV
CH_FEVR_C_FEV(KRdata)CH_FEVR_C_FEV(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_FEVR_C_FEV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_FEVR_C_FEV", year = 2018) ## End(Not run)
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 KR
CH_FEVT_C_ADV(Rdata)CH_FEVT_C_ADV(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_FEVT_C_ADV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_FEVT_C_ADV", year = 2018) ## End(Not run)
CH_SZWT_C_L25
CH_SZWT_C_L25(KRdata)CH_SZWT_C_L25(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_SZWT_C_L25", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_SZWT_C_L25", year = 2018) ## End(Not run)
Percentage of children one to four years of age for whom a vaccination card was shown
CH_VAC1_C_VCD(KRdata)CH_VAC1_C_VCD(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who were fully vaccinated according to the national schedule
CH_VACC_C_APP(KRdata)CH_VACC_C_APP(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
CH_VACC_C_BAS KRdata Children with all 8 basic vaccinations (age 12-23)
CH_VACC_C_BAS(Rdata)CH_VACC_C_BAS(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_BAS) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_BAS) ## End(Not run)
CH_VACC_C_BCG Percentage of children 12-23 months who had received BCG vaccination ms_afm_15 in github KR
CH_VACC_C_BCG(Rdata)CH_VACC_C_BCG(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_BCG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_BCG", year = 2018) ## End(Not run)
CH_VACC_C_DP1 KRdata Pentavalent 1st dose vaccination Percentage of children (age 12-23) with 1st dose of Pentavalent vaccine
CH_VACC_C_DP1(Rdata)CH_VACC_C_DP1(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_DP1", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_DP1) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_DP1", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_DP1) ## End(Not run)
CH_VACC_C_DP3 KRdata Pentavalent 3rd dose vaccination Percentage of children (age 12-23) with 3rd dose of Pentavalent vaccine
CH_VACC_C_DP3(Rdata)CH_VACC_C_DP3(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_DP3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_DP3) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_DP3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_DP3) ## End(Not run)
CH_VACC_C_MSL KRdata Measles vaccination received Percentage of children (age 12-23)
CH_VACC_C_MSL(Rdata)CH_VACC_C_MSL(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_MSL", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_MSL) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_MSL", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_MSL) ## End(Not run)
CH_VACC_C_NON KRdata Children with no vaccinations (age 12-23)
CH_VACC_C_NON(Rdata)CH_VACC_C_NON(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_NON", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_NON) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_NON", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_NON) ## End(Not run)
CH_VACC_C_PN3 KRdata Pneumococcal 3rd dose vaccination Percentage of children (age 12-23)
CH_VACC_C_PN3(Rdata)CH_VACC_C_PN3(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_PN3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_PN3) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_PN3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_PN3) ## End(Not run)
CH_VACC_C_RT1 KRdata Rotavirus 1 vaccination received
CH_VACC_C_RT1(Rdata)CH_VACC_C_RT1(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_RT1", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_RT1) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACC_C_RT1", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACC_C_RT1) ## End(Not run)
Percentage of children 12-23 (or 24-35) months who were fully vaccinated according to the national schedule
CH_VACS_C_APP(KRdata)CH_VACS_C_APP(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who were fully vaccinated with 8 basic antigens (BCG, Polio 1-3, DPT 1-3, Measles)
CH_VACS_C_BAS(KRdata)CH_VACS_C_BAS(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received BCG vaccination
CH_VACS_C_BCG(KRdata)CH_VACS_C_BCG(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received DPT 1 vaccination
CH_VACS_C_DP1(KRdata)CH_VACS_C_DP1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received DPT 2 vaccination
CH_VACS_C_DP2(KRdata)CH_VACS_C_DP2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received DPT 3 vaccination
CH_VACS_C_DP3(KRdata)CH_VACS_C_DP3(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Hepatitis 1 vaccination
CH_VACS_C_HP1(KRdata)CH_VACS_C_HP1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Hepatitis 2 vaccination
CH_VACS_C_HP2(KRdata)CH_VACS_C_HP2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Hepatitis 3 vaccination
CH_VACS_C_HP3(KRdata)CH_VACS_C_HP3(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Measles 2 vaccination
CH_VACS_C_MS2(KRdata)CH_VACS_C_MS2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Measles vaccination
CH_VACS_C_MSL(KRdata)CH_VACS_C_MSL(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received no vaccinations
CH_VACS_C_NON(KRdata)CH_VACS_C_NON(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Polio 0 vaccination
CH_VACS_C_OP0(KRdata)CH_VACS_C_OP0(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Polio 1 vaccination
CH_VACS_C_OP1(KRdata)CH_VACS_C_OP1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Polio 2 vaccination
CH_VACS_C_OP2(KRdata)CH_VACS_C_OP2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Polio 3 vaccination
CH_VACS_C_OP3(KRdata)CH_VACS_C_OP3(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Pneumococcal 1 vaccination
CH_VACS_C_PN1(KRdata)CH_VACS_C_PN1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Pneumococcal 2 vaccination
CH_VACS_C_PN2(KRdata)CH_VACS_C_PN2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
CH_VACS_C_PN3 KRdata Pneumococcal 3 vaccination received
CH_VACS_C_PN3(Rdata)CH_VACS_C_PN3(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACS_C_PN3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACS_C_PN3) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CH_VACS_C_PN3", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CH_VACS_C_PN3) ## End(Not run)
Percentage of children 12-23 (or 24-35) months who had received Pentavalent 1 vaccination
CH_VACS_C_PT1(KRdata)CH_VACS_C_PT1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Pentavalent 2 vaccination
CH_VACS_C_PT2(KRdata)CH_VACS_C_PT2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Pentavalent 3 vaccination
CH_VACS_C_PT3(KRdata)CH_VACS_C_PT3(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Rotavirus 1 vaccination
CH_VACS_C_RT1(KRdata)CH_VACS_C_RT1(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children 12-23 (or 24-35) months who had received Rotavirus 2 vaccination
CH_VACS_C_RT2(KRdata)CH_VACS_C_RT2(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
This function add admin 1 and admin2 information to a particular DHS survey.
clusterInfo( geo, poly.adm1, poly.adm2 = NULL, by.adm1 = "NAME_1", by.adm2 = "NAME_2", map = FALSE )clusterInfo( geo, poly.adm1, poly.adm2 = NULL, by.adm1 = "NAME_1", by.adm2 = "NAME_2", map = FALSE )
geo |
spatial point dataframe |
poly.adm1 |
spatial polygons dataframe for admin 1 |
poly.adm2 |
spatial polygons dataframe for admin 2 or other lower admin level. |
by.adm1 |
the column name of column for Admin names for admin 1 |
by.adm2 |
the column name of column for Admin names for admin 2 or other lower admin level. |
map |
whether to return a map of clusters or not |
This function returns the dataset that contains admin 1 and admin 2 information and coordinates for each cluster.
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) ## End(Not run)
This function calculate smoothed direct estimates at given admin level.
clusterModel( data, cluster.info, admin.info, X = NULL, X.unit = NULL, X.pixel = NULL, admin, CI = 0.95, model = c("bym2", "iid"), stratification = FALSE, aggregation = FALSE, nested = FALSE, interact = FALSE, overdisp.mean = 0, overdisp.prec = 0.4, pc.u = 1, pc.alpha = 0.01, pc.u.phi = 0.5, pc.alpha.phi = 2/3, ... )clusterModel( data, cluster.info, admin.info, X = NULL, X.unit = NULL, X.pixel = NULL, admin, CI = 0.95, model = c("bym2", "iid"), stratification = FALSE, aggregation = FALSE, nested = FALSE, interact = FALSE, overdisp.mean = 0, overdisp.prec = 0.4, pc.u = 1, pc.alpha = 0.01, pc.u.phi = 0.5, pc.alpha.phi = 2/3, ... )
data |
dataframe that contains the indicator of interests(column name is value), output of getDHSindicator function |
cluster.info |
dataframe that contains admin 1 and admin 2 information and coordinates for each cluster. |
admin.info |
dataframe that contains population and urban/rural proportion at specific admin level |
X |
dataframe that contains areal covariates, the first column should be the same admin name as in admin.info$data. |
X.unit |
dataframe that contains unit covariates, must contain cluster |
X.pixel |
dataframe that contains pixel covariates, must contain 1. admin1.name or admin2.name.full, 2. Population, 3. strata if stratification==T |
admin |
admin level for the model |
CI |
Credible interval to be used. Default to 0.95. |
model |
smoothing model used in the random effect. Options are independent ("iid") or spatial ("bym2"). |
stratification |
whether or not to include urban/rural stratum. |
aggregation |
whether or not report aggregation results. |
nested |
whether or not to fit a nested model. |
interact |
whether or not to fit a admin1 x urban/rural model. |
overdisp.mean |
prior mean for logit(d), where d is the intracluster correlation. |
overdisp.prec |
prior precision for logit(d), where d is the intracluster correlation. |
pc.u |
pc prior u for iid or bym2 precision. |
pc.alpha |
pc prior alpha for iid or bym2 precision. |
pc.u.phi |
pc prior u for bym2 mixing paramete. |
pc.alpha.phi |
pc prior u for bym2 mixing paramete. |
... |
additional arguments for internal functions. |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) cl_res_ad1 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info1, stratification = FALSE, model = "bym2", admin = 1, aggregation = TRUE, CI = 0.95) cl_res_ad1$res.admin1 # 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") ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) cl_res_ad1 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info1, stratification = FALSE, model = "bym2", admin = 1, aggregation = TRUE, CI = 0.95) cl_res_ad1$res.admin1 # 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") ## End(Not run)
This function calculate smoothed direct estimates at given admin level.
clusterModel_u5mr( data, cluster.info, admin.info, X = NULL, X.unit = NULL, X.pixel = NULL, admin, CI = 0.95, model = c("bym2", "iid"), stratification = FALSE, aggregation = FALSE, nested = FALSE, interact = FALSE, overdisp.mean = 0, overdisp.prec = 0.4, pc.u = 1, pc.alpha = 0.01, pc.u.phi = 0.5, pc.alpha.phi = 2/3, age.space.group = c(1, 2, 2, 2, 3, 3, 3, 3) )clusterModel_u5mr( data, cluster.info, admin.info, X = NULL, X.unit = NULL, X.pixel = NULL, admin, CI = 0.95, model = c("bym2", "iid"), stratification = FALSE, aggregation = FALSE, nested = FALSE, interact = FALSE, overdisp.mean = 0, overdisp.prec = 0.4, pc.u = 1, pc.alpha = 0.01, pc.u.phi = 0.5, pc.alpha.phi = 2/3, age.space.group = c(1, 2, 2, 2, 3, 3, 3, 3) )
data |
dataframe that contains the indicator of interests(column name is value), output of getDHSindicator function |
cluster.info |
dataframe that contains admin 1 and admin 2 information and coordinates for each cluster. |
admin.info |
dataframe that contains population and urban/rural proportion at specific admin level |
X |
dataframe that contains areal covariates, the first column should be the same admin name as in admin.info$data. |
X.unit |
dataframe that contains unit covariates, must contain cluster |
X.pixel |
dataframe that contains pixel covariates, must contain 1. admin1.name or admin2.name.full, 2. Population, 3. strata if stratification==T |
admin |
admin level for the model |
CI |
Credible interval to be used. Default to 0.95. |
model |
smoothing model used in the random effect. Options are independent ("iid") or spatial ("bym2"). |
stratification |
whether or not to include urban/rural stratum. |
aggregation |
whether or not report aggregation results. |
nested |
whether or not to fit a nested model. |
interact |
whether or not to fit a admin1 x urban/rural model. |
overdisp.mean |
prior mean for logit(d), where d is the intracluster correlation. |
overdisp.prec |
prior precision for logit(d), where d is the intracluster correlation. |
pc.u |
pc prior u for iid or bym2 precision. |
pc.alpha |
pc prior alpha for iid or bym2 precision. |
pc.u.phi |
pc prior u for bym2 mixing paramete. |
pc.alpha.phi |
pc prior u for bym2 mixing paramete. |
age.space.group |
vector indicating grouping of the ages groups in the spatial model. For example, if each age group is assigned a different spatial component, then set age.group.group to c(1:length(age.group)); if all age groups share the same spatial component, then set age.group.group to a rep(1, length(age.group)). The default for 8 age groups is c(1,2,2,2,3,3,3,3), which assigns a separate hazards to the first two groups and a common hazard for the rest of the age groups. The vector should contain values starting from 1. |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,
BR
CM_ECMR_C_IMF(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 5)CM_ECMR_C_IMF(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 5)
Rdata |
data.frame from surveyPrev::getDHSdata |
mort.cut |
age group cutoffs for hazard calculation. Constant hazards are assumed to be within the specified cutoffs. |
mort.year |
The number of years preceding survey. Set to be 5. |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_IMF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_IMF", year = 2018) ## End(Not run)
BR
CM_ECMR_C_IMR(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 10)CM_ECMR_C_IMR(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 10)
Rdata |
data.frame from surveyPrev::getDHSdata |
mort.cut |
age group cutoffs for hazard calculation. Constant hazards are assumed to be within the specified cutoffs. |
mort.year |
The number of years preceding survey. Set to be 10. |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_IMR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_IMR", year = 2018) ## End(Not run)
BR
CM_ECMR_C_NNF(Rdata)CM_ECMR_C_NNF(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_NNF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_NNF", year = 2018) ## End(Not run)
CM_ECMR_C_NNR BRdata Neonatal mortality rate
CM_ECMR_C_NNR(Rdata, nmr.year = 10)CM_ECMR_C_NNR(Rdata, nmr.year = 10)
Rdata |
data.frame from surveyPrev::getDHSdata |
nmr.year |
This is an argument specifically for NMR calculation. It specifies births how many years do we include prior to the date of survey. Default to be 10, i.e., NMR in the last 10 years prior to survey. |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_NNR", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CM_ECMR_C_NNR) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_NNR", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CM_ECMR_C_NNR) ## End(Not run)
BR
CM_ECMR_C_U5F(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 5)CM_ECMR_C_U5F(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 5)
Rdata |
data.frame from surveyPrev::getDHSdata |
mort.cut |
age group cutoffs for hazard calculation. Constant hazards are assumed to be within the specified cutoffs. |
mort.year |
The number of years preceding survey. Set to be 5. |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_U5F", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_U5F", year = 2018) ## End(Not run)
BR
CM_ECMR_C_U5M(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 10)CM_ECMR_C_U5M(Rdata, mort.cut = c(1, 2, 6, 12, 24, 36, 48, 60), mort.year = 10)
Rdata |
data.frame from surveyPrev::getDHSdata |
mort.cut |
age group cutoffs for hazard calculation. Constant hazards are assumed to be within the specified cutoffs. |
mort.year |
The number of years preceding survey. Set to be 10. |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_U5M", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CM_ECMR_C_U5M", year = 2018) ## End(Not run)
CN_ANMC_C_ANY PRdata Children with any anemia Children under five with any anemia
CN_ANMC_C_ANY(Rdata)CN_ANMC_C_ANY(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_ANMC_C_ANY", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CN_ANMC_C_ANY) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_ANMC_C_ANY", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CN_ANMC_C_ANY) ## End(Not run)
CN_BRFI_C_EVR
CN_BRFI_C_EVR(KRdata)CN_BRFI_C_EVR(KRdata)
KRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_BRFI_C_EVR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_BRFI_C_EVR", year = 2018) ## End(Not run)
CN_BRFS_C_EXB KRdata Children exclusively breastfed Prevalence of exclusive breastfeeding of children under six months of age
CN_BRFS_C_EXB(Rdata)CN_BRFS_C_EXB(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_BRFS_C_EXB", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CN_BRFS_C_EXB) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_BRFS_C_EXB", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::CN_BRFS_C_EXB) ## End(Not run)
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 KR
CN_IYCF_C_4FA(Rdata)CN_IYCF_C_4FA(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_IYCF_C_4FA", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_IYCF_C_4FA", year = 2018) ## End(Not run)
Percentage of breastfed children age 6-23 months fed four or more food groups and the minimum meal frequency
CN_IYCF_C_BTB(KRdata)CN_IYCF_C_BTB(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of children age 6-23 months fed the minimum meal frequency defined as receiving solid or semi-solid food at least twice a day for infants 6-8 months and at least three times a day for children 9-23 months
CN_IYCF_C_MNA(KRdata)CN_IYCF_C_MNA(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of breastfed children age 6-23 months fed the minimum meal frequency defined as receiving solid or semi-solid food at least twice a day for infants 6-8 months and at least three times a day for children 9-23 months
CN_IYCF_C_MNB(KRdata)CN_IYCF_C_MNB(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of youngest children age 6-23 months living with the mother who consumed foods rich in iron in the 24 hours preceding the survey. Food rich in iron include meat (and organ meat), fish, poultry, eggs.
CN_MIAC_C_IRF(KRdata)CN_MIAC_C_IRF(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
CN_NUTS_C_HA2
CN_NUTS_C_HA2(PRdata)CN_NUTS_C_HA2(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_HA2", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_HA2", year = 2018) ## End(Not run)
CN_NUTS_C_HA3
CN_NUTS_C_HA3(PRdata)CN_NUTS_C_HA3(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_HA3", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_HA3", year = 2018) ## End(Not run)
CN_NUTS_C_WA2
CN_NUTS_C_WA2(PRdata)CN_NUTS_C_WA2(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WA2", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WA2", year = 2018) ## End(Not run)
CN_NUTS_C_WA3
CN_NUTS_C_WA3(PRdata)CN_NUTS_C_WA3(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WA3", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WA3", year = 2018) ## End(Not run)
CN_NUTS_C_WAP
CN_NUTS_C_WAP(PRdata)CN_NUTS_C_WAP(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WAP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WAP", year = 2018) ## End(Not run)
CN_NUTS_C_WH2
CN_NUTS_C_WH2(PRdata)CN_NUTS_C_WH2(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WH2", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WH2", year = 2018) ## End(Not run)
CN_NUTS_C_WH3
CN_NUTS_C_WH3(PRdata)CN_NUTS_C_WH3(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WH3", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WH3", year = 2018) ## End(Not run)
CN_NUTS_C_WHP
CN_NUTS_C_WHP(PRdata)CN_NUTS_C_WHP(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WHP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CN_NUTS_C_WHP", year = 2018) ## End(Not run)
Percentage of men who ever used the internet
CO_INUS_M_EVU(MRdata)CO_INUS_M_EVU(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men who used the internet in the last 12 months
CO_INUS_M_U12(MRdata)CO_INUS_M_U12(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
CO_INUS_W_EVU
CO_INUS_W_EVU(IRdata)CO_INUS_W_EVU(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_INUS_W_EVU", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_INUS_W_EVU", year = 2018) ## End(Not run)
CO_INUS_W_U12
CO_INUS_W_U12(IRdata)CO_INUS_W_U12(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_INUS_W_U12", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_INUS_W_U12", year = 2018) ## End(Not run)
Percentage of men who have and use a bank account
CO_MOBB_M_BNK(MRdata)CO_MOBB_M_BNK(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men who use a mobile phone for financial transactions
CO_MOBB_M_MBF(MRdata)CO_MOBB_M_MBF(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men who own a mobile phone
CO_MOBB_M_MOB(MRdata)CO_MOBB_M_MOB(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of all men who have used a mobile phone for financial transactions in the last 12 months
CO_MOBB_M_SPT(MRdata)CO_MOBB_M_SPT(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
CO_MOBB_W_BNK
CO_MOBB_W_BNK(IRdata)CO_MOBB_W_BNK(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_BNK", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_BNK", year = 2018) ## End(Not run)
Percentage of women who have and used a bank account or used a mobile phone for financial transactions in the last 12 months
CO_MOBB_W_DFT(IRdata)CO_MOBB_W_DFT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
CO_MOBB_W_MBF
CO_MOBB_W_MBF(IRdata)CO_MOBB_W_MBF(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_MBF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_MBF", year = 2018) ## End(Not run)
CO_MOBB_W_MOB
CO_MOBB_W_MOB(IRdata)CO_MOBB_W_MOB(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_MOB", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CO_MOBB_W_MOB", year = 2018) ## End(Not run)
Percentage of all women who have used a mobile phone for financial transactions in the last 12 months
CO_MOBB_W_SPT(IRdata)CO_MOBB_W_SPT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
CP_BREG_C_CRT
CP_BREG_C_CRT(PRdata)CP_BREG_C_CRT(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_CRT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_CRT", year = 2018) ## End(Not run)
CP_BREG_C_NCT
CP_BREG_C_NCT(PRdata)CP_BREG_C_NCT(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_NCT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_NCT", year = 2018) ## End(Not run)
CP_BREG_C_REG
CP_BREG_C_REG(PRdata)CP_BREG_C_REG(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_REG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "CP_BREG_C_REG", year = 2018) ## End(Not run)
Computes summary statistics on the number of sampled observations, events, and unique clusters at national, admin1, and admin2 levels. The function merges the input dataset with cluster- and admin-level metadata and returns counts of samples, events, and clusters per geographic unit.
datainfo(data, cluster.info, admin.info1 = NULL, admin.info2 = NULL)datainfo(data, cluster.info, admin.info1 = NULL, admin.info2 = NULL)
data |
A data frame containing at least the variables |
cluster.info |
A list containing the element |
admin.info1 |
A list containing the element |
admin.info2 |
A list containing the element |
The function performs left and right joins to associate each observation
in data with its cluster and administrative region. It removes rows
with missing values before summarizing. For each administrative level:
n_samples: number of non-missing observations.
n_events: number of cases where value == 1.
n_clusters: number of distinct survey clusters.
If admin.info1 or admin.info2 is NULL, the corresponding
summaries are omitted.
A list with up to three data frames:
summary.ad0National-level totals across all clusters.
summary.ad1Admin1-level summaries (if admin.info1 provided).
summary.ad2Admin2-level summaries (if admin.info2 provided).
## Not run: datainfo( data = data, cluster.info = cluster.info, admin.info1 = admin.info1, admin.info2 = admin.info2 ) ## End(Not run)## Not run: datainfo( data = data, cluster.info = cluster.info, admin.info1 = admin.info1, admin.info2 = admin.info2 ) ## End(Not run)
This function calculate direct estimates at given admin level.
directEST( data, cluster.info, admin, strata = "all", CI = 0.95, weight = c("population", "survey")[1], admin.info = NULL, aggregation = FALSE, alt.strata = NULL, var.fix = FALSE, threshold = 1e-12, ... )directEST( data, cluster.info, admin, strata = "all", CI = 0.95, weight = c("population", "survey")[1], admin.info = NULL, aggregation = FALSE, alt.strata = NULL, var.fix = FALSE, threshold = 1e-12, ... )
data |
dataframe that contains the indicator of interests, output of getDHSindicator function |
cluster.info |
list contains data and wrong.points. data contains admin 1 and admin 2 information and coordinates for each cluster. wrong.points. contains cluster id for cluster without coordinates or admin 1 information. Output of getDHSindicator function |
admin |
admin level for the model. |
strata |
use only urban or rural data, only for national level model |
CI |
Credible interval to be used. Default to 0.95. |
weight |
the weight used for aggregating result, "population" or "survey" |
admin.info |
list contains data and mat, data contains population and urban/rural proportion at specific admin level and mat is the adjacency matrix, output of adminInfo function |
aggregation |
whether or not report aggregation results. |
alt.strata |
the variable name in the data frame that correspond to the stratification variable. Most of the DHS surveys are stratified by admin 1 area crossed with urban/rural, which is the default stratification variable created by the function (when |
var.fix |
Whether to add phantom cluster to fix admin 2 direct estimate with variance close to 0. |
threshold |
the threshold of variance to implement the variance fix method. |
... |
Additional arguments passed on to the 'smoothSurvey' function |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,
Qianyu Dong
## Not run: ## ## Direct estimation of ANC visit 4+ proportion ## geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info<-clusterInfo(geo=geo, poly.adm1=ZambiaAdm1, poly.adm2=ZambiaAdm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") 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") ## ## Changing customized stratification variable ## data_alt <- data # Assuming the stratification is done with only admin1 area # and not stratified by urban and rural # Note that this is not the correct stratification, but we use # this as an illustration to create user-specified strata variable data_alt$new_strata <- data_alt$v024 res_ad1_wrong <- directEST(data = data_alt, cluster.info = cluster.info, admin = 1, aggregation = FALSE, alt.strata = "new_strata") res_ad1_wrong ## End(Not run)## Not run: ## ## Direct estimation of ANC visit 4+ proportion ## geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info<-clusterInfo(geo=geo, poly.adm1=ZambiaAdm1, poly.adm2=ZambiaAdm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") 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") ## ## Changing customized stratification variable ## data_alt <- data # Assuming the stratification is done with only admin1 area # and not stratified by urban and rural # Note that this is not the correct stratification, but we use # this as an illustration to create user-specified strata variable data_alt$new_strata <- data_alt$v024 res_ad1_wrong <- directEST(data = data_alt, cluster.info = cluster.info, admin = 1, aggregation = FALSE, alt.strata = "new_strata") res_ad1_wrong ## End(Not run)
Helper function for the U5MR direct estimation
directEST_u5mr(modt, regionVar)directEST_u5mr(modt, regionVar)
modt |
input data frame internally constructed from directEST() function |
regionVar |
region column |
a fitted object in the same format as smoothSurvey() function, to be slotted in directEST() internal script.
This function calculate direct estimates at given admin level.
directEST_varfix( data, cluster.info, admin, strata = "all", CI = 0.95, weight = c("population", "survey")[1], admin.info = NULL, aggregation = FALSE, alt.strata = NULL, var.fix = TRUE, eps = 1e-12, floor_var = 1e-12, tol = 1e-12, all.fix = FALSE, ... )directEST_varfix( data, cluster.info, admin, strata = "all", CI = 0.95, weight = c("population", "survey")[1], admin.info = NULL, aggregation = FALSE, alt.strata = NULL, var.fix = TRUE, eps = 1e-12, floor_var = 1e-12, tol = 1e-12, all.fix = FALSE, ... )
data |
dataframe that contains the indicator of interests, output of getDHSindicator function |
cluster.info |
list contains data and wrong.points. data contains admin 1 and admin 2 information and coordinates for each cluster. wrong.points. contains cluster id for cluster without coordinates or admin 1 information. Output of getDHSindicator function |
admin |
admin level for the model. |
strata |
use only urban or rural data, only for national level model |
CI |
Credible interval to be used. Default to 0.95. |
weight |
the weight used for aggregating result, "population" or "survey" |
admin.info |
list contains data and mat, data contains population and urban/rural proportion at specific admin level and mat is the adjacency matrix, output of adminInfo function |
aggregation |
whether or not report aggregation results. |
alt.strata |
the variable name in the data frame that correspond to the stratification variable. Most of the DHS surveys are stratified by admin 1 area crossed with urban/rural, which is the default stratification variable created by the function (when |
var.fix |
Whether to add phantom cluster to fix direct estimate with variance close to 0. |
eps |
the threshold of variance to implement the variance fix method. |
floor_var |
the threshold of variance to implement the variance fix method. |
tol |
the threshold of variance to implement the variance fix method. |
all.fix |
Whether to add phantom cluster to all areas |
... |
Additional arguments passed on to the 'smoothSurvey' function |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,
## Not run: ## ## Direct estimation of ANC visit 4+ proportion ## geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info<-clusterInfo(geo=geo, poly.adm1=ZambiaAdm1, poly.adm2=ZambiaAdm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") res_ad1 <- directEST_new(data = data, cluster.info = cluster.info, admin = 1, aggregation = FALSE) ## End(Not run)## Not run: ## ## Direct estimation of ANC visit 4+ proportion ## geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info<-clusterInfo(geo=geo, poly.adm1=ZambiaAdm1, poly.adm2=ZambiaAdm2, by.adm1 = "NAME_1",by.adm2 = "NAME_2") # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") res_ad1 <- directEST_new(data = data, cluster.info = cluster.info, admin = 1, aggregation = FALSE) ## End(Not run)
DV_AFSV_W_A10
DV_AFSV_W_A10(IRdata)DV_AFSV_W_A10(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_AFSV_W_A10", year = 2018) ## End(Not run)## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_AFSV_W_A10", year = 2018) ## End(Not run)
DV_AFSV_W_A12
DV_AFSV_W_A12(IRdata)DV_AFSV_W_A12(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_AFSV_W_A12", year = 2018) ## End(Not run)## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_AFSV_W_A12", year = 2018) ## End(Not run)
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 IR
DV_EXPV_W_12M(Rdata)DV_EXPV_W_12M(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXPV_W_12M", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXPV_W_12M", year = 2018) ## End(Not run)
DV_EXSV_W_12M Percentage of women who ever experienced sexual violence dv_sex_12m in github IR
DV_EXSV_W_12M(Rdata)DV_EXSV_W_12M(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXSV_W_12M", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXSV_W_12M", year = 2018) ## End(Not run)
DV_EXSV_W_EVR Percentage of women who ever experienced sexual violence dv_sex in github IR
DV_EXSV_W_EVR(Rdata)DV_EXSV_W_EVR(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXSV_W_EVR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_EXSV_W_EVR", year = 2018) ## End(Not run)
Percentage of women who experienced physical and sexual violence
DV_FMVL_W_PAS(IRdata)DV_FMVL_W_PAS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of ever married women or never married women who ever had an intimate partner whose current or most recent husband/partner committed any physical violence
DV_FSVL_W_PHS(IRdata)DV_FSVL_W_PHS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
DV_PCPV_W_CBF
DV_PCPV_W_CBF(IRdata)DV_PCPV_W_CBF(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_CBF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_CBF", year = 2018) ## End(Not run)
DV_PCPV_W_CHD
DV_PCPV_W_CHD(IRdata)DV_PCPV_W_CHD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_CHD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_CHD", year = 2018) ## End(Not run)
DV_PCPV_W_EMP
DV_PCPV_W_EMP(IRdata)DV_PCPV_W_EMP(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_EMP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_EMP", year = 2018) ## End(Not run)
Percentage of women for whom physical violence was committed by former husband or partner
DV_PCPV_W_FHP(IRdata)DV_PCPV_W_FHP(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
DV_PCPV_W_FLW
DV_PCPV_W_FLW(IRdata)DV_PCPV_W_FLW(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_FLW", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_FLW", year = 2018) ## End(Not run)
DV_PCPV_W_OLW
DV_PCPV_W_OLW(IRdata)DV_PCPV_W_OLW(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_OLW", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_PCPV_W_OLW", year = 2018) ## End(Not run)
Percentage of ever married women or never married women who have experienced physical or sexual or emotional violence committed by their husband/partner in the 12 months preceding the survey
DV_SPV1_W_ANY(IRdata)DV_SPV1_W_ANY(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
DV_STPS_W_BFR
DV_STPS_W_BFR(IRdata)DV_STPS_W_BFR(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_STPS_W_BFR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_STPS_W_BFR", year = 2018) ## End(Not run)
DV_VPRG_W_VPG
DV_VPRG_W_VPG(IRdata)DV_VPRG_W_VPG(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_VPRG_W_VPG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "DV_VPRG_W_VPG", year = 2018) ## End(Not run)
Percentage of the de facto household population age 6 and over with some secondary education
ED_EDAT_B_CSC(BRdata)ED_EDAT_B_CSC(BRdata)
BRdata |
A DHS Births Recode (BR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto household population age 6 and over who attended higher education
ED_EDAT_B_HGH(BRdata)ED_EDAT_B_HGH(BRdata)
BRdata |
A DHS Births Recode (BR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto household population age 6 and over with no education
ED_EDAT_B_NED(BRdata)ED_EDAT_B_NED(BRdata)
BRdata |
A DHS Births Recode (BR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto male household population age 6 and over who attended primary education
ED_EDAT_M_PRI(MRdata)ED_EDAT_M_PRI(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto male household population age 6 and over with no education education
ED_EDAT_M_SPR(MRdata)ED_EDAT_M_SPR(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto female household population age 6 and over with some secondary education
ED_EDAT_W_CSC(IRdata)ED_EDAT_W_CSC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of the de facto female household population age 6 and over with no education education
ED_EDAT_W_SPR(IRdata)ED_EDAT_W_SPR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with completed primary education
ED_EDUC_W_CPR(IRdata)ED_EDUC_W_CPR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with completed secondary education
ED_EDUC_W_CSC(IRdata)ED_EDUC_W_CSC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with more than secondary education
ED_EDUC_W_HGH(IRdata)ED_EDUC_W_HGH(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with no education
ED_EDUC_W_NED(IRdata)ED_EDUC_W_NED(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with primary education
ED_EDUC_W_PRI(IRdata)ED_EDUC_W_PRI(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
ED_EDUC_W_SEH IRdata Percentage of women with secondary or higher education
ED_EDUC_W_SEH(Rdata)ED_EDUC_W_SEH(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
Percentage of women with some primary education
ED_EDUC_W_SPR(IRdata)ED_EDUC_W_SPR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with some secondary education
ED_EDUC_W_SSC(IRdata)ED_EDUC_W_SSC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of men with secondary or higher education
ED_LITR_M_SCH(MRdata)ED_LITR_M_SCH(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
ED_LITR_W_LIT
ED_LITR_W_LIT(IRdata)ED_LITR_W_LIT(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_LITR_W_LIT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_LITR_W_LIT", year = 2018) ## End(Not run)
Percentage of women who can read a whole sentence
ED_LITR_W_RDW(IRdata)ED_LITR_W_RDW(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with secondary or higher education
ED_LITR_W_SCH(IRdata)ED_LITR_W_SCH(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
ED_MDIA_W_3MD
ED_MDIA_W_3MD(IRdata)ED_MDIA_W_3MD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_3MD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_3MD", year = 2018) ## End(Not run)
ED_MDIA_W_N3M
ED_MDIA_W_N3M(IRdata)ED_MDIA_W_N3M(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_N3M", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_N3M", year = 2018) ## End(Not run)
ED_MDIA_W_NWS
ED_MDIA_W_NWS(IRdata)ED_MDIA_W_NWS(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_NWS", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_NWS", year = 2018) ## End(Not run)
ED_MDIA_W_RDO
ED_MDIA_W_RDO(IRdata)ED_MDIA_W_RDO(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_RDO", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_RDO", year = 2018) ## End(Not run)
ED_MDIA_W_TLV
ED_MDIA_W_TLV(IRdata)ED_MDIA_W_TLV(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_TLV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ED_MDIA_W_TLV", year = 2018) ## End(Not run)
EM_EMPM_W_EMP
EM_EMPM_W_EMP(IRdata)EM_EMPM_W_EMP(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "EM_EMPM_W_EMP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "EM_EMPM_W_EMP", year = 2018) ## End(Not run)
This function return a map of exceedance probability for given model results.
exceedPlot( x, exceed = TRUE, direction = 1, threshold = NA, geo = geo, by.geo = NULL, ylim = NULL, ... )exceedPlot( x, exceed = TRUE, direction = 1, threshold = NA, geo = geo, by.geo = NULL, ylim = NULL, ... )
x |
a model result using surveyPrev of class "fhModel" or "clusterModel" |
exceed |
direction of the comparison The default is exceed = TRUE, which correspond to probability of prevalence larger than the threshold. If exceed = FALSE, the plot computes probability smaller than the threshold. |
direction |
Direction of the color scheme. It can be either 1 (smaller values are darker) or -1 (higher values are darker). Default is set to 1. |
threshold |
the threshold to be used in computing the exceedance probability |
geo |
SpatialPolygonsDataFrame object for the map |
by.geo |
variable name specifying region names in the data |
ylim |
range of the values to be plotted. |
... |
additional arguments passed to SUMMER::mapPlot(). |
This function returns a map showing probability of prevalence over/under the threshold.
Zehang Li, Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, by.adm="NAME_2", by.adm.upper = "NAME_1") cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) ZambiaAdm2$admin2.name.full <- paste0(ZambiaAdm2$NAME_1, "_", ZambiaAdm2$NAME_2) exceedPlot(cl_res_ad2_unstrat, threshold = 0.5, exceed = TRUE, direction = -1, geo = ZambiaAdm2, by.geo = "admin2.name.full") exceedPlot(cl_res_ad2_unstrat, threshold = 0.5, exceed = FALSE, direction = -1, geo = ZambiaAdm2, by.geo = "admin2.name.full") ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, by.adm="NAME_2", by.adm.upper = "NAME_1") cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) ZambiaAdm2$admin2.name.full <- paste0(ZambiaAdm2$NAME_1, "_", ZambiaAdm2$NAME_2) exceedPlot(cl_res_ad2_unstrat, threshold = 0.5, exceed = TRUE, direction = -1, geo = ZambiaAdm2, by.geo = "admin2.name.full") exceedPlot(cl_res_ad2_unstrat, threshold = 0.5, exceed = FALSE, direction = -1, geo = ZambiaAdm2, by.geo = "admin2.name.full") ## End(Not run)
Percentage of women who gave birth by age 18
FE_BBAG_W_A18(IRdata)FE_BBAG_W_A18(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Age-specific fertility rate for the three years preceding the survey for age group 15-19 expressed per 1,000 women
FE_FRTR_W_A15(IRdata)FE_FRTR_W_A15(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Total fertility rate for the three years preceding the survey for age group 15-44 expressed per woman
FE_FRTR_W_TF4(IRdata)FE_FRTR_W_TF4(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Total fertility rate for the three years preceding the survey for age group 15-49 expressed per woman
FE_FRTR_W_TFR(IRdata)FE_FRTR_W_TFR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FG_KFCC_W_HFC IRdata Percentage of women who have ever heard of female circumcision
FG_KFCC_W_HFC(Rdata)FG_KFCC_W_HFC(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
FG_PFCC_W_WCC IRdata Percentage of women circumcised (women who experienced female genital cutting (FGM))
FG_PFCC_W_WCC(Rdata)FG_PFCC_W_WCC(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
This function calculate smoothed direct estimates at given admin level.
fhModel( data, cluster.info, admin.info = NULL, X = NULL, nested = FALSE, admin, CI = 0.95, model = c("bym2", "iid"), aggregation = FALSE, alt.strata = NULL, var.fix = FALSE, ... )fhModel( data, cluster.info, admin.info = NULL, X = NULL, nested = FALSE, admin, CI = 0.95, model = c("bym2", "iid"), aggregation = FALSE, alt.strata = NULL, var.fix = FALSE, ... )
data |
dataframe that contains the indicator of interests, output of getDHSindicator function |
cluster.info |
list contains data and wrong.points. data contains admin 1 and admin 2 information and coordinates for each cluster. wrong.points. contains cluster id for cluster without coordinates or admin 1 information. Output of getDHSindicator function |
admin.info |
list contains data and mat, data contains population and urban/rural proportion at specific admin level and mat is the adjacency matrix, output of adminInfo function |
X |
dataframe that contains areal covariates, the first column should be the same admin name as in admin.info$data. |
nested |
whether or not to fit a nested model. |
admin |
admin level for the model |
CI |
Credible interval to be used. Default to 0.95. |
model |
smoothing model used in the random effect. Options are independent ("iid") or spatial ("bym2"). |
aggregation |
whether or not report aggregation results. |
alt.strata |
the variable name in the data frame that correspond to the stratification variable. Most of the DHS surveys are stratified by admin 1 area crossed with urban/rural, which is the default stratification variable created by the function (when |
var.fix |
Whether to use fix variance admin 2 direct estimate as input for the model. |
... |
Additional arguments passed on to the 'smoothSurvey' function |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, by.adm = "NAME_1", agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) smth_res_ad1 <- fhModel(data, cluster.info = cluster.info, admin.info = admin.info1, admin = 1, model = "bym2", aggregation = F) smth_res_ad1 ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, by.adm = "NAME_1", agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) smth_res_ad1 <- fhModel(data, cluster.info = cluster.info, admin.info = admin.info1, admin = 1, model = "bym2", aggregation = F) smth_res_ad1 ## End(Not run)
Percentage of women who have ever experienced fistula symptoms
FI_EXFI_W_EEX(IRdata)FI_EXFI_W_EEX(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who have ever heard of fistula symptoms
FI_EXFI_W_HRD(IRdata)FI_EXFI_W_HRD(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_CUSA_W_ANY
FP_CUSA_W_ANY(IRdata)FP_CUSA_W_ANY(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_ANY", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_ANY", year = 2018) ## End(Not run)
FP_CUSA_W_EMC
FP_CUSA_W_EMC(IRdata)FP_CUSA_W_EMC(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_EMC", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_EMC", year = 2018) ## End(Not run)
FP_CUSA_W_FCN
FP_CUSA_W_FCN(IRdata)FP_CUSA_W_FCN(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_FCN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_FCN", year = 2018) ## End(Not run)
FP_CUSA_W_FST
FP_CUSA_W_FST(IRdata)FP_CUSA_W_FST(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_FST", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_FST", year = 2018) ## End(Not run)
FP_CUSA_W_IMP
FP_CUSA_W_IMP(IRdata)FP_CUSA_W_IMP(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_IMP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_IMP", year = 2018) ## End(Not run)
FP_CUSA_W_INJ
FP_CUSA_W_INJ(IRdata)FP_CUSA_W_INJ(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_INJ", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_INJ", year = 2018) ## End(Not run)
FP_CUSA_W_IUD
FP_CUSA_W_IUD(IRdata)FP_CUSA_W_IUD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_IUD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_IUD", year = 2018) ## End(Not run)
FP_CUSA_W_MCN
FP_CUSA_W_MCN(IRdata)FP_CUSA_W_MCN(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MCN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MCN", year = 2018) ## End(Not run)
FP_CUSA_W_MOD IRdata Modern contraceptive prevalence rate (women currently using any modern method of contraception)
FP_CUSA_W_MOD(Rdata)FP_CUSA_W_MOD(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_CUSA_W_MOD) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_CUSA_W_MOD) ## End(Not run)
FP_CUSA_W_MST
FP_CUSA_W_MST(IRdata)FP_CUSA_W_MST(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MST", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MST", year = 2018) ## End(Not run)
FP_CUSA_W_PIL
FP_CUSA_W_PIL(IRdata)FP_CUSA_W_PIL(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_PIL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_PIL", year = 2018) ## End(Not run)
FP_CUSA_W_STD
FP_CUSA_W_STD(IRdata)FP_CUSA_W_STD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_STD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_STD", year = 2018) ## End(Not run)
FP_CUSA_W_TRA
FP_CUSA_W_TRA(IRdata)FP_CUSA_W_TRA(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_TRA", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_TRA", year = 2018) ## End(Not run)
FP_CUSA_W_WTH
FP_CUSA_W_WTH(IRdata)FP_CUSA_W_WTH(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_WTH", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_WTH", year = 2018) ## End(Not run)
FP_CUSM_W_MOD IRdata Modern contraceptive prevalence rate (Married women currently using any modern method of contraception)
FP_CUSM_W_MOD(Rdata)FP_CUSM_W_MOD(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_CUSM_W_MOD) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_CUSM_W_MOD) ## End(Not run)
Among currently married women using family planning, the percentage for whom the decision was made mainly by others or the response is don't know or missing
FP_DMKF_W_UDK(IRdata)FP_DMKF_W_UDK(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Among currently married women using family planning, the percentage for whom the decision was made mainly by the husband
FP_DMKF_W_UHS(IRdata)FP_DMKF_W_UHS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Among currently married women using family planning, the percentage for whom the decision was made jointly by wife and husband
FP_DMKF_W_UJN(IRdata)FP_DMKF_W_UJN(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Among currently married women using family planning, the percentage for whom the decision was made mainly by the wife
FP_DMKF_W_UWF(IRdata)FP_DMKF_W_UWF(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married women age 15-49 for whom decisionmaking about whether to use or not use or family planning is made mainly by the husband
FP_DMKP_W_MHS(IRdata)FP_DMKP_W_MHS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married women age 15-49 for whom decisionmaking about whether to use or not use or family planning is made jointly by the wife and husband
FP_DMKP_W_MJN(IRdata)FP_DMKP_W_MJN(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married women age 15-49 for whom decisionmaking about whether to use or not use or family planning is made mainly by the wife
FP_DMKP_W_MWF(IRdata)FP_DMKP_W_MWF(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_EFPM_M_NWS
FP_EFPM_M_NWS(MRdata)FP_EFPM_M_NWS(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_M_NWS", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_M_NWS", year = 2018) ## End(Not run)
FP_EFPM_M_TLV
FP_EFPM_M_TLV(MRdata)FP_EFPM_M_TLV(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_M_TLV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_M_TLV", year = 2018) ## End(Not run)
FP_EFPM_W_NWS
FP_EFPM_W_NWS(IRdata)FP_EFPM_W_NWS(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_NWS", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_NWS", year = 2018) ## End(Not run)
FP_EFPM_W_RDO
FP_EFPM_W_RDO(IRdata)FP_EFPM_W_RDO(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_RDO", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_RDO", year = 2018) ## End(Not run)
FP_EFPM_W_TLV
FP_EFPM_W_TLV(IRdata)FP_EFPM_W_TLV(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_TLV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EFPM_W_TLV", year = 2018) ## End(Not run)
FP_EVUM_W_MOD
FP_EVUM_W_MOD(Rdata)FP_EVUM_W_MOD(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EVUM_W_MOD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_EVUM_W_MOD", year = 2018) ## End(Not run)
Percentage of men who know any method of contraception
FP_KMTA_M_ANY(MRdata)FP_KMTA_M_ANY(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men who know any modern method of contraception
FP_KMTA_M_MOD(MRdata)FP_KMTA_M_MOD(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
FP_KMTA_W_ANY
FP_KMTA_W_ANY(IRdata)FP_KMTA_W_ANY(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_ANY", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_ANY", year = 2018) ## End(Not run)
FP_KMTA_W_EMC
FP_KMTA_W_EMC(IRdata)FP_KMTA_W_EMC(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_EMC", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_EMC", year = 2018) ## End(Not run)
FP_KMTA_W_FCN
FP_KMTA_W_FCN(IRdata)FP_KMTA_W_FCN(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_FCN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_FCN", year = 2018) ## End(Not run)
FP_KMTA_W_FST
FP_KMTA_W_FST(IRdata)FP_KMTA_W_FST(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_FST", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_FST", year = 2018) ## End(Not run)
FP_KMTA_W_IMP
FP_KMTA_W_IMP(IRdata)FP_KMTA_W_IMP(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_IMP", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_IMP", year = 2018) ## End(Not run)
FP_KMTA_W_INJ
FP_KMTA_W_INJ(IRdata)FP_KMTA_W_INJ(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_INJ", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_INJ", year = 2018) ## End(Not run)
FP_KMTA_W_IUD
FP_KMTA_W_IUD(IRdata)FP_KMTA_W_IUD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_IUD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_IUD", year = 2018) ## End(Not run)
FP_KMTA_W_MST
FP_KMTA_W_MST(IRdata)FP_KMTA_W_MST(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_MST", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_MST", year = 2018) ## End(Not run)
FP_KMTA_W_OMD
FP_KMTA_W_OMD(IRdata)FP_KMTA_W_OMD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_OMD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_OMD", year = 2018) ## End(Not run)
FP_KMTA_W_PIL
FP_KMTA_W_PIL(IRdata)FP_KMTA_W_PIL(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_PIL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_PIL", year = 2018) ## End(Not run)
FP_KMTA_W_STD
FP_KMTA_W_STD(IRdata)FP_KMTA_W_STD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_STD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_STD", year = 2018) ## End(Not run)
FP_KMTA_W_TRA
FP_KMTA_W_TRA(IRdata)FP_KMTA_W_TRA(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_TRA", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_TRA", year = 2018) ## End(Not run)
FP_KMTA_W_WTH
FP_KMTA_W_WTH(IRdata)FP_KMTA_W_WTH(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_WTH", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_KMTA_W_WTH", year = 2018) ## End(Not run)
Percentage of currently married or in union men who know any method of contraception
FP_KMTM_M_ANY(MRdata)FP_KMTM_M_ANY(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union men who know any modern method of contraception
FP_KMTM_M_MOD(MRdata)FP_KMTM_M_MOD(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union women who know any method of contraception
FP_KMTM_W_ANY(IRdata)FP_KMTM_W_ANY(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union women who know any modern method of contraception
FP_KMTM_W_MOD(IRdata)FP_KMTM_W_MOD(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women using family planning
FP_NADA_W_MNT(IRdata)FP_NADA_W_MNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of demand for family planning satisfied by modern methods is calculated as the number of all women using modern methods of family planning divided by the number of all women with demand for family planning (either with unmet need or currently using any family planning)
FP_NADA_W_PDM(IRdata)FP_NADA_W_PDM(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of demand for family planning satisfied is calculated as the number of all women using family planning divided by the number of all women with demand for family planning (either with unmet need or currently using any family planning)
FP_NADA_W_PDS(IRdata)FP_NADA_W_PDS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Total demand for family planning is the sum of unmet need and those currently using
FP_NADA_W_TDT(IRdata)FP_NADA_W_TDT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women with an unmet need for modern methods
FP_NADA_W_UMT(IRdata)FP_NADA_W_UMT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_NADA_W_UNT IRdata Women with an unmet need for family planning for spacing and limiting
FP_NADA_W_UNT(Rdata)FP_NADA_W_UNT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADA_W_UNT", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NADA_W_UNT) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADA_W_UNT", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NADA_W_UNT) ## End(Not run)
Percentage of currently married or in union women using family planning
FP_NADM_W_MNT(IRdata)FP_NADM_W_MNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_NADA_W_UNT IRdata Women with an unmet need for family planning for spacing and limiting
FP_NADM_W_PDM(Rdata)FP_NADM_W_PDM(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADM_W_PDM", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NADM_W_PDM) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADM_W_PDM", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NADM_W_PDM) ## End(Not run)
Percentage of demand for family planning satisfied is calculated as the number of currently married women using family planning divided by the number of currently married women with demand for family planning (either with unmet need or currently using any family planning)
FP_NADM_W_PDS(IRdata)FP_NADM_W_PDS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Total demand for family planning is the sum of unmet need for family planning and those currently using family planning
FP_NADM_W_TDT(IRdata)FP_NADM_W_TDT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union women with an unmet need for modern methods
FP_NADM_W_UMT(IRdata)FP_NADM_W_UMT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_NADM_W_UNT #unmet_family IRdata Married women with an unmet need for family planning for spacing and limiting, line 17 manually added by Qianyu
FP_NADM_W_UNT(Rdata)FP_NADM_W_UNT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADM_W_UNT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NADM_W_UNT", year = 2018) ## End(Not run)
Percentage of young women age 15-24 using family planning
FP_NDYA_W_MNT(IRdata)FP_NDYA_W_MNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
FP_NADA_W_UNT IRdata Women with an unmet need for family planning for spacing and limiting
FP_NDYA_W_PDM(Rdata)FP_NDYA_W_PDM(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NDYA_W_PDM", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NDYA_W_PDM) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_NDYA_W_PDM", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::FP_NDYA_W_PDM) ## End(Not run)
Percentage of demand for family planning satisfied is calculated as the number of young women age 15-24 using family planning divided by the number of all young women with demand for family planning (either with unmet need or currently using any family planning)
FP_NDYA_W_PDS(IRdata)FP_NDYA_W_PDS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Total demand for family planning is the sum of unmet need and those currently using
FP_NDYA_W_TDT(IRdata)FP_NDYA_W_TDT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of young women age 15-24 with an unmet need for modern methods
FP_NDYA_W_UMT(IRdata)FP_NDYA_W_UMT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of young women age 15-24 with an unmet need for family planning
FP_NDYA_W_UNT(IRdata)FP_NDYA_W_UNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union young women age 15-24 using family planning
FP_NDYM_W_MNT(IRdata)FP_NDYM_W_MNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of demand for family planning satisfied by modern methods is calculated as the number of currently married women using modern methods of family planning divided by the number of currently married women with demand for family planning (either with unmet need or currently using any family planning)
FP_NDYM_W_PDM(IRdata)FP_NDYM_W_PDM(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of demand for family planning satisfied is calculated as the number of currently married women using family planning divided by the number of currently married women with demand for family planning (either with unmet need or currently using any family planning)
FP_NDYM_W_PDS(IRdata)FP_NDYM_W_PDS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union young women age 15-24 with an unmet need for modern methods
FP_NDYM_W_UMT(IRdata)FP_NDYM_W_UMT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of currently married or in union young women age 15-24 with an unmet need for family planning
FP_NDYM_W_UNT(IRdata)FP_NDYM_W_UNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Function to obtain subnational estimates from DHS API
get_api_table(country, survey, indicator, simplify = TRUE, admin = 1)get_api_table(country, survey, indicator, simplify = TRUE, admin = 1)
country |
A character string of keys at: https://api.dhsprogram.com/rest/dhs/countries?returnFields=CountryName,DHS_CountryCode&f=html |
survey |
A character string of keys at: https://api.dhsprogram.com/rest/dhs/surveys?returnFields=SurveyId,SurveyYearLabel,SurveyType,CountryName&f=html |
indicator |
A character string of keys at: https://api.dhsprogram.com/rest/dhs/indicators?returnFields=IndicatorId,Label,Definition&f=html |
simplify |
if TRUE only the value and region index is returned. |
admin |
Either 0 (national) or 1 (subnational admin 1 area). |
a data frame of the DHS indicator estimates
## Not run: # country: Zambia # survey: 2018 DHS # indicator: Percentage of children stunted # (below -2 SD of height for age # according to the WHO standard) dhs_table <- get_api_table(country = "ZM", survey = "ZM2018DHS", indicator = "CN_NUTS_C_HA2", simplify = TRUE) dhs_table ## End(Not run)## Not run: # country: Zambia # survey: 2018 DHS # indicator: Percentage of children stunted # (below -2 SD of height for age # according to the WHO standard) dhs_table <- get_api_table(country = "ZM", survey = "ZM2018DHS", indicator = "CN_NUTS_C_HA2", simplify = TRUE) dhs_table ## End(Not run)
Retrieves official administrative boundary shapefiles from the [geoBoundaries](https://www.geoboundaries.org/) API for a given country ISO3 code and administrative level. Returns the data as an 'sf' object for direct spatial use.
get_geoBoundaries(iso3, adm = "ADM1", release = "gbOpen")get_geoBoundaries(iso3, adm = "ADM1", release = "gbOpen")
iso3 |
Character. The three-letter ISO3 country code (e.g., '"NGA"', '"ZMB"'). |
adm |
Character. Administrative level to download (e.g., '"ADM0"', '"ADM1"', '"ADM2"'). Defaults to '"ADM1"'. |
release |
Character. geoBoundaries release type. Either '"gbOpen"' (default) for open data or '"gbAuthoritative"' for official boundaries. |
An 'sf' object containing the requested administrative boundaries.
## Not run: # Download Nigeria Admin 1 boundaries nga_adm1 <- get_geoBoundaries("NGA", adm = "ADM1") # Download Burkina Faso Admin 2 boundaries from the authoritative release bfa_adm2 <- get_geoBoundaries("BFA", adm = "ADM2", release = "gbAuthoritative") ## End(Not run)## Not run: # Download Nigeria Admin 1 boundaries nga_adm1 <- get_geoBoundaries("NGA", adm = "ADM1") # Download Burkina Faso Admin 2 boundaries from the authoritative release bfa_adm2 <- get_geoBoundaries("BFA", adm = "ADM2", release = "gbAuthoritative") ## End(Not run)
This function aligns raster covariates to a population density grid, extracts values for a national grid, associates administrative information, and prepares covariates for cluster-based data.
getCovariate( tiffs, tiff.population, UR.surface = NULL, cluster.info, poly.adm, by.adm, by.adm.upper, standardize = FALSE, na.rm = FALSE, fact = 1 )getCovariate( tiffs, tiff.population, UR.surface = NULL, cluster.info, poly.adm, by.adm, by.adm.upper, standardize = FALSE, na.rm = FALSE, fact = 1 )
tiffs |
A list of 'SpatRaster' with element names the column names for the covariates. |
tiff.population |
A 'SpatRaster' object representing population density used as the reference grid. |
UR.surface |
(Optional) A 'SpatRaster' object indicating urban-rural classification. |
cluster.info |
**Need STRATA here** |
poly.adm |
A 'sf' object |
by.adm |
the column name of column for Admin names for admin 1 |
by.adm.upper |
the column name of column for Admin names for admin 2 or other lower admin level. |
standardize |
whether to standardize the covariates/tiffs or not |
na.rm |
whether to remove rows that have no Population or admin 2 membership |
fact |
A numeric value indicating the aggregation factor for resampling the raster data. If 'fact = 1', no aggregation is performed. |
The function follows these steps: 1. Converts 'poly.adm' to an 'sf' object. 2. Aligns rasters in 'tiffs' to match the 'tiff.population' grid using bilinear resampling. 3. Aggregates raster resolution if 'fact' is greater than 1. 4. Extracts pixel center coordinates and values for the national grid. 5. Matches pixel locations to administrative boundaries. 6. Extracts raster values at cluster locations.
A list with two elements:
natl.grid |
A data frame containing natl grid of pixels for covariates and Admin information. |
cluster.cov |
A data frame with extracted covariates for cluster locations. U/R info from DHS |
## Not run: kenya_cov <- getCovariate( tiffs = cov_raster_stack, tiff.population = avg.pop, UR.surface = UR_surface, cluster.info = cluster.info, poly.adm = poly.adm2, by.adm = 'NAME_2', by.adm.upper = 'NAME_1', standardize=FALSE, . na.rm=FALSE, fact = 1) ## End(Not run)## Not run: kenya_cov <- getCovariate( tiffs = cov_raster_stack, tiff.population = avg.pop, UR.surface = UR_surface, cluster.info = cluster.info, poly.adm = poly.adm2, by.adm = 'NAME_2', by.adm.upper = 'NAME_1', standardize=FALSE, . na.rm=FALSE, fact = 1) ## End(Not run)
This function downloads DHS data for a particular country and survey.
getDHSdata(country, indicator = NULL, Recode = NULL, year, SurveyType = "DHS")getDHSdata(country, indicator = NULL, Recode = NULL, year, SurveyType = "DHS")
country |
Country name. |
indicator |
Indicator of interests. Current list of supported indicators include: "womananemia", "ancvisit4+", "stunting", "wasting", "DPT3". |
Recode |
Types of dhs Recode |
year |
Year the survey conducted. |
SurveyType |
Type of survey ("DHS","SPE"). Default is "DHS". |
This function returns the survey dataset that contains the indicator.
Qianyu Dong
## Not run: # When indicator is known, download only the relevant file # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) # When indicator is NULL or not recognized, download all files dhsData <- getDHSdata(country = "Zambia", indicator = NULL, year = 2018) names(dhsData) ## End(Not run)## Not run: # When indicator is known, download only the relevant file # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) # When indicator is NULL or not recognized, download all files dhsData <- getDHSdata(country = "Zambia", indicator = NULL, year = 2018) names(dhsData) ## End(Not run)
This function downloads cluster's coordinate data for country and survey.
getDHSgeo(country, year)getDHSgeo(country, year)
country |
Country name. |
year |
Year the survey conducted. |
The function returns a spatial point dataset with coordinates for each cluster based on the chosen survey and year.
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) ## End(Not run)
This function processes DHS data from getDHSdata function.
getDHSindicator( Rdata, indicator = NULL, FUN = NULL, nmr.year = 10, filter = NULL, yesCondition = NULL, noCondition = NULL )getDHSindicator( Rdata, indicator = NULL, FUN = NULL, nmr.year = 10, filter = NULL, yesCondition = NULL, noCondition = NULL )
Rdata |
Result from getDHSdata function, the raw DHS survry data from get_datasets. |
indicator |
Indicator of interests. |
FUN |
a function to process the DHS data into a binary indicator if not using one of the implemented indicators. See surveyPrev::AN_ANEM_W_ANY for an example function to obtain the indicator for women classified as having any anemia. |
nmr.year |
This is an argument specifically for NMR calculation. It specifies births how many years do we include prior to the date of survey. Default to be 10, i.e., NMR in the last 10 years prior to survey. |
filter |
This arguments specifies how the data should be filtered for creating a customized indicator. It should be a character string or a vector of character strings specifying the expression used to filter the data. See example for details |
yesCondition |
This arguments specifies how to define a yes label, i.e., value = 1, for creating a customized indicator. It should be a character string specifying the expression used to define the outcome value equal to 1. See example for details. |
noCondition |
This arguments specifies how to define a no label, i.e., value = 0, for creating a customized indicator. It should be a character string specifying the expression used to define the outcome value equal to 0. See example for details. |
The function returns processed survey data that contains the indicator of interests.
Qianyu Dong
## Not run: # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData1 <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data1 <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") #------------------------------------------------------------------# # User-specified function to process the data # For example see the internal function surveyPrev::AN_ANEM_W_ANY #------------------------------------------------------------------# dhsData2 <- getDHSdata(country = "Zambia", indicator = NULL, year = 2018) data2 <- getDHSindicator(dhsData2, indicator = NULL, FUN = surveyPrev::AN_ANEM_W_ANY) # which should be identical to the following dhsData3 <- getDHSdata(country = "Zambia", indicator = "womananemia", year = 2018) data3 <- getDHSindicator(dhsData3, indicator = "womananemia") #------------------------------------------------------------------# # User-specified filtering condition # Demonstrating NMR data preparation by specifying how to subset data # and specify the outcome variable and its levels #------------------------------------------------------------------# Recode <- "Births Recode" dhsData4 <- getDHSdata(country = "Zambia", indicator = NULL, Recode=Recode,year = "2018") # # Here we filter the births to be within the last 10 years # this is specified by condition = "v008 - b3 < 120" # b3 is the date of births in CMC format # v008 is the date of interview in CMC format # the difference is the number of months between the two dates # b7 is the age of death for the child. We consider neonatal deaths where # b7 = 0. # b7 = NA when the child is alive at the time of interview. data4 <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 120", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") # This will return the same dataset as below data5 <- getDHSindicator(Rdata = dhsData4, indicator = "nmr") # Notice that filter can have more than one conditions specified by vector # The following four specifications lead to the same dataset for # neonatal deaths in the last 5 years data6a <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 120 & v008 - b3 < 60", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data6b <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = c("v008 - b3 < 120", "v008 - b3 < 60"), yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data6c <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 60", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data7 <- getDHSindicator(Rdata = dhsData4, indicator = "nmr", nmr.year = 5) ## End(Not run)## Not run: # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData1 <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data1 <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") #------------------------------------------------------------------# # User-specified function to process the data # For example see the internal function surveyPrev::AN_ANEM_W_ANY #------------------------------------------------------------------# dhsData2 <- getDHSdata(country = "Zambia", indicator = NULL, year = 2018) data2 <- getDHSindicator(dhsData2, indicator = NULL, FUN = surveyPrev::AN_ANEM_W_ANY) # which should be identical to the following dhsData3 <- getDHSdata(country = "Zambia", indicator = "womananemia", year = 2018) data3 <- getDHSindicator(dhsData3, indicator = "womananemia") #------------------------------------------------------------------# # User-specified filtering condition # Demonstrating NMR data preparation by specifying how to subset data # and specify the outcome variable and its levels #------------------------------------------------------------------# Recode <- "Births Recode" dhsData4 <- getDHSdata(country = "Zambia", indicator = NULL, Recode=Recode,year = "2018") # # Here we filter the births to be within the last 10 years # this is specified by condition = "v008 - b3 < 120" # b3 is the date of births in CMC format # v008 is the date of interview in CMC format # the difference is the number of months between the two dates # b7 is the age of death for the child. We consider neonatal deaths where # b7 = 0. # b7 = NA when the child is alive at the time of interview. data4 <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 120", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") # This will return the same dataset as below data5 <- getDHSindicator(Rdata = dhsData4, indicator = "nmr") # Notice that filter can have more than one conditions specified by vector # The following four specifications lead to the same dataset for # neonatal deaths in the last 5 years data6a <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 120 & v008 - b3 < 60", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data6b <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = c("v008 - b3 < 120", "v008 - b3 < 60"), yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data6c <- getDHSindicator(Rdata = dhsData4, indicator = NULL, filter = "v008 - b3 < 60", yesCondition = "b7 == 0", noCondition = "b7 > 0 | is.na(b7)") data7 <- getDHSindicator(Rdata = dhsData4, indicator = "nmr", nmr.year = 5) ## End(Not run)
This function computes the urban proportion at a given survey year. It requires two population raster files and urban population fraction by admin 1 area from the census. The census year overall population raster is used to partition the grids into urban and rural pixels, based on the urban population fractions in a given area at the census year. The thresholding process is performed by first sorting the pixels from high to low population density, and find a threshold such that the fraction of population above this threshold matches the urban population fraction from the census. This step defines the urbanicity of each pixel. In the second step, for any given year's raster for a specific (sub-)population (e.g., specific age groups), we aggregate the population in the urban pixels defined in the previous step to compute urban proportion for the (sub-)population, within both admin1 and admin2 regions.
getUR( tiff.census, tiff.survey, prop.census, fact = 10, poly.adm1, poly.adm2, varname1, varname2 )getUR( tiff.census, tiff.survey, prop.census, fact = 10, poly.adm1, poly.adm2, varname1, varname2 )
tiff.census |
spatial raster of population estimates at the census year when the sampling frame is based, for the whole population. |
tiff.survey |
spatial raster of population estimates at the survey year, for the target population. |
prop.census |
a data frame with two columns: 'admin1' column correspond to the admin 1 names in the 'poly.adm1' file. And 'frac' column specifying the proportion of population in each admin 1 area during the census year. See examples for detail. |
fact |
factor to aggregate pixels from tiff.survey to tiff.census. For example, if tiff.census is a population raster at 1km by 1km resolution and tiff.survey is a raster at 100m by 100m resolution, then fact should be set to 10. Currently we only support fact > 1. Default is 10. |
poly.adm1 |
spatial polygons data frame for admin 1 |
poly.adm2 |
spatial polygons data frame for admin 2 |
varname1 |
column name of district name in the admin 1 spatial polygon data frame |
varname2 |
column name of district name in the admin 2 spatial polygon data frame |
a list of two data frames for admin 1 and admin 2 urban ratios and UR surface where 1 for urban.
## Not run: # ----------------------------------------------------------------------# # Here we consider the example of computing urban/rural fraction for # Zambia 2018 DHS for the sub-population of children under 1 years old. # This survey is based on sampling frame from the 2010 Zambia Census. # ----------------------------------------------------------------------# # # From Table A1 of Zambia 2013-2014 DHS final report, we can obtain the fraction of # urban population by Admin 1 areas in the 2010 survey. # Notice that in the appendix of the 2018 DHS final report, # only distribution of household is reported and not population size by urbanicity. # When the table is not provided in the DHS report, you need to find it from # the census website directly. # Please note that the admin1 column needs to match the admin 1 names in the # Admin 1 spatial polygon file exactly. # For example, here we change "Northwestern" to "North-Western" urban.frac <- data.frame( admin1 = c('Central', 'Copperbelt', 'Eastern', 'Luapula', 'Lusaka', 'Muchinga', 'North-Western', 'Northern', 'Southern','Western'), frac = c(0.2513, 0.809, 0.1252, 0.1963, 0.8456, 0.1714, 0.2172, 0.1826, 0.2448, 0.1474)) # The corresponding census year population tiff can be found at: # https://data.worldpop.org/GIS/Population/Global_2000_2020_1km_UNadj/ # The code below downloads the file from the internet directly # You can also download the file directly and read into R link1="https://data.worldpop.org/GIS/Population/Global_2000_2020_1km_UNadj/" file1="2010/ZMB/zmb_ppp_2010_1km_Aggregated_UNadj.tif" tempfile1 = tempfile() download.file(paste0(link1, file1), destfile = tempfile1, method = "libcurl", mode="wb") library(raster) tiff1 <- raster(tempfile1) # https://hub.worldpop.org/geodata/summary?id=16429 # Here we compute population fractions for 0-1 year old population. # The from the same link below link2="https://data.worldpop.org/GIS/AgeSex_structures/Global_2000_2020/" # The two files are for female and male population respectively, file2f="2018/ZMB/zmb_f_0_2018.tif" file2m="2018/ZMB/zmb_f_0_2018.tif" # Since the two files are very large, we recommend downloading them # mannually and then load them into R. tiff2f <- raster("zmb_f_0_2018.tif") tiff2m <- raster("zmb_m_0_2018.tif") tiff2 <- tiff2f + tiff2m frac <- getUR(tiff.census = tiff1, tiff.survey = tiff2, prop.census = urban.frac, fact = 10, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2, varname1 = "NAME_1", varname2 = "NAME_2") library(SUMMER) mapPlot(frac$admin1.ur, geo = ZambiaAdm1, by.data = "admin1.name", by.geo = "NAME_1", variable = "urban") mapPlot(frac$admin2.ur, geo = ZambiaAdm2, by.data = "admin2.name", by.geo = "NAME_2", variable = "urban") # Compare with the proportion of Women 14-49 years old in the built-in data # These two plots should be similar but not identical # since the population is different mapPlot(ZambiaPopWomen$admin2_urban, geo = ZambiaAdm2, by.data = "admin2.name", by.geo = "NAME_2", variable = "urban") ## End(Not run)## Not run: # ----------------------------------------------------------------------# # Here we consider the example of computing urban/rural fraction for # Zambia 2018 DHS for the sub-population of children under 1 years old. # This survey is based on sampling frame from the 2010 Zambia Census. # ----------------------------------------------------------------------# # # From Table A1 of Zambia 2013-2014 DHS final report, we can obtain the fraction of # urban population by Admin 1 areas in the 2010 survey. # Notice that in the appendix of the 2018 DHS final report, # only distribution of household is reported and not population size by urbanicity. # When the table is not provided in the DHS report, you need to find it from # the census website directly. # Please note that the admin1 column needs to match the admin 1 names in the # Admin 1 spatial polygon file exactly. # For example, here we change "Northwestern" to "North-Western" urban.frac <- data.frame( admin1 = c('Central', 'Copperbelt', 'Eastern', 'Luapula', 'Lusaka', 'Muchinga', 'North-Western', 'Northern', 'Southern','Western'), frac = c(0.2513, 0.809, 0.1252, 0.1963, 0.8456, 0.1714, 0.2172, 0.1826, 0.2448, 0.1474)) # The corresponding census year population tiff can be found at: # https://data.worldpop.org/GIS/Population/Global_2000_2020_1km_UNadj/ # The code below downloads the file from the internet directly # You can also download the file directly and read into R link1="https://data.worldpop.org/GIS/Population/Global_2000_2020_1km_UNadj/" file1="2010/ZMB/zmb_ppp_2010_1km_Aggregated_UNadj.tif" tempfile1 = tempfile() download.file(paste0(link1, file1), destfile = tempfile1, method = "libcurl", mode="wb") library(raster) tiff1 <- raster(tempfile1) # https://hub.worldpop.org/geodata/summary?id=16429 # Here we compute population fractions for 0-1 year old population. # The from the same link below link2="https://data.worldpop.org/GIS/AgeSex_structures/Global_2000_2020/" # The two files are for female and male population respectively, file2f="2018/ZMB/zmb_f_0_2018.tif" file2m="2018/ZMB/zmb_f_0_2018.tif" # Since the two files are very large, we recommend downloading them # mannually and then load them into R. tiff2f <- raster("zmb_f_0_2018.tif") tiff2m <- raster("zmb_m_0_2018.tif") tiff2 <- tiff2f + tiff2m frac <- getUR(tiff.census = tiff1, tiff.survey = tiff2, prop.census = urban.frac, fact = 10, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2, varname1 = "NAME_1", varname2 = "NAME_2") library(SUMMER) mapPlot(frac$admin1.ur, geo = ZambiaAdm1, by.data = "admin1.name", by.geo = "NAME_1", variable = "urban") mapPlot(frac$admin2.ur, geo = ZambiaAdm2, by.data = "admin2.name", by.geo = "NAME_2", variable = "urban") # Compare with the proportion of Women 14-49 years old in the built-in data # These two plots should be similar but not identical # since the population is different mapPlot(ZambiaPopWomen$admin2_urban, geo = ZambiaAdm2, by.data = "admin2.name", by.geo = "NAME_2", variable = "urban") ## End(Not run)
HA_AFSY_M_A15
HA_AFSY_M_A15(MRdata)HA_AFSY_M_A15(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_M_A15", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_M_A15", year = 2018) ## End(Not run)
HA_AFSY_M_A18
HA_AFSY_M_A18(MRdata)HA_AFSY_M_A18(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_M_A18", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_M_A18", year = 2018) ## End(Not run)
HA_AFSY_W_A18
HA_AFSY_W_A18(IRdata)HA_AFSY_W_A18(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_W_A18", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_AFSY_W_A18", year = 2018) ## End(Not run)
HA_ANSS_M_CND
HA_ANSS_M_CND(MRdata)HA_ANSS_M_CND(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_M_CND", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_M_CND", year = 2018) ## End(Not run)
HA_ANSS_W_CND
HA_ANSS_W_CND(IRdata)HA_ANSS_W_CND(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_W_CND", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_W_CND", year = 2018) ## End(Not run)
HA_ANSS_W_RSX
HA_ANSS_W_RSX(IRdata)HA_ANSS_W_RSX(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_W_RSX", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_ANSS_W_RSX", year = 2018) ## End(Not run)
HA_CATH_W_ATN
HA_CATH_W_ATN(IRdata)HA_CATH_W_ATN(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: ## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_CATH_W_ATN", year = 2018) ## End(Not run)## Not run: ## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_CATH_W_ATN", year = 2018) ## End(Not run)
HA_CATH_W_NRS
HA_CATH_W_NRS(IRdata)HA_CATH_W_NRS(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: ## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_CATH_W_NRS", year = 2018) ## End(Not run)## Not run: ## Not run: ## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_CATH_W_NRS", year = 2018) ## End(Not run)
Percentage of women who correctly identify the two major ways of preventing the sexual transmission of HIV (using condoms and limiting sex to one faithful, uninfected partner), who reject the two most common local misconceptions about HIV transmission, and who know that a healthy-looking person can have HIV.
HA_CKNA_W_CKA(IRdata)HA_CKNA_W_CKA(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
HA_HIVP_B_HIV hv_hiv_pos "HIV prevalence among general population"
HA_HIVP_B_HIV(Rdata)HA_HIVP_B_HIV(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata IR+AR+MR |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HIVP_B_HIV", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::HA_HIVP_B_HIV) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HIVP_B_HIV", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::HA_HIVP_B_HIV) ## End(Not run)
HA_HRSX_W_CND
HA_HRSX_W_CND(IRdata)HA_HRSX_W_CND(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HRSX_W_CND", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HRSX_W_CND", year = 2018) ## End(Not run)
HA_HVST_M_HRD
HA_HVST_M_HRD(MRdata)HA_HVST_M_HRD(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVST_M_HRD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVST_M_HRD", year = 2018) ## End(Not run)
HA_HVST_M_USD
HA_HVST_M_USD(MRdata)HA_HVST_M_USD(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVST_M_USD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVST_M_USD", year = 2018) ## End(Not run)
HA_HVTY_M_TRR
HA_HVTY_M_TRR(MRdata)HA_HVTY_M_TRR(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVTY_M_TRR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVTY_M_TRR", year = 2018) ## End(Not run)
HA_HVTY_W_TRR
HA_HVTY_W_TRR(IRdata)HA_HVTY_W_TRR(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVTY_W_TRR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_HVTY_W_TRR", year = 2018) ## End(Not run)
Percentage of men who have heard of HIV or AIDS
HA_KAID_M_HRD(MRdata)HA_KAID_M_HRD(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
HA_KAID_W_HRD Percentage of women who have heard of HIV or AIDS hk_ever_heard in github IR
HA_KAID_W_HRD(Rdata)HA_KAID_W_HRD(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_KAID_W_HRD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_KAID_W_HRD", year = 2018) ## End(Not run)
Percentage of men who, in response to a prompted question, say that people can protect themselves from contracting HIV by using condoms or having sex only with one faithful, uninfected partner.
HA_KHVP_M_CS1(MRdata)HA_KHVP_M_CS1(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
HA_STIS_M_DIS
HA_STIS_M_DIS(MRdata)HA_STIS_M_DIS(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_M_DIS", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_M_DIS", year = 2018) ## End(Not run)
HA_STIS_M_SOR
HA_STIS_M_SOR(MRdata)HA_STIS_M_SOR(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_M_SOR", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_M_SOR", year = 2018) ## End(Not run)
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 IR
HA_STIS_W_STI(Rdata)HA_STIS_W_STI(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_W_STI", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HA_STIS_W_STI", year = 2018) ## End(Not run)
HC_AGEG_P_ADL
HC_AGEG_P_ADL(PRdata)HC_AGEG_P_ADL(PRdata)
PRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_AGEG_P_ADL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_AGEG_P_ADL", year = 2018) ## End(Not run)
HC_ELEC_H_ELC Percentage of households with electricity ph_electric in github HR
HC_ELEC_H_ELC(Rdata)HC_ELEC_H_ELC(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_ELEC_H_ELC", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_ELEC_H_ELC", year = 2018) ## End(Not run)
HC_FLRM_H_CER Percentage of households with ceramic tile floors ph_floor in github HR
HC_FLRM_H_CER(Rdata)HC_FLRM_H_CER(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_FLRM_H_CER", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_FLRM_H_CER", year = 2018) ## End(Not run)
HC_HEFF_H_RDO Percentage of households possessing a radio ph_radio in github HR
HC_HEFF_H_RDO(Rdata)HC_HEFF_H_RDO(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_HEFF_H_RDO", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "HC_HEFF_H_RDO", year = 2018) ## End(Not run)
Percentage of households possessing a private car
HC_TRNS_H_CAR(HRdata)HC_TRNS_H_CAR(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households possessing a motorcycle
HC_TRNS_H_SCT(HRdata)HC_TRNS_H_SCT(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
HC_WIXQ_P_12Q PRdata Population in the lowest and second wealth quintile
HC_WIXQ_P_12Q(Rdata)HC_WIXQ_P_12Q(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
HC_WIXQ_P_2ND PRdata Population in the second wealth quintile
HC_WIXQ_P_2ND(Rdata)HC_WIXQ_P_2ND(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
HC_WIXQ_P_LOW PRdata Population in the lowest wealth quintile
HC_WIXQ_P_LOW(Rdata)HC_WIXQ_P_LOW(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
A data frame listing the DHS indicators supported by the package, including their IDs, descriptions, full definitions, associated DHS chapters, and the recode files (IR, PR, KR, BR, HR, MR, AR, CR) required to compute them.
data(indicatorList)data(indicatorList)
A data frame with 182 rows and 15 columns:
Chapter acronym.
DHS standard indicator ID.
Short label of the indicator.
Full definition of the indicator.
Chapter topic the indicator belongs to.
Logical flags indicating which DHS recode files are required.
DHS chapter number.
DHS chapter title.
This function return scatter plot at admin 1 level for any two model results
intervalPlot( admin = 0, compare = FALSE, model = NULL, group = FALSE, sort_by = NULL, decreasing = FALSE )intervalPlot( admin = 0, compare = FALSE, model = NULL, group = FALSE, sort_by = NULL, decreasing = FALSE )
admin |
level of plot |
compare |
plot for compare multiple plot or not |
model |
list of model results using surveyPrev |
group |
plot by group or not |
sort_by |
the name of the model to sort the areas by. Default to be NULL |
decreasing |
whether the regions are sorted in decreasing order. Default to be NULL |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level.
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, agg.pop =ZambiaPopWomen$admin2_pop, proportion = ZambiaPopWomen$admin2_urban) # unstratified model cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) head(cl_res_ad2_unstrat$res.admin2) head(cl_res_ad2_unstrat$agg.admin1) plots <- intervalPlot(cl_res_ad2_unstrat) plots[["Central"]] # unstratified model cl_res_ad2 <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = TRUE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) head(cl_res_ad2$res.admin2) head(cl_res_ad2$agg.admin1) plots <- intervalPlot(cl_res_ad2) plots[["Central"]] library(patchwork) wrap_plots(plots, ncol = 5) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, agg.pop =ZambiaPopWomen$admin2_pop, proportion = ZambiaPopWomen$admin2_urban) # unstratified model cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) head(cl_res_ad2_unstrat$res.admin2) head(cl_res_ad2_unstrat$agg.admin1) plots <- intervalPlot(cl_res_ad2_unstrat) plots[["Central"]] # unstratified model cl_res_ad2 <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = TRUE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) head(cl_res_ad2$res.admin2) head(cl_res_ad2$agg.admin1) plots <- intervalPlot(cl_res_ad2) plots[["Central"]] library(patchwork) wrap_plots(plots, ncol = 5) ## End(Not run)
MA_CWIV_W_CWV
MA_CWIV_W_CWV(IRdata)MA_CWIV_W_CWV(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_CWIV_W_CWV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_CWIV_W_CWV", year = 2018) ## End(Not run)
MA_MBAG_W_B15 Women first married by exact age 15 ms_afm_15 in github IR
MA_MBAG_W_B15(Rdata)MA_MBAG_W_B15(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAG_W_B15", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAG_W_B15", year = 2018) ## End(Not run)
##' MA_MBAG_W_B18 Percentage of women first married by exact age 18 ms_afm_18 in github IR
MA_MBAG_W_B18(Rdata)MA_MBAG_W_B18(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAG_W_B18", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAG_W_B18", year = 2018) ## End(Not run)
MA_MBAY_W_B15 Young women age 20-24 first married by exact age 15 ms_afm_15 in github IR
MA_MBAY_W_B15(Rdata)MA_MBAY_W_B15(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAY_W_B15", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAY_W_B15", year = 2018) ## End(Not run)
MA_MBAY_W_B18 Percentage of Young women age 20-24 first married by exact age 18 ms_afm_18 in github IR
MA_MBAY_W_B18(Rdata)MA_MBAY_W_B18(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAY_W_B18", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MBAY_W_B18", year = 2018) ## End(Not run)
MA_MSTA_W_NMA
MA_MSTA_W_NMA(IRdata)MA_MSTA_W_NMA(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MSTA_W_NMA", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "MA_MSTA_W_NMA", year = 2018) ## End(Not run)
Percentage of women married or living in union
MA_MSTA_W_UNI(IRdata)MA_MSTA_W_UNI(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of young women age 15-19, 20-24, or 15-24 married
MA_MSTY_W_MAR(IRdata)MA_MSTY_W_MAR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of young women age 15-19, 20-24, or 15-24 married or living in union
MA_MSTY_W_UNI(IRdata)MA_MSTY_W_UNI(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
A data frame with DHS indicator information used to match across different code bases.
data(match_all_result)data(match_all_result)
An object of class data.frame with 146 rows and 21 columns.
Among children under age five with fever in the two weeks preceding the survey, the percentage for whom advice or treatment was sought
ML_FEVT_C_ADV(KRdata)ML_FEVT_C_ADV(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Households with at least one ITN for every two persons and/or IRS in the past 12 months
ML_IRSM_H_I2I(HRdata)ML_IRSM_H_I2I(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
ML_NETC_C_ITN PRdata Percentage of children under age five who slept under an insecticide treated net (ITN) the night before the survey
ML_NETC_C_ITN(Rdata)ML_NETC_C_ITN(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
ML_NETP_H_IT2 HRdata Households with access to an insecticide-treated mosquito net (ITN)
ML_NETP_H_IT2(Rdata)ML_NETP_H_IT2(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ML_NETP_H_IT2", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::ML_NETP_H_IT2) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ML_NETP_H_IT2", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::ML_NETP_H_IT2) ## End(Not run)
ML_NETU_P_ITN PRdata Percentage of the de facto household population who slept under an insecticide treated net the night before the survey
ML_NETU_P_ITN(Rdata)ML_NETU_P_ITN(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
ML_PMAL_C_RDT PRdata Malaria prevalence according to RDT
ML_PMAL_C_RDT(Rdata)ML_PMAL_C_RDT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ML_PMAL_C_RDT", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::ML_PMAL_C_RDT) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "ML_PMAL_C_RDT", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::ML_PMAL_C_RDT) ## End(Not run)
PR_DESL_W_WNM
PR_DESL_W_WNM(IRdata)PR_DESL_W_WNM(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "PR_DESL_W_WNM", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "PR_DESL_W_WNM", year = 2018) ## End(Not run)
produce static map for any subnational level, with the option to focus on one admin-1 level
prevMap( res.obj, poly.shp, admin1.focus = NULL, value.to.plot = "mean", map.title = NULL, legend.label = "Estimates", threshold.p = NULL, color.palette = NULL, color.reverse = T, value.range = NULL, ... )prevMap( res.obj, poly.shp, admin1.focus = NULL, value.to.plot = "mean", map.title = NULL, legend.label = "Estimates", threshold.p = NULL, color.palette = NULL, color.reverse = T, value.range = NULL, ... )
res.obj |
result object from surveyPrev |
poly.shp |
polygon file for plotting |
admin1.focus |
if needed, the admin 1 level area name to create an individual focused prevalence map on |
value.to.plot |
statistics to appear on the map |
map.title |
title for the map |
legend.label |
label for the legend, such as 'Coefficient of Variation' |
threshold.p |
cutoff for the exceedance probability map |
color.palette |
which palette to use for plotting |
color.reverse |
whether to use reverse color scale |
value.range |
what range to plot, useful if want to compare plots using the same scale |
... |
arguments passed to mapPlot function from SUMMER package |
summer map object
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = sf::st_as_sf(ZambiaAdm2), admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") cl_res_ad2 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) prevMap.adm2.central <- prevMap(res.obj=cl_res_ad2, poly.shp=poly.adm2, admin1.focus = "Central") ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = sf::st_as_sf(ZambiaAdm2), admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") cl_res_ad2 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) prevMap.adm2.central <- prevMap(res.obj=cl_res_ad2, poly.shp=poly.adm2, admin1.focus = "Central") ## End(Not run)
produce interactive map for any subnational level, with the option to focus on one admin-1 level
prevMap.web( res.obj, poly.shp, admin1.focus = NULL, color.palette = NULL, value.to.plot = "mean", value.range = NULL, num_bins = NULL, legend.label = "Estimates", map.title = NULL, color.reverse = T, no.hatching = F, hatching.density = 12, use.basemap = NULL, threshold.p = NULL, legend.color.reverse = T )prevMap.web( res.obj, poly.shp, admin1.focus = NULL, color.palette = NULL, value.to.plot = "mean", value.range = NULL, num_bins = NULL, legend.label = "Estimates", map.title = NULL, color.reverse = T, no.hatching = F, hatching.density = 12, use.basemap = NULL, threshold.p = NULL, legend.color.reverse = T )
res.obj |
result object from surveyPrev |
poly.shp |
polygon file for plotting |
admin1.focus |
if needed, the admin 1 level area name to create an individual focused prevalence map on |
color.palette |
which palette to use for plotting |
value.to.plot |
statistics to appear on the map |
value.range |
what range to plot, useful if want to compare plots using the same scale |
num_bins |
number of bins on the legend (what displayed might not be exact) |
legend.label |
label for the legend, such as 'Coefficient of Variation' |
map.title |
title for the map |
color.reverse |
whether to use reverse color scale |
no.hatching |
whether to hatch region with problematic uncertainties, recommend F (depends on rgeos package, set to T if not installed) |
hatching.density |
density of the hatching lines |
use.basemap |
what basemap to use 'OSM', if NULL, no basemap |
threshold.p |
cutoff for the exceedance probability map |
legend.color.reverse |
logical indicator of reversing the color legend |
leaflet map object
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm2 <- sf::st_as_sf(ZambiaAdm2) admin.info2 <- adminInfo(poly.adm = poly.adm2, admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") cl_res_ad2 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) prevMap.adm2.central <- prevMap.web(res.obj=cl_res_ad2, poly.shp=poly.adm2, admin1.focus = "Central") ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm2 <- sf::st_as_sf(ZambiaAdm2) admin.info2 <- adminInfo(poly.adm = poly.adm2, admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") cl_res_ad2 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) prevMap.adm2.central <- prevMap.web(res.obj=cl_res_ad2, poly.shp=poly.adm2, admin1.focus = "Central") ## End(Not run)
This function return scatter plot at admin 1 or 2 level for given model results.
rankPlot(x, direction = 1)rankPlot(x, direction = 1)
x |
a model result using surveyPrev of class "fhModel" or "clusterModel" |
direction |
direction of the ranking. The default is direction = 1, which correspond to larger value having higher ranking. If direction = -1, larger value has lower ranking. |
This function returns a ranking plot.
Zehang Li, Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, by.adm="NAME_2", by.adm.upper = "NAME_1") cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) rankPlot(cl_res_ad2_unstrat) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, by.adm="NAME_2", by.adm.upper = "NAME_1") cl_res_ad2_unstrat <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) rankPlot(cl_res_ad2_unstrat) ## End(Not run)
AH_TOBC_W_OTH
RH_ANCN_W_N01(Rdata)RH_ANCN_W_N01(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N01", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N01", year = 2018) ## End(Not run)
RH_ANCN_W_N4F IRdata Antenatal visits for pregnancy: 4+ visits FIVE year
RH_ANCN_W_N4F(Rdata)RH_ANCN_W_N4F(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_N4P) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_N4P) ## End(Not run)
RH_ANCN_W_N4P IRdata Antenatal visits for pregnancy: 4+ visits TWO year
RH_ANCN_W_N4P(Rdata)RH_ANCN_W_N4P(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_N4P) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_N4P) ## End(Not run)
RH_ANCN_W_N4P IRdata Antenatal visits for pregnancy: no visits TWO year
RH_ANCN_W_NON(Rdata)RH_ANCN_W_NON(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_NON", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_NON) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_NON", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_ANCN_W_NON) ## End(Not run)
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey whose source of antenatal care during the pregnancy for the most recent live birth was a community health worker
RH_ANCP_W_CHW(IRdata)RH_ANCP_W_CHW(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey whose source of antenatal care during the pregnancy for the most recent live birth was a doctor
RH_ANCP_W_DOC(IRdata)RH_ANCP_W_DOC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who received no antenatal care during the pregnancy for the most recent live birth
RH_ANCP_W_NON(IRdata)RH_ANCP_W_NON(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey whose source of antenatal care during the pregnancy for the most recent live birth was a nurse or midwife
RH_ANCP_W_NRS(IRdata)RH_ANCP_W_NRS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey whose source of antenatal care during the pregnancy for the most recent live birth was another type of health worker
RH_ANCP_W_OHW(IRdata)RH_ANCP_W_OHW(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who received antenatal care during the pregnancy for the most recent live birth from a skilled provider
RH_ANCP_W_SKP(IRdata)RH_ANCP_W_SKP(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey whose source of antenatal care during the pregnancy for the most recent live birth was a traditional birth attendant
RH_ANCP_W_TBA(IRdata)RH_ANCP_W_TBA(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of live births (or stillbirths) in the two (or three/five) years preceding the survey assisted by no one
RH_DELA_C_NON(KRdata)RH_DELA_C_NON(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
RH_DELA_C_SKF BRdata Assistance during delivery from a skilled provider
RH_DELA_C_SKF(Rdata)RH_DELA_C_SKF(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELA_C_SKF", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_DELA_C_SKF) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELA_C_SKF", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_DELA_C_SKF) ## End(Not run)
RH_DELA_C_SKP BRdata Assistance during delivery from a skilled provider
RH_DELA_C_SKP(Rdata)RH_DELA_C_SKP(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELA_C_SKP", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_DELA_C_SKP) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELA_C_SKP", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::RH_DELA_C_SKP) ## End(Not run)
Percentage of live births (or stillbirths) in the two (or three/five) years preceding the survey assisted by a traditional birth attendant
RH_DELA_C_TBA(KRdata)RH_DELA_C_TBA(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
RH_DELP_C_DHF
RH_DELP_C_DHF(Rdata)RH_DELP_C_DHF(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHF", year = 2018) ## End(Not run)
RH_DELP_C_DHT
RH_DELP_C_DHT(Rdata)RH_DELP_C_DHT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)
RH_DELP_C_HOM
RH_DELP_C_HOM(Rdata)RH_DELP_C_HOM(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)
RH_DELP_C_HOT
RH_DELP_C_HOT(Rdata)RH_DELP_C_HOT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_DHT", year = 2018) ## End(Not run)
RH_DELP_C_PRT
RH_DELP_C_PRT(Rdata)RH_DELP_C_PRT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PRT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PRT", year = 2018) ## End(Not run)
RH_DELP_C_PRV
RH_DELP_C_PRV(Rdata)RH_DELP_C_PRV(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PRV", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PRV", year = 2018) ## End(Not run)
RH_DELP_C_PUB
RH_DELP_C_PUB(Rdata)RH_DELP_C_PUB(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PUB", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PUB", year = 2018) ## End(Not run)
RH_DELP_C_PUT
RH_DELP_C_PUT(Rdata)RH_DELP_C_PUT(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PUT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_DELP_C_PUT", year = 2018) ## End(Not run)
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who took iron containing supplements for 60-89 days during the pregnancy of the most recent live birth (or stillbirth)
RH_ICSP_W_B69(IRdata)RH_ICSP_W_B69(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who did not know if they took iron containing supplements or did not know the number of days they took iron supplementation during the pregnancy of the most recent live birth (or stillbirth) or where the information was missing
RH_ICSP_W_IDK(IRdata)RH_ICSP_W_IDK(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who took iron containing supplements for less than 60 days during the pregnancy of the most recent live birth (or stillbirth)
RH_ICSP_W_L60(IRdata)RH_ICSP_W_L60(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women who had a live birth (or stillbirth) in the two (or three/five) years preceding the survey who took no iron containing supplements during the pregnancy of the most recent live birth (or stillbirth)
RH_ICSP_W_TNI(IRdata)RH_ICSP_W_TNI(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women: total
RH_ICSP_W_TOT(IRdata)RH_ICSP_W_TOT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
RH_PAHC_W_DIS IRdata Problems in accessing health care: Distance to health facility
RH_PAHC_W_DIS(Rdata)RH_PAHC_W_DIS(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
Percentage of women who reported they have big problems in concern there may not be a female provider for treatment for themselves when they are sick
RH_PAHC_W_FEM(IRdata)RH_PAHC_W_FEM(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
RH_PAHC_W_MON IRdata Problems in accessing health care: Getting money for treatment
RH_PAHC_W_MON(Rdata)RH_PAHC_W_MON(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
Percentage of women who reported they have big problems in any of the specified problems for treatment for themselves when they are sick
RH_PAHC_W_PR1(IRdata)RH_PAHC_W_PR1(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
RH_PAHC_W_PRM IRdata Problems in accessing health care: Getting permission to go for treatment
RH_PAHC_W_PRM(Rdata)RH_PAHC_W_PRM(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "FP_CUSA_W_MOD", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::fp_cruse_mod) ## End(Not run)
Percentage of women who reported they have big problems in having to take transport for treatment for themselves when they are sick
RH_PAHC_W_TRN(IRdata)RH_PAHC_W_TRN(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a community health worker
RH_PCCP_C_CHW(KRdata)RH_PCCP_C_CHW(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a doctor, nurse or midwife
RH_PCCP_C_DOC(KRdata)RH_PCCP_C_DOC(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who received no postnatal checkup in the first two days after birth
RH_PCCP_C_NON(IRdata)RH_PCCP_C_NON(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from another type of health worker
RH_PCCP_C_OHW(KRdata)RH_PCCP_C_OHW(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a traditional birth attendant
RH_PCCP_C_TBA(KRdata)RH_PCCP_C_TBA(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who had their first postnatal checkup 1-2 days after birth
RH_PCCT_C_D12(KRdata)RH_PCCT_C_D12(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who had their first postnatal checkup 3-6 days after birth
RH_PCCT_C_D36(KRdata)RH_PCCT_C_D36(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey with missing information on their first postnatal checkup after birth
RH_PCCT_C_DKM(KRdata)RH_PCCT_C_DKM(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
RH_PCCT_C_DY2 Newborn's first postnatal checkup: 1-2 days RH_PCCT_C_DY2 in github IR
RH_PCCT_C_DY2(Rdata)RH_PCCT_C_DY2(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCCT_C_DY2", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCCT_C_DY2", year = 2018) ## End(Not run)
Percentage of last births in the two years preceding the survey who had their first postnatal checkup 4-23 hours after birth
RH_PCCT_C_H4P(KRdata)RH_PCCT_C_H4P(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey who had their first postnatal checkup less than 1 hour after birth
RH_PCCT_C_L1H(KRdata)RH_PCCT_C_L1H(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of last births in the two years preceding the survey: Total
RH_PCCT_C_TOT(KRdata)RH_PCCT_C_TOT(KRdata)
KRdata |
A DHS Children's Recode (KR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a community health worker
RH_PCMP_W_CHW(IRdata)RH_PCMP_W_CHW(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a doctor, nurse or midwife
RH_PCMP_W_DOC(IRdata)RH_PCMP_W_DOC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who received no postnatal checkup in the first two days after birth
RH_PCMP_W_NON(IRdata)RH_PCMP_W_NON(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from another type of health worker
RH_PCMP_W_OHW(IRdata)RH_PCMP_W_OHW(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who received their first postnatal checkup in the first two days after birth from a traditional birth attendant
RH_PCMP_W_TBA(IRdata)RH_PCMP_W_TBA(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who had their first postnatal checkup 1-2 days after birth
RH_PCMT_W_D12(IRdata)RH_PCMT_W_D12(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey who had their first postnatal checkup 7-41 days after birth
RH_PCMT_W_D7P(IRdata)RH_PCMT_W_D7P(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women giving birth in the two years preceding the survey with missing information on their first postnatal checkup after birth
RH_PCMT_W_DKM(IRdata)RH_PCMT_W_DKM(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
RH_PCMT_W_DY2 Mother's first postnatal checkup: 1-2 days IR
RH_PCMT_W_DY2(Rdata)RH_PCMT_W_DY2(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCMT_W_DY2", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCMT_W_DY2", year = 2018) ## End(Not run)
RH_PCMT_W_NON No Mother's postnatal checkup in 42 days IR
RH_PCMT_W_NON(Rdata)RH_PCMT_W_NON(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCMT_W_NON", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "RH_PCMT_W_NON", year = 2018) ## End(Not run)
Percentage of women giving birth in the two years preceding the survey: Total
RH_PCMT_W_TOT(IRdata)RH_PCMT_W_TOT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
static ridge plot for posterior densities
ridgeprevPlot( res.obj, admin1.focus = NA, plot.extreme.num = 8, legend.label = "Value", color.reverse = T, plot.format = c("Long", "Wide")[1], top.bottom.label = c("Top", "Bottom") )ridgeprevPlot( res.obj, admin1.focus = NA, plot.extreme.num = 8, legend.label = "Value", color.reverse = T, plot.format = c("Long", "Wide")[1], top.bottom.label = c("Top", "Bottom") )
res.obj |
result object from surveyPrev |
admin1.focus |
whether to plot densities for regions within a single upper admin |
plot.extreme.num |
number of regions to plot for the top n and bottom n regions |
legend.label |
label on the legend |
color.reverse |
whether to reverse color scheme |
plot.format |
c('Long','Wide') for extreme regions, side-by-side or long plot |
top.bottom.label |
c('Top','Bottom') how to name the extremes, top 10 bottom 10? need to change when close to 0 is bad for the indicator |
ggplot2 object
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm1 <- sf::st_as_sf(ZambiaAdm1) admin.info1 <- adminInfo(poly.adm = poly.adm1, admin = 1, by.adm = "NAME_1") cl_res_ad1 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info1, stratification = FALSE, model = "bym2", admin = 1, aggregation = TRUE, CI = 0.95) ridgeprevPlot(cl_res_ad1, plot.extreme.num=5) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm1 <- sf::st_as_sf(ZambiaAdm1) admin.info1 <- adminInfo(poly.adm = poly.adm1, admin = 1, by.adm = "NAME_1") cl_res_ad1 <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info1, stratification = FALSE, model = "bym2", admin = 1, aggregation = TRUE, CI = 0.95) ridgeprevPlot(cl_res_ad1, plot.extreme.num=5) ## End(Not run)
This function return scatter plot at admin 1 level for any two model results
scatterPlot( res1, value1, res2, value2, label1, label2, by.res1, by.res2, title )scatterPlot( res1, value1, res2, value2, label1, label2, by.res1, by.res2, title )
res1 |
model result 1 using surveyPrev |
value1 |
value1 |
res2 |
model result 2 using surveyPrev |
value2 |
value2 |
label1 |
label for x axis |
label2 |
label for y axis |
by.res1 |
by.res1 |
by.res2 |
by.res2 |
title |
title |
This function returns the dataset that contain district name and population for given tiff files and polygons of admin level
Qianyu Dong
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) smth_res_ad1 <- fhModel(data, cluster.info = cluster.info, admin.info = admin.info1, admin = 1, model = "bym2", aggregation = F) admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, agg.pop =ZambiaPopWomen$admin2_pop, proportion = ZambiaPopWomen$admin2_urban) cl_res_ad2 <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) scatterPlot( res1 = smth_res_ad1, res2 = cl_res_ad2$agg.admin1, value1 = "value", value2 = "value", by.res1 = "admin1.name", by.res2 = "admin1.name", title = "Aggregated cluster model v.s. Fay–Herriot", label1 = "Fay–Herriot", label2 = "Aggregated cluster model") ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) data(ZambiaAdm1) data(ZambiaAdm2) data(ZambiaPopWomen) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") admin.info1 <- adminInfo(poly.adm = ZambiaAdm1, admin = 1, agg.pop =ZambiaPopWomen$admin1_pop, proportion = ZambiaPopWomen$admin1_urban) smth_res_ad1 <- fhModel(data, cluster.info = cluster.info, admin.info = admin.info1, admin = 1, model = "bym2", aggregation = F) admin.info2 <- adminInfo(poly.adm = ZambiaAdm2, admin = 2, agg.pop =ZambiaPopWomen$admin2_pop, proportion = ZambiaPopWomen$admin2_urban) cl_res_ad2 <- clusterModel(data = data, cluster.info = cluster.info, admin.info = admin.info2, stratification = FALSE, model = "bym2", admin = 2, aggregation = TRUE, CI = 0.95) scatterPlot( res1 = smth_res_ad1, res2 = cl_res_ad2$agg.admin1, value1 = "value", value2 = "value", by.res1 = "admin1.name", by.res2 = "admin1.name", title = "Aggregated cluster model v.s. Fay–Herriot", label1 = "Fay–Herriot", label2 = "Aggregated cluster model") ## End(Not run)
interactive scatter plot comparing estimates from two methods for the same admin level
scatterPlot.web( res.obj.x, res.obj.y, value.to.plot = "mean", label.x = "Method 1 Estimates", label.y = "Method 2 Estimates", plot.title = NULL, interactive = T )scatterPlot.web( res.obj.x, res.obj.y, value.to.plot = "mean", label.x = "Method 1 Estimates", label.y = "Method 2 Estimates", plot.title = NULL, interactive = T )
res.obj.x |
result object from surveyPrev |
res.obj.y |
result object from surveyPrev |
value.to.plot |
which statistics to plot 'mean' |
label.x |
label on x-axis |
label.y |
label on y-axis |
plot.title |
title for the plot |
interactive |
whether to render interactive or static plot |
plotly or ggplot2 object
## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm2 <- sf::st_as_sf(ZambiaAdm2) admin.info2 <- adminInfo(poly.adm = poly.adm2, admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") res_adm2_cl <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) res_adm2_fh <- fhModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) scatterPlot.web(res_adm2_cl, res_adm2_fh) ## End(Not run)## Not run: geo <- getDHSgeo(country = "Zambia", year = 2018) cluster.info <- clusterInfo(geo = geo, poly.adm1 = ZambiaAdm1, poly.adm2 = ZambiaAdm2) # "RH_ANCN_W_N4P" is an indicator for having more than four ANC visits. # In previous versions of the package, it is labeled "ancvisit4+". dhsData <- getDHSdata(country = "Zambia", indicator = "RH_ANCN_W_N4P", year = 2018) data <- getDHSindicator(dhsData, indicator = "RH_ANCN_W_N4P") poly.adm2 <- sf::st_as_sf(ZambiaAdm2) admin.info2 <- adminInfo(poly.adm = poly.adm2, admin = 2, by.adm = "NAME_2", by.adm.upper = "NAME_1") res_adm2_cl <- clusterModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) res_adm2_fh <- fhModel(data=data, cluster.info = cluster.info, admin.info = admin.info2, model = "bym2", admin = 2) scatterPlot.web(res_adm2_cl, res_adm2_fh) ## End(Not run)
WE_AWBT_M_ARG
WE_AWBT_M_ARG(MRdata)WE_AWBT_M_ARG(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_ARG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_ARG", year = 2018) ## End(Not run)
WE_AWBT_M_BFD
WE_AWBT_M_BFD(MRdata)WE_AWBT_M_BFD(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_BFD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_BFD", year = 2018) ## End(Not run)
WE_AWBT_M_OUT
WE_AWBT_M_OUT(MRdata)WE_AWBT_M_OUT(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_OUT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_OUT", year = 2018) ## End(Not run)
WE_AWBT_M_REF
WE_AWBT_M_REF(MRdata)WE_AWBT_M_REF(MRdata)
MRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_REF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_M_REF", year = 2018) ## End(Not run)
Percentage of women who agree that a husband is justified in hitting or beating his wife for at least one specific reason
WE_AWBT_W_AGR(IRdata)WE_AWBT_W_AGR(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
WE_AWBT_W_ARG
WE_AWBT_W_ARG(IRdata)WE_AWBT_W_ARG(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_ARG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_ARG", year = 2018) ## End(Not run)
WE_AWBT_W_BFD
WE_AWBT_W_BFD(IRdata)WE_AWBT_W_BFD(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_BFD", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_BFD", year = 2018) ## End(Not run)
WE_AWBT_W_NEG
WE_AWBT_W_NEG(IRdata)WE_AWBT_W_NEG(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_NEG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_NEG", year = 2018) ## End(Not run)
WE_AWBT_W_OUT
WE_AWBT_W_OUT(IRdata)WE_AWBT_W_OUT(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_OUT", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_OUT", year = 2018) ## End(Not run)
WE_AWBT_W_REF
WE_AWBT_W_REF(IRdata)WE_AWBT_W_REF(IRdata)
IRdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_REF", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WE_AWBT_W_REF", year = 2018) ## End(Not run)
Percentage of women who say that they alone or jointly have the final say in own health care
WE_DMAK_W_OHC(IRdata)WE_DMAK_W_OHC(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for their own health care is mainly the husband
WE_DMKH_M_HUS(MRdata)WE_DMKH_M_HUS(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for their own health care is mainly the respondent and her husband
WE_DMKH_M_JNT(MRdata)WE_DMKH_M_JNT(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for their own health care is mainly the respondent
WE_DMKH_M_WIF(MRdata)WE_DMKH_M_WIF(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for their own health care is mainly the husband
WE_DMKH_W_HUS(IRdata)WE_DMKH_W_HUS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for their own health care is mainly the respondent and her husband
WE_DMKH_W_JNT(IRdata)WE_DMKH_W_JNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for their own health care is mainly the respondent
WE_DMKH_W_WIF(IRdata)WE_DMKH_W_WIF(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for major household purchases is mainly the husband
WE_DMKP_M_HUS(MRdata)WE_DMKP_M_HUS(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for major household purchases is mainly the respondent and her husband
WE_DMKP_M_JNT(MRdata)WE_DMKP_M_JNT(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of men for whom the decision maker for major household purchases is mainly the respondent
WE_DMKP_M_WIF(MRdata)WE_DMKP_M_WIF(MRdata)
MRdata |
A DHS Men's Recode (MR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for major household purchases is mainly the husband
WE_DMKP_W_HUS(IRdata)WE_DMKP_W_HUS(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for major household purchases is mainly the respondent and her husband
WE_DMKP_W_JNT(IRdata)WE_DMKP_W_JNT(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of women for whom the decision maker for major household purchases is mainly the respondent
WE_DMKP_W_WIF(IRdata)WE_DMKP_W_WIF(IRdata)
IRdata |
A DHS Individual Recode (IR) data.frame. |
A data.frame with a 'value' column.
Percentage of households with a basic handwashing facility, defined as a handwashing facility with soap and water available
WS_HNDW_H_BAS(HRdata)WS_HNDW_H_BAS(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households where a place for washing hands was observed
WS_HNDW_H_OBS(HRdata)WS_HNDW_H_OBS(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households with basic water service, defined as an improved water source with either water on the premises or round-trip collection time is 30 minutes or less.
WS_SRCE_H_BAS(HRdata)WS_SRCE_H_BAS(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households whose main source of drinking water is an improved source
WS_SRCE_H_IMP(HRdata)WS_SRCE_H_IMP(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households with limited water service, defined as an improved water source with round-trip collection time greater than 30 minutes.
WS_SRCE_H_LTD(HRdata)WS_SRCE_H_LTD(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
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, HR
WS_SRCE_H_USG(Rdata)WS_SRCE_H_USG(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_SRCE_H_USG", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_SRCE_H_USG", year = 2018) ## End(Not run)
WS_SRCE_P_BAS PRdata Population using a basic water source
WS_SRCE_P_BAS(Rdata)WS_SRCE_P_BAS(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_SRCE_P_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_SRCE_P_BAS) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_SRCE_P_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_SRCE_P_BAS) ## End(Not run)
Percentage of households with basic sanitation service, defined as improved sanitation facilities that are not shared with other households
WS_TLET_H_BAS(HRdata)WS_TLET_H_BAS(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
WS_TLET_H_IMP PRdata Percentage of households using an improved sanitation facility
WS_TLET_H_IMP(Rdata)WS_TLET_H_IMP(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_TLET_H_IMP", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_TLET_H_IMP) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_TLET_H_IMP", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_TLET_H_IMP) ## End(Not run)
WS_TLET_P_BAS PRdata Population with access to a basic sanitation service
WS_TLET_P_BAS(Rdata)WS_TLET_P_BAS(Rdata)
Rdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_TLET_P_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_TLET_P_BAS) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_TLET_P_BAS", year = 2018) data <- getDHSindicator(dhsData, indicator = NULL, FUN = surveyPrev::WS_TLET_P_BAS) ## End(Not run)
Percentage of the de jure population living in households with an improved sanitation facility
WS_TLET_P_IMP(PRdata)WS_TLET_P_IMP(PRdata)
PRdata |
A DHS Household Member (PR) Recode data.frame. |
A data.frame with a 'value' column.
Percentage of households treating water by adding bleach or chlorine
WS_WTRT_H_BLC(HRdata)WS_WTRT_H_BLC(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households treating water by boiling
WS_WTRT_H_BOL(HRdata)WS_WTRT_H_BOL(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
Percentage of households treating water by straining through a cloth
WS_WTRT_H_STN(HRdata)WS_WTRT_H_STN(HRdata)
HRdata |
A DHS Household Recode (HR) data.frame. |
A data.frame with a 'value' column.
WS_WTRT_P_BLC
WS_WTRT_P_BLC(WASHdata)WS_WTRT_P_BLC(WASHdata)
WASHdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_BLC", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_BLC", year = 2018) ## End(Not run)
WS_WTRT_P_BOL
WS_WTRT_P_BOL(WASHdata)WS_WTRT_P_BOL(WASHdata)
WASHdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_BOL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_BOL", year = 2018) ## End(Not run)
WS_WTRT_P_SOL
WS_WTRT_P_SOL(WASHdata)WS_WTRT_P_SOL(WASHdata)
WASHdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_SOL", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_SOL", year = 2018) ## End(Not run)
WS_WTRT_P_STN
WS_WTRT_P_STN(WASHdata)WS_WTRT_P_STN(WASHdata)
WASHdata |
data.frame from surveyPrev::getDHSdata |
A partially processed data.frame that will be used in surveyPrev::getDHSindicator. The whole function can be used as a parameter in surveyPrev::getDHSindicator
Miaolei Bao, Yunhan Wu, Qianyu Dong
## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_STN", year = 2018) ## End(Not run)## Not run: dhsData <- getDHSdata(country = "Zambia", indicator = "WS_WTRT_P_STN", year = 2018) ## End(Not run)
A SpatialPolygonsDataFrame corresponding to Zambia's admin-1 regions. The dataset is downloaded from GADM (https://gadm.org/data.html) version 4.1.
data(ZambiaAdm1)data(ZambiaAdm1)
An object of class SpatialPolygonsDataFrame with 10 rows and 4 columns.
A SpatialPolygonsDataFrame corresponding to Zambia's admin-2 regions. The dataset is downloaded from GADM (https://gadm.org/data.html) version 4.1.
data(ZambiaAdm2)data(ZambiaAdm2)
An object of class SpatialPolygonsDataFrame with 115 rows and 6 columns.
A list of three objects
raster A 100m by 100m raster file for the population estimates for women of age 15 to 49 in Zambia in 2018
admin1_urban A data frame specifying the proportion of urban population (as defined by those living in regions designated as urban in the previous census) for Women of age 15 to 49 in Zambia in 2018, in each admin1 region.
admin2_urban A data frame specifying the proportion of urban population (as defined by those living in regions designated as urban in the previous census) for Women of age 15 to 49 in Zambia in 2018, in each admin2 region. The corresponding admin1 region name is also included.
The dataset is downloaded from WorldPop (https://hub.worldpop.org/geodata/summary?id=16429) and post processed.
data(ZambiaPopWomen)data(ZambiaPopWomen)
An object of class list of length 4.