Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Programming help


From   Sergio Prada <[email protected]>
To   [email protected]
Subject   st: Programming help
Date   Wed, 5 Jan 2011 18:41:20 -0500

Thanks Sergiy, please see answers to your questions below

1) what do you want your flag to be if there is a partial overlap?
E.g. claim1 starts 10dec and lasts till 20dec, claim 2 starts 15 dec
and lasts till 25dec.

flag= 1

2)  is cid assigned chronologically? can there be duplicates (two
claims with the same date).

cid is not in the original data, I created cid using "sort from_dt
thru_dt" and then "by pid: gen cid=_n"

3) if periods coincide how do you want to resolve the flag? (c1:
10th-20th and c2: 10th-20th,
should the flag for c1 be 1 or for c2 be 1?)

flag=1

4) in the example you illustrate the claims form chains, so that one
claim starts next day after another ends. is that a specific pattern
you are looking for?

that is the typical pattern in these data, altough some claims start
several days after the previous,

Essentially what I am looking for is code that allow me to compare,
within each pid, pairs of claims against certain condition.
For instance, knowing start and thru date of cid1, compare that to the
start and thru date of cid2, cid3, cid4, cid5, cid6 and cid7 and flag
when both are the same. Then knowing start and thru date of cid2,
compare that to the start and thru date of cid3, cid4, cid5, cid6 and
cid7.

Sergio
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index