Hi,
I have a panel of firms from 2011-2015 (please refer to the sample dataset attached to the post), with panel id "cocode" and year "Year". I wish to find how is the regime of the firm changing from one year to another i.e. want to know
how many of firms in regime 0 in 2011 moved to regime 2 in 2012
how many of firms in regime 2 in 2011 moved to regime 0,1, 2 in 2014
how many of firms in regime 1 in 2011 move to regime 2 in 2013
(a) which commands can be used in stata for this. I have used xttrans, but I am unsure if that is the correct way to come up with transition probabilities. I would be very grateful if someone can help me with this.
(b) I also want to know how is transition matrix calculated in stata if we use xttrans command i.e. for calculating transition matrix from 2011 to 2014. Is stata taking the data only for 2011 and 2015 or it is taking data for 2011,2012, 2013, 2014 to calculate transition matrix from 2011 to 2014?
(c) what is the role of delta in xtset while finding these transition matrices?
(d) How is missing values treated by stata?
Example generated by -dataex-. To install: ssc install dataex
clear
input float(cocode Year regime)
1 2011 1
1 2012 1
1 2013 .
1 2014 1
1 2015 1
2 2011 2
2 2012 2
2 2013 0
2 2014 0
2 2015 1
3 2011 1
3 2012 1
3 2013 .
3 2014 2
3 2015 .
4 2011 1
4 2012 1
4 2013 1
4 2014 0
4 2015 2
5 2011 2
5 2012 2
5 2013 2
5 2014 0
5 2015 0
end
I will really be grateful if someone can help me with this.
I have a panel of firms from 2011-2015 (please refer to the sample dataset attached to the post), with panel id "cocode" and year "Year". I wish to find how is the regime of the firm changing from one year to another i.e. want to know
how many of firms in regime 0 in 2011 moved to regime 2 in 2012
how many of firms in regime 2 in 2011 moved to regime 0,1, 2 in 2014
how many of firms in regime 1 in 2011 move to regime 2 in 2013
(a) which commands can be used in stata for this. I have used xttrans, but I am unsure if that is the correct way to come up with transition probabilities. I would be very grateful if someone can help me with this.
(b) I also want to know how is transition matrix calculated in stata if we use xttrans command i.e. for calculating transition matrix from 2011 to 2014. Is stata taking the data only for 2011 and 2015 or it is taking data for 2011,2012, 2013, 2014 to calculate transition matrix from 2011 to 2014?
(c) what is the role of delta in xtset while finding these transition matrices?
(d) How is missing values treated by stata?
Example generated by -dataex-. To install: ssc install dataex
clear
input float(cocode Year regime)
1 2011 1
1 2012 1
1 2013 .
1 2014 1
1 2015 1
2 2011 2
2 2012 2
2 2013 0
2 2014 0
2 2015 1
3 2011 1
3 2012 1
3 2013 .
3 2014 2
3 2015 .
4 2011 1
4 2012 1
4 2013 1
4 2014 0
4 2015 2
5 2011 2
5 2012 2
5 2013 2
5 2014 0
5 2015 0
end
I will really be grateful if someone can help me with this.
Comment