Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add burden level vignette #58

Merged
merged 8 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ RoxygenNote: 7.3.2
URL: https://github.com/ssi-dk/aedseo, https://ssi-dk.github.io/aedseo/
BugReports: https://github.com/ssi-dk/aedseo/issues
Suggests:
grid,
ISOweek,
kableExtra,
knitr,
mem,
rmarkdown,
testthat (>= 3.0.0),
tidyr,
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
- `vignette("generate_seasonal_wave")`,
- `vignette("aedseo")`,
- `vignette("seasonal_onset")`
providing a comprehensive walkthrough of the application of the functions provided by the `aedseo` package with detailed explanations and illustrative examples (#56, #57).
- `vignette("burden_levels")`
providing a comprehensive walkthrough of the application of the functions provided by the `aedseo` package with detailed explanations and illustrative examples (#56, #57, #58).

* Improved the autoplot function which can now visualise dates as days, weeks and months on the x-axis with the `time_interval` argument (#56).

Expand Down
2 changes: 1 addition & 1 deletion R/seasonal_burden_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' The `conf_levels` are specific for each method:
#' - for `intensity_levels` only specify the highest confidence level e.g.: `0.95`, which is the highest intensity
#' that has been observed in previous seasons.
#' - for `peak_levels` specify three confidence levels e.g.: `c(0.5, 0.9, 0.95)`, which are the three confidence
#' - for `peak_levels` specify three confidence levels e.g.: `c(0.4, 0.9, 0.975)`, which are the three confidence
#' levels low, medium and high that reflect the peak severity relative to those observed in previous seasons.
#' @param decay_factor A numeric value between 0 and 1, that specifies the weight applied to previous seasons in level
#' calculations. It is used as `decay_factor`^(number of seasons back), whereby the weight for the most recent season
Expand Down
2 changes: 1 addition & 1 deletion man/combined_seasonal_output.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/seasonal_burden_levels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions vignettes/aedseo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ More information about the function can be found in the `vignette("generate_seas
```{r, include = FALSE}
withr::local_seed(222)
# Construct an 'tsd' object with time series data
set.seed(222)
tsd_data <- generate_seasonal_data(
years = 3,
start_date = as.Date("2021-10-18"),
Expand Down Expand Up @@ -170,7 +169,8 @@ Detailed information about each function and their respective arguments can be f
```{r}
seasonal_output <- combined_seasonal_output(
tsd = tsd_data,
disease_threshold = 140
disease_threshold = 140,
method = "intensity_levels"
)
```
The default function calculates onset and burden for the current season. If it is desired to see calculations for all previous seasons, the `only_current_season` argument should be set to `FALSE`.
Expand Down Expand Up @@ -199,3 +199,7 @@ plot(
time_interval = "3 weeks"
)
```

Using the `intensity_levels` method to define burden levels, the Outbreak is expected to fall within the low or medium
category. This is because the very low threshold is the disease-specific threshold, which must be surpassed for five
consecutive weeks along with a significant positive growth rate.
Loading
Loading