Skip to contents

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.

Usage

calculate_nipi(
  monthly_policy,
  weight_matrices,
  spillover_param = 0.4,
  monthly_dates = NULL,
  crisis_start = as.Date("2020-03-01"),
  crisis_end = as.Date("2020-12-31")
)

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

Value

Named list containing NIPI results for each weight type

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)
} # }