Hi,
I've found a code for generating Markov Probabilities, which was written by Nicholas Cox (maybe he can help?): https://ideas.repec.org/c/boc/bocode...tml#statistics
I want to analyze the mobility table for the class of sons and fathers. Where both of them can be in 4 classes (class 1: unskilled workers, class 2: skilled workers ...)
My data are stored the following:
Explanation of Variables:
- every row shows a father-son combination (class of father and class of son)
- Family ID: Is a family identifier, shows to which family they belong to (Just added here to show that my data set contains more variables than only class father and class son)
- Class father: Shows the class the father belongs to (possible classes are 1 to 4)
- Class son: Shows the class the son belongs to (possible classes are 1 to 4)
I want to have the transition probabilities between the class of father and class of son (4*4 Matrix) I also need a matrix, since at the end I also want to compare Altham statistics, because I analyze the same thing for grandfathers and grandsons. So I can compare at the end if there are differences between father-son and grandfather-son.
With the code presented by Nicholas Cox I wasn't able to use this code to get the transition probabilities (since it calcuates it in another way, as I understood it takes the transition within a column, whats not what I want. Since I need the transition between the row class father and class son).
Every support is highly appreciated
I've found a code for generating Markov Probabilities, which was written by Nicholas Cox (maybe he can help?): https://ideas.repec.org/c/boc/bocode...tml#statistics
I want to analyze the mobility table for the class of sons and fathers. Where both of them can be in 4 classes (class 1: unskilled workers, class 2: skilled workers ...)
My data are stored the following:
Explanation of Variables:
- every row shows a father-son combination (class of father and class of son)
- Family ID: Is a family identifier, shows to which family they belong to (Just added here to show that my data set contains more variables than only class father and class son)
- Class father: Shows the class the father belongs to (possible classes are 1 to 4)
- Class son: Shows the class the son belongs to (possible classes are 1 to 4)
Family ID | Class father | Class son |
1 | 2 | 3 |
1 | 2 | 1 |
1 | 2 | 2 |
2 | 4 | 1 |
3 | 3 | 3 |
3 | 3 | 4 |
With the code presented by Nicholas Cox I wasn't able to use this code to get the transition probabilities (since it calcuates it in another way, as I understood it takes the transition within a column, whats not what I want. Since I need the transition between the row class father and class son).
Every support is highly appreciated
Comment