This file is part of IDEAS, which uses RePEc data


[ Papers | Articles | Software | Books | Chapters | Authors | Institutions | JEL Classification | NEP reports | Search | New papers by email | Author registration | Rankings | Volunteers | FAQ | Blog | Help! ]

ONESPELL: Stata module to generate single longest spell for each unit in panel data, listwise

Author info | Abstract | Publisher info | Download info | Related research | Statistics
Author Info
Christopher F Baum () (Boston College)

Additional information is available for the following registered author(s):

Abstract

onespell produces a subset of a panel data set in which all observations on varlist are non-missing and contiguous in the time dimension. If a panel unit contains more than one such subset, the longest "spell" is retained. Although performing this operation for a single variable of interest is fairly straightforward, this routine deals with a more challenging task: generating the single longest spell in a listwise fashion, across a set of variables. This applies the same logic as does, e.g., regress: an observation with a missing value in any variable will be deleted from the regression sample. Some matrix software (e.g., DPD for Ox) requires that panel data be organized in this fashion, with each unit appearing as a single contiguous block of non-missing observations. onespell will produce such a dataset, which after conversion to Stata version 6 format (by, e.g., Stat/Transfer) may be read directly by Ox. The routine has been tested with the latest version of Ox (3.40) and the DPD package (1.21). The routine makes use of N.J. Cox's -tsspell-.

Download Info
To download:

If you experience problems downloading a file, check if you have the proper application to view it first. Information about this may be contained in the File-Format links below. In case of further problems read the IDEAS help file. Note that these files are not on the IDEAS site. Please be patient as the files may be large.

File URL: http://fmwww.bc.edu/repec/bocode/o/onespell.ado
File Format: text/plain
File Function: program code
Download Restriction: no
File URL: http://fmwww.bc.edu/repec/bocode/o/onespell.hlp
File Format: text/plain
File Function: help file
Download Restriction: no
File URL: http://fmwww.bc.edu/repec/bocode/t/tsspell.ado
File Format: text/plain
File Function: program code
Download Restriction: no
File URL: http://fmwww.bc.edu/repec/bocode/t/tsspell.hlp
File Format: text/plain
File Function: help file
Download Restriction: no

Publisher Info
Software component provided by Boston College Department of Economics in its series Statistical Software Components with number S448601.

Download reference. The following formats are available: HTML, plain text, BibTeX, RIS (EndNote), ReDIF
Size:
Programming language: Stata
Requires: Stata version 8.2
Date of creation: 15 Jan 2005
Date of revision:
Handle: RePEc:boc:bocode:s448601

Note: This module may be installed from within Stata by typing "ssc install onespell". Windows users should not attempt to download these files with a web browser.
Contact details of provider:
Postal: Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA
Phone: 617-552-3670
Fax: +1-617-552-2308
Email:
Web page: http://fmwww.bc.edu/EC/
More information through EDIRC

Order Information:
Web: http://repec.org/docs/ssc.php

For technical questions regarding this item, or to correct its listing, contact: (Christopher F Baum).

Related research
Keywords: panel data spell streak run

Statistics
Access and download statistics

Did you know? RePEc data is maintained by each archive holder on its own website. Nothing is held centrally.

This page was last updated on 2008-10-11.


This information is provided to you by IDEAS at the Department of Economics, College of Liberal Arts and Sciences, University of Connecticut using RePEc data on a server sponsored by the Society for Economic Dynamics.