clusterModel_u5mr: Calculate cluster model estimates using beta binomial model...

View source: R/U5MR_helpers.R

clusterModel_u5mrR Documentation

Calculate cluster model estimates using beta binomial model for U5MR

Description

This function calculate smoothed direct estimates at given admin level.

Usage

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)
)

Arguments

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.

Value

This function returns the dataset that contain district name and population for given tiff files and polygons of admin level,


surveyPrev documentation built on June 19, 2026, 5:06 p.m.