Learn R Programming

SUMMER (version 0.1.0)

countrySummary_mult: Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for multiple surveys.

Description

Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for multiple surveys.

Usage

countrySummary_mult(births, years, idVar = "v002", regionVar = "region",
  timeVar = "per5", clusterVar = "~v001+v002", ageVar = "ageGrpD",
  weightsVar = "v005", geo.recode = NULL)

Arguments

births

A list of child-month data from multiple surveys from getBirths. The name of the list is used as the identifier in the output.

years

String vector of the year intervals used

idVar

Variable name for ID, typically 'v002'

regionVar

Variable name for region, typically 'v024', for older surveys might be 'v101'

timeVar

Variable name for time, typically 'per5'

clusterVar

Variable name for cluster, typically '~v001 + v002'

ageVar

Variable name for age group, default assumes the variable is called 'ageGrpD'

weightsVar

Variable name for sampling weights, typically 'v005'

geo.recode

The recode matrix to be used if region name is not consistent across different surveys. See ChangeRegion.

Value

a matrix of period-region summary of the Horvitz-Thompson direct estimates, the standard errors using delta method for a single survey, the 95% confidence interval, the logit of the estimates, and the survey labels.

See Also

countrySummary

Examples

Run this code
# NOT RUN {
data(Uganda)
years <- c("85-89", "90-94", "95-99", "00-04", "05-09", "10-14")
u5m <- countrySummary_mult(births = Uganda, years = years, idVar = "id", 
regionVar = "region", timeVar = "time", clusterVar = "~clustid+id", 
ageVar = "age", weightsVar = "weights", geo.recode = NULL)
# }

Run the code above in your browser using DataLab