Skip to contents

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 = params,
  replicates = 399
)

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".

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.

replicates

Number of bootstrap replicate case and non-case.

Value

A tibble::tibble() of boot estimates using PROBIT.

Examples

test <- estimate_probit(x = indicators.ALL, w = testPSU, replicates = 3)
#>  x has the appropriate/expected data structure
#>  x has the appropriate/expected data structure
#>  x has the appropriate/expected data structure
#>  x has the appropriate/expected data structure
#>  x has the appropriate/expected data structure
#>  x has the appropriate/expected data structure

test
#> # A tibble: 3 × 10
#>   INDICATOR  EST.ALL   LCL.ALL UCL.ALL EST.MALES LCL.MALES UCL.MALES EST.FEMALES
#>   <chr>        <dbl>     <dbl>   <dbl>     <dbl>     <dbl>     <dbl>       <dbl>
#> 1 GAM       0.0232   0.0140    4.13e-2 0.00814     3.31e-3  0.0166      0.0202  
#> 2 MAM       0.0222   0.0134    4.13e-2 0.00814     3.13e-3  0.0166      0.0196  
#> 3 SAM       0.000536 0.0000272 9.55e-4 0.0000356   1.78e-6  0.000184    0.000625
#> # ℹ 2 more variables: LCL.FEMALES <dbl>, UCL.FEMALES <dbl>