Ordered Logistic Regression


ตัวแปรตาม y เป็นแบบมีได้มากกว่า 2 ค่า (1, 2, 3, ...) และเรียงลำดับได้ ใช้ Ordered Logistic Regression

Ordered Logistic Regression

ตัวแปรต้น มี 1 ตัวแปรหรือมีหลายตัวแปร เป็นแบบมีได้ 2 ค่า (0, 1) แบบมีได้หลายค่า หรือแบบ Continuous

1) ตัวแปรตาม y เป็นแบบมีได้ 2 ค่า (0, 1) ใช้ Binary Logistic Regression
2) ตัวแปรตาม y เป็นแบบมีได้มากกว่า 2 ค่า (1, 2, 3, ...) และเรียงลำดับได้ ใช้ Ordered Logistic Regression
3) ตัวแปรตาม y เป็นแบบตัวแปรกลุ่ม มีได้มากกว่า 2 ค่า (1, 2, 3, ...) ใช้ Multinomial Logistic Regression

(binomial) logistic regression ใช้คำสั่ง logit y x1 x2 x3
ordered logistic regression ใช้คำสั่ง ologit y x1 x2 x3
multinomial logistic regression ใช้คำสั่ง mlogit y x1 x2 x3

ถ้าหากตัวแปร y ซึ่งมีได้มากกว่า 2 ค่า (1, 2, 3, ...)
ตัวเลขเป็นชื่อ code หมายถึงจัดเรียงตัวแปรจากน้อยไปมาก
แต่จัดกลุ่มให้ y มี 2 ค่า (0, 1) คำสั่ง logit, ologit, molgit จะได้ค่าเดียวกัน


"Logistic Regression with Ordered-Category y
logit and logistic fit models for variables with two outcomes, coded 0 and 1.
We need other methods for models in which y takes on more than two values.
Two important possibilities are ordered and multinomial logistic regression.
ologit Ordered logistic regression, where y is an ordinal (ordered-category) variable.
The numeric values representing the categories do not matter,
except that higher numbers mean "more."
For example, the y categories might be {1 = "poor," 2 = "fair," 3 = "excellent"}.
mlogit Multinomia llogistic regression, where y has multiple but unordered categories
such as {1 = "Democrat" 2 = "Republican," 3 = "other"}."
Source : Lawrence C. Hamilton. Statistics with STATA, Updated for Version 12. p268



webuse fullauto

เปิดไฟล์ fullauto.dta จาก website ข้อมูล มีจำนวน 66 Obsrvations

ตัวแปรตาม rep77 ผลการซ่อมที่บันทึกไว้ (poor, fair, average, good, excellence)
มีลักษณะ Ordered จัดเรียงลำดับได้

ตัวแปรต้น foreign, length, mpg
(domestic, foreign) ผลิตในประเทศ หรือ ต่างประเทศ มีได้ 2 ค่า Dichotomous
length ความยาว (Inches) ตัวแปร Continuous
mpg (Miles Per Gallon) ตัวแปร Continuous



repair record มี 74 บรรทัด แต่บันทึกไม่ครบ มี missing ที่บันทึกไว้มี 66 Observations
(domestic, foreign) มี 74 Observations



ologit [depvar] [indepvars] [, options]
เพิ่ม option or ต่อท้าย คำสั่ง ologit
reports the estimated coefficients transformed to odds ratios,
i.e., exp(b) rather than b.
Standard errors and confidence intervals are similarly transformed.
This option affects how results are displayed, not how they are estimated.
or may be specified at estimation or when replaying previously estimated results.


rep77 = Coef_Cut# + 2.89 foreign + 0.082 length + 0.23 mpg
1) Prob > chi 2 < 0.0001 หมายถึง Log likelihood (-2LL) มีค่าน้อย
2) Wald p-value คือ P > |Z| < 0.001 หมายถึงใช้ตัวแปรต้น predict ตัวแปรตามได้
3) Pseudo R Square = 0.1295 หมายถึงสมการ predict ตัวแปรตามได้ 12.95 %


[depvar]

เช่น รายงานผลการซ่อมแซม (poor, fair, average, good, excellence) วิธีเดิมก็มักจะยุบกลุ่มไปรวมกัน
หรือจัดแบ่งกลุ่มใหม่ให้เหลือ เพียง 2 กลุ่ม และใช้ ฺBinary logistic regression
ปัจจุบันถ้ายังคงมากกว่า 2 กลุ่ม และถ้าจัดเรียงลำดับได้ อาจจะใช้วิธี Ordinal Logistic Regression
ในตัวอย่างนี้ ตัวแปรตาม [depvar] คือ rep77 (poor, fair, average, good, excellence)
ตัวแปรต้น [indepvars] คือ foreign, length, mpg

Ordinal logistic regression
ใช้สำหรับ Cohort study วัดปัจจัยเสี่ยงกับการเกิดโรค ไม่สามารถใช้กับ Cross-sectional study
สิริมา มงคลสัมฤทธิ์, จุฬาลักษณ์ โกมลตรี. Ordinal logistic regression model (proportional odds model).
DMBN E Journal 2548;1(3):75-84.



Link : https://dl.dropboxusercontent.com/u/1999671/EPI_56/logistic/ologit.htm


หมายเลขบันทึก: 583341เขียนเมื่อ 1 มกราคม 2015 23:54 น. ()แก้ไขเมื่อ 6 มกราคม 2015 13:02 น. ()สัญญาอนุญาต: ครีเอทีฟคอมมอนส์แบบ แสดงที่มา-ไม่ใช้เพื่อการค้า-ไม่ดัดแปลงจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

อนุญาตให้แสดงความเห็นได้เฉพาะสมาชิก
พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท