This chapter compares the response of agricultural production to a standard weather shock depending on the aggregation level of the agricultural data: monthly (as in Chapter 7), quarterly (Chapter 13), or annual (Chapter 14).
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Let us load the theme function for graphs:
source("../weatherperu/R/utils.R")
Let us now load the estimations made in Chapter 7 with monthly production data:
load("../R/output/df_irfs_lp_piscop.rda")
Those made in Chapter 13 with quarterly production data:
load("../R/output/df_irfs_lp_quarter.rda")
And the estimations made in Chapter 14 with annual production data:
load("../R/output/df_irfs_lp_year.rda")
Let us merge the IRfs. We need to make sure that the values for each quarter are repeated 3 times so that the horizons can be compared. The same reasoning applies to annual data for which each year response is repeated 12 times.