Preselected examples · common samples · Under development
Published
October 20, 2026
Estimators and weight interpretation
The examples preserve the 27 representative panels selected for the preceding SDID collection. Treatment timing, outcomes, donors, complete-case restrictions and shortened windows are unchanged. Computational comparisons retain the original design labels and sample-retention information.
The author TROP package uses the untreated-cell objective
where d_i is RMS distance from the mean treated pre-trajectory and c=T-T_1/2 using zero-based column indices. Its treatment estimate is the unweighted mean treated-cell residual. Time localization factors in the loss are e^{-\lambda_t|t-c|}; the package multiplies residuals by their square roots. For comparison with SDID, pre-period factors are normalized to sum to one. These are localization weights, not the complete implicit coefficients of the TROP treatment-effect estimator with its low-rank adjustment.
All pre-period TROP localization weights are positive mathematically. They are uniform when \lambda_t=0 and increase geometrically toward adoption otherwise. The restriction is built into TROP; its shape is not an empirical finding about unrestricted balancing weights. SDID weights are learned on the simplex and may have exact zeros. Full-period TROP factors are exported as well.
The upstream reference is zhaonanq/TROP-Estimator, commit 43738cdaa8eb8356566903bb010bbf6ce4cb31b9, package 0.1.11. Its CVXPY nuclear-norm formulation creates an SDP whose matrix dimension grows with the number of units. The largest retained example has over 100,000 units. A memory-efficient proximal solver below targets the identical convex objective: it profiles weighted additive effects analytically and applies singular-value thresholding to the low-rank matrix. Direct upstream comparisons and primal–dual checks are reported; large panels are not subsampled.
Numerical validation
Direct comparisons below use the unchanged author estimator and the full weighted least-squares design. The primal–dual certificate profiles the free unit and time effects; its dual residual has zero row and column sums and is scaled to satisfy the nuclear-norm spectral constraint.
Code
validation=[]rng=np.random.default_rng(42026)for n,t,n0,t0 in [(9,8,6,5),(7,12,4,8),(12,5,8,2)]: Y=rng.normal(size=(n,2))@rng.normal(size=(2,t))+rng.normal(size=(n,t))*.2 W=np.zeros_like(Y);W[n0:,t0:]=1for lu,lt,nn in [(0.,0.,np.inf),(.4,.2,np.inf),(.4,.2,.1),(.4,.2,1.)]: fit=trop_prox(Y,n0,t0,lu,lt,nn,tol=1e-10,max_iter=10000)with warnings.catch_warnings(): warnings.simplefilter('ignore') direct=TROP_TWFE_average(Y,W,list(range(n0,n)),lu,lt,nn,treated_periods=t-t0) err=abs(fit['estimate']-direct)assert fit['accepted'] and err<5e-4,(n,t,lu,lt,nn,fit,err) validation.append(dict(N=n,T=t,lambda_unit=lu,lambda_time=lt,lambda_nn=nn, estimate=fit['estimate'],upstream_estimate=direct,absolute_difference=err, normalized_gap=fit['normalized_gap']))write_rows('upstream-validation.csv',validation)print('Validated',len(validation),'direct upstream comparisons; maximum ATT difference',max(r['absolute_difference'] for r in validation))
Validated 12 direct upstream comparisons; maximum ATT difference 3.4704169764717893e-06
Placebo tuning
Outcomes are centered by the control pre-period mean and scaled by the standard deviation of control pre-period first differences. This scale is fixed before tuning. Three seeded folds of the control units are each assigned placebo treatment over the original post window; all remaining controls remain donors. The score is the RMSE of the three placebo treatment estimates. Actual treated post outcomes are never used for tuning.
The prespecified search uses coordinate minimization, initialized at zero unit/time decay and no low-rank adjustment. The unit-decay grid is 0, 0.5, 2 per scaled outcome unit. Time half-lives are infinity, the pre-period length, one fifth and one twentieth of that length. Nuclear penalties are infinity or 1, 0.1, 0.01, 0.001 times twice the spectral norm of the two-way-demeaned control matrix. The common penalty scale is computed once per paper. The same three folds are used for every candidate. The search stops when the selected triplet is unchanged, with a six-cycle cap; grid boundaries and any cap are reported. The grid is an exploratory, reproducible choice, not an author-supplied universal default or a claim of global tuning optimality.
Each finite-penalty fit must meet a relative primal–dual gap of 10^-6 during tuning. The final full-panel fit uses 10^-8. A failed fold invalidates its candidate; scores never silently discard unsuccessful folds. Every evaluated candidate and fold result is retained.