Clean public release repository
This commit is contained in:
@@ -171,7 +171,6 @@ alliance_union_harmonization <- bind_rows(
|
||||
tibble(metric = "unique_union_or_alliance_ids", category = "all", value = n_distinct(union_mapping$manifesto_pf_id)),
|
||||
tibble(metric = "unique_constituent_party_ids", category = "all", value = n_distinct(union_mapping$expert_pf_id)),
|
||||
union_mapping %>% count(country, name = "value") %>% transmute(metric = "mappings_by_country", category = country, value),
|
||||
union_mapping %>% count(relationship, name = "value") %>% transmute(metric = "mappings_by_relationship", category = relationship, value),
|
||||
union_mapping %>% count(status, name = "value") %>% transmute(metric = "mappings_by_status", category = status, value)
|
||||
)
|
||||
|
||||
@@ -189,11 +188,11 @@ if (is.na(convergence_summary_file) || is.na(convergence_detail_file)) {
|
||||
stop("Convergence diagnostics not found under ", outputs_dir, ". Run the model diagnostics before generating the report.")
|
||||
}
|
||||
model_convergence_summary <- read_if_exists(convergence_summary_file) %>%
|
||||
mutate(source_file = convergence_summary_file)
|
||||
identity()
|
||||
model_convergence_by_dimension <- read_if_exists(convergence_detail_file) %>%
|
||||
group_by(dimension) %>%
|
||||
summarise(parameters = n(), mean_rhat = mean(rhat, na.rm = TRUE), max_rhat = max(rhat, na.rm = TRUE), min_ess_bulk = min(ess_bulk, na.rm = TRUE), mean_ess_bulk = mean(ess_bulk, na.rm = TRUE), .groups = "drop") %>%
|
||||
mutate(dimension = public_dimension(dimension), source_file = convergence_detail_file) %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(dimension)
|
||||
|
||||
convergent_summary_file <- latest_file(file.path(outputs_dir, "validation", "latest"), "^convergent_summary_.*\\.csv$")
|
||||
@@ -216,14 +215,13 @@ uncertainty_summary <- read_if_exists(uncertainty_summary_file) %>%
|
||||
external_validation_correlations <- read_if_exists(external_validation_file) %>%
|
||||
group_by(var, dimension) %>%
|
||||
summarise(n = n(), pearson_r = cor(expert_val, model_val, use = "complete.obs"), mean_absolute_error = mean(abs_error, na.rm = TRUE), coverage_95 = mean(covered_95, na.rm = TRUE), .groups = "drop") %>%
|
||||
mutate(dimension = public_dimension(dimension), source_file = external_validation_file) %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(dimension, var)
|
||||
construct_family_positions <- read_if_exists(construct_families_file) %>%
|
||||
rename(mean_cultural = mean_galtan, sd_cultural = sd_galtan) %>%
|
||||
mutate(source_file = construct_families_file) %>%
|
||||
arrange(mean_economic)
|
||||
construct_temporal_stability <- read_if_exists(construct_unstable_file) %>%
|
||||
mutate(dimension = public_dimension(dimension), source_file = construct_unstable_file) %>%
|
||||
mutate(dimension = public_dimension(dimension)) %>%
|
||||
arrange(desc(annual_change))
|
||||
source_composition_balance <- read_if_exists(review_file("validation", "source_composition_balance.csv")) %>%
|
||||
mutate(dimension = public_dimension(dimension))
|
||||
|
||||
Reference in New Issue
Block a user