Order and Prints Algorithms
summarise_rates.RdThis function computes summaries of the estimated PDD rates, stratified by diagnostic algorithm.
Arguments
- d0
A list with PDD data generated via
diagnose_pdd_sample.- vars
A data.frame, tibble, or matrix with in the following order:
variable names,
variable labels
type of variable (continuous, binary, or nominal)
optional, group,
optional, mapping each label to its description in the table’s note.
Alternatively, a path to a CSV file (semicolon-delimited) containing such a table.
- descending
A logical indicating whether algorithms with the highest estimated PDD rates should be listed first (default is
TRUE).- plot
A logical indicating whether to plot PDD rates as densities. The code is dataset-specific (default is
TRUE).
Value
A list with:
tableA tibble containing raw summaries of PDD rates.
plotA
ggplot2object visualising estimated PDD rates.gtableA named list of gt tables:
gtab_ratesAn APA-style
gttable summarising the results.gtab_algosAn APA-style
gttable listing algorithms used.
See also
diagnose_pdd_sample() prepares d0.
Examples
if (FALSE) { # \dontrun{
p <- data_paths("data-raw")
data <- prepare_data(p)
pdd <- diagnose_pdd_sample(data)
vars <- here::here("data-raw", "VariablesOfInterest.csv")
rates0 <- summarise_rates(pdd, vars)
rates1 <- summarise_rates(pdd, vars, TRUE) # rates0 and rates1 are identical
rates2 <- summarise_rates(pdd, vars, FALSE) # ascending order
} # }