Built site for AMR@3.0.1.9116: 53d0704

This commit is contained in:
github-actions committed 2026-10-11 18:49:41 +00:00
1 parent b4272847be
commit 53b2dad6a5
96 files changed
+892 -364

No files matched your search

+58 -35
View File
@@ -59,7 +59,9 @@ count_df(
(for combination therapies, i.e. using more than one variable for
`...`): a [logical](https://rdrr.io/r/base/logical.html) to indicate
that isolates must be tested for all antimicrobials, see section
*Combination Therapy* below.
*Combination Therapy* below. Use
[`sir_combine()`](https://amr-for-r.org/reference/sir_combine.md) to
create a new variable for a combination therapy.
- guideline:
@@ -117,8 +119,10 @@ These functions are meant to count isolates. Use the
functions to calculate microbial resistance/susceptibility.
The function `n_sir()` is an alias of `count_all()`. They can be used to
count all available isolates, i.e. where all input antimicrobials have
an available result (S, I or R). Their use is equal to `dplyr`'s
count all available isolates, i.e. where the input antimicrobial has an
available result (S, I or R), or for multiple antimicrobials, where the
result of the combination is available (see *Combination Therapy*
below). Their use is equal to `dplyr`'s
[`n_distinct()`](https://dplyr.tidyverse.org/reference/n_distinct.html).
Their function is equal to
`count_susceptible(...) + count_resistant(...)`.
@@ -146,44 +150,63 @@ to `count_SI()`) to count susceptible isolates.
## Combination Therapy
When using more than one variable for `...` (= combination therapy), use
`only_all_tested` to only count isolates that are tested for all
antimicrobials/variables that you test them for. See this example for
two antimicrobials, Drug A and Drug B, about how
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md)
works to calculate the %SI:
A combination of antimicrobials is considered as good as its most active
antimicrobial. Results are ranked as follows, from best to worst:
--------------------------------------------------------------------
only_all_tested = FALSE only_all_tested = TRUE
----------------------- -----------------------
Drug A Drug B considered considered considered considered
susceptible tested susceptible tested
-------- -------- ----------- ---------- ----------- ----------
S or I S or I X X X X
R S or I X X X X
<NA> S or I X X - -
S or I R X X X X
R R - X - X
<NA> R - - - -
S or I <NA> X X - -
R <NA> - - - -
<NA> <NA> - - - -
--------------------------------------------------------------------
1. `"S"` and `"WT"`
Please note that, in combination therapies, for `only_all_tested = TRUE`
applies that:
2. `"SDD"`
count_S() + count_I() + count_R() = count_all()
proportion_S() + proportion_I() + proportion_R() = 1
3. `"I"`
and that, in combination therapies, for `only_all_tested = FALSE`
applies that:
4. `"R"`, `"NWT"`, and `"NS"`
count_S() + count_I() + count_R() >= count_all()
proportion_S() + proportion_I() + proportion_R() >= 1
The result of the combination is the best result of the antimicrobials,
i.e., the result keeps its original category instead of being reduced to
only S or R. If antimicrobials have an equally ranked result, `"S"` is
preferred over `"WT"`, and `"R"` over `"NWT"` and `"NS"`. The value
`"NI"` (non-interpretable) is considered a missing result.
Using `only_all_tested` has no impact when only using one antibiotic as
input.
A missing result can only be ignored if the result of the combination is
susceptible regardless of the missing result, which depends on the
`only_all_tested` argument and on the guideline: under EUCAST, the 'I'
category is considered susceptible (*susceptible, increased exposure*),
and under CLSI, it is not. This is an example for two antimicrobials,
Drug A and Drug B (the order of the antimicrobials does not matter):
-------------------------------------------------------------------------
Result of the combination
-----------------------------------------------------
Drug A Drug B only_all_tested = FALSE only_all_tested = TRUE
-------- -------- ---------------------------- ----------------------
S S, I, R S S
I I, R I I
R R R R
S <NA> S <NA>
I <NA> I (EUCAST), <NA> (CLSI) <NA>
R <NA> <NA> <NA>
<NA> <NA> <NA> <NA>
-------------------------------------------------------------------------
The `count_*()` and
[`proportion_*()`](https://amr-for-r.org/reference/proportion.md)
functions, such as
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) and
[`resistance()`](https://amr-for-r.org/reference/proportion.md), apply
exactly these rules when more than one variable is used: an isolate is
considered tested if the result of the combination is not `NA`, and is
then counted by the result of the combination. Consequently,
`count_susceptible()` `+` `count_resistant()` `=` `count_all()`, and
[`susceptibility()`](https://amr-for-r.org/reference/proportion.md) `+`
[`resistance()`](https://amr-for-r.org/reference/proportion.md) `= 1`,
for both values of `only_all_tested`. The guideline is taken from their
`guideline` argument if they have one, and otherwise from the
`AMR_guideline` option.
In [`antibiogram()`](https://amr-for-r.org/reference/antibiogram.md) and
[`wisca()`](https://amr-for-r.org/reference/antibiogram.md), the 'I' and
'SDD' categories are considered susceptible if `combine_SI = TRUE`
(default), and the result of the combination is then reduced to S or R.
## See also