athowes / beyond-borders

Evaluating the suitability of spatial adjacency for small-area estimation
https://athowes.github.io/beyond-borders
MIT License
2 stars 1 forks source link

Determine effect of geometry irregularity #30

Closed athowes closed 5 months ago

athowes commented 2 years ago
#' For IK simulated data, what's the difference between Besag, FCK and FIK over the different geometries?
irregularity_effect <- df_rho %>%
  filter(sim_model == "IK", inf_model %in% c("Besag", "FCK", "FIK")) %>%
  group_by(geometry) %>%
  mutate(crps = 1000 * crps_mean,
         crps_min = min(crps),
         diff = crps - crps_min) %>%
  select(inf_model, diff)

# FCK versus best (FIK)
irregularity_effect %>% filter(inf_model == "FCK") %>% mutate_if(is.numeric, round, 1)

# Besag versus best (FIK)
irregularity_effect %>% filter(inf_model == "Besag") %>% mutate_if(is.numeric, round, 1)