Bookmark and Share

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

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

re: st: rollreg - r134

From   Christopher Baum <>
To   "" <>
Subject   re: st: rollreg - r134
Date   Wed, 2 May 2012 20:36:17 -0400

> 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?

my -onespell- routine on SSC does exactly that.

author of -rollreg-

Kit Baum   |   Boston College Economics & DIW Berlin   |
                             An Introduction to Stata Programming  |
  An Introduction to Modern Econometrics Using Stata  |

*   For searches and help try:

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