estimate_classic: Function to apply bootstrap to RAM-OP indicators using a...

View source: R/05-classicBoot.R

estimate_classicR Documentation

Function to apply bootstrap to RAM-OP indicators using a classical estimator.

Description

Function to apply bootstrap to RAM-OP indicators using a classical estimator.

Usage

estimate_classic(
  x,
  w,
  statistic = bbw::bootClassic,
  indicators = c("demo", "food", "hunger", "adl", "disability", "mental", "dementia",
    "health", "oedema", "screening", "income", "wash", "visual", "misc"),
  params = get_variables(indicators),
  outputColumns = params,
  replicates = 399
)

Arguments

x

Indicators dataset produced by create_op_all with primary sampling unit (PSU) in column named PSU

w

A data frame with primary sampling unit (PSU) in column named psu and survey weight (i.e. PSU population) in column named pop

statistic

A function operating on data in x; fixed to bootClassic function for means

indicators

A character vector of indicator set names to estimate. Indicator set names are demo, food, hunger, disability, adl, mental, dementia, health, income, wash, visual, and misc. Default is all indicator sets.

params

Parameters (named columns in x) passed to the function specified in statistic. This is equivalent to variables corresponding to the indicator sets specified in indicators. The function get_variables is used to specify these variables.

outputColumns

Names of columns in output data frame. This defaults to values specified in params

replicates

Number of bootstrap replicates

Value

Tibble of boot estimates using bootClassic mean function

Examples

  #
  test <- estimate_classic(x = indicators.ALL,
                           w = testPSU,
                           replicates = 9)

  test


validmeasures/ramOP documentation built on April 18, 2024, 1:04 a.m.