Summarise Kappa Coefficients
summarise_kappa.RdUsing a list of PDD algorithms stratified by IADL deficit operationalisation and a table of pairwise concordance statistics, this function extracts the raw Cohen’s kappa estimates and computes their summary statistics (mean and standard deviation) across groups of algorithm pairs defined by the IADL operationalisation scheme.
Arguments
- algorithms
A list containing algorithm mapping generated by
list_algorithms.- concordance
A tibble containing concordance indexes for pairs of algorithms generated by
decribe_concordance. The table is also available as data concords.
Value
A list with the following components:
faq_totA numeric vector containing all Cohen's kappas of algorithm pairs with IADL deficit defined as FAQ total > 7.
faq_9A numeric vector containing all Cohen's kappas of algorithm pairs with IADL deficit defined as FAQ item 9 > 1.
crossA numeric vector containing all Cohen's kappas of algorithm pairs with different IADL deficit definitions.
iadlA numeric vector containing all Cohen's kappas of algorithm pairs which differ only in IADL deficit definition.
sumsA named character vector containing mean and standard deviation of each vector of Kappas contained in this list.
See also
list_algorithms()preparesalgorithms.describe_concordance()preparesconcordance.concords containg data used as
concordance.
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")
data(concords)
rates <- summarise_rates(pdd, vars)
algos <- list_algorithms(rates$table)
# Two equally valid ways to run the function:
kappa1 <- summarise_kappa(algos, rates$table)
kappa2 <- summarise_kappa(algos, concords)
} # }