Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Maria Dolores Montoya Diaz" <madmdiaz@usp.br> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Time-span database, stset or snapspan problem |
Date | Mon, 3 May 2010 12:14:59 -0300 |
Dear all, My original database has the following firms information: var1= firm code, var2 = opening date, var3 = date of the balance sheet of financial information (quarterly data: trim1/1995 to trim 2/2009), var4-var20 = financial indicators at different periods, var21= dummy (1= firm closed, 0= firm in operation), var22=closing date or date of last financial information available. Example from two companies(var1==1 and var1==2): +--------------------------------------------------------------------------- -----+ | var1 var2 var3 var4 ... var20 var21 var22 | |--------------------------------------------------------------------------- -----| 1. | 1 30jun1994 30mar1995 161.1933 .0062037 0 20mar1998 | 2. | 1 30jun1994 30jun1995 255.4849 .0039141 0 20mar1998 | 3. | 1 30jun1994 30sep1995 6.106456 .1637611 0 20mar1998 | : : 12. | 1 30jun1994 30dec1997 264.0175 .0037876 1 20mar1998 | 13. | 2 06jun1994 30mar1995 .0717944 13.92866 0 30jun2009 | 14. | 2 06jun1994 30jun1995 .0544895 18.35216 0 30jun2009 | : : 70. | 2 06jun1994 30jun2009 .0642468 15.56499 0 30jun2009 | |--------------------------------------------------------------------------- -----| The first company closed in 20mar1998 and the last financial information is from 30dec1997. The second one remains in operation and the var22 is equal var3 for the last observation available - 30jun2009. The following Snapspan command(Stata 11) was used: snapspan var1 var3 var2 var22 var21 var4-var20, generate(data0) replace After, the stset command: stset var3, id(var1) origin(time var2) failure(var21==1) So, the variable survival was calculated for all companies - closed and in operation - as the date of the last financial information (var3) - (var2) opening date. I do not have var4-var20 at closing date from closed firms. How do I get the correct time-span database? Is it necessary to add an additional line for closed firms to include in var3 the closing date? In this case, var4-var20 will be missing? Is it possible to apply snapspan options to have this solution? Thanks, Dolores ____________________________________________________________________________ ______ Maria Dolores Montoya Diaz University of São Paulo - Brazil FEA-RP/USP - Ribeirão Preto School of Economics, Administration and Accounting Departament of Economics e-mail: madmdiaz@usp.br ____________________________________________________________________________ ______ * * 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/