Code
<- summarize_detections(detection) detect_summary
summarize_detections()
returns a summary of detection events by iteration.
View a subset of detect_summary
## Filter data to scenario
detect_summary_select <- detect_summary %>%
filter(region == "central") %>%
filter(scenario_type == "suboptimal") %>%
filter(preclinical == 2)
## Select and order columns to display
detect_summary_select <- detect_summary_select[c("iteration", "farms_detected", "first_detect", "last_detect", "duration")]
## Check data
head(detect_summary_select)
iteration | farms_detected | first_detect | last_detect | duration |
---|---|---|---|---|
1 | 82 | 18 | 68 | 50 |
2 | 13 | 18 | 36 | 18 |
3 | 179 | 18 | 90 | 72 |
4 | 10 | 18 | 44 | 26 |
5 | 20 | 18 | 49 | 31 |
6 | 115 | 18 | 118 | 100 |
generate_detect_statistics()
returns summary statistics for each modeling scenario. Results are grouped by region
, scenario_type
, and preclinical
.
The number of days between the first detection and last detection in a single outbreak
scenario_type | preclinical | mean | q05 | q25 | q50 | q75 | q95 |
---|---|---|---|---|---|---|---|
optimal | 0 | 15.8400 | 2.00 | 2.00 | 13.0 | 22.00 | 45.00 |
optimal | 1 | 21.9520 | 2.00 | 8.00 | 17.0 | 28.00 | 61.00 |
optimal | 2 | 28.7140 | 2.00 | 12.00 | 23.0 | 37.00 | 75.00 |
optimal | 3 | 44.3140 | 6.00 | 15.00 | 28.0 | 59.00 | 135.00 |
suboptimal | 0 | 48.5040 | 10.00 | 24.00 | 38.0 | 65.25 | 124.05 |
suboptimal | 1 | 67.6460 | 14.00 | 28.00 | 53.0 | 93.25 | 181.00 |
suboptimal | 2 | 90.3340 | 15.90 | 34.50 | 71.5 | 141.00 | 213.05 |
suboptimal | 3 | 119.5380 | 17.95 | 48.00 | 108.0 | 189.00 | 243.00 |
low-virulence | 6 | 308.7667 | 212.45 | 291.25 | 340.0 | 341.00 | 341.00 |
scenario_type | preclinical | mean | q05 | q25 | q50 | q75 | q95 |
---|---|---|---|---|---|---|---|
optimal | 0 | 17.258 | 2.00 | 2.00 | 15.0 | 25.00 | 50.00 |
optimal | 1 | 23.564 | 2.00 | 9.75 | 19.0 | 31.00 | 68.10 |
optimal | 2 | 32.520 | 2.00 | 14.00 | 24.0 | 41.00 | 94.05 |
optimal | 3 | 39.916 | 2.00 | 16.00 | 29.5 | 56.25 | 104.10 |
suboptimal | 0 | 47.752 | 9.00 | 23.00 | 38.0 | 63.25 | 118.05 |
suboptimal | 1 | 62.646 | 11.95 | 28.00 | 53.0 | 80.00 | 157.10 |
suboptimal | 2 | 81.336 | 13.95 | 35.00 | 64.0 | 110.25 | 205.25 |
suboptimal | 3 | 107.550 | 17.95 | 47.00 | 95.0 | 152.25 | 250.00 |
low-virulence | 6 | 284.674 | 76.95 | 259.75 | 318.5 | 341.00 | 341.00 |
Perform significance testing on optimal
and suboptimal
detection scenarios
Call:
lm(formula = duration ~ preclinical * scenario_type, data = no_LV_detect_central_summary)
Residuals:
Min 1Q Median 3Q Max
-117.54 -24.66 -7.84 15.38 227.46
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 32.172 1.479 21.749 < 2e-16 ***
preclinical1 12.627 2.092 6.036 1.72e-09 ***
preclinical2 27.352 2.092 13.075 < 2e-16 ***
preclinical3 49.754 2.092 23.784 < 2e-16 ***
scenario_type.L 23.097 2.092 11.041 < 2e-16 ***
preclinical1:scenario_type.L 9.214 2.958 3.114 0.00186 **
preclinical2:scenario_type.L 20.475 2.958 6.921 5.21e-12 ***
preclinical3:scenario_type.L 30.094 2.958 10.172 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 46.78 on 3992 degrees of freedom
Multiple R-squared: 0.3411, Adjusted R-squared: 0.34
F-statistic: 295.3 on 7 and 3992 DF, p-value: < 2.2e-16
Call:
lm(formula = duration ~ preclinical * scenario_type, data = no_LV_detect_eastern_summary)
Residuals:
Min 1Q Median 3Q Max
-105.550 -22.672 -7.752 14.447 256.664
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 32.505 1.366 23.791 < 2e-16 ***
preclinical1 10.600 1.932 5.486 4.37e-08 ***
preclinical2 24.423 1.932 12.640 < 2e-16 ***
preclinical3 41.228 1.932 21.338 < 2e-16 ***
scenario_type.L 21.563 1.932 11.160 < 2e-16 ***
preclinical1:scenario_type.L 6.073 2.733 2.222 0.0263 *
preclinical2:scenario_type.L 12.956 2.733 4.741 2.20e-06 ***
preclinical3:scenario_type.L 26.262 2.733 9.611 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 43.2 on 3992 degrees of freedom
Multiple R-squared: 0.3075, Adjusted R-squared: 0.3063
F-statistic: 253.2 on 7 and 3992 DF, p-value: < 2.2e-16
plot_epidemic_duration()
returns a plot with median epidemic duration (days) on the x-axis and the duration of incubation phase transmission on the y-axis.