Skip to content

Commit 63b7432

Browse files
committed
a few more bugs squashed
1 parent b77978d commit 63b7432

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

vignettes/articles/sliding.Rmd

+7-6
Original file line numberDiff line numberDiff line change
@@ -270,24 +270,25 @@ current and past COVID-19 case rates for all states. That is, we can make
270270
forecasts on the archive, `x`, and compare those to forecasts on the latest
271271
data, `x_latest` using the same general set-up as above. For version-aware
272272
forecasting, note that `x` is fed into `epix_slide()`, while for version-unaware
273-
forecasting, `x_latest` is fed into `epi_slide()`. #%% update to include
274-
percent_cli after that issue is fixed?
273+
forecasting, `x_latest` is fed into `epi_slide()`.
275274

276275
```{r make-ar-kweek-asof}
277276
k_week_ahead_as_of <- function(ahead = 7, version_aware = TRUE) {
278277
if (version_aware) {
279278
epix_slide(
280279
x,
281-
~ arx_forecaster(.x, "case_rate", "case_rate",
280+
~ arx_forecaster(.x, "case_rate", c("case_rate", "percent_cli"),
282281
args_list = arx_args_list(ahead = ahead)) %>%
283282
extract2("predictions") %>%
284-
select(-c(geo_value, time_value)),
283+
select(-time_value),
285284
before = 120 - 1,
286285
ref_time_values = fc_time_values,
287286
new_col_name = "fc") %>%
288-
mutate(engine_type = "lm", version_aware = version_aware)
287+
mutate(engine_type = "lm", version_aware = version_aware) %>%
288+
rename(geo_value = fc_geo_value)
289289
} else {
290-
k_week_ahead(x_latest, "case_rate", "case_rate", ahead, linear_reg()) %>%
290+
k_week_ahead(x_latest, "case_rate", c("case_rate", "percent_cli"),
291+
ahead, linear_reg()) %>%
291292
mutate(version_aware = version_aware)
292293
}
293294
}

0 commit comments

Comments
 (0)