Learn R Programming

SUMMER (version 0.2.3)

aggregateSurvey: Aggregate estimators from different surveys.

Description

Aggregate estimators from different surveys.

Usage

aggregateSurvey(data)

Arguments

data

Value

Estimators aggregated across surveys.

Examples

Run this code
# NOT RUN {
data(DemoData)
data(DemoMap)
years <- levels(DemoData[[1]]$time)

# obtain direct estimates
data <- countrySummary_mult(births = DemoData, 
years = years, 
regionVar = "region", timeVar = "time", 
clusterVar = "~clustid+id", 
ageVar = "age", weightsVar = "weights", 
geo.recode = NULL)

# obtain maps
geo <- DemoMap$geo
mat <- DemoMap$Amat

# Simulate hyper priors
priors <- simhyper(R = 2, nsamp = 1e+05, nsamp.check = 5000, Amat = mat, only.iid = TRUE)

# combine data from multiple surveys
data <- aggregateSurvey(data)
utils::head(data)

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab