Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using stored model in -sensemakr- (looking for way to use cluster bootstrap)

    Dear Statalist:

    I am learning a bit more about the user-written -sensemakr- package. If you're not familiar with it, it's an implemention of some ideas in Cinelli & Hazlett (2020, in the Journal of the Royal Statistical Society: Statistical Methodology, Series B). You can run an OLS regression within it, and it will report how big the effect size of a potential confounder would have to be in order to reduce your coefficient of interest to zero.

    Code:
    sysuse auto2.dta
    regress price mpg weight rep78
    sensemakr price mpg weight rep78, treat(rep78) bench(weight)
    The problem is that it can only run basic OLS commands within sensemakr itself. I am wondering if there is a way to run more complex OLS models and then pass them to -sensemakr-. I think it may be possible because that functionality is available for its sister package in R, but I'm pretty sure that if it's a possibility in Stata that it is undocumented.

    Code:
    sysuse auto2.dta
    regress price mpg weight rep78, vce(bootstrap, reps(100)) cluster(foreign)
    est sto m1
    sensemakr m1, treat(rep78) bench(weight)
    This obviously doesn't work, but I'm wondering if there's a way to use some of the options in regress that can then be used within -sensemakr- in some way. I also tried:

    Code:
    sysuse auto2.dta
    bootstrap, cluster(foreign) reps(100): sensemakr price mpg weight rep78, treat(rep78) bench(weight)
    And that also didn't work, so we can rule that one out.


    Thank you for your time,
    Jonathan


    (Apologies in advance: I will probably post a combined R / Stata question to stackexchange soon, but I'm going to focus mostly on R there and I wanted to see what this community had to say first)

  • #2
    Dear Jonathan,

    It is most likely that you increase your chances to get useful feedback when you provide more complete references to the literature and other resources when posting your questions on the Statalist forum:

    Cinelli, C., & Hazlett, C. (2020). Making sense of sensitivity: Extending omitted variable bias. Journal of the Royal Statistical Society Series B: Statistical Methodology, 82(1), 39-67. https://doi.org/10.1111/rssb.12348

    Cinelli, C., Ferwerda, J., & Hazlett, C. (2020). sensemakr: Sensitivity analysis tools for OLS in R and Stata. Available at SSRN: https://ssrn.com/abstract=3588978 or http://dx.doi.org/10.2139/ssrn.3588978

    Cinelli, C., Forney, A., & Pearl, J. (2024). A crash course in good and bad controls. Sociological Methods & Research, 53(3), 1071-1104. https://doi.org/10.1177/00491241221099552 (access freely available)


    Furthermore, you might want to write the author of sensemakr about your question, here is his personal website and here you can get all software.
    Last edited by ericmelse; 31 Aug 2024, 14:16. Reason: Further references added
    http://publicationslist.org/eric.melse

    Comment

    Working...
    X