For my PhD thesis, i am studying the survival of firms in export destination by using characteristics of both firm and destination. My data is a panel in which each observation indicates the export performed to a specific export partner in that year. Each firm-partner observation is repeated once in a year. If firm did not exported in a specific year or a partner, there is no observation.
I can not share my data because firm level data is not allowed to be shared without the permission of statistical institute. But you can find a very small example of how the data looks. The number in id is the firm_id and the next three letters is iso3 code of destination. The time interval of my data is 2009-2019 and it is annual.
I know that i need to transform the data so that it can be used in survival analysis. The event in my data is quit exporting and repeated for some firms. Some firms also did not exported in some years so there are gaps in intervals.
Some of my variables are also time-varying (both firm and destination characteristics) and changes each year.
year id export
2009 1FRA 1
2010 1FRA 1
2012 1FRA 1
2013 1FRA 1
2015 1FRA 1
2009 1USA 1
2010 1USA 1
2011 1USA 1
2010 1ITA 1
2011 1ITA 1
2010 2DEU 1
2011 2DEU 1
2012 2DEU 1
2017 2DEU 1
2010 2FRA 1
2011 2FRA 1
2009 2GBR 1
2010 2GBR 1
2011 2GBR 1
My question is can I divide the intervals yearly such as;
id begin. end. event spell spell_duration
1FRA. 2009 2010 0 1 1
1FRA. 2010 2011 1 1 1
or should it look like this;
id begin. end. event spell spell_duration
1FRA. 2009 2010 0 1 1
1FRA. 2009 2011 0 1 2
I want to divide the data yearly to incorporate time varying covariates such as firm revenue or destination countries GDP.
And also if i transform my year as starting from 0, does 2009 is 0?
Thank you so much for your interest and help in advance,
I have not tried any estimation method yet, cause i am still searching the right format for the data.
Cemre Küçük Pekmezci is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.