Computes the Network-Informed Policy Intensity, which measures direct policy effects plus spillover effects from neighboring countries in the network. This serves as the treatment variable in the TE-DiD framework.
Arguments
- monthly_policy
data.frame with policy data (CountryCode, year_month, StringencyIndex)
- weight_matrices
Named list of network weight matrices
- spillover_param
Numeric parameter controlling spillover intensity (default = 0.4)
- monthly_dates
Vector of dates for analysis
- crisis_start
Date when crisis period begins (for time-varying spillovers)
- crisis_end
Date when crisis period ends
Examples
if (FALSE) { # \dontrun{
# Prepare monthly policy data
monthly_policy <- policy_data %>%
mutate(year_month = format(Date, "%Y-%m")) %>%
group_by(CountryCode, year_month) %>%
summarise(StringencyIndex = mean(StringencyIndex, na.rm = TRUE))
nipi_data <- calculate_nipi(monthly_policy, weight_matrices)
} # }