ebenmichael / augsynth

Augmented Synthetic Control Method
MIT License
147 stars 52 forks source link

Conformal Inference procedure p-value potential issue #85

Closed andresnigenda closed 1 year ago

andresnigenda commented 1 year ago

Hi, thanks so much for creating this package!

While using this package I uncovered what I think might be a bug in the inference.R conformal_inf() function. I uncovered this potential issue when using a dataset with one single post year.

See this example using the Kansas dataset (restricted to one post intervention year):

Time Estimate lower_bound upper_bound p_val
2012.25 -2.233432e-02 -0.04512445 0.002279013 0.05555556
Estimate Std.Error lower_bound upper_bound p_val
-0.02233432 NA NA NA 0.055

After looking at conformal_inf() , compute_permute_ci() gets called using type=="block", whereas compute_permute_pval() inherits type=="iid" from the function's default values. Is this intentional? If I switch the call to compute_permute_pval() to type=="block", then the p-values above match.

ebenmichael commented 1 year ago

No it was not meant to be this way! This is now fixed, with "block" being the default