gphk-metrics / stata-multe

Multiple Treatment Effects
17 stars 4 forks source link

Improve error handling? #11

Closed paulgp closed 1 year ago

paulgp commented 1 year ago

Not obvious what this error is (I believe it's that final number of observations is zero because some of the (very small) treatment arms are perfectly collinear with the treatment).

reprex.csv

multe ch13 id, control(homeowner) 2 control strata without sufficient overlap dropped (29407 obs) (29,407 missing values generated) MulTE::estimates(): 3301 subscript invalid <istmt>: - function returned error

paulgp commented 1 year ago

I think a more concrete error message (e.g. "insufficient observations for estimation") be helpful for users.

paulgp commented 1 year ago

Another alternative that might be useful is to have an option that highlights which arms fail the overlap diagnostic, and have an option to drop those treatment arms, rather than dropping the strata. Curious if @peterdhull or @kolesarm agree.

mcaceresb commented 1 year ago

@paulgp Added fix to issue branch. Now gives

. multe ch13 id, control(homeowner)
dropped 2 control strata without sufficient overlap (29407 obs)
insufficient observations for estimation
r(498);

LMK on this comment.

paulgp commented 1 year ago

Yeah, this is better. Let's leave this as is for now and I'll discuss with Peter and Michal.

mcaceresb commented 1 year ago

In this issue:

kolesarm commented 1 year ago

I think this is better, thanks Mauricio! I agree that highlighting which treatment arms fail the overlap diagnostic would be useful here---I suspect this will be a common issue in the value added applications.