ดาวน์โหลดงานนำเสนอ
งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ
1
Binary regression: Logit and Probit Models
5 Modified Version by Woraphon Yamaka
2
ทำไมเราต้องใช้ Binary regression?
เนื่องจากในหลายๆการศึกษาหรืองานวิจัย ตัวแปรตามหรือ Y ในบางครั้งมี ลักษณะที่ไม่ใช่ค่าที่เป็นตัวเลขสุ่มหรือตัวเลขทั่วไป เช่น การศึกษาปัจจัยที่ ส่งผลต่อการตัดสินใจซื้อ ซึ่งกรณีนี้ Y คือ ซื้อ และ ไม่ซื้อ แค่ 2 ทางเลือก ดังนั้นลักษณะข้อมูล Y ไม่มีลักษณะแบบต่อเนื่อง หรือ ลักษณะแบบแจกแจง ปกติ (distributed normally) ดังนั้นตัวแปร Y จึงมีลักษณะเป็นข้อมูลเชิงคุณภาพ ดังนั้น เราต้องแปลง ข้อมูลนี้ให้อยู่ในรูปของตัวเลข (ตัวแปร dummy) เช่น ซื้อ (Y=1) ไม่ ซื้อ (Y=0) เป็นต้น
3
ตัวอย่างการลงข้อมูล X Y
4
ทำไมเราไม่ใช้แบบจำลอง Linear regression ?
5
Comparing Linear Regression and Binary Regression Models
Linear Regression Model 1 Binary Regression Model Nonlinear models for binary response
6
Logit and Probit models for Binary choice Model
ปัจจุบันแบบจำลอง Binary choice regression มี 2 แบบจำลอง คือ 1) Logit regression 2) Probit regression ความน่าจะเป็นสะสม (cumulative distribution function : CDF) ซึ่งเป็นฟังก์ชันที่ทำให้สมการอยู่ในช่วง 0-1 นั่นเองทำให้เราสามารถประมาณค่า Yที่อยู่ในช่วง 0-1 ความน่าจะเป็นที่ Y=1 logit and probit models overcome the shortcomings of the LPM; the disadvantage is that they are more difficult to interpret. In the LPM, we assume that the response probability is linear in a set of parameters. To avoid the LPM limitations, consider a class of binary response models of the form: where G is a function taking on values strictly between zero and one: 0<G(z)<1, for all real numbers z. This ensures that the estimated response probabilities are strictly between zero and one.
7
Logit and Probit distribution
Cumulative Distribution Function : CDF ของ Logit และ Probit
8
Logit and Probit models for binary response
Cumulative Distribution Function : CDF ของ Logit และ Probit ดังนั้นสมการแบบจำลอง Logit และ Probit Probit: (normal distribution) Logit: (logistic function) whereas Various nonlinear functions have been suggested for the function G to make sure that the probabilities are between zero and one. The two we will cover here are used in the vast majority of applications (along with the LPM) In the logit model, G is the logistic function; This is the cumulative distribution function (cdf) for a standard logistic random variable. In the probit model, G is the standard normal cdf. Logit and probit models can be derived from an underlying latent variable model. and
9
Logit and Probit models for binary response
เพิ่มเติม: logistic และ normal distribution ทำให้เราสมารถสร้างสมการ probability ได้ ซึ่ง เป็นทางเดียวที่ทำให้ Y อยู่ในช่วง 0-1 ถ้า X =0, ดังนั้น p = .50 ยิ่งค่า X สูงขึ้น, p จะเข้าใกล้ 1 มากขึ้น ยิ่งค่า X ต่ำขึ้น, p จะเข้าใกล้ 0 มากขึ้น
10
การประมาณ
11
Logit and Probit models for binary response
Maximum likelihood estimation ของแบบจำลอง Logit และ Probit ดังนั้นเราสามารถสร้างสมการ log-likelihood ได้ดังนี้ ความน่าจะเป็นของคนที่ตอบ yi =0 โดยที่การตอบนั่นขึ้นอยู่กับปัจจัย x ต่างๆในแบบจำลอง ความน่าจะเป็นของคนที่ตอบ yi =1 โดยที่การตอบนั่นขึ้นอยู่กับปัจจัย x ต่างๆในแบบจำลอง Because of the nonlinear nature of E(y|x), OLS and WLS are not applicable. We could use nonlinear versions of these methods, but it is no more difficult to use maximum likelihood estimation (MLE). Maximum likelihood estimates
12
Estimation FOC SOC
13
Example of the results (STATA)
14
Interpretation (การแปลผล)
15
Problem of the traditional interpretation
ตัวอย่างเช่น การเพิ่มขึ้นของสัดส่วน BVAP จาก 0.2 ไป 0.3 (20%30%) มีผลทำให้ความน่าจะเป็นที่คนดำจะได้รับเลือกตั้งเพิ่มขึ้นไม่มาก (Black Elected) แต่ การเพิ่มขึ้นของสัดส่วน BVAP จาก 0.5 ไป 0.6 (50%60%) มีผลทำให้ความน่าจะเป็นที่คนดำจะได้รับเลือกตั้งเพิ่มขึ้นอย่างมาก น้อยกว่า
16
เราจะแก้ไขปัญหานี้อย่างไร: Marginal Effects
ในกรณีนี้คือหาค่าเฉลี่ยของ partial effects ทั้งหมดเลยนั่นเอง (แบบนี้ดีกว่าและได้รับความนิยมมากกว่า)
17
เราจะแก้ไขปัญหานี้อย่างไร: Marginal Effects
นอกจากนี้เราสามารถทำการแปลผลจาก Marginal effect Odd ratio 𝜕𝐺(𝑥𝛽 𝜕𝑥 = 𝛽 𝑚𝑓𝑥 exp(𝛽)= 𝛽 𝑜𝑑𝑑
18
สรุปการแปลผล ตัวอย่างการแปลผลด้วยค่า Odds ratio
Odds ratio = e(β) = e(0.059) = 1.061 ถ้าค่า OR มากกว่า 1 เมื่อ x1 เปลี่ยนไป 1 หน่วย ค่า odds หรือโอกาสที่จะเกิดเหตุการณ์ จะเพิ่มขึ้น 1.06 เท่าเมื่อเทียบกับค่าเดิมของ x หรือเพิ่มขึ้น 6 % ตัวอย่างเช่นถ้า “เมื่อเวลาที่ ใช้ในการทำข้อสอบเพิ่มขึ้น 1 นาที โอกาสที่ นักศึกษาจะสอบผ่านเพิ่มขึ้น 1.06 เท่า หรือ เพิ่มขึ้น 6% ด้วยระดับนัยสำคัญ ” Odds ratio = e(β) = e((-1.897) = 0.15 - ถ้าค่าน้อย OR กว่า 1 สมมุติว่ามีการเพิ่มตัวแปร x2 : จำนวนครั้งที่ขาดเรียน เข้าไปใน สมการและพบว่าค่า Odds ratio ของตัวแปรนี้ = 0.15 แสดงว่าเมื่อ X2 เปลี่ยนไป 1 หน่วย โอกาสที่จะเกิดเหตุการณ์ จะเพิ่มขึ้น 0.15 หรือก็คือ ลดลง 85 % หรือกล่าวได้ว่า “เมื่อจำนวนครั้งที่ขาด เรียนเพิ่มขึ้น 1 ครั้ง โอกาสที่นักศึกษาจะสอบผ่านลดลง 0.15 เท่า หรือ ลดลง 85% ด้วยระดับนัยสำคัญ .....”
19
สรุปการแปลผล ตัวอย่างการแปลผลด้วยค่า Marginal effect β=0.5
เมื่อ x1 เปลี่ยนไป 1 หน่วย โอกาสที่จะเกิดเหตุการณ์จะเป็น Y=1 หรือ Pr(Y=1) เปลี่ยนแปลงไป 0.50 หน่วยหรือ 50 % ในทิศทางเดียวกัน ด้วยระดับนัยสำคัญ ..... β=-0.5 เมื่อ x1 เปลี่ยนไป 1 หน่วย โอกาสที่จะเกิดหตุการณ์จะเป็น Y=1 หรือ Pr(Y=1) เปลี่ยนแปลงไป 0.50 หน่วยหรือ 50 % ในทิศทางตรงกันข้ามกัน ด้วยระดับนัยสำคัญ .....
20
Lr Lur Multivariate test
Hypothesis testing (สำหรับ maximum likelihood estimation) t-tests and confidence intervals ก็สามารถได้ในกรณี univariate test (ดู บทที่ 4 ทำเหมือนกันเลย ) แต่ในกรณีของ multivariate hypotheses test จะใช้วิธีอื่นๆ เช่น Lagrange multiplier or score test Wald test Likelihood ratio test (คล้ายกับการทำ F-test ) Chi-square distribution with q degrees of freedom Lr Lur
21
Logit and Probit models for binary response
Goodness-of-fit measures for Logit and Probit models Percent correctly predicted Pseudo R-squared Correlation based measures Individual i‘s outcome is predicted as one if the probability for this event is larger than .5, then percentage of correctly predicted y = 1 and y = 0 is counted Compare maximized log-likelihood of the model with that of a model that only contains a constant (and no explanatory variables) Look at correlation (or squared correlation) between predictions or predicted prob. and true values
22
ตัวอย่างและการเปรียบเทียบผลการประมาณจากแบบจำลองต่างๆ
ตัวอย่าง: Married women’s labor force participation จะเห็นว่าผลการประมาณแตกต่างกันอย่างมากและเราจะเลือกแบบจำลองใดหรือเชื่อแบบจำลองใด? As mentioned earlier, for probit g(0) ~= .4 and for logit, g(0) ~= .25. to make the magnitudes of probit and logit roughly comparable, we can multiply the probit coefficients by .4/.25 = 1.6, or we can multiply the logit estimates by .625. LPM = linear Probability model or linear regression model
งานนำเสนอที่คล้ายกัน
© 2025 SlidePlayer.in.th Inc.
All rights reserved.