1 / 48

有序多分类变量模型 ( Models for Ordinal Outcomes )

类别 资料 分析 Categorical Data Analysis 王德育 (T.Y. Wang) 伊利诺州立大学 (Illinois State University) tywang@ilstu.edu. 1. 有序多分类变量模型 ( Models for Ordinal Outcomes ). 如果变量具有两个以上的类别,虽然类别间的距离是未知数,但是这些类别具有大小或高低等级,可以依序排列,即为有序多分类变量. 3. 例如,收入可分为「上等水平」,「中等水平」与 「下等水平」。在抽样调查研究中,选项包括「非常同意」,「比较同意」,「不太同意」,与「很不同意」。

raleigh
Download Presentation

有序多分类变量模型 ( Models for Ordinal Outcomes )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 类别资料分析Categorical Data Analysis王德育(T.Y. Wang)伊利诺州立大学(Illinois State University)tywang@ilstu.edu 1

  2. 有序多分类变量模型 (Models for Ordinal Outcomes)

  3. 如果变量具有两个以上的类别,虽然类别间的距离是未知数,但是这些类别具有大小或高低等级,可以依序排列,即为有序多分类变量如果变量具有两个以上的类别,虽然类别间的距离是未知数,但是这些类别具有大小或高低等级,可以依序排列,即为有序多分类变量 3

  4. 例如,收入可分为「上等水平」,「中等水平」与 「下等水平」。在抽样调查研究中,选项包括「非常同意」,「比较同意」,「不太同意」,与「很不同意」。 • 应以有序多分类变量模型分析 4

  5. -∞ ∞ y* y 1 2 3 4 • 以Latent Variable Model(隐性变量模型)说明: 5

  6. Structural Model: 6

  7. 7

  8. Two Models for Ordinal Outcomes • ordered probit model(有序勝算對數模型) • ordered logit model(有序概率對數模型) 8

  9. 9

  10. 以『推广之线性模型』(Generalized Linear Model) 说明: • 随机部份(random component) • 系统部份 (system component) • 连接部份(link component) 10

  11. 随机部份: 随机部份指涉依变量 y,及其相关的概率分布。有序多分依变量之概率分布为多项(multinomial)分布 11

  12. 系统部份: 所有自变量的组合 • 连接部份:胜算对数 12

  13. Ordered logit model (有序胜算对数模型 ) 13

  14. 前述公式等於一组分析二分类变量的模型: 14

  15. Example: Mother’s relationship with her Child (职业妇女与亲子关系)(file name: ordwarm2) 15

  16. Hypothesis Testing • 置信区间,临界值,p值检定法 • test (testing effects of single e.g., test k5, or multiple coefficients being equal, e.g., test hc=wc) • lrtest:Comparing competitive (nested) models using LR test 16

  17. 四种解释方法: • predict指令计算预测概率 • prvalue或prtab指令计算『典型』(profile) • prchange指令计算依变量边际改变或固定值改变 • listcoef指令计算胜算比(odds ratio) 17

  18. Interpretation with listcoef (odds ratio – factor change coefficient): • 在其他变量不变的情况下, 变量每增加 δ 个单位,低类别的胜算与高类别相比后会改变 倍 18

  19. (listcoef continued) Note: odds ratio in Stata is based on 男性对职业妇女的亲子关系采较正面态度的胜算(或机率比)要比女性低 0.48倍 19

  20. The Parallel Regression Assumption (平行回归假设): • the slope coefficients are identical across each regression • if the assumption holds, the coefficients should be “close” 20

  21. 21

  22. The slop of the three probability curves at 0.5 is 22

  23. 平行回归假设的检定: • brant, detail 23

  24. 一个看似是有序多分类的变量,有时并不必然就适用有序胜算对数模型一个看似是有序多分类的变量,有时并不必然就适用有序胜算对数模型 • 如果检定的结果显示违反了平行回归的设定,另一个可能考量的是多项胜算对数模型 24

  25. if the proper ordering is ambiguous, models for nominal variables should be considered 25

  26. 有序多分类变量模型练习: • 抽烟习惯与健康状况的调查研究 • Stata数据库:smoking.dta

  27. 无序多分类变量模型(Models for Nominal Outcomes)

  28. 无序多分类变量:如果一个变量有两个以上的类别,但是这些类别不具有等级,因此无法按照顺序排列出高低先后,这就是无序多分类变量无序多分类变量:如果一个变量有两个以上的类别,但是这些类别不具有等级,因此无法按照顺序排列出高低先后,这就是无序多分类变量 28

  29. 例如,受访人的政治面貌可分为「中共党员」 、「民主党派」 、与「无党派」。工作单位性质可分为「党政机关」,「国有企业」 ,「集体企事业」 ,「个体经营」 ,「三资企业」 ,以及「其他企业」 29

  30. Assumed Level 30

  31. Multinominal logit model (MNLM多项胜算对数模型 ): the most frequently used nominal regression model • 以Generalized Linear Model说明,MNLM的连接函数为 31

  32. Formally, the MNLM can be written as: for m=1 to J where n is the base category (it is important to know which is the base category) 32

  33. 在其他变量保持不变的情况下, 每增加一个单位,类别 m 对比类别 n 的胜算对数便改变 个单位 33

  34. MNLM can be thought of as simultaneously estimating binary logits for all comparisons among the dependent categories 34

  35. Let occ3 be a nominal outcome with the categories M for manual jobs, W for white collar jobs, and P for professional jobs. Assuming there is a single independent variable ed measuring years of education, we can estimate three binary logits 35

  36. 36

  37. 当依变量有三个类别时,但是实际的计算上我们只须两个模型即可,因为当依变量有三个类别时,但是实际的计算上我们只须两个模型即可,因为 • ,即 37

  38. 因为每一个二分勝算對數模型仅使用相关类别中的案例,不相关类别中的案例则被排除在外。所以每一个二分勝算對數模型所使用的样本数都不相同。导出的回归系数与用多项胜算对数模型所计算的会有差异因为每一个二分勝算對數模型仅使用相关类别中的案例,不相关类别中的案例则被排除在外。所以每一个二分勝算對數模型所使用的样本数都不相同。导出的回归系数与用多项胜算对数模型所计算的会有差异 38

  39. 多项胜算对数模型中所有的系数都同时估计 • 当对照类别不同时,所估算的回归系数也会不同 39

  40. Example: Occupational Attainment(就业种类): (file name: nomocc2). 40

  41. Hypothesis Testing • 置信区间,临界值,p值检定法 • Because the dependent variable in MNLM involves more than one categories, testing groups of coefficients is required 41

  42. Using test and lrtest to test groups of coefficients could be tedious. The mlogtest makes the task simple • Tests for combining dependent categories: mlogtest 42

  43. 四种解释方法: • predict指令计算预测概率 • prvalue或prtab指令计算『典型』(profile) • prchange指令计算依变量边际改变或固定值改变 • listcoef指令计算胜算比(odds ratio) 43

  44. Interpretation with listcoef (odds ratio – factor change coefficient): • 当某自变量 每增加 单位时,类别 m的胜算在与类别 n对比后会依照下列公式改变 44

  45. 如果 为1时, 在其他变量不变的情况下,变量 每增加一个单位,类别 m的胜算在与类别 n 对比后会改变 • 倍 45

  46. 不相关选项独立性的假定(Independence of Irrelevant Alternative, IIA) 这表示类别 m 与类别 n 对比后的胜算不会受到其他类别的影响 46

  47. 检定IIA • mlogtest, hausman base • mlogtest, smhsiao • 这两种检定法并不可靠,所得的结果往往相互抵触 • IIA假定的检定,最终仍在使用者的主观判断 47

  48. 无序多分类变量模型练习: • 抽烟习惯与健康状况的调查研究 • Stata数据库:smoking.dta

More Related