Skip to contents

It is common to estimate prevalence of wasting from non survey data, such as screenings or any other community-based surveillance systems. In such situations, the analysis usually consists only in estimating the point prevalence and the counts of positive cases, without necessarily estimating the uncertainty. This is the job of this function.

Before estimating, it evaluates the quality of data by calculating and rating the standard deviation of z-scores of muac-for-age (MFAZ) and the p-value of the age ratio test; then it sets the analysis path that best fits the data.

  • If all tests are rated as not problematic, a normal analysis is done.

  • If standard deviation is not problematic and age ratio test is problematic, prevalence is age-weighted. This is to fix the likely overestimation of wasting when there are excess of younger children in the data set.

  • If standard deviation is problematic and age ratio test is not, or both are problematic, analysis gets cancelled out and NAs get thrown.

Outliers are detected based on SMART flags on the MFAZ values and then get excluded prior being piped into the actual prevalence analysis workflow.

Usage

mw_estimate_prevalence_screening(df, muac, edema = NULL, .by = NULL)

Arguments

df

A data set object of class data.frame to use. This must have been wrangled using this package's wrangling function for MUAC data. Make sure MUAC values are converted to millimeters after using the wrangler. If this is not done, the function will stop execution and return an error message with the issue.

muac

A vector of raw MUAC values of class numeric or integer. The measurement unit of the values should be millimeters. If any or all values are in a different unit than the expected, the function will stop execution and return an error message indicating the issue.

edema

A vector of class character of edema. Code should be "y" for presence and "n" for absence of bilateral edema. Default is NULL. If class, as well as, code values are different than expected, the function will stop the execution and return an error message indicating the issue.

.by

A vector of class character or numeric of the geographical areas or respective IDs for where the data was collected and for which the analysis should be summarized at.

Value

A summarized table of class data.frame of the descriptive statistics about wasting.

References

SMART Initiative (no date). Updated MUAC data collection tool. Available at: https://smartmethodology.org/survey-planning-tools/updated-muac-tool/

Examples

mw_estimate_prevalence_screening(
  df = anthro.02,
  muac = muac,
  edema = edema,
  .by = province
)
#> # A tibble: 2 × 7
#>   province gam_n  gam_p sam_n   sam_p mam_n  mam_p
#>   <chr>    <dbl>  <dbl> <dbl>   <dbl> <dbl>  <dbl>
#> 1 Nampula     61 0.0590    19 0.0184     42 0.0406
#> 2 Zambezia    57 0.0500    10 0.00876    47 0.0412

## With `edema` set to `NULL` ----
mw_estimate_prevalence_screening(
  df = anthro.02,
  muac = muac,
  edema = NULL,
  .by = province
)
#> # A tibble: 2 × 7
#>   province gam_n  gam_p sam_n   sam_p mam_n  mam_p
#>   <chr>    <dbl>  <dbl> <dbl>   <dbl> <dbl>  <dbl>
#> 1 Nampula     53 0.0513    10 0.00967    43 0.0416
#> 2 Zambezia    53 0.0465     6 0.00526    47 0.0412

## With `.by` set to `NULL` ----
mw_estimate_prevalence_screening(
  df = anthro.02,
  muac = muac,
  edema = NULL,
  .by = NULL
)
#> # A tibble: 1 × 6
#>   gam_n  gam_p sam_n   sam_p mam_n  mam_p
#>   <dbl>  <dbl> <dbl>   <dbl> <dbl>  <dbl>
#> 1   106 0.0487    16 0.00736    90 0.0414