Percentage of non-completed interviews by enumerator
Source:R/enumeratorsurveysconsent.R
enumeratorSurveysConsent.Rd
This function display the percentage of non-completed interviews per enumerator.
Arguments
- ds
dataset containing the survey (from kobo): labelled data.frame
- surveyConsent
name of the field in the dataset where the survey consent is stored: string
- enumeratorID
name of the field where the enumerator ID is stored: string
- checkperiod
if not null number of day before today when the check should be made
- consentForValidSurvey
value defined in the kobo form to acknowledge the surveyed person gave his consent: string
Value
result a list that includes: * dst same dataset as the inputed one but with survey marked for deletion if errors are found and delete=TRUE (or NULL) * ret_log list of the errors found (or NULL) * var a list of value (or NULL) * graph graphical representation of the results (or NULL)
Examples
load(system.file("sample_dataset.RData", package = "HighFrequencyChecks"))
ds <- sample_dataset
surveyConsent <- "survey_consent"
enumeratorID <- "enumerator_id"
result <- enumeratorSurveysConsent(ds = ds,
surveyConsent=surveyConsent,
enumeratorID=enumeratorID)
knitr::kable(head(result[["ret_log"]], 10))
#>
#>
#> | enumeratorID| no| not_eligible| yes|
#> |------------:|-----:|------------:|------:|
#> | 1| 0.00| 0.00| 100.00|
#> | 3| 0.00| 0.00| 100.00|
#> | 6| 0.00| 0.00| 100.00|
#> | 12| 0.00| 16.67| 83.33|
#> | 13| 16.67| 0.00| 83.33|
#> | 14| 0.00| 33.33| 66.67|
#> | 16| 0.00| 33.33| 66.67|
#> | 18| 0.00| 0.00| 100.00|
#> | 19| 0.00| 33.33| 66.67|
#> | 24| 0.00| 33.33| 66.67|
print(result[["graph"]])