*! version 1.0.0 14sept2025

undid_diff

undid

undid - Estimate difference-in-differences with unpoolable data.

Command Description

undid_diff Creates the CSV file to be sent out to each silo (`empty_diff_df.csv`) and displays its filepath

Required parameters:

- init_filepath : A string specifying the filepath to the init.csv

- date_format : A string which specifies the date format used in the init.csv. Options are:
-> "ddmonyyyy yyyym00 yyyy/mm/dd yyyy-mm-dd yyyymmdd yyyy/dd/mm yyyy-dd-mm yyyyddmm dd/mm/yyyy dd-mm-yyyy ddmmyyyy mm/dd/yyyy mm-dd-yyyy mmddyyyy yyyy"

- freq : A string which indicates the length of the time periods to be used when computing the differences in mean outcomes between
periods at each silo and the length of a period for the trends data. Either "year", "month", "week", or "day".

Optional parameters:

- covariates : A string specifying covariates to be considered at each silo. If left blank uses covariates from init.csv.

- freq_multiplier : An integer which specifies if the frequency should be multiplied by a non-zero integer.
For example, if the time periods to consider are two years, set freq("year") freq_multiplier(2)

- weights : A string indicating the type of weighting to use. Defaults to "both". Options are:
-> "none", "diff", "att", or "both". The various options describe the level at which weights are applied (to the contrasts/differences, to the sub-aggregate ATTs, to both, or to none).

- filename : A string specifying the outputted filename. Must end in ".csv". Defaults to "empty_diff_df.csv".

- filepath : A string specifying the path to the folder in which to save the output file, e.g. "`c(pwd)'". Defaults to "`c(tempdir)'".

Syntax

undid_diff init_filepath(string) date_format(string) freq(string) [covariates(string) freq_multiplier(int) weights(string) filename(string) filepath(string)]

Examples

undid_diff, filepath("C:/Users/User/Documents/Project Files/init.csv") date_format("yyyy") freq("year")

empty_diff_df.csv saved to: C:\Users\ERICBR~1\AppData\Local\Temp\empty_diff_df.csv

Author

Eric Jamieson

For more information about undid, visit the https://github.com/ebjamieson97/undid GitHub repository.

Citation

Please cite: Sunny Karim, Matthew D. Webb, Nichole Austin, Erin Strumpf. 2024. Difference-in-Differenecs with Unpoolable Data. https://arxiv.org/abs/2403.15910