Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: selecting consecutive years, panel data


From   "Biljana Dlab" <dlab@isb.uzh.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: selecting consecutive years, panel data
Date   Sat, 25 Sep 2010 16:52:07 +0200

Hi,


I have runs of consecutive observations (following instructions in FAQ,
bellow) - Now how do I drop runs of consecutive observations if the
number of consecutive observations is less than 4?

And how do I count number of observations in panel data - for example
how many firms (the variable is defined as number) in total I have in
the panel and how many firms with currency CAD / USD I have in panel
(the currency is defined as string)?

Thank you.

Biljana


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: 22 September 2010 16:20
To: 'statalist@hsphsun2.harvard.edu'
Subject: st: RE: RE: selecting consecutive years timeseries

This is an FAQ 

FAQ     . . . . . . Identifying runs of consecutive observations in
panel data
        . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox and V.
Wiggins
        8/02    How do I identify runs of consecutive observations
                in panel data?
                http://www.stata.com/support/faqs/data/panel.html

Nick 
n.j.cox@durham.ac.uk 

Martin Weiss

ssc d tsspell

by NJC may help.

Biljana Dlab

I have period from 1980-1995 and about 50 firms. For some firms
there is date for all year for other firms not.

Now I need to select those firm-years that are at least 4 consecutive
years long. 

Any ideas and tips how to do that?

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index