Announcement

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

  • Bootstrap standard error


    Dear Statalist members,

    I am working on a time series data and encountered the following error message when I apply vce(bootstrap) in my regression.

    Error: time-series operators are not allowed with bootstrap without panels, see tsset

    Does this mean that vce(bootstrap) can only be used on panel data and not time series data? If yes, how am I going to get a bootstrapped standard error for time series regression?

    Any help is much appreciated!

    Thanks,
    Janys

  • #2
    Without seeing the actual commands, and probably some example data (use the -dataex- command), it is difficult to troubleshoot this. With everything being left to the imagination, the chances that a proposed solution will prove correct are slim.

    Nevertheless, if you have a time series only, and no panels, then when you attempt to bootstrap a regression, you will be sampling, with replacement, observations corresponding to different times of observation. This means that the bootstrap samples may have time gaps which do not exist in the original data, or may have duplicate observations for the same time period. While this is not a problem in simple circumstances, it is clear that if you are trying to use things like lag and lead operators, or estimate autoregressive correlation structure, the situation is unworkable as the time-series ordering is destroyed by the resampling. So, yes, you can use vce(bootstrap) on time series data, but not if the model you are bootstrapping relies on lags/leads/differences/seasonal-differences or autoregressive structure. If you need those features in your model, you cannot bootstrap. In fact, bootstrap doesn't even make sense in that context.

    (When you have panel data, the bootstrapping resamples whole panels, with replacement, it does not sample times within panels, so the same problem does not arise.)

    Comment


    • #3
      I'm not very knowledgeable about time-series, but perhaps this approach in R will work.
      Steve Samuels
      Statistical Consulting
      [email protected]

      Stata 14.2

      Comment


      • #4
        Hi Clyde and Steve,

        Sorry for my late reply and many thanks for both your advice!

        Clyde Schechter, yes, you're right! I can't use the vce(bootstrap) as I'm using the lag operator.

        Steve Samuels, thanks for the link! Although I am not familiar with R, but will look into it.

        Best, Janys

        Comment

        Working...
        X