Announcement

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

  • #16
    Hi All,

    I am trying to replicate Michael Klein' s 1996 paper, "Timing Is All: Elections and the Duration of United States Business Cycles", published in Journal of Money, Credit and Banking, pp.84-101. The author mentions that "The relatively small number of business cycles, especially in the subsamples makes inference based upon standard asymptotic suspect. Therefore we use boot-strap techniques. The point estimates presented in Tables 4 through 8 represent the mean value of the respective estimates for five hundred resamples from the original data. We resample "clusters" of observations from the original data set choosing the set of observations corresponding to an entire business cycle as one "draw." Each resample therefore has the same number of business cycles as the original sample."

    I tried to follow the same bootstrap method, however, the results I generarted are very different from the ones reported in the paper. therefore, I would to seek for your help to understand what i did wrong. My Stata code are
    Code:
    stset time, fail(event) id(phaseid)
    bootstrap _b[a24],  cluster(cycleid) idcluster(newcycleid): stcox a24 if phase==1 & pww2==1
    and my dataset looks like this :
    Code:
    input byte cycleid int(phaseid time) byte(a9 a12 a24 event a9_d a12_d a24_d a9_r a12_r a24_r pww1 pww2 phase _st _d) int(_t _t0) float newcycleid
     1  101  23 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0  23   0  1
     1  101  32 1 1 1 0 1 1 1 0 0 0 0 0 1 1 0  32  23  1
     1  101  35 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0  35  32  1
     1  101  44 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1  44  35  1
     1  102   3 0 0 1 0 0 0 1 0 0 0 0 0 2 1 0   3   0  1
     1  102   7 0 0 0 1 0 0 0 0 0 0 0 0 2 1 1   7   3  1
     2  201  10 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1  10   0  2
     2  202  10 0 0 0 0 0 0 0 0 0 0 1 0 2 1 0  10   0  2
     2  202  18 1 1 1 1 0 0 0 1 1 1 1 0 2 1 1  18  10  2
     3  301   1 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0   1   0  3
     3  301   4 0 1 1 0 0 0 0 0 1 1 1 0 1 1 0   4   1  3
     3  301  16 0 0 1 0 0 0 0 0 0 1 1 0 1 1 0  16   4  3
     3  301  32 0 0 0 1 0 0 0 0 0 0 1 0 1 1 1  32  16  3
     3  302  14 0 0 0 1 0 0 0 0 0 0 1 0 2 1 1  14   0  3
     4  401   4 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0   4   0  4
     4  401  13 1 1 1 0 0 0 0 1 1 1 1 0 1 1 0  13   4  4
     4  401  16 0 1 1 0 0 0 0 0 1 1 1 0 1 1 0  16  13  4
     4  401  27 0 0 1 1 0 0 0 0 0 1 1 0 1 1 1  27  16  4
     4  402   1 0 0 1 0 0 0 0 0 0 1 1 0 2 1 0   1   0  4
     4  402  13 0 0 0 1 0 0 0 0 0 0 1 0 2 1 1  13   1  4
     5  501  12 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0  12   0  5
     5  501  21 1 1 1 1 0 0 0 1 1 1 1 0 1 1 1  21  12  5
     5  502   3 1 1 1 0 0 0 0 1 1 1 1 0 2 1 0   3   0  5
     5  502  15 0 1 1 0 0 0 0 0 1 1 1 0 2 1 0  15   3  5
     5  502  39 0 0 1 0 0 0 0 0 0 1 1 0 2 1 0  39  15  5
     5  502  43 1 1 1 1 1 1 1 0 0 0 1 0 2 1 1  43  39  5
    end
    Error message:
    Code:
    Note: One or more parameters could not be estimated in 2 bootstrap replicates;
          standard-error estimates include only complete replications.
    Any advice on how to solve the error is highly appreciated
    Last edited by fan wang; 14 Oct 2017, 21:04.

    Comment


    • #17
      I think that bootstrap doesn't change the point estimates. It makes a bootstrap estimate of the standard error of the point estimates.

      From what you say of the journal article, they used a bootstrap technique to make the point estimates. You'll need to program that yourself: bootstrap doesn't do that, but you might be able to use the results left behind in the dataset created by the saving() option of bootstrap to do such a thing.

      Comment


      • #18
        Fan:
        as an aside to Joseph's helpful advice, different -seed- in -bootstrap- can give back different results.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #19

          Dear Carlo and Joseph, thank you so much for your kind replies. I understand the points raised by you. I would like to know whether my code is bootstrapping the cycles as the author used for his paper. Additionally, the question now I have is how to solve the error message that bootstrap replicates can't estimate the interested covariate, particularly, if the covariate is dummy variable. Do you have any suggestion on this? Thank you!!
          Last edited by fan wang; 17 Oct 2017, 00:57.

          Comment

          Working...
          X