| rankPlot | R Documentation |
This function return scatter plot at admin 1 or 2 level for given model results.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.