23
Mô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit để: 1. dự báo xác suất xảy ra sự kiện dựa vào các thông tin có được từ các biến độc lập. 2. đo lường mức độ tác động của một biến độc lập lên thay đổi xác xuất xảy ra sự kiện. 3. xếp thứ tự ảnh hưởng giữa các biến độc lập trong việc giải thích thay đổi ở biến phụ thuộc. Trong hồi quy Logit, biến phụ thuộc Y hoặc bằng 0 hoặc bằng 1. Y = 1 khi xảy ra (có) sự kiện; Y = 0 khi không xảy ra (không có) sự kiện, với các xác suất tương ứng p và (1-p). Xác suất: p =[0,1] Xác suất xảy ra: Pr(Y = 1) = p Xác suất không xảy ra: Pr(Y = 0) = 1 – p Khái niệm: Odds: Odds = p/(1-p) so sánh giữa xác suất xảy ra và xác suất không xảy ra. Khi Odds = 1 thì xác suất xảy ra sự kiện bằng xác suất không xảy ra và cùng bằng 0.5.

dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

  • Upload
    ngotram

  • View
    220

  • Download
    2

Embed Size (px)

Citation preview

Page 1: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Mô hình hồi quy Binary LogitBinary Logit Regression Model

Sử dụng hồi quy logit để:

1. dự báo xác suất xảy ra sự kiện dựa vào các thông tin có được từ các biến độc lập.

2. đo lường mức độ tác động của một biến độc lập lên thay đổi xác xuất xảy ra sự kiện.

3. xếp thứ tự ảnh hưởng giữa các biến độc lập trong việc giải thích thay đổi ở biến phụ thuộc.

Trong hồi quy Logit, biến phụ thuộc Y hoặc bằng 0 hoặc bằng 1. Y = 1 khi xảy ra

(có) sự kiện; Y = 0 khi không xảy ra (không có) sự kiện, với các xác suất tương ứng

p và (1-p).

• Xác suất: p =[0,1]

• Xác suất xảy ra: Pr(Y = 1) = p

• Xác suất không xảy ra: Pr(Y = 0) = 1 – p

• Khái niệm:

• Odds: Odds = p/(1-p) so sánh giữa xác suất xảy ra và xác suất không

xảy ra. Khi Odds = 1 thì xác suất xảy ra sự kiện bằng xác suất không

xảy ra và cùng bằng 0.5.

• Tỷ lệ Odds (odds ratio): 

Chú ý: có thể là so sánh giữa hai thời điểm hay giữa hai nhóm khác nhau. Ví dụ: xác

suất mắc bệnh ung thư phổi của nam giới là 0.75 và của nữ giới là 0.5 thì Odds mắc

bệnh của nam là 3 và Odds mắc bệnh của nữ là 1; khi đó, tỷ lệ Odds sẽ bằng 3 (Odds

Page 2: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

nam/Odds nữ = 3), nghĩa là, khả năng mắc phải bệnh ung thư của nam giới cao gấp 3

lần của nữ giới.

• log odds: ln(odds)

• logit = log of it (odds)

Trường hợp đơn giản là dạng hồi quy logit đơn (simple logistic regression):

Phương trình logistic là:

Trong đó: p là xác suất để Y = 1.

Suy ra:

Odds của sự kiện xảy ra:

Hay :

Xem xét sự thay đổi của Odds khi biến độc lập (biến giải thích) X gia tăng thêm 1

đơn vị (từ X lên X +1). Chúng ta có:

Page 3: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Ý nghĩa: gia tăng 1 đơn vị của biến độc lập thì Odds2 bằng lần so với Odds1.

Nếu (hay β1 > 0) thì Odds2 tăng gấp lần Odds1 (Odds2 = *Odds1)

và ngược lại nếu (hay β1 < 0) thì Odds2 giảm lần Odds1.

Cũng như trong hồi quy tuyến tính, chúng ta ước lượng các tham số β 0 và β1 từ mẫu,

rồi dùng các kiểm định thống kê phù hợp để xem xét ý nghĩa thống kê của chúng.

Giả thuyết kiểm định là:

H0: β1 = 0 biến độc lập không tác động đến xác suất xảy ra sự kiện;

H1: β1 ≠ 0 biến độc lập có tác động đến xác suất xảy ra sự kiện.

Trường hợp hồi quy logit bội (Multiple logistic regression) thì:

Vận dụng: Mroz’s (1987) nghiên cứu về tham gia lực lượng lao động của nữ. Mẫu

quan sát có 753 phụ nữ đã có gia đình trong độ tuổi 30 – 60. Biến phụ thuộc lfp = 1

cho biết người phụ nữ tham gia lực lượng lao động và lfp = 0 khi người phụ nữ

không tham gia lực lượng lao động. Những gì chúng ta sẽ làm là ước lượng xác suất

Page 4: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

(trung bình) tham gia lực lượng lao động của người phụ nữ ở các thông tin khác nhau

về độ tuổi, số con của họ, trình độ giáo dục, thu nhập...

. use "D:\data\binlfp2.dta", clear

(Data from 1976 PSID-T Mroz)

. d

Contains data from D:\data\binlfp2.dta obs: 753 Data from 1976 PSID-T Mroz vars: 8 30 Apr 2001 16:17 size: 13,554 (99.9% of memory free) (_dta has notes)------------------------------------------------------------------------------- storage display valuevariable name type format label variable label-------------------------------------------------------------------------------lfp byte %9.0g lfplbl Paid Labor Force: 1=yes 0=nok5 byte %9.0g # kids < 6k618 byte %9.0g # kids 6-18age byte %9.0g Wife's age in yearswc byte %9.0g collbl Wife College: 1=yes 0=nohc byte %9.0g collbl Husband College: 1=yes 0=nolwg float %9.0g Log of wife's estimated wagesinc float %9.0g Family income excluding wife's-------------------------------------------------------------------------------Sorted by: lfp

Note: dataset has changed since last saved

. sum

Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- lfp | 753 .5683931 .4956295 0 1 k5 | 753 .2377158 .523959 0 3 k618 | 753 1.353254 1.319874 0 8 age | 753 42.53785 8.072574 30 60 wc | 753 .2815405 .4500494 0 1-------------+-------------------------------------------------------- hc | 753 .3917663 .4884694 0 1 lwg | 753 1.097115 .5875564 -2.054124 3.218876 inc | 753 20.12897 11.6348 -.0290001 96 pr | 753 .5683931 .058308 .2144927 .6671243

Chúng ta cần ước lượng mô hình:

Hay

. logit lfp k5 k618 age wc hc lwg inc

Page 5: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Logistic regression Number of obs = 753 LR chi2(7) = 124.48 Prob > chi2 = 0.0000Log likelihood = -452.63296 Pseudo R2 = 0.1209

------------------------------------------------------------------------------ lfp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- k5 | -1.462913 .1970006 -7.43 0.000 -1.849027 -1.076799 k618 | -.0645707 .0680008 -0.95 0.342 -.1978499 .0687085 age | -.0628706 .0127831 -4.92 0.000 -.0879249 -.0378162 wc | .8072738 .2299799 3.51 0.000 .3565215 1.258026 hc | .1117336 .2060397 0.54 0.588 -.2920969 .515564 lwg | .6046931 .1508176 4.01 0.000 .3090961 .9002901 inc | -.0344464 .0082084 -4.20 0.000 -.0505346 -.0183583 _cons | 3.18214 .6443751 4.94 0.000 1.919188 4.445092------------------------------------------------------------------------------

. logit lfp k5 k618 age wc hc lwg inc, nolog

Logistic regression Number of obs = 753 LR chi2(7) = 124.48 Prob > chi2 = 0.0000Log likelihood = -452.63296 Pseudo R2 = 0.1209

------------------------------------------------------------------------------ lfp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- k5 | -1.462913 .1970006 -7.43 0.000 -1.849027 -1.076799 k618 | -.0645707 .0680008 -0.95 0.342 -.1978499 .0687085 age | -.0628706 .0127831 -4.92 0.000 -.0879249 -.0378162 wc | .8072738 .2299799 3.51 0.000 .3565215 1.258026 hc | .1117336 .2060397 0.54 0.588 -.2920969 .515564 lwg | .6046931 .1508176 4.01 0.000 .3090961 .9002901 inc | -.0344464 .0082084 -4.20 0.000 -.0505346 -.0183583 _cons | 3.18214 .6443751 4.94 0.000 1.919188 4.445092------------------------------------------------------------------------------. predict pr(option p assumed; Pr(lfp))

. sum pr

Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- pr | 753 .5683931 .1944213 .0139875 .9621198

. listcoef, help //net search spost hoặc net search spostado

logit (N=753): Factor Change in Odds

Odds of: inLF vs NotInLF

---------------------------------------------------------------------- lfp | b z P>|z| e^b e^bStdX SDofX-------------+-------------------------------------------------------- k5 | -1.46291 -7.426 0.000 0.2316 0.4646 0.5240 k618 | -0.06457 -0.950 0.342 0.9375 0.9183 1.3199 age | -0.06287 -4.918 0.000 0.9391 0.6020 8.0726 wc | 0.80727 3.510 0.000 2.2418 1.4381 0.4500 hc | 0.11173 0.542 0.588 1.1182 1.0561 0.4885 lwg | 0.60469 4.009 0.000 1.8307 1.4266 0.5876 inc | -0.03445 -4.196 0.000 0.9661 0.6698 11.6348---------------------------------------------------------------------- b = raw coefficient z = z-score for test of b=0

Page 6: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

P>|z| = p-value for z-test e^b = exp(b) = factor change in odds for unit increase in X e^bStdX = exp(b*SD of X) = change in odds for SD increase in X SDofX = standard deviation of X

Kiểm định Wald

Trong Stata dùng lệnh . test. test k5 k618

( 1) k5 = 0

( 2) k618 = 0

chi2( 2) = 55.16

Prob > chi2 = 0.0000

Page 7: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

. test k5 k618 age wc hc lwg inc

( 1) k5 = 0

( 2) k618 = 0

( 3) age = 0

( 4) wc = 0

( 5) hc = 0

( 6) lwg = 0

( 7) inc = 0

chi2( 7) = 94.98

Prob > chi2 = 0.0000

Kiểm định sự kết hợp tuyến tính của các hệ số. Ví dụ: k5 = k618

. test k5=k618

( 1) k5 - k618 = 0

chi2( 1) = 49.48

Prob > chi2 = 0.0000

Xác định các giá trị ước lượng (predicted probabilities)

Tác động biên (marginal effect hay marginal change) được tính theo công thức:

. prvalue xác định thay đổi biên của xác suất Y = 1.

Page 8: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

. prtab tạo ra một bảng các ước lượng xác suất Y=1 theo các kết hợp khác nhau của

các biến phân loại Xk.

. logit lfp k5 k618 age wc hc lwg inc

. prvalue, x(k5=0 wc=0)

logit: Predictions for lfp

Confidence intervals by delta method

95% Conf. Interval Pr(y=inLF|x): 0.6069 [ 0.5567, 0.6570] Pr(y=NotInLF|x): 0.3931 [ 0.3430, 0.4433]

k5 k618 age wc hc lwg incx= 0 1.3532537 42.537849 0 .39176627 1.0971148 20.128965

. prvalue, x(k5=1 wc=0)

logit: Predictions for lfp

Confidence intervals by delta method

95% Conf. Interval Pr(y=inLF|x): 0.2633 [ 0.1932, 0.3335] Pr(y=NotInLF|x): 0.7367 [ 0.6665, 0.8068]

k5 k618 age wc hc lwg incx= 1 1.3532537 42.537849 0 .39176627 1.0971148 20.128965

. prtab k5 wc

logit: Predicted probabilities of positive outcome for lfp

---------------------------- | Wife College: # kids < | 1=yes 0=no 6 | NoCol College----------+----------------- 0 | 0.6069 0.7758 1 | 0.2633 0.4449 2 | 0.0764 0.1565 3 | 0.0188 0.0412----------------------------

k5 k618 age wc hc lwg incx= .2377158 1.3532537 42.537849 .2815405 .39176627 1.0971148 20.128965

. prtab k618 wc

logit: Predicted probabilities of positive outcome for lfp

---------------------------- | Wife College: # kids | 1=yes 0=no 6-18 | NoCol College----------+----------------- 0 | 0.5433 0.7273 1 | 0.5273 0.7143 2 | 0.5112 0.7010 3 | 0.4950 0.6873 4 | 0.4789 0.6732 5 | 0.4628 0.6589 6 | 0.4468 0.6442

Page 9: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

7 | 0.4309 0.6293 8 | 0.4151 0.6141----------------------------

k5 k618 age wc hc lwg incx= .2377158 1.3532537 42.537849 .2815405 .39176627 1.0971148 20.128965

Lệnh prgen vẽ đồ thị thể hiện xác suất theo giá trị của các biến tác động.**********dofile: GRAPH*************prgen inc, generate(p30) x(age=30) rest(mean)label var p30p1 "Age 30"prgen inc, generate(p40) x(age=40) rest(mean)label var p40p1 "Age 40"prgen inc, generate(p50) x(age=50) rest(mean)label var p50p1 "Age 50"prgen inc, generate(p60) x(age=60) rest(mean)label var p60p1 "Age 60"line p30p1 p40p1 p50p1 p60p1 p60x

0.2

.4.6

.8

0 20 40 60 80 100family income excluding wife's

Age 30 Age 40Age 50 Age 60

*******************************************************prgen age, generate(k50) x(k5=0) rest(mean)prgen age, generate(k51) x(k5=1) rest(mean)prgen age, generate(k52) x(k5=2) rest(mean)prgen age, generate(k53) x(k5=3) rest(mean)line k50p1 k51p1 k52p1 k53p1 k50xlabel variable k50p1 "k5=0"label variable k51p1 "k5=1"label variable k52p1 "k5=2"label variable k53p1 "k5=3"

0.2

.4.6

.8

30 40 50 60wife's age in years

k5=0 k5=1k5=2 k5=3

Có thể dùng lệnh . mfx để xác định thay đổi biên của xác suất của Y=1.

Page 10: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

.mfx : Stata mặc định tại các giá trị trung bình của biến độc lập.

.mfx, at() // at() tại những giá trị cụ thể của các biến độc lập.

. mfxMarginal effects after logit y = Pr(lfp) (predict) = .57779421------------------------------------------------------------------------------variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X---------+-------------------------------------------------------------------- k5 | -.3568748 .04821 -7.40 0.000 -.451366 -.262383 .237716 k618 | -.0157519 .01659 -0.95 0.342 -.048266 .016763 1.35325 age | -.0153371 .00311 -4.93 0.000 -.021434 -.00924 42.5378 wc*| .1880592 .05003 3.76 0.000 .09001 .286109 .281541 hc*| .0271985 .05004 0.54 0.587 -.070882 .125279 .391766 lwg | .1475137 .03674 4.01 0.000 .075496 .219532 1.09711 inc | -.0084031 .002 -4.19 0.000 -.012332 -.004474 20.129------------------------------------------------------------------------------(*) dy/dx is for discrete change of dummy variable from 0 to 1

. mfx, at(wc=1 age=40) warning: no value assigned in at() for variables k5 k618 hc lwg inc; means used for k5 k618 hc lwg inc

Marginal effects after logit y = Pr(lfp) (predict) = .74140317------------------------------------------------------------------------------variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X---------+-------------------------------------------------------------------- k5 | -.2804763 .04221 -6.64 0.000 -.363212 -.197741 .237716 k618 | -.0123798 .01305 -0.95 0.343 -.037959 .013199 1.35325 age | -.0120538 .00245 -4.92 0.000 -.016855 -.007252 40 wc*| .1802113 .04742 3.80 0.000 .087269 .273154 1 hc*| .0212952 .03988 0.53 0.593 -.056866 .099456 .391766 lwg | .1159345 .03229 3.59 0.000 .052643 .179226 1.09711 inc | -.0066042 .00163 -4.05 0.000 -.009802 -.003406 20.129------------------------------------------------------------------------------(*) dy/dx is for discrete change of dummy variable from 0 to 1

. mfx, at(k5=1 wc=0)

warning: no value assigned in at() for variables k618 age hc lwg inc; means used for k618 age hc lwg inc

Marginal effects after logit y = Pr(lfp) (predict) = .26333411------------------------------------------------------------------------------variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X---------+-------------------------------------------------------------------- k5 | -.2837894 .02182 -13.00 0.000 -.326565 -.241013 1 k618 | -.012526 .01313 -0.95 0.340 -.038252 .0132 1.35325 age | -.0121962 .0023 -5.31 0.000 -.0167 -.007693 42.5378 wc*| .1815317 .05369 3.38 0.001 .076309 .286754 0 hc*| .021797 .04062 0.54 0.592 -.05782 .101414 .391766 lwg | .117304 .03161 3.71 0.000 .055357 .179251 1.09711 inc | -.0066822 .00164 -4.08 0.000 -.009889 -.003475 20.129------------------------------------------------------------------------------(*) dy/dx is for discrete change o[f dummy variable from 0 to 1

Page 11: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Phụ lục 1

Ta có hệ số Odds ban đầu Odds0

Suy ra:

Giả định rằng các yếu tố khác không thay đổi, khi Xk tăng lên 1 đơn vị, hệ số Odds

mới là Odds1:

Hay :

Hay :

Khi Xk tăng lên một đơn vị thì xác suất xảy ra sự kiện sẽ thay đổi từ P0 sang P1.

Page 12: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Phụ lục 2

Page 13: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Phụ lục 3

Stata Annotated Output: Logistic Regression Analysis

This page shows an example of logistic regression regression analysis with footnotes explaining the output.  

These data were collected on 200 high schools students and are scores on various tests, including science,

math, reading and social studies (socst). The variable female is a dichotomous variable coded 1 if the

student was female and 0 if male.

Because we do not have a suitable dichotomous variable to use as our dependent variable, we will create one

(which we will call honcomp, for honors composition) based on the continuous variable write.  We do not

advocate making dichotomous variables out of continuous variables; rather, we do this here only for

purposes of this illustration.

. logit honcomp female read scienceIteration 0: log likelihood = -115.64441Iteration 1: log likelihood = -84.558481Iteration 2: log likelihood = -80.491449Iteration 3: log likelihood = -80.123052Iteration 4: log likelihood = -80.118181Iteration 5: log likelihood = -80.11818

Logit estimates Number of obs = 200 LR chi2(3) = 71.05 Prob > chi2 = 0.0000Log likelihood = -80.11818 Pseudo R2 = 0.3072

------------------------------------------------------------------------------ honcomp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+---------------------------------------------------------------- female | 1.482498 .4473993 3.31 0.001 .6056111 2.359384 read | .1035361 .0257662 4.02 0.000 .0530354 .1540369 science | .0947902 .0304537 3.11 0.002 .035102 .1544784 _cons | -12.7772 1.97586 -6.47 0.000 -16.64982 -8.904589------------------------------------------------------------------------------

Iteration LogIteration 0: log likelihood = -115.64441Iteration 1: log likelihood = -84.558481Iteration 2: log likelihood = -80.491449Iteration 3: log likelihood = -80.123052Iteration 4: log likelihood = -80.118181Iteration 5:a log likelihood = -80.11818

a.  This is a listing of the log likelihoods at each iteration.  (Remember that logistic regression uses

maximum likelihood, which is an iterative procedure.)  The first iteration (called iteration 0) is the log

likelihood of the "null" or "empty" model; that is, a model with no predictors.   At the next iteration, the

predictor(s) are included in the model.  At each iteration, the log likelihood increases because the goal is to

maximize the log likelihood.  When the difference between successive iterations is very small,  the model is

said to have "converged", the iterating is stopped and the results are displayed.  For more information on this

process, see Regression Models for Categorical and Limited Dependent Variables by J. Scott Long.

Page 14: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Model SummaryLogit estimates Number of obsc = 200 LR chi2(3)d = 71.05 Prob > chi2e = 0.0000Log likelihood = -80.11818b Pseudo R2f = 0.3072

b.  Log likelihood - This is the log likelihood of the final model.  The value -80.11818 has no meaning in

and of itself; rather, this number can be used to help compare nested models.

c.  Number of obs - This is the number of observations that were used in the analysis.  This number may be

smaller than the total number of observations in your data set if you have missing values for any of the

variables used in the logistic regression.  Stata uses a listwise deletion by default, which means that if there

is a missing value for any variable in the logistic regression, the entire case will be excluded from the

analysis.

d.  LR chi2(3) - This is the likelihood ratio (LR) chi-square test.  The likelihood chi-square test statistic can

be calculated by hand as 2*(115.64441 - 80.11818) = 71.05.  This is minus two (i.e., -2) times the difference

between the starting and ending log likelihood.  The number in the parenthesis indicates the number of

degrees of freedom.  In this model, there are three predictors, so there are three degrees of freedom.

e.  Prob > chi2 - This is the probability of obtaining the chi-square statistic given that the null hypothesis is

true.  In other words, this is the probability of obtaining this chi-square statistic (71.05) if there is in fact no

effect of the independent variables, taken together, on the dependent variable.  This is, of course, the p-value,

which is compared to a critical value, perhaps .05 or .01 to determine if the overall model is statistically

significant.  In this case, the model is statistically significant because the p-value is less than .000.

f.  Pseudo R2 - This is the pseudo R-squared.  Logistic regression does not have an equivalent to the R-

squared that is found in OLS regression; however, many people have tried to come up with one.   There are a

wide variety of pseudo-R-square statistics.  Because this statistic does not mean what R-square means in

OLS regression (the proportion of variance explained by the predictors), we suggest interpreting this statistic

with great caution.

Parameter Estimates------------------------------------------------------------------------------ honcompg| Coef.h Std. Err.i zj P>|z|j [95% Conf. Interval]k

-------------+---------------------------------------------------------------- female | 1.482498 .4473993 3.31 0.001 .6056111 2.359384 read | .1035361 .0257662 4.02 0.000 .0530354 .1540369 science | .0947902 .0304537 3.11 0.002 .035102 .1544784 _cons | -12.7772 1.97586 -6.47 0.000 -16.64982 -8.904589------------------------------------------------------------------------------

g.  honcomp - This is the dependent variable in our logistic regression.  The variables listed below it are the

independent variables.

Page 15: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

h.  Coef. - These are the values for the logistic regression equation for predicting the dependent variable

from the independent variable.  They are in log-odds units.  Similar to OLS regression, the prediction

equation is

log(p/1-p) = b0 + b1*x1 + b2*x2 + b3*x3 + b3*x3

where p is the probability of being in honors composition.  Expressed in terms of the variables used in this

example, the logistic regression equation is

log(p/1-p) = -12.7772 + 1.482498*female + .1035361*read + 0947902*science

These estimates tell you about the relationship between the independent variables and the dependent

variable, where the dependent variable is on the logit scale.  These estimates tell the amount of increase in

the predicted log odds of honcomp = 1 that would be predicted by a 1 unit increase in the predictor, holding

all other predictors constant.  Note: For the independent variables which are not significant, the coefficients

are not significantly different from 0, which should be taken into account when interpreting the coefficients. 

(See the columns with the z-values and p-values regarding testing whether the coefficients are statistically

significant).  Because these coefficients are in log-odds units, they are often difficult to interpret, so they are

often converted into odds ratios.  You can do this by hand by exponentiating the coefficient, or by using the

or option with logit command, or by using the logistic command.

female - The coefficient (or parameter estimate) for the variable female is 1.482498.  This means that

for a one-unit increase in female (in other words, going from male to female), we expect a 1.482498

increase in the log-odds of the dependent variable honcomp, holding all other independent variables

constant

read - For every one-unit increase in reading score (so, for every additional point on the reading test),

we expect a .1035361 increase in the log-odds of honcomp, holding all other independent variables

constant.

science - For every one-unit increase in science score, we expect a .0947902 increase in the log-odds of

honcomp, holding all other independent variables constant.

constant - This is the expected value of the log-odds of honcomp when all of the predictor variables

equal zero.  In most cases, this is not interesting.  Also, oftentimes zero is not a realistic value for a

variable to take.

i.  Std. Err. - These are the standard errors associated with the coefficients.   The standard error is used for

testing whether the parameter is significantly different from 0; by dividing the parameter estimate by the

standard error you obtain a z-value (see the column with z-values and p-values).   The standard errors can

also be used to form a confidence interval for the parameter, as shown in the last two columns of this table.

Page 16: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

j.  z and P>|z| - These columns provide the z-value and 2-tailed p-value used in testing the null hypothesis

that the coefficient (parameter) is 0.   If you use a 2-tailed test, then you would compare each p-value to your

preselected value of alpha.  Coefficients having p-values less than alpha are statistically significant.  For

example, if you chose alpha to be 0.05, coefficients having a p-value of 0.05 or less would be statistically

significant (i.e., you can reject the null hypothesis and say that the coefficient is significantly different from

0).   If you use a 1-tailed test (i.e., you predict that the parameter will go in a particular direction), then you

can divide the p-value by 2 before comparing it to your preselected alpha level.   With a 2-tailed test and

alpha of 0.05, you may reject the null hypothesis that the coefficient for female is equal to 0.  The coefficient

of 1.482498 is significantly greater than 0.  The coefficient for read is .1035361 significantly different from

0 using alpha of 0.05 because its p-value is 0.000, which is smaller than 0.05. The coefficient for science

is .0947902 significantly different from 0 using alpha of 0.05 because its p-value is 0.000, which is smaller

than 0.05.

k. [95% Conf. Interval] - This shows a 95% confidence interval for the coefficient.  This is very useful as it

helps you understand how high and how low the actual population value of the parameter might be.  The

confidence intervals are related to the p-values such that the coefficient will not be statistically significant if

the confidence interval includes 0. 

Page 17: dulieu.tailieuhoctap.vndulieu.tailieuhoctap.vn/books/giao-duc-dai-cuong/xac... · Web viewMô hình hồi quy Binary Logit Binary Logit Regression Model Sử dụng hồi quy logit

Tài liệu tham khảo

J. Scott Long (2007), Regression Models for Categorical and Limited Dependent Variables, A Stata

Press Publication.

Woolbridge, J.M. (2005) Introductory Econometrics – A Modern Approach, South-Western

College Pub.

James H. Stock & Mark W. Watson (2006) Introduction to Econometrics (second edition),

Addison-Wesley Pub.

Christopher Dougherty (2007), Introduction to Econometrics (third edition), Oxford Pub.