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]

Re: st: Dropping overlapped spells in duration data


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Dropping overlapped spells in duration data
Date   Sat, 25 May 2013 17:55:53 +0100

-onespell- from SSC may be what you seek.

However, be careful.

Consider 888: the data appear to be saying that Y = 1 in 1985-89 and Y
= 0  in 1986-98.

That's not redundant: that's contradictory.

Spelling is Stata: see FAQ.

Nick
njcoxstata@gmail.com


On 25 May 2013 16:18, Kai Huang <demonsecret@hotmail.com.hk> wrote:
> Dear all,
>
> I have a spell dataset with some overlapped spells as follows:
>
> ID   Start   End     Y     X
> 888 1981   1985    1      0
> 888 1985   1989    1      1
> 888 1986   1988    0      0
> 888 1989   1991    1      0
> 888 1991   1995    0      1
> 889 1987   1992    0      1
> 889 1992   1996    1      1
>
> A spell of ID 888 starting from 1986 is overlapped with other spell and seems to be redundant. Are there any commands in STATA which can help to drop overlapped spell in this case? Thank you very much in advance.
>
> Best regards,
> Kai Huang
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index