Announcement

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

  • bootstrap with user command: could this be a problem with ereturn?

    Hello,


    Problem definition

    I'm using bootstrap with a user command which is eclass.
    When I run the bootstrap on my command, the command is properly executed once (I introduced some display to verify the execution of my command).
    Then the execution is stuck (even with only two replications) giving me only this output for hours:

    Bootstrap replications (2)
    ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5

    What could be wrong?
    • My intuition is that I did not specify ereturn properly.
    What I would like, is for e() out of my command to be that of the last estimation inside this command.
    I did not specify any ereturn at the end of my command because I thought it would do the trick.
    Doing so, I'm not sure if bootstrap finds in e() all the information it (may) need to run properly on my command.
    Could this be the problem?
    and if it is, how do I make sure that my user command correctly inherits the e() from the last estimation within it.
    • Another possibility is that I did not take care of the panel dimension properly.
    I found some explanations on how to do this right and coded the following:
    gen newid = pairid /* to create a new individual identifier for my panel */
    xtset newid year /* to change the panel dimensions */
    Then I run my command with the bootstrap command:
    bootstrap , reps(2) seed(1) cluster(pairid) idcluster(newid): iterative_panel_sg flow x_o m_d iso_o iso_d year newid $regressors, gen1(Omega1BS) gen2(Phi1BS) ras(0) est(1) mata(0)
    Knowing that the command inside the bootstrap (iterative_panel_sg flow.... ) works fine.

    Did I make a mistake here which could explain my problem with bootstrap?
    • Any other direction to find a solution would be more than welcome.
    Thanks a lot for your help.

    PS: My user command is a loop of estimations, calling another loop to modify the inputs from these estimations until convergence is obtained. It's a bit obscure, but it's just to say that it's difficult for me to provide a minimal example.
    Last edited by aurelien poissonnier; 24 May 2018, 12:16. Reason: added tags
Working...
X