Announcement

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

  • bootstrap the errors in xtpcse

    I'm running several regressions using the xtpcse and the errors of the models are not normally distributed, hence I am unable to my inferences. I was advised to bootstrap the errors, say 10,000 times, and get my own critical values for each regression. I requested the ereturn list, but the errors of the model are not listed there. I realized that Stata is unable to predict the residuals after xtpcse, it can predict the dependent variable Y only. I can generate errors=Y-Y*. Is there a smart way to ask stata to bootstrap the errors and determine the upper and lower critical values?

    I would be thankful for any suggestions with respect to programming this on Stata.

    Cheers
    Last edited by Lilly; 26 Apr 2014, 03:59.

  • #2
    Lilly can find the following article helpful: Brian P. Poi. From the help desk: Some bootstrapping techniques.The Stata Journal 2004; 4, 3: pp. 312–328. The article is dowloadable for free from: www.stata-journal.com/article.html?article=st0073.

    Kind regards,
    Carlo
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Cross-posted: http://stats.stackexchange.com/quest...ributed-errors.

      See the advice on cross-posting in the FAQ. There, you're also asked to use your full real name.
      You should:

      1. Read the FAQ carefully.

      2. "Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!"

      3. Describe your dataset. Use list to list data when you are doing so. Use input to type in your own dataset fragment that others can experiment with.

      4. Use the advanced editing options to appropriately format quotes, data, code and Stata output. The advanced options can be toggled on/off using the A button in the top right corner of the text editor.

      Comment


      • #4
        Thanks Carlo. The paper you recommended gives examples for cross-section and time series. Is there any guidance for bootstrapping percentile-t method for panel data?
        When I bsample panel data and then use the command xtpcse, there is always "repeated time values within panel" error. Any ideas how I may overcome this problem?

        Comment


        • #5
          Lilly might find out some helpful advice in Cameron AC, Trivedi PK. Microeconometrics using Stata. Revised edition. College Station, TX: Stata Press, 2010: 434-435, where the topic clustered bootstrap is covered.

          Kind Regards,
          Carlo
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Ok folks, the errors of my model are not normally distributed and hence my aim is to model the distribution of the t-statistic for each parameter and then get the critical values based on that unique distribution. The final step is to compare these generated critical values with the t-test from the original regression and test the hypothesis. I'd like to get your opinion with this code.

            xtset Number Year
            xtpcse Y X1 X2, correlation(psar1)
            ereturn list
            scalar b1=b[1,1]
            scalar b2=b[1,2]
            scalar b3=b[1,3]
            generate newid = Number
            xtset newid Year
            generate sample=1-missing(Y , X1 , X2)
            keep if sample
            bootstrap _b _se, reps(10000) nodots cluster(Number) idcluster(newid) saving(bsdata, replace) : xtpcse Y X1 X2, correlation(psar1)
            use bsdata, clear
            generate t1= (_b_X1-b1)/ _se_X1
            generate t2 =(_b_X2-b2) / _se_X2
            generate t3 = (_b_cons-b3) /_se_cons
            centile t1 t2 t3, centile(2.5, 97.5)

            I get the following upper and lower centiles (critical values); they seem too large though (not sure if they alarming for something wrong in the methodology)
            t1 (-13.8 and 5.00)
            t2 (-1.9 and 1.57)
            t3 (-9.5 and 11.56)

            Comment


            • #7
              In your cross-post (which you still haven't acknowledged on either forum), you mention having 20 panels with six time-points. With your xtpsce set-up, each panel has its own residual variance parameter and its own panel-specific autocorrelation parameter. Are you sure that bootstrapping a total of 20 nonexchangeable observations will fix-up your problem with nonnormal residuals?

              Among its xt linear regression estimators, Stata allows bootstrapping as a vce() option for the xtgee, xtreg, xthtaylor, xtfrontier, xtrc and xtivreg estimation commands, but not for either of the two (xtgls and now xtpcse) that you're trying to use.

              Occasionally, StataCorp just hasn’t got around to adding an option to a command, or has never thought to do so. But often, the company has avoided adding an option for cause. Do you know which is the case here?

              For nearly two weeks now, in a total of three threads on two help forums, you’ve made essentially zilch headway with bootstrapping as the exclusive approach to your problem. Would it be worthwhile to step back and see whether there are alternatives?

              Comment


              • #8
                Thanks Joseph, I am pursuing this particular approach for comparative purposes.

                Comment

                Working...
                X