Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: [Stata 9] -rolling-


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: [Stata 9] -rolling-
Date   Mon, 9 May 2005 18:31:36 +0100

As indicated in many other postings, you can call up 
the help remotely by 

http://www.stata.com/help.cgi?rolling

irrespective of whether Stata 9 is installed. 

I believe that -rolling- is more indulgent
than -rollreg- about gaps. 

Nick 
[email protected] 

Cameron Hooper
 
> I don't have Stata 9 but from a post to this list I note that 
> version 9 
> has a -rolling- command. Can this new command perform rolling OLS 
> regressions? If so, will it allow gaps in the data series? I've been 
> using the excellent -rollreg- module, but it does not allow 
> gaps. Here 
> is some test data to illustrate my question (using version 8.2)
> 
> . clear
> . use http://www-personal.umich.edu/~chooper/stata/rrtest2
> . list if id == 1
> 
>       +----------------------------+
>       | id    y    x1    x2   year |
>       |----------------------------|
>    1. |  1   12    80   100   1980 |
>    2. |  1   23    90    93   1981 |
>    3. |  1   45   100    62   1982 |
>    4. |  1   13    56   120   1983 |
>    5. |  1   22    65    90   1984 |
>       |----------------------------|
>    6. |  1   21     .    80   1985 |
>    7. |  1   56   120    12   1986 |
>    8. |  1   43    90    45   1987 |
>    9. |  1   29    67    67   1988 |
>   10. |  1   14    42    55   1989 |
>       +----------------------------+
> 
> . tsset id year
>         panel variable:  id, 1 to 2
>          time variable:  year, 1980 to 1995
> 
> . rollreg y x1 x2, move(5) stub(rr)
> 
> Number of gaps in sample:  1
> 
> Observations with preceding time gaps
> ----------------------------------
>     Record |         id        year
> ----------+-----------------------
>          7 |          1        1986
> ----------------------------------
> sample may not contain gaps
> r(198);
> 
> end of do-file
> r(198);

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index