Skip to contents

This helper function prepares a table showing the five best and five worst-performing Level I algorithms in predicting a selected Level II-based diagnosis of probable PDD. It is primarily intended for use in the manuscript to keep Quarto document uncluttered.

Usage

table_levelII_approximations(values, struct, crit)

Arguments

values

A tibble of concordance statistics generated by describe_concordance. Can also be provided by the data concords propagated with the package.

struct

A list generated by list_algorithms with two elements:

[[1]]

Character vector of Level I algorithm names derived using FAQ total > 7 as the IADL criterion.

[[2]]

Character vector of Level I algorithm names derived using FAQ item 9 > 1 as the IADL criterion. Note: order matters.

crit

A character string indicating which concordance statistics is to be used for comparisons. Can be one of "Accuracy_raw", "Balanced Accuracy", "Kappa_raw", "Sensitivity" or "Specificity".

Value

A list containing:

table

A tibble with the five best and five worst Level I algorithms in predicting the specified Level II-based diagnosis of probable PDD.

gtable

A gt table object summarising the concordance statistics (e.g., accuracy, kappa) of the five best and five worst Level I algorithms in predicting the specified Level II-based diagnosis of probable PDD.

See also

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")
rates <- summarise_rates(pdd, vars)
algos <- list_algorithms(rates$table)
data(concords)

# Tables ordered by different statistics:
table_levelII_approximations(concords, algos, "Accuracy_raw") # Table 3
table_levelII_approximations(concords, algos, "Balanced Accuracy") # Table 7
table_levelII_approximations(concords, algos, "Kappa_raw")
table_levelII_approximations(concords, algos, "Sensitivity")
table_levelII_approximations(concords, algos, "Specificity")
} # }