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

View source: R/06-probitBoot.R

estimate_probitR Documentation

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

Description

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

Usage

estimate_probit(
  x,
  w,
  gam.stat = probit_gam,
  sam.stat = probit_sam,
  params = "MUAC",
  outputColumns = "MUAC",
  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

gam.stat

A function operating on data in x to estimate GAM prevalence for older people. Fixed to probit_gam

sam.stat

A function operating on data in x to estimate SAM prevalence for older people. Fixed to probit_sam

params

Parameters (named columns in x) passed to the function specified in statistic; fixed to MUAC as indicator amenable to probit estimation

outputColumns

Names of columns in output data frame; fixed to MUAC

replicates

Number of bootstrap replicate case and non-case

Value

Dataframe of boot estimates using bootPROBIT function

Examples

  #
  test <- estimate_probit(x = indicators.ALL,
                          w = testPSU,
                          replicates = 3)

  test


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