Skip to contents

Prepares the dataset for Transfer Entropy-informed Difference-in-Differences estimation by combining NICI outcomes, NIPI treatments, and policy data.

Usage

prepare_tedid_dataset(
  nici_data,
  nipi_data,
  treatment_groups = NULL,
  policy_data = NULL,
  weight_type = "composite",
  crisis_start = as.Date("2020-03-01"),
  scale_nici = 1000
)

Arguments

nici_data

Named list of NICI results from calculate_nici()

nipi_data

Named list of NIPI results from calculate_nipi()

treatment_groups

data.frame with treatment group assignments

policy_data

data.frame with additional policy controls

weight_type

Character string specifying which weight type to use

crisis_start

Date when crisis period begins

scale_nici

Numeric scaling factor for NICI (for better estimation)

Value

data.frame ready for TE-DiD estimation

Examples

if (FALSE) { # \dontrun{
# Prepare treatment groups
treatment_groups <- data.frame(
  CountryCode = c("USA", "GBR", "DEU"),
  Group = c("LateAdopter", "LateAdopter", "EarlyAdopter"),
  TreatmentDummy = c(0, 0, 1)
)

tedid_dataset <- prepare_tedid_dataset(nici_data, nipi_data, treatment_groups)
} # }