Calculate CMAM performance indicators
Arguments
- .data
A data.frame containing programme monitoring data on number of cured, deaths, defaulters and non-response. The required data.frame holds rows of data corresponding to total counts for each performance indicator (i.e., cured, dead, defaulter and non-responder) rather than rows of individual cases.
- vars
A vector of variable names specifying cured, dead, defaulter and non-responder (in this specific order) values in
.data
. If NULL (default), typical names used for these variables will be searched and used accordingly. If search doesn't yield matching variable names, the first 4 columns of the data.frame will be used.- add
Logical. Should result be added to
.data
. Default is TRUE.
Examples
calculate_performance(.data = monitoring)
#> # A tibble: 8,234 × 20
#> State Locality `Beginning Of Month` `New Admissions` Male Female Cured Death
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Gaze… El Qura… 16 16 8 8 23 0
#> 2 Gaze… El Qura… 56 24 11 13 0 0
#> 3 Gaze… El Qura… 80 41 16 25 22 0
#> 4 Gaze… El Qura… 81 43 21 22 29 0
#> 5 Gaze… El Qura… 93 51 31 30 36 2
#> 6 Gaze… El Qura… 103 59 34 25 3 0
#> 7 Gaze… El Qura… 163 69 34 35 8 0
#> 8 Gaze… El Qura… 104 108 56 40 6 0
#> 9 Gaze… El Qura… 275 123 61 62 111 0
#> 10 Gaze… El Qura… 204 81 39 40 52 0
#> # ℹ 8,224 more rows
#> # ℹ 12 more variables: Default <dbl>, `Non-Responder` <dbl>,
#> # `Total Discharge` <dbl>, `Rutf Consumed` <dbl>, Screening <dbl>,
#> # Sites <lgl>, Month <chr>, Year <chr>, cured_prop <dbl>, dead_prop <dbl>,
#> # defaulter_prop <dbl>, nr_prop <dbl>