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: stsetting survival foreign affiliates


From   Kristel Van den Bergh <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: stsetting survival foreign affiliates
Date   Tue, 4 May 2010 12:14:23 +0200

Dear all,
For my research I have investigate on the  determinants of survival of foreign affiliates
I am using several publications of a survey which reports information on existing japanese affiliates in the US

My data looks as follows

aff_ID         year ---- birthday affiliate---- failure -----------   entry

1234           1990               1956                 0                            1
1234           1991               1956                 0                            0
1234           1992               1956                 1                            0

5678           1992               1978                 0                            1
5678           1993               1978                 0                            0
....               ...                   ...                     ...
5678           2008               1978                 0 (censored)          0


Interpretation:
Affiliate 1234 was born in 1956, and is listed in the first edition (1990).  We observe its existence untill 1992, this means the affiliate is no longer listed in te 1993 survey.
Affiliate 5678 was not observed in the 1990 and 1991 surveys, but was listed for the first time in 1992.
This affiliate was born in 1978. After 1992 the affiliate was reported in all the following surveys, untill 2008 (right censoring)

I created the failure variable, for indicating the year in which the failure occurred. The dummy entry variable indicates when the affiliate is first observed
The observation period runs from 1990 - 2008 (so we use 18 publications of the survey), however the affiliates become at risk starting from their birthday
We  also have cases of delayed entry (left truncation): for example  affiliate 5678 is observed for the first time in the 1992 survey.
If the affiliate is still reported in the 2008 survey, this means the affiliate does not fail throughout the observation period (right censoring)

Step 1: SNAPSPAN

snapspan aff_ID year failure entry, gen(date0)

here I assume that failure and entry are instanteneous variables.
we get the following result

aff_ID     date0   date1   birthday    entry     failure
1234          ....    1990       1956        1            0
1234          1990    1991      1956         0            0
1234          1991    1992      1956         0            1


Step 2: STSET THE DATA
stset  date1, id(aff_ID) failure(failure==1) origin (birthday) enter(yearlisted==1)

after stsetting i get

aff_ID     date0   date1   birthday    entry     failure   origin     _t0  _t      _d _st
1234           ....   1990    1956         1         0      1956     .        .      0   0
1234          1990    1991      1956        0          0      1956     34   35       0   1
1234          1991     1992      1956       0         1      1956     36    37        1   1

Do you think my method is correct, because when afterwards I run stcox afterwards, I get strange results. 
Best regards,
Kristel










*
*   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