Skip to content

Commit 2c9b420

Browse files
committed
Adding changes to documentation
1 parent 21be993 commit 2c9b420

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

R/aedseo.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#' disease threshold?
3737
#' - 'seasonal_onset_alarm': Logical. Is there a seasonal onset alarm?
3838
#' - 'converged': Logical. Was the IWLS judged to have converged?
39+
#' - 'skipped_window': Logical. Was the window skipped?
3940
#'
4041
#' @export
4142
#'

man/aedseo.Rd

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-aedseo.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ test_that("Test if it works with weeks with NA values", {
9797
expect_false(all(aedseo_poisson_na$converged))
9898
# Count if the skipped windows are = ones in output
9999
expect_equal(skipped_window_count, sum(aedseo_poisson_na$skipped_window))
100-
})
100+
})

vignettes/aedseo_introduction.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ In the following figure, the simulated data (solid circles) is visualized alongs
174174
plot(tsd_data)
175175
```
176176

177-
Next, the time series data object is passed to the `aedseo()` function. Here, a window width of $k=5$ is specified, meaning that a total of 5 weeks is used in the local estimate of the exponential growth rate. Additionally, a 95\% confidence interval is specified. Finally, the exponential growth rate is estimated using quasi-Poisson regression to account for overdispersion in the data.
177+
Next, the time series data object is passed to the `aedseo()` function. Here, a window width of $k=5$ is specified, meaning that a total of 5 weeks is used in the local estimate of the exponential growth rate. $na_percentage_allowed = 0.4$ defines how many percentage of the observables in the k window that are allowed to be NA, here 0.4*5 = 20%. Additionally, a 95\% confidence interval is specified. Finally, the exponential growth rate is estimated using quasi-Poisson regression to account for overdispersion in the data.
178178

179179
```{r}
180180
# Apply the 'aedseo' algorithm
@@ -183,7 +183,8 @@ aedseo_results <- aedseo(
183183
k = 5,
184184
level = 0.95,
185185
disease_threshold = 2000,
186-
family = "quasipoisson"
186+
family = "quasipoisson",
187+
na_percentage_allowed = 0.4
187188
)
188189
```
189190

0 commit comments

Comments
 (0)