7.4 Validación de los resultados.
Este código junta las estimaciones del modelo con pesos de benchmarking con los valores observados y sintéticos, y luego resume las estimaciones combinadas para compararlas con la estimación directa obtenida anteriormente.
<- estimacionesBench %>% left_join(
temp bind_rows(
%>% select(dam2, thetaSyn, thetaFH),
data_dir %>% select(dam2, thetaSyn, thetaFH))) %>%
data_syn group_by(region) %>%
summarise(thetaSyn = sum(W_i * thetaSyn),
thetaFH = sum(W_i * theta_pred),
theta_RBench = sum(W_i * theta_pred_RBench)
%>%
) left_join(directoDam, by = "region") %>%
mutate(id = 1:n())
%<>% gather(key = "Metodo",value = "Estimacion",
temp -id, -region, -theta_dir_upp, -theta_dir_low)
ggplot(data = temp, aes(x = id, y = Estimacion, shape = Metodo)) +
geom_point(aes(color = Metodo), size = 2) +
geom_line(aes(y = theta_dir_low), linetype = 2) +
geom_line(aes(y = theta_dir_upp), linetype = 2) +
theme_bw(10) +
labs(y = "", x = "")