compare_sir | R Documentation |
Compare two AMR::sir vectors and generate a categorical agreement vector with the following levels: M (major error), vM (very major error), m (minor error). The error definitions are:
Major error (M): The test result is resistant (R) when the gold standard is susceptible (S).
vM (very major error): The test result is susceptible (S) when the gold standard is resistant (R).
Minor error (m): The test result is intermediate (I) when the gold standard is susceptible (S) or resistant (R), or vice versa.
compare_sir(gold_standard, test)
gold_standard |
Susceptibility results in AMR::sir format |
test |
Susceptibility results in AMR::sir format |
factor vector with the following levels: M, vM, m.
gold_standard <- c("S", "R", "I", "I")
gold_standard <- AMR::as.sir(gold_standard)
test <- c("S", "I", "R", "R")
test <- AMR::as.sir(test)
compare_sir(gold_standard, test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.