Abstract
Background We have run the simplified Naomi model using a range of inference methods.
Task We check the appropriateness of the model for the data.
tmb <- readRDS("depends/tmb.rds")
outputs <- tmb$outputs
indicators <- naomi::add_output_labels(outputs) %>%
left_join(outputs$meta_area %>% select(area_level, area_id, center_x, center_y)) %>%
sf::st_as_sf()
## Joining, by = c("area_level", "area_id")
indicators %>%
filter(
age_group == "Y015_049",
indicator == "prevalence",
area_level == 4
) %>%
ggplot(aes(fill = mode)) +
geom_sf() +
viridis::scale_fill_viridis(labels = scales::percent_format()) +
naomi::th_map() +
facet_wrap(~sex)
indicators %>%
filter(
age_group == "Y015_049",
indicator == "prevalence",
area_level == 4
) %>%
names()
## [1] "area_level" "area_level_label" "area_id" "area_name" "sex" "age_group" "age_group_label" "calendar_quarter" "quarter_label" "indicator" "indicator_label" "mean"
## [13] "se" "median" "mode" "lower" "upper" "center_x" "center_y" "geometry"
Next steps here are:
indicators
with the “raw” value of the indicatorindicators
with the quantile of the raw value within samples from the posteriortmb$outputs
for the other inference methods