From 025c931b17e7da5a8585d1b479d3c3505cc571dc Mon Sep 17 00:00:00 2001 From: athowes <xwg3@cdc.gov> Date: Mon, 2 Sep 2024 17:13:45 +0100 Subject: [PATCH] Correct error that prevents render --- vignettes/ebola.Rmd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vignettes/ebola.Rmd b/vignettes/ebola.Rmd index ece1f8aef..2db4ea2e8 100644 --- a/vignettes/ebola.Rmd +++ b/vignettes/ebola.Rmd @@ -334,7 +334,7 @@ Note that these results are questionable, and suggest that further would should Part of the issue is that some sex-district strata have quite limited data. ```{r} -epred_draws_sex_district <- obs_prep_reduced |> +epred_draws_sex_district <- obs_prep |> as.data.frame() |> modelr::data_grid(sex, district) |> dplyr::mutate(obs_t = NA, pwindow_upr = NA, swindow_upr = NA) |> @@ -364,7 +364,7 @@ The `tidybayes` package also allows users to generate draws of the linear predic For example, for the `mu` parameter in the sex-district stratified model: ```{r} -linpred_draws_sex_district <- obs_prep_reduced |> +linpred_draws_sex_district <- obs_prep |> as.data.frame() |> modelr::data_grid(sex, district) |> dplyr::mutate(obs_t = NA, pwindow_upr = NA, swindow_upr = NA) |> @@ -443,7 +443,7 @@ draws_sex_pmf |> Stratification by sex-district: ```{r} -newdata_sex_district_pmf <- obs_prep_reduced |> +newdata_sex_district_pmf <- obs_prep |> as.data.frame() |> modelr::data_grid(sex, district) |> dplyr::mutate(obs_t = 1000, pwindow_upr = 1, swindow_upr = 1) @@ -520,7 +520,7 @@ draws_sex_pmf |> Stratification by sex: ```{r} -newdata_sex_district_pdf <- obs_prep_reduced |> +newdata_sex_district_pdf <- obs_prep |> as.data.frame() |> modelr::data_grid(sex, district) |> dplyr::mutate(obs_t = 1000, pwindow_upr = 0.001, swindow_upr = 0.001)