Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: patterns of panel data (indicators of)

To   "Statalist@Hsphsun2.Harvard.Edu" <>
Subject   st: patterns of panel data (indicators of)
Date   Fri, 9 Aug 2002 16:16:11 -0400

Dear All,

I am working with panel data and I found the program xtpattern extremely useful.
Basically, it creates a string variable for each observation with the patterns
you would obtain by "xtdes" (describing) the data, sp say:
indicates that a unit of observation (say, a household) is present on time
periods 1,3 and 6.
What I need now is to know how many contiguous observations there are, so for
1.1..1 would be zero
111111 would be six
111.11  would be (perhaps) three (the max).

The obvious thing would be to parse through the string generated by xtpattern...
but I couldn't find an elegant way around this problem. Any ideas on this?

Thank you all


Guillermo Cruces

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index