This implementation contrasts the empirical distribution of a measurement variables against assumed distributions. The approach is adapted from the idea of rootograms (Tukey (1977)) which is also applicable for count data (Kleiber and Zeileis (2016)).
acc_end_digits(resp_vars = NULL, study_data, meta_data, label_col = VAR_NAMES)
variable the names of the measurement variables, mandatory
data.frame the data frame that contains the measurements
data.frame the data frame that contains metadata attributes of study data
variable attribute the name of the column in the metadata with labels of variables
a list with:
SummaryData: data frame underlying the plot
SummaryPlot: ggplot2 distribution plot comparing expected
with observed distribution
This implementation is restricted to data of type float or integer.
Missing codes are removed from resp_vars (if defined in the metadata)
The user must specify the column of the metadata containing probability distribution (currently only: normal, uniform, gamma)
Parameters of each distribution can be estimated from the data or are specified by the user
A histogram-like plot contrasts the empirical vs. the technical distribution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.