Open maximilian-sprengholz opened 1 year ago
Atm, the suest in the background does not produce SEs and issues a "Warning: Variance matrix is nonsymmetric or highly singular" if there is no varation in $Y$ in one of the compared groups per component (usually the unmatched for $D_A$ and $D_B$). Probably rare issue, but more likely with binary outcomes.
Okay, what I achieved so far:
ps
and md
What I learned today...
md
and ps
againImplementing this for the example data from the help-file provides a first indication that the SEs for all four components work well :)
remaining thoughts:
Okay, I implemented it also now for md
and ps
. the SEs seem plausible, but they do not match to the bootstrapping one's and sometimes we get still negative values (especially, if too many variables);
let's see what the simulations bring...
Notes on kmatch
and nlcom
implementation:
nlcom
. At the moment, we deliberately fixed to either att
or atc
. If I remember correctly, passing through all estimates would require some direct referencing (e.g. of the estimates and potential outcomes) instead of using just the single estimate, the single weight, and so on.I would say that we should try to incorporate his influence functions in the document directly, as currently the kmatch
-command also does not acknowledge the uncertainty with respect to the weights.
Then the last difference to nopo is the incorporation of the covariance, which we even might also achieve with the influence functions... and moreover, we should also get influence functions for DA and DB based on his formula and what we learned now.
So overall, we could do everything with influence functions by ourselves and only provide these SE, no?
Currently agreed on setup:
em
, we offer two SEs:
md
and ps
we calculate the SEs from the influence functions returned by kmatch
What we should not forget:
vce
implementation
Some remaining minor things:
em
md
and ps
we should generate the influence-function-variables via kmatch and add also the SEs for DA and DB via influence functions (to obtain a cohort variance-covariance-matrix of the components)Note on total varlist, vce()
: Strange default behavior, which is not vce(analytic)
, but appears to be vce(robust)
despite not being documented as possible option. For now, kmatchse
defaults to vce()
and not vce(analytic)
, even though the kmatch default would be vce(analytic)
(there is no way around this, as we do not have any influence on the returned macro from kmatch). When streamlining, we should check if these defaults can be consistent across SEs.
Standard errors are implemented for md
and ps
using the influence functions returned by kmatch
and self-generated ones for DA
and DB
. All are scaled that total
is the appropriate way to obtain standard errors. Nice side-effect is that weights and clustering are already inbuilt.
Important thing I noticed because we use both matching directions for kmatchse
: If units are matched in only one of the directions, we count them as matched for all directions, although they might actually be unmatched in the direction of interest (ATT/ATC). This was no problem when ATT/ATC was fixed, but now leads to wrong subsamples, affecting DA/DB (and therefore DX as residual). This problem would also affect any postestimation usage after calling kmatch, att atc
(without setting bwidth
) in the currently published version, since we did not ensure that sharedbwidth
was set as kmatch
option. Is now part of the checks and will be added automatically.
After consulting help kmatch
again, Jann (2019) and some testing, the IFs do not seem to incorporate the uncertainty from being estimated. So, the current SE implementation for md
and ps
has to be adjusted, possibly following Abadie and Imbens (2006) or analogous to Jann (2021) on ebalfit
.
Dear Maximilian and Maik, My output table contains one column only, for coefficients, and does not display the other columns for : Std. err., z , P>|z|, [95% conf. interval]. Is this normal? I only manage to get the complete table, including Std.err. etc, if I use the bootstrap, but with this command weights are not allowed. Do you know where the issue may come from? Many thanks for your feedback! and for the package! :)
Implement Influence Functions to estimate correct standard errors for all decomposition components.