.

Visualizing Categorical Data (Repost)

作者:
Michael Friendly, "Visualizing Categorical Data"
ISBN :
出版日期:
2010-10-07 00:00:00
语言:
国家地区:
.
Chapter 7 Log-linear and Logit Models321Figure 7.25Empirical logits and log odds ratios for breathlessness and wheeze. The lines show separate linear regressions for each function.Empirical Logits4 3 Log Odds Ratio (B | W)/(B | noW)21 Log Odds0 -1-2Wheeze-3-4 -5 20Breathlessness3040 Age Group5060Plotting both logits and the log odds against age gives the graph shown in Figure 7.25. The plotting step is straight-forward and is not shown. Notice that both symptoms, while quite rare among young miners, increase steadily with age (or years working in the mine). There is a hint of curvilinearity, particularly in the logit for breathlessness. The decline in the odds ratio with age rects selection, as miners who had retired for health or other reasons were excluded from the study. You can ordinary log-linear models to this data as shown below, giving likelihoodratio goodness-of- G 2 values shown in Table 7.8. Note that in Models 0�, age is treated as a 9-level factor. In Models 3�, age is treated as a quantitative variable (symbolized as x in the model terms) by declaring AGE and AGE2 (x 2 ) in a DIRECT statement.13 PROC CATMOD does not allow quantitative variables to appear on the left-hand side in a MODEL statement. Consequently, these models are in a separate PROC CATMOD step, where they are expressed as _RESPONSE_*AGE and _RESPONSE_*AGE2 on the right-hand side.Table 7.8 Log-linear models to Ashford & Snowden dataModel 0 1 2 3 4Terms [B][W ][A] [BW ][A] [BW ][B A][W A] [BW ][Bx][W x] [BW ][Bx 2 ][W x 2 ]df 25 24 8 21 18G2 6939.07 2701.94 26.69 41.46 17.60p-value 0.0000 0.0000 0.0008 0.0049 0.4825G 2 /df 277.56 112.58 3.34 1.97 0.9713 In these model formulae, a term like [Bx 2 ] refers to a quadratic model, 1= 伪1 +尾11 x +尾11 x 2 in Equation 7.32.
本书内搜索
序号 页码 相关内容
您还未搜索