Learn R Programming

SUMMER (version 0.1.0)

countrySummary: Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for a single survey.

Description

Obtain the Horvitz-Thompson direct estimates and standard errors using delta method for a single survey.

Usage

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

Arguments

births

A matrix child-month data from getBirths

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, and the logit of the estimates.

See Also

countrySummary_mult

Examples

Run this code
# NOT RUN {
data(Uganda)
years <- c("85-89", "90-94", "95-99", "00-04", "05-09", "10-14")
u5m <- countrySummary(births = Uganda[[1]],  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