Hello everyone,
I am studying on survival of firms in export between 2009-2019. My data is yearly and i have kept the data that way because there are many time varying variables in my data that i did not included here . As you can see, there are time gaps (discontinuous risk intervals) because some firms do not export in some years. There are also multiple failures and firms that started to export after 2009. When i search for the best stset option to introduce the my data to Stata, i have seen the code below but i have learned there are other options such as enter and origin. Can use the code below to set data as survival? Also do ı need to transform my t_start and t_end variable as 0,1,2 instead of 2008,2009?
Thank you so much for your help,
Cemre
I am studying on survival of firms in export between 2009-2019. My data is yearly and i have kept the data that way because there are many time varying variables in my data that i did not included here . As you can see, there are time gaps (discontinuous risk intervals) because some firms do not export in some years. There are also multiple failures and firms that started to export after 2009. When i search for the best stset option to introduce the my data to Stata, i have seen the code below but i have learned there are other options such as enter and origin. Can use the code below to set data as survival? Also do ı need to transform my t_start and t_end variable as 0,1,2 instead of 2008,2009?
Code:
stset t_end, fail (fail) exit (t_end .) id(id) time0(t_start)
Code:
id t_start t_end fail interval 1 2008 2009 0 1 1 2009 2010 0 2 1 2010 2011 1 3 1 2015 2016 0 4 1 2016 2017 0 5 1 2017 2018 1 6 2 2008 2009 0 1 2 2009 2010 0 2 2 2010 2011 0 3 2 2011 2012 1 4 3 2009 2010 0 1 3 2010 2011 0 2 3 2011 2012 1 3 4 2009 2010 0 1 4 2010 2011 0 2 4 2011 2012 0 3 4 2012 2013 1 4 4 2016 2017 0 5 4 2017 2018 1 6 5 2009 2010 0 1 5 2010 2011 0 2 5 2011 2012 1 3
Thank you so much for your help,
Cemre