Learn R Programming

oldr (version 0.2.3)

estimate_classic: Apply bootstrap to RAM-OP indicators using a classical estimator.

Description

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
)

Value

A tibble::tibble() of boot estimates using bbw::bootClassic()

mean function

Arguments

x

Indicators dataset produced by create_op() 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 bbw::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

Examples

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

test

Run the code above in your browser using DataLab