saeplus_conssummary: Compute Outcome Variable Summary Statistics

View source: R/saeplus_makesumtable.R

saeplus_conssummaryR Documentation

Compute Outcome Variable Summary Statistics

Description

A function to compute summary statistics for an outcome variable at the group level

Usage

saeplus_conssummary(
  dt = gin_master.dt,
  out_var = "pcexp",
  weight = "popweight",
  group_var = "ADM1_NAME",
  threshold = 5006362,
  hhid = "hhid"
)

Arguments

dt

a data.table or data.frame object (object will be coerced to data.table for analysis)

out_var

a character variable for outcome variable of interest (for instance household consumption estimate)

weight

a weighting variable (replace with vector of 1s if not including weights)

group_var

a grouping variable

threshold

threshold to be applied to out_var (for example a poverty line)

hhid

household ID variable

Value

a table


SSA-Statistical-Team-Projects/SAEplus documentation built on Aug. 24, 2022, 11:26 a.m.