Compute prevalence of zscores
anthro_api_compute_prevalence(data, zscores_to_compute, survey_subsets)
a data frame containing the underlying data
a list of zscore indicators that should be computed. The list needs to have 4 named values:
The name or abbreviation of the indicator. This will appear in the column names of the output.
The column name without the 'z' of the zscore that shall be used.
TRUE iff cutoffs for the indicator shall be computed.
TRUE iff z-score should be set to
-3.1 if oedema = "y"
for prevalence estimates.
optional function to define a special condition when the z-score should be set to -3.1
subsets for which the prevalence values should be computed. It is a named list of characters, where the values correspond to columns and the names to labels in the output.
This function is meant to be used by other anthro related packages. It is not advised to use this in you own packages or analysis. If you must use it, prepare for potential breaking changes in the future.