kkranker / psweight

IPW- and CBPS-type propensity score reweighting, with various extensions (Stata package)
https://ideas.repec.org/c/boc/bocode/s458657.html
MIT License
4 stars 2 forks source link

Standard errors for propensity score model coefficients #1

Open kkranker opened 4 years ago

kkranker commented 4 years ago

[someone] asks,

... Unfortunately, I am unable to recover the standard errors, nor the test statistic to enable me tell the significance of the estimated Propensity score model coefficients. On with my web search again, I came across your GITHUB page (https://github.com/kkranker/psweight) where you indicated some potential improvements and extensions.

I am by this letter (email) writing to ask if this has been made possible and if so, is there a way I can at least retrieve the standard errors to match the displayed coefficients of the covariates estimated from the propensity score model?....

kkranker commented 4 years ago

Quite honestly I haven't spent a ton of time on the statistical properties of the estimator, but imagine the normal methods apply. You will find it easier to work with the Mata code (not the .ado wrap around).*

Inside the solve() function, you should be able to add a few lines of code to produce standard errors. Specifically, you will want to look for the name that says moptimize(S). Between that line and the end of the function, you can add a line with moptimize_result_V_robust().* This will produce a variance-covariance matrix, which you can use to calculate standard errors in the usual manner. Once you have the matrix, you just need to find a way to return these results (or just display it them to the screen).

You can find documentation for moptimize_result_V_robust() in the Stata manual; Also see Drukker's example.

Please let me know if it works! I'm especially curious how long it will take to compute the variance-covariance matrix.