acc_distributions_only_ecdf {dataquieR} | R Documentation |
Plots and checks for distributions – only, but with ecdf
Description
Usage
acc_distributions_only_ecdf(
resp_vars = NULL,
study_data,
group_vars = NULL,
meta_data,
label_col,
flip_mode = "noflip"
)
Arguments
resp_vars |
variable list the names of the measurement variables |
study_data |
data.frame the data frame that contains the measurements |
group_vars |
variable list the name of the observer, device or reader variable |
meta_data |
data.frame the data frame that contains metadata attributes of study data |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
flip_mode |
enum default | flip | noflip | auto. Should the plot be
in default orientation, flipped, not flipped or
auto-flipped. Not all options are always supported.
In general, this con be controlled by
setting the |
Value
A list with:
-
SummaryTable
: data.frame containing data quality checks for "Unexpected location" (FLG_acc_ud_loc
) and "Unexpected proportion" (FLG_acc_ud_prop
) for each response variable inresp_vars
. -
SummaryData
: a data.frame containing data quality checks for "Unexpected location" and / or "Unexpected proportion" for a report -
SummaryPlotList
: list of ggplots for each response variable inresp_vars
.
Algorithm of this implementation:
If no response variable is defined, select all variables of type float or integer in the study data.
Remove missing codes from the study data (if defined in the metadata).
Remove measurements deviating from (hard) limits defined in the metadata (if defined).
Exclude variables containing only
NA
or only one unique value (excludingNA
s).Perform check for "Unexpected location" if defined in the metadata (needs a LOCATION_METRIC (mean or median) and LOCATION_RANGE (range of expected values for the mean and median, respectively)).
Perform check for "Unexpected proportion" if defined in the metadata (needs PROPORTION_RANGE (range of expected values for the proportions of the categories)).
Plot histogram(s).
If group_vars is specified by the user, distributions within group-wise ecdf are presented.