Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

R: st: re: rollreg module


From   "[email protected]" <[email protected]>
To   <[email protected]>
Subject   R: st: re: rollreg module
Date   Sun, 6 Feb 2011 20:22:56 +0100 (CET)

Thanks a lot for the feedback, Kit. I think the best strategy should be to 
split the data as you suggested.

Andrea


>----Messaggio originale----
>Da: [email protected]
>Data: 5-feb-2011 21.34
>A: <[email protected]>
>Ogg: st: re: rollreg module
>
><>
>I have a panel dataset and I am trying to use the rollreg module to run 
>rolling regressions for each unit in the sample.
>
>Unfortunately my sample has gaps in time for many units. The program 
requires 
>that there are no gaps and I get an error message. If I fill the gaps by 
using 
>the tsfill command (so by setting the gaps to be missing observations) the 
>command still doesn't work.
>
>Do you know if there is a way to run the rollreg command without dropping 
the 
>units with gaps?
>
>I also tried the rolling prefix to regress, but in this case the 
computation 
>time is too long with a very large dataset.
>
>
>No. rollreg, a routine of mine from SSC, does not function when there are 
gaps, implicit or explicit, in time-series data. Neither do a large number of 
official Stata commands that work with time series data. If there are one-
period gaps you could try filling with averages of adjacent observations as an 
alternative to dropping those units. Do you have any understanding of why the 
missing values occur? Do they represent just non-reported values, or a lack of 
activity (e.g. no trading in that interval)? Could you use Stata's -mi- logic 
to deal with this?
>
>As both -rollreg- and the -rolling- prefix are ado code, I don't know why -
rolling- would be faster. But you could always split the task up into handling 
the first half of the panel units separately from the second half, or split it 
into quarters, etc. as with -rolling- you get a separate dataset.
>
>Kit
>
>Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.
org/e/pba1.html
>                              An Introduction to Stata Programming  |   http:
//www.stata-press.com/books/isp.html
>   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-
press.com/books/imeus.html
>
>
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/statalist/faq
>*   http://www.ats.ucla.edu/stat/stata/
>


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index