English, Article edition: ONESPELL: Stata module to generate single longest spell for each unit in panel data, listwise Christopher F Baum

User activity

Share to:
 
Bookmark: http://trove.nla.gov.au/version/175452
Physical Description
  • code
Language
  • English

Edition details

Title
  • ONESPELL: Stata module to generate single longest spell for each unit in panel data, listwise
Author
  • Christopher F Baum
Physical Description
  • code
Notes
  • 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-.
  • panel data, spell, streak, run
  • RePEc:boc:bocode:s448601
Language
  • English
Contributed by
OAIster

Get this edition

  • Set up My libraries

    How do I set up "My libraries"?

    In order to set up a list of libraries that you have access to, you must first login or sign up. Then set up a personal list of libraries from your profile page by clicking on your user name at the top right of any screen.

  • All (1)
  • Unknown (1)
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.
None of your libraries hold this item.

User activity


e.g. test cricket, Perth (WA), "Parkes, Henry"

Separate different tags with a comma. To include a comma in your tag, surround the tag with double quotes.

Be the first to add a tag for this edition

Be the first to add this to a list

Comments and reviews

What are comments? Add a comment

No user comments or reviews for this version

Add a comment