So only 53.3% is suitable for resistance analysis! We can now filter on it with the filter()
function, also from the dplyr
package:
So we end up with 10,669 isolates for analysis. Now our data looks like:
+So we end up with 10,659 isolates for analysis. Now our data looks like:
As per the EUCAST guideline of 2019, we calculate resistance as the proportion of R (proportion_R()
, equal to resistance()
) and susceptibility as the proportion of S and I (proportion_SI()
, equal to susceptibility()
). These functions can be used on their own:
data_1st %>%
@@ -975,19 +975,19 @@ Longest: 24
Hospital A |
-0.5541245 |
+0.5398944 |
Hospital B |
-0.5501455 |
+0.5323505 |
Hospital C |
-0.5269306 |
+0.5494168 |
Hospital D |
-0.5483716 |
+0.5354147 |
@@ -1008,23 +1008,23 @@ Longest: 24
Hospital A |
-0.5541245 |
-3261 |
+0.5398944 |
+3221 |
Hospital B |
-0.5501455 |
-3779 |
+0.5323505 |
+3663 |
Hospital C |
-0.5269306 |
-1541 |
+0.5494168 |
+1629 |
Hospital D |
-0.5483716 |
-2088 |
+0.5354147 |
+2146 |
@@ -1047,27 +1047,27 @@ Longest: 24
Escherichia |
-0.7649591 |
-0.8676281 |
-0.9750323 |
+0.7697595 |
+0.8696306 |
+0.9765893 |
Klebsiella |
-0.8290155 |
-0.9127807 |
-0.9818653 |
+0.8025210 |
+0.8899160 |
+0.9781513 |
Staphylococcus |
-0.7893578 |
-0.8921101 |
-0.9809174 |
+0.7972212 |
+0.8880961 |
+0.9831018 |
Streptococcus |
-0.5341121 |
+0.5530233 |
0.0000000 |
-0.5341121 |
+0.5530233 |
@@ -1092,23 +1092,23 @@ Longest: 24
Hospital A |
-55.4% |
-27.2% |
+54.0% |
+25.8% |
Hospital B |
-55.0% |
-26.8% |
+53.2% |
+26.7% |
Hospital C |
-52.7% |
-27.3% |
+54.9% |
+26.8% |
Hospital D |
-54.8% |
-25.9% |
+53.5% |
+26.2% |
@@ -1206,16 +1206,18 @@ Longest: 24
mic_values <- random_mic(size = 100)
mic_values
# Class 'mic'
-# [1] 0.01 128 0.005 2 0.002 0.025 128 0.001 4 128
-# [11] 32 128 0.002 0.025 2 128 8 16 0.002 0.005
-# [21] 0.005 0.0625 0.0625 2 0.5 0.25 0.001 4 32 >=256
-# [31] 0.25 >=256 0.125 4 0.001 32 16 0.25 0.025 0.002
-# [41] 32 128 64 16 0.001 64 0.025 0.125 0.025 >=256
-# [51] >=256 1 0.0625 32 0.025 16 8 0.025 0.025 >=256
-# [61] 0.0625 0.01 0.002 0.025 0.002 0.002 0.5 64 0.25 0.5
-# [71] 64 0.0625 1 0.0625 2 0.0625 0.25 0.25 32 1
-# [81] 4 0.005 128 0.5 0.001 16 0.25 16 0.5 >=256
-# [91] 0.002 32 0.005 16 16 128 0.025 0.0625 128 0.001
+