Dear Mr. Schechter,
thank you so much! That was very helpful! I estimated it again -with the table option- and from what I make of it, the biggest difference is in the lowest group (it would expect about 1 case to have a yes and I have 9 cases), apart from that, the differences are relatively small (0-6 cases).
As the table option does not run with svy: i wrote a little program to feed the results from the svy logit model in a regular logit model and used the option then. If that´s ok and in case anyone else wants to try that this is the program I used
and this is my table
Thank you & all the best,
Katharina
thank you so much! That was very helpful! I estimated it again -with the table option- and from what I make of it, the biggest difference is in the lowest group (it would expect about 1 case to have a yes and I have 9 cases), apart from that, the differences are relatively small (0-6 cases).
As the table option does not run with svy: i wrote a little program to feed the results from the svy logit model in a regular logit model and used the option then. If that´s ok and in case anyone else wants to try that this is the program I used
PHP Code:
capture prog drop logit_post
prog logit_post, eclass
version 13
mat b1= e(b)
mat V1= e(V)
loc com= e(command)
qui: `com'
ereturn repost b=b1 V=V1, rename
end
PHP Code:
Logistic model for t_s, goodness-of-fit test
(Table collapsed on quantiles of estimated probabilities)
+--------------------------------------------------------+
Group Prob Obs_1 Exp_1 Obs_0 Exp_0 Total
-------+--------+-------+-------+-------+-------+-------
1 0.0103 9 0.9 115 123.1 124
2 0.0144 4 1.5 119 121.5 123
3 0.0183 2 2.0 122 122.0 124
4 0.0222 5 2.5 118 120.5 123
5 0.0270 4 3.1 120 120.9 124
-------+--------+-------+-------+-------+-------+-------
6 0.0313 4 3.6 119 119.4 123
7 0.0360 7 4.2 117 119.8 124
8 0.0404 2 4.7 121 118.3 123
9 0.0452 4 5.3 119 117.7 123
10 0.0514 6 6.0 118 118.0 124
-------+--------+-------+-------+-------+-------+-------
11 0.0579 3 6.7 120 116.3 123
12 0.0660 6 7.7 118 116.3 124
13 0.0755 6 8.7 117 114.3 123
14 0.0864 8 10.0 116 114.0 124
15 0.0980 9 11.3 114 111.7 123
-------+--------+-------+-------+-------+-------+-------
16 0.1089 6 12.8 117 110.2 123
17 0.1240 12 14.5 112 109.5 124
18 0.1406 8 16.3 115 106.7 123
19 0.1609 14 18.8 110 105.2 124
20 0.1856 16 21.3 107 101.7 123
-------+--------+-------+-------+-------+-------+-------
21 0.2115 25 24.7 99 99.3 124
22 0.2463 32 28.0 91 95.0 123
23 0.2908 39 32.9 84 90.1 123
24 0.3390 40 39.3 84 84.7 124
25 0.4028 43 45.6 80 77.4 123
-------+--------+-------+-------+-------+-------+-------
26 0.4913 46 55.0 78 69.0 124
27 0.5989 79 67.1 44 55.9 123
28 0.7335 85 82.8 39 41.2 124
29 0.8711 94 98.5 29 24.5 123
30 0.9999 113 115.9 10 7.1 123
+--------------------------------------------------------+
number of observations = 3703
number of groups = 30
Hosmer-Lemeshow chi2(28) = 109.26
Prob > chi2 = 0.0000
Katharina
Comment