Examples
Runnable scripts live in the repository's examples/ directory. These mirror the package vignettes and are useful when you want a plain Julia script instead of a documentation page.
Matrix Workflow
julia --project=. examples/01_matrix_workflow.jlThis script simulates a common-adoption panel, estimates MSC from the panel matrix, prints the ATT, reports treated-unit effects, and summarizes the pre-treatment fit.
Source: examples/01_matrix_workflow.jl
DataFrame Workflow
julia --project=. examples/02_dataframe_workflow.jlThis script converts a long DataFrame with unit, time, y, and treated columns into the MSC panel format, estimates the ATT, and prints the largest nonzero control-treated weights.
Source: examples/02_dataframe_workflow.jl
Paper Application
julia --project=. examples/03_covid_sah_orders.jlThis is the runnable replication script for Shen, Song, and Abadie's stay-at-home-orders application. It expects a local BLS LAUS county flat file at data/la.data.64.County, or an explicit BLS_LAUS_COUNTY_FILE.
The script reports the paper comparison in the terminal:
quantity MSC.jl paper
control counties 438 438
treated counties 2674 2,674
pre-treatment months 147 147
April 2020 ATT, pp 4.9552 5.06Source: examples/03_covid_sah_orders.jl