SAS file for linear-by-linear association with Table 7.3 data sex; input premar birth count @@; assoc = premar*birth; cards; 1 1 38 1 2 60 1 3 68 1 4 81 2 1 14 2 2 29 2 3 26 2 4 24 3 1 42 3 2 74 3 3 41 3 4 18 4 1 157 4 2 161 4 3 57 4 4 36 ; proc genmod; class premar birth; model count = premar birth / dist=poi link=log obstats; run; proc genmod; class premar birth; model count = premar birth assoc / dist=poi link=log obstats; run; -------------------------------------------------------------- The GENMOD Procedure Criteria For Assessing Goodness Of Fit Model Information Criterion DF Value Value/DF Deviance 9 127.6529 14.1837 Data Set WORK.SEX Scaled Deviance 9 127.6529 14.1837 Distribution Poisson Pearson Chi-Square 9 128.6836 14.2982 Link Function Log Scaled Pearson X2 9 128.6836 14.2982 Dependent Variable count Log Likelihood 2983.6850 Observations Used 16 Class Level Information Class Levels Values premar 4 1 2 3 4 birth 4 1 2 3 4 Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 4.2566 0.0874 4.0853 4.4280 2370.81 <.0001 premar 1 1 -0.5092 0.0805 -0.6670 -0.3514 40.00 <.0001 premar 2 1 -1.4860 0.1148 -1.7111 -1.2609 167.47 <.0001 premar 3 1 -0.8538 0.0903 -1.0307 -0.6769 89.48 <.0001 premar 4 0 0.0000 0.0000 0.0000 0.0000 . . birth 1 1 0.4565 0.1014 0.2579 0.6552 20.29 <.0001 birth 2 1 0.7118 0.0968 0.5221 0.9016 54.05 <.0001 birth 3 1 0.1886 0.1072 -0.0216 0.3988 3.09 0.0786 birth 4 0 0.0000 0.0000 0.0000 0.0000 . . Scale 0 1.0000 0.0000 1.0000 1.0000 The GENMOD Procedure Observation Statistics Observation count premar birth Pred Xbeta Std HessWgt Lower Upper Resraw Reschi Resdev StResdev StReschi Reslik 1 38 1 1 66.951404 4.203967 0.0833831 66.951404 56.856996 78.837977 -28.9514 -3.53826 -3.85459 -5.272327 -4.83965 -5.075509 2 60 1 2 86.423326 4.4592576 0.0778145 86.423326 74.198512 100.66228 -26.42333 -2.842314 -3.009499 -4.358852 -4.116706 -4.233864 3 68 1 3 51.213823 3.9360095 0.0904268 51.213823 42.8959 61.144671 16.786177 2.345623 2.2323542 2.9281355 3.0767079 2.9912522 4 81 1 4 42.411447 3.7474183 0.0962184 42.411447 35.122212 51.213485 38.588553 5.92539 5.2575557 6.7462479 7.6031816 7.0950697 5 14 2 1 25.208423 3.2271782 0.1168625 25.208423 20.048051 31.697076 -11.20842 -2.232398 -2.439152 -3.012142 -2.756819 -2.926758 6 29 2 2 32.539957 3.4824688 0.1129566 32.539957 26.077631 40.603718 -3.539957 -0.620568 -0.632363 -0.826907 -0.811484 -0.820539 7 26 2 3 19.282937 2.9592206 0.1219881 19.282937 15.182269 24.491179 6.7170626 1.5296526 1.4516962 1.7191596 1.8114788 1.7461502 8 24 2 4 15.968683 2.7706295 0.1263411 15.968683 12.466006 20.455536 8.0313174 2.0097972 1.8691535 2.1653882 2.328322 2.208061 9 42 3 1 47.435205 3.8593647 0.0928355 47.435205 39.543858 56.901345 -5.435205 -0.789161 -0.805 -1.046972 -1.026372 -1.0386 10 74 3 2 61.231102 4.1146553 0.087868 61.231102 51.544065 72.738691 12.768898 1.6318018 1.5795123 2.1752831 2.2472954 2.2096196 11 41 3 3 36.285097 3.5914071 0.0992104 36.285097 29.873096 44.073379 4.7149028 0.7827239 0.7666295 0.9561554 0.9762287 0.9633725 12 18 3 4 30.048596 3.4028159 0.1045164 30.048596 24.48272 36.879814 -12.0486 -2.197983 -2.376805 -2.899926 -2.681746 -2.830165 13 157 4 1 111.40497 4.7131719 0.0730564 111.40497 96.542562 128.55539 45.595032 4.319816 4.0663418 6.3864478 6.7845451 6.6260379 14 161 4 2 143.80562 4.9684625 0.0666303 143.80562 126.2002 163.86706 17.194384 1.4338335 1.4065963 2.3392605 2.3845577 2.36828 15 57 4 3 85.218143 4.4452144 0.0810031 85.218143 72.707977 99.880813 -28.21814 -3.056767 -3.254181 -4.901184 -4.603856 -4.737231 16 36 4 4 70.571275 4.2566232 0.0874213 70.571275 59.458618 83.760857 -34.57127 -4.115299 -4.547422 -6.700002 -6.063329 -6.364535 The GENMOD Procedure Model Information Data Set WORK.SEX Distribution Poisson Link Function Log Dependent Variable count Observations Used 16 Class Level Information Class Levels Values premar 4 1 2 3 4 birth 4 1 2 3 4 Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance 8 11.5337 1.4417 Scaled Deviance 8 11.5337 1.4417 Pearson Chi-Square 8 11.5085 1.4386 Scaled Pearson X2 8 11.5085 1.4386 Log Likelihood 3041.7446 Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 8.0699 0.3741 7.3366 8.8031 465.30 <.0001 premar 1 1 -2.5338 0.2226 -2.9702 -2.0975 129.53 <.0001 premar 2 1 -2.7506 0.1680 -3.0800 -2.4213 267.99 <.0001 premar 3 1 -1.4455 0.1052 -1.6516 -1.2394 188.96 <.0001 premar 4 0 0.0000 0.0000 0.0000 0.0000 . . birth 1 1 -1.8797 0.2491 -2.3679 -1.3914 56.94 <.0001 birth 2 1 -0.7245 0.1620 -1.0420 -0.4070 20.00 <.0001 birth 3 1 -0.4641 0.1195 -0.6984 -0.2298 15.08 0.0001 birth 4 0 0.0000 0.0000 0.0000 0.0000 . . assoc 1 -0.2858 0.0282 -0.3412 -0.2305 102.46 <.0001 Scale 0 1.0000 0.0000 1.0000 1.0000 The GENMOD Procedure Observation Statistics Observation count assoc premar birth Pred Xbeta Std HessWgt Lower Upper Resraw Reschi Resdev StResdev StReschi Reslik 1 38 1 1 1 29.09363 3.3705192 0.1355054 29.09363 22.307738 37.943753 8.9063702 1.651208 1.5761806 2.309459 2.4193911 2.3688205 2 60 2 1 2 69.395738 4.2398255 0.0875855 69.395738 58.44938 82.392122 -9.395738 -1.127884 -1.154889 -1.688806 -1.649316 -1.6679 3 68 3 1 3 67.654059 4.2144074 0.0903496 67.654059 56.674562 80.760602 0.3459409 0.0420586 0.0420229 0.0628021 0.0628555 0.0628316 4 81 4 1 4 80.856575 4.3926769 0.0981162 80.856575 66.711187 98.00134 0.143425 0.0159502 0.0159455 0.0338722 0.0338822 0.03388 5 14 2 2 1 17.599963 2.8678968 0.1278748 17.599963 13.698233 22.613039 -3.599963 -0.858108 -0.89018 -1.054812 -1.016809 -1.044017 6 29 4 2 2 31.5435 3.4513675 0.1136913 31.5435 25.242693 39.417046 -2.5435 -0.452873 -0.459174 -0.596642 -0.588456 -0.593318 7 26 6 2 3 23.1065 3.140114 0.1221169 23.1065 18.188133 29.354874 2.8934997 0.6019444 0.5899948 0.7287643 0.7435245 0.7338838 8 24 8 2 4 20.750038 3.0325481 0.1261186 20.750038 16.205652 26.568759 3.2499622 0.7134587 0.6959541 0.8502739 0.87166 0.8573913 9 42 3 3 1 48.773151 3.88718 0.0935202 48.773151 40.604696 58.584857 -6.773151 -0.969841 -0.993696 -1.312242 -1.280739 -1.298897 10 74 6 3 2 65.681367 4.1848153 0.0878013 65.681367 55.297514 78.015116 8.3186329 1.0264336 1.0058363 1.431575 1.4608906 1.446493 11 41 9 3 3 36.151783 3.5877263 0.0997549 36.151783 29.731592 43.958339 4.8482173 0.8063382 0.7892537 0.9863731 1.0077244 0.994107 12 18 12 3 4 24.3937 3.1943249 0.1130262 24.3937 19.546528 30.442879 -6.3937 -1.294534 -1.35834 -1.637181 -1.560277 -1.613609 13 157 4 4 1 155.53326 5.0468596 0.0724399 155.53326 134.94671 179.26036 1.4667415 0.1176094 0.1174252 0.2738738 0.2743033 0.2742244 14 161 8 4 2 157.3794 5.0586594 0.0664288 157.3794 138.16676 179.26362 3.6206042 0.2886072 0.287511 0.5201584 0.5221415 0.5215364 15 57 12 4 3 65.087658 4.1757349 0.0903959 65.087658 54.51971 77.704067 -8.087658 -1.002475 -1.024391 -1.49719 -1.465159 -1.48024 16 36 16 4 4 32.999688 3.4964981 0.1332415 32.999688 25.415256 42.84747 3.0003115 0.5222897 0.5146608 0.7997309 0.8115853 0.806697