Announcement

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

  • bootstrap standard errors for heckprobit

    Dear community,
    I have survey data for which I estimate a model of the willingness to vaccinate. Many of the individuals were already vaccinated when observed, so I use heckprobit model including weights. I used s.e. clustered at the country level. However, a reviewer of the paper suggested to use bootstrap s.e. because I have only 20 countries.
    Therefore, I used the "bsweights" command and then used "svy bootstrap _b: heckprobit..."
    The problem is that when the command is running, some of the "heckprobit"s do not converge, and unless I press the "x" (break) button manually it doesn't move on to the next iteration.
    How can I handle the problem?
    Thanks

  • #2
    you can boottest after heckprobit (ssc install boottest), which is often the way people deal with few clusters.

    Comment


    • #3
      Dear George
      Thank you for the advice. I have installed "boottest"
      I ran again the regression:
      heckprobit dependentvar firstvar othervar if.. [pw=weight] , select (depevar=var) vce(cl country)
      and then I tried "boottest {firstvar}"
      Stata ran the regression again without the firstvar, but returned "Z= . " and prob>|Z|=."
      Could you please suggest what is the problem?
      Once again, thank you for your help
      Last edited by osnat israeli; 28 Oct 2024, 12:47.

      Comment


      • #4
        Hmm. I've run it with a model similar to yours and got results. Not sure why it is failing and hard to tell without the data. I suspect it may be due to something weird in the data, since it works with other data.

        You'll have to investigate.

        1. Are there any perfect predictions?
        2. Simplify the model and build it up to search for problematic variables. maybe leave off "if" "pw" and change up the selection variables.
        3. Look over the options and try a few things to see if you can get it to work, and figure out why it does and does not work. Maybe change the weight in boottest (it weights the residuals, not the regression; try weight(webb)).
        4. You can also drop the vce(cl country) from the model and add cluster(country) to boottest.
        5. Maybe run on some subsamples to see if it will work. Maybe instead of "if", try preseve/keep if XXX/run/restore to make sure missings are not causing a problem (I doubt it).

        Comment


        • #5
          Thank you very much, George.
          I have tried your suggestions and found that if I omit two specific variables from the second stage (not the selection equation), the command gives me the z-value (though I don't know why, the variables seem OK). Those variables are quite important (health status which is supposed to affect the willingness to vaccinate) and excluding them might be problematic.
          The "if" and the "weight(pw=..)" don't seem to be a problem, and I did not find perfect predictions. weight(webb) did not solve the problem.
          Technically, if I want the bootstrap s.e. for all variables in the model, and I have about 10 specifications, it is a lot of computations which should then be copied manually. Do you think that I could bypass the whole bootstrap issue if I use s.e. clustered by regions (for which I have around 200 groups)?
          Many thanks for your help.

          Comment


          • #6
            I was unable to edit my last post: I looked at additional statlist posts and saw that I should look at "estadd" for presenting the results.
            Still, I wonder if clustering by regions would be an easy (and correct) estimation procedure.
            Thanks again

            Comment


            • #7
              clustering up can be a problem, but clustering at a lower level makes sense.

              Comment


              • #8
                Thank you very much for your help!

                Comment

                Working...
                X