Panel Bootstrap
-
Jim Stodder
- Posts: 9
- Joined: Wed Mar 06, 2013 7:57 pm
Panel Bootstrap
I have a question about panel bootstrapping . RATS 8.2 has bootstrapping with an option for PANELS, but this seems to involve merely shuffling the INDIVIDUALS, leaving the time structure of each unchanged.
Repeated draws with replacement of individuals might be useful if I had a large number of them, but I only have 6 -- and just 14 time periods. I'd like to do bootstrapping to extend the time dimension, to overcome small size distortions. Will the overlapping BLOCK default on time observations still be operating if I run BOOTS with the PANEL option? The Reference Manual on this option reads, "Within each individual, the original time order is maintained." Thank you for your time.
Repeated draws with replacement of individuals might be useful if I had a large number of them, but I only have 6 -- and just 14 time periods. I'd like to do bootstrapping to extend the time dimension, to overcome small size distortions. Will the overlapping BLOCK default on time observations still be operating if I run BOOTS with the PANEL option? The Reference Manual on this option reads, "Within each individual, the original time order is maintained." Thank you for your time.
Re: Panel Bootstrap
Sorry. The block bootstrap that's done with BOOT isn't set up to handle panel data. It doesn't sound like you really have enough time series data points to do block bootstrapping within individual records anyway. To bootstrap what you have, you'll need to make some rather strong assumptions to generate a parametric bootstrap which can allow for shuffling residuals between individuals.
-
Jim Stodder
- Posts: 9
- Joined: Wed Mar 06, 2013 7:57 pm
Re: Panel Bootstrap
Thanks for your comment, Tom. You're right, I don't want to shuffle residuals between individuals, just 'within' them. I thought the block method might work if one could re-start the series at different points, 'reconnecting' with the creation of appropriate new 'transitional' residuals. A paper I've been looking at which does panel bootstraps with blocking is:
Di Lorio, Francesca and Fachin, Stefano, A Panel Cointegration Study of the Long-Run Relationship between Savings and Investments in the OECD Economies, 1970-2007 (February 1, 2011). Italy, Ministry of Economy and Finance, Treasury Working Paper No. 3. See SSRN: http://ssrn.com/abstract=1769554
Di Lorio, Francesca and Fachin, Stefano, A Panel Cointegration Study of the Long-Run Relationship between Savings and Investments in the OECD Economies, 1970-2007 (February 1, 2011). Italy, Ministry of Economy and Finance, Treasury Working Paper No. 3. See SSRN: http://ssrn.com/abstract=1769554
Re: Panel Bootstrap
What they're doing is drawing a single stationary bootstrap sequence and applying it across individuals. The basic idea is shown in:
cal(panel=14)
all 6//14
set x = %ran(1.0)
boot(block=4,method=stationary) shuffle 1 14 1 14
*
do i=1,6
set(nopanel) xshuffle = x(%indiv(t)//shuffle(%period(t)))
end do i
cal(panel=14)
all 6//14
set x = %ran(1.0)
boot(block=4,method=stationary) shuffle 1 14 1 14
*
do i=1,6
set(nopanel) xshuffle = x(%indiv(t)//shuffle(%period(t)))
end do i
-
Jim Stodder
- Posts: 9
- Joined: Wed Mar 06, 2013 7:57 pm
Re: Panel Bootstrap
I have successfully run the panel bootstrap as shown above. I now have 10 shuffles (s) of each of the 6 individuals (i) for 15 time periods (t) each; each of these 10 s shuffles is now in a vector stacked first by i, and then by t for each i. So my challenge is to rearrange all of these into one long vector of similar structure, one where there are now 'as if' 10 x 15 = 150 time periods for each individual. I've searched in the forum and in the various RATS manuals but can't find any helpful examples -- but maybe I'm missing something. Any help will be much appreciated.
-
Jim Stodder
- Posts: 9
- Joined: Wed Mar 06, 2013 7:57 pm
Re: Panel Bootstrap
I figured out I can do the above task by converting series to matrices, and then matrix partitioning commands. I now have another little problem, however. Using the following code,
data(for=rats) / outputavr turnavr velavr balavr
@paneldols(lags=1,average=sqrt)
# balavr outputavr
set uhat = %resids
@paneldols(lags=1,average=sqrt)
# uhat uhat{1}
I get the first PANELDOLS program to execute, but on the 2nd, the one on the residuals, I get the following error message:
## SR4. Tried To Use Series Number -32763. (-series n1 n2 triples are no longer legal)
The Error Occurred At Location 503, Line 77 of PANELDOLS
I would certainly appreciate any clues on how to interpret and/or fix this error.
data(for=rats) / outputavr turnavr velavr balavr
@paneldols(lags=1,average=sqrt)
# balavr outputavr
set uhat = %resids
@paneldols(lags=1,average=sqrt)
# uhat uhat{1}
I get the first PANELDOLS program to execute, but on the 2nd, the one on the residuals, I get the following error message:
## SR4. Tried To Use Series Number -32763. (-series n1 n2 triples are no longer legal)
The Error Occurred At Location 503, Line 77 of PANELDOLS
I would certainly appreciate any clues on how to interpret and/or fix this error.
Re: Panel Bootstrap
@PANELDOLS is for estimating a cointegrating vector, which would never involve two lags of a single variable among the explanatory variables. What model are you trying to estimate?
-
Jim Stodder
- Posts: 9
- Joined: Wed Mar 06, 2013 7:57 pm
Re: Panel Bootstrap
You're right; thanks. I just did a simple LINREG command on the residuals and that works. I'm trying to run a bootstrap on the cointegration results. You helped me earlier; see the beginning of this same post.