首页    期刊浏览 2024年12月05日 星期四
登录注册

文章基本信息

  • 标题:Speaking Stata: Identifying spells
  • 本地全文:下载
  • 作者:Cox, Nicholas J.
  • 期刊名称:Journal of Food Distribution Research
  • 印刷版ISSN:0047-245X
  • 出版年度:2007
  • 期号:SUPPL
  • 页码:249-265
  • 出版社:Food Distribution Research Society
  • 摘要:Spells in time series (and more generally in any kind of one-dimensional series) may be defined as sequences of observations that are homogeneous in some sense. For example, a categorical variable may remain in the same state, or values of a measured variable may satisfy the same true–false condition. Devices for working with spells in Stata include marking the start of each spell with indicator variables and tagging spells with integer codes. Panel data are easy to handle with the by: prefix. Some kinds of spell identification require two passes through the data, as when only spells of some minimum length are of interest or short gaps are tolerable within spells. Many questions concerning spells are easy to answer given careful use of by: and appropriate sort order, selection of just 1 observation from each panel or spell, and appreciation of the many functions written for egen. Gaps before, between, and after spells can also be important, and I suggest a convention for handling them.
  • 关键词:spells;runs;time series;data management
国家哲学社会科学文献中心版权所有