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]

Re: st: rollreg - r134


From   "Fabian Schönenberger" <[email protected]>
To   [email protected]
Subject   Re: st: rollreg - r134
Date   Thu, 03 May 2012 11:28:19 +0200

Many thanks for your and Kit's advice. I try Kit's advice and rerun rollreg. Stata is till working ... I guess it takes a couple of hours.

Best regards, Fabian 

-------- Original-Nachricht --------
> Datum: Thu, 3 May 2012 09:27:33 +0100
> Von: Nick Cox <[email protected]>
> An: [email protected]
> Betreff: Re: st: rollreg - r134

> Kit's answer was better. If getting rid of the gaps means working with
> the longest possible unbroken spell in each panel, then that is a
> method easy to explain.
> 
> Nick
> 
> On Thu, May 3, 2012 at 8:27 AM, Nick Cox <[email protected]> wrote:
> > I won't encourage or support your doing this. It's at best a fudge. I
> > think you need to write a loop from first principles.
> >
> > Nick
> >
> > On Wed, May 2, 2012 at 10:15 PM, "Fabian Schönenberger" <[email protected]>
> wrote:
> >> Oh, yes, rollreg from SSC.
> >>
> >> OK. So I have to get rid off the gaps. I have generated a new variable:
> >> by cusip: generate datecontrol=datemonthly[_n]-datemonthly[_n-1]
> >>
> >> If the variable is larger than 1 there is a gap in the monthly time
> series. Instead of dropping a cusip completely if there is datecontrol>1, I
> would like to keep either the observations befor or after the gap depending
> on the length of the time series without a datecontrol>1. The longer the
> better.
> >>
> >> How do I have to proceed or is there a more elegant way?
> >
> > Von: Nick Cox <[email protected]>
> >>
> >>> -rollreg- is from SSC. Please recall that you are asked to explain
> >>> where user-written programs you refer to come from.
> >>>
> >>> -rollreg- itself does not ever issue error 134 so far as I can see.
> >>>
> >>> My guess is this.
> >>>
> >>> guess {
> >>>
> >>> You are running -rollreg-, which in turn runs -tsreport-, which in
> >>> turn finds gaps. -tsreport- would use  -tabdisp- for display but you
> >>> hit limits on how much it can display.
> >>>
> >>> But -rollreg- does not allow gaps any way. So what you are finding is
> >>> that -rollreg- is failing to tell you that you cannot use it because
> >>> your dataset triggers a system limit first.
> >>>
> >>> }
> >>>
> >>> Nick
> >>>
> >>> On Wed, May 2, 2012 at 8:56 PM, "Fabian Schönenberger" <[email protected]>
> >>> wrote:
> >>> > Dear all
> >>> > I have a problem running rollreg regression for my panel data. The
> >>> sample is very large, about 2'400'000 observations. First, I tsset the
> date:
> >>> >
> >>> > . tsset cusip datemonthly
> >>> >       panel variable:  cusip (unbalanced)
> >>> >        time variable:  datemonthly, 1969m2 to 2012m2, but with
> gaps
> >>> >                delta:  1 month
> >>> >
> >>> > I want to conduct rolling regressions for my panel date. I tried:
> >>> >
> >>> > rollreg stockpremium marketpremium, move(36) stub(capm)
> >>> >
> >>> > The output is:
> >>> > Observations with preceding time gapstoo many values
> >>> > r(134);
> >>> >
> >>> > I did some internet research and found out that some years ago the
> same
> >>> problem was discussed among Statalist. However, I did not find a
> solution
> >>> for the problem. I am not sure if the problem are too many values, or
> the
> >>> gaps. I dropped all missing observations (monthly stock prices).
> However, it
> >>> is possible that for some cusips the sequence of months has gaps. The
> >>> reason why I want to conduct rollreg is that I am interested in how
> the
> >>> explanatory power of marketpremium changes over time.
> >>> >
> 
> *
> *   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/

-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
*
*   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