Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: consecutive variables


From   [email protected]
To   [email protected]
Subject   Re: st: consecutive variables
Date   Wed, 20 Dec 2006 12:50:46 -0600

Another way would be to use -tsreport, list-

-tsset myvar-

-tsreport, list-

Scott


----- Original Message -----
From: Sergio Correia <[email protected]>
Date: Wednesday, December 20, 2006 12:45 pm
Subject: Re: st: consecutive variables
To: [email protected]

> You could use a mix of -generate- and _n in order to achieve what 
> you want.
> 
> However, I would think it could be better (considering that you are
> studying cohorts) to use the -tsfill- command, which fills missing
> observations in a panel.
> 
> See help tsfill, and remember that you must first -tsset- your data.
> 
> After using tsfill, count the number of missing values. If there 
> are 0
> missing values, then there are no gaps.
> 
> 
> On 12/20/06, Manasi Vydyanath <[email protected]> wrote:
> > Hello - I was wondering whether there was any command for checking
> > for gaps in a given variable. In other words - supposing I have
> > "myvar" which is supposed to run from 1 to 256 consecutively. But
> > there may be gaps in this variable, and it might be missing, 
> say, 69
> > and 78. Is there a command I can use to detect this sort of thing?
>
*
*   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