Dear Stata users,
My question is about mobility table analysis, and the relevant commands including -poisson-, -glm-, and -loglin- (SSC). I want to replicate the result of John Goldthorpe who used level matrix or design matrix in fitting partitioning models (or called topological models). The model tells us that the log likelihood ratio, i.e. G2 = 351 with 31 degrees of freedom. How can I fit this model and get significance test results in Stata? Thank you very much.
My question is about mobility table analysis, and the relevant commands including -poisson-, -glm-, and -loglin- (SSC). I want to replicate the result of John Goldthorpe who used level matrix or design matrix in fitting partitioning models (or called topological models). The model tells us that the log likelihood ratio, i.e. G2 = 351 with 31 degrees of freedom. How can I fit this model and get significance test results in Stata? Thank you very much.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(father son count levels) 1 1 311 2 1 2 130 2 1 3 79 1 1 4 53 1 1 5 33 1 1 6 37 1 1 7 45 1 2 1 161 2 2 2 128 2 2 3 66 1 2 4 39 1 2 5 53 1 2 6 59 1 2 7 48 1 3 1 128 1 3 2 109 1 3 3 89 3 3 4 54 1 3 5 89 1 3 6 108 1 3 7 117 1 4 1 167 1 4 2 151 1 4 3 106 1 4 4 324 4 4 5 116 1 4 6 192 1 4 7 273 1 5 1 154 1 5 2 147 1 5 3 109 1 5 4 83 1 5 5 170 5 5 6 229 1 5 7 190 1 6 1 202 1 6 2 228 1 6 3 216 1 6 4 170 1 6 5 319 1 6 6 788 6 6 7 671 6 7 1 162 1 7 2 194 1 7 3 205 1 7 4 164 1 7 5 311 1 7 6 587 6 7 7 870 6 end label values father class label values son class label def class 1 "I", modify label def class 2 "II", modify label def class 3 "III", modify label def class 4 "IV", modify label def class 5 "V", modify label def class 6 "VI", modify label def class 7 "VII", modify */ Show the Intergenerational class mobility tabulate father son [fw=count] */ Show the Levels matrix (design matrix) for model tabulate father son [fw=levels]
Comment