การวิเคราะห์โลจิท logistic regression...

43
Thanut Wongsaichue, Ph.D. (Demography) Human and Community Resource Development 190693 Data Analysis and Presentation ดร.ฐณัฐ วงศ์สายเชื อ 20080119 da8008 การวิเคราะห์โลจิท Logistic Regression Analysis คณะศึกษาศาสตร์และพัฒนศาสตร์ Tel: 08-1923-0303 E-mail: [email protected] Homepage: http://pirun.ku.ac.th/~fedutnw/

Upload: tranthu

Post on 08-Nov-2018

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation

ดร.ฐณฐั วงศ์สายเชื อ20080119

da8008

การวิเคราะห์โลจิทLogistic Regression Analysis

คณะศกึษาศาสตร์และพฒันศาสตร์Tel: 08-1923-0303E-mail: [email protected]: http://pirun.ku.ac.th/~fedutnw/

Page 2: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationทบทวน Simple regression

Y = a + bXY

Xa

b

Y = a + (b)XY = 2 + (0.5)0 = 2.0Y = 2 + (0.5)1 = 2.5Y = 2 + (0.5)2 = 3.0Y = 2 + (0.5)3 = 3.5Y = 2 + (0.5)4 = 4.0

Page 3: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationComplete Simple regression

Y = a + bX + e X = Independent variableY = Dependent variablea = Constantb = Coefficiente = Residual

Interval level Simple & Multiple RegressionDichotomous Logistic regressionPolytomous Order logic regression

Multinomial regression

Page 4: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation

Logistic Regression“Categorical dependent variables”

ตวัแปรตามทีมีการวดัแบบกลุม่

Page 5: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationตวัแปรอิสระทีใช้ในการวิเคราะห์ Regression

1. Interval or ratio scaleเชน่ นํ าหนกั, สว่นสงู, ระยะทาง

2. Dichotomousเชน่ เพศ เพศชาย = 1, เพศหญิง = 0

คําตอบ ใช่ = 1, ไมใ่ช่ = 03. Polytomous

เชน่ อาชีพ – รับราชการพนกังานเอกชนเกษตรกรอืนๆ

ขนาดครัวเรือน- ครัวเรือนเลก็- ครัวเรือนขนาดกลาง- ครัวเรือนขนาดใหญ่

Page 6: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationตวัแปรทีเป็น Polytomous

ครัวเรือน 1-4 คนครัวเรือน 5-6 คนครัวเรือน 7 คนขึ นไป

Categories เชน่ ขนาดครัวเรือน – มี 2 วิธีคือ

Size1100

010

001

Size2 Size3Family size

ครัวเรือน 1-4 คน = 1ครัวเรือน 5-6 คน = 2ครัวเรือน 7 คนขึ นไป = 3

1 ตวัแปรมี 3 คา่

Page 7: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationตวัแปรทีเป็น CategoriesCategories เชน่ ขนาดครัวเรือน – มี 2 วิธีคือ

family_size

1773 30.2 30.2 30.22103 35.9 35.9 66.11988 33.9 33.9 100.05864 100.0 100.0

1.002.003.00Total

ValidFrequency Percent Valid Percent

CumulativePercent

size1

4091 69.8 69.8 69.81773 30.2 30.2 100.05864 100.0 100.0

.001.00Total

ValidFrequency Percent Valid Percent

CumulativePercent

size2

3761 64.1 64.1 64.12103 35.9 35.9 100.05864 100.0 100.0

.001.00Total

ValidFrequency Percent Valid Percent

CumulativePercent

size3

3876 66.1 66.1 66.11988 33.9 33.9 100.05864 100.0 100.0

.001.00Total

ValidFrequency Percent Valid Percent

CumulativePercent

1 ตวัแปรมีสามคา่3 ตวัแปรๆ ละสองคา่

Note: 1 ตวัแปรมีสามคา่ จะใช้ได้ในการวิเคราะห์ Logistic regression แตใ่น Multiple regressionโปรแกรม SPSS ยงัไม่สามารถใช้ได้ หากใช้จะต้องจดัโครงสร้างตวัแปรใหม่

Page 8: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationตวัแปรตามในการวิเคราะห์โลจิก

Dichotomous ตวัแปรทีมีสองคา่ คือ 0 และ 1

เชน่ เพศ เพศชาย = 1, เพศหญิง = 0คําตอบ ใช่ = 1, ไมใ่ช่ = 0

ถกู = 1, ผิด = 0Multiple regression:

X ใช้ทํานายคา่ของ YLogistic regression:

X ใช้ทํานายโอกาส (probability) ทีจะเกิด Y

Page 9: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationโอกาสความนา่จะเป็น (Probability)Probability: เหตกุารณ์บางอยา่ง(ทีเราสนใจ)ทีน่าจะเกิดขึ นเชน่ จํานวนนิสติในห้องทั งหมด8 คน (ชาย 3 และ หญิง 5)Prob (ชาย)Prob (หญิง)Prob (ชาย) + Prob (หญิง)

ดงันั น 0 ≤ Probability ≥ 1โอกาสความน่าจะเป็นจะไมม่ากกวา่ 1 และไมน้่อยกวา่ 0

= 3/8 = 0.375= 5/8 = 0.625= 0.375+0.625 = 1

Page 10: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationOdds …ภาษาไทยแปลวา่อะไร?Odds: (Merriam-Webster Dictionary)(1) : the probability that one thing is so or will happen

rather than another(2) : the ratio of the probability of one event to that of

an alternative eventOdds (ชาย) =

Odds (หญิง) =Prob (ชาย)/Prob (หญิง) = 0.375/0.625 = 0.6

Prob (หญิง)/Prob (ชาย) = 0.625/0.375 = 1.6

Page 11: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationProbability vs. Odds

Prob (ผู้ชาย) = 0.375 Prob (ผู้หญิง) = 0.6251. โอกาสทีนิสติชายเดินเข้าชั นเรียนเป็นคนสดุท้าย?

2. หากทายเพศหญิงมีโอกาสทายถกูเทา่ไร?

ถ้าทายผู้ชายมีโอกาสถกู =ถ้าทายผู้หญิงมีโอกาสถกู =

โอกาสในการทายผู้ชายถกูน้อยกวา่ =โอกาสในการทายผู้หญิงถกูมากกวา่ =

Odds (ผู้ชาย) = 0.6 Odds (ผู้หญิง) = 1.6

37.5%62.5%

40%1.6 เทา่

Page 12: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationProbability vs. Oddsสมมตุิ: ห้องเรียนๆ หนึงมีนิสติ 7 คนมีทั งเพศหญิงและชายเพศชายหญิง

Class116

Class225

Class334

Class443

Class552

Class661

Prob(ชาย) 0.14 0.29 0.43 0.57 0.71 0.86Prob(หญิง) 0.86 0.71 0.57 0.43 0.29 0.14Odds(ชาย) 0.17 0.40 0.75 1.33 2.45 6.00Odds(หญิง) 6.00 2.50 1.33 0.75 0.40 0.17

Page 13: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationProbability vs. Odds

0

1.00

2.00

3.00

4.00

5.00

6.00

7.00

Prob (หญิง)

ชายหญิง

16

25

34

43

52

61

จํานวนนิสิต

Prob (ชาย)

Odds (หญิง) Odds (ชาย)

Page 14: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationLogistic regression model

log Pr(success)/Pr(failure) = α+βX

log(Odds)= α+βXหรือ

= α+βXlog 1- = Probability

logit()= α+βXหรือLogistic transformation or logit

เพิมจาก 0 1 เพิมจาก 0 1odds เพิมจาก 0odds เพิมจาก 0logit เพิมจาก -logit เพิมจาก -

= 1/2 = 1/2odds = 1odds = 1logit = 0logit = 0

Page 15: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationβ ใน Logistic regression

logit()= α+βXβ ในสมการหมายถงึการเปลียนแปลงของเส้นโค้งเมือ X เพิมขึ นβ ในสมการหมายถงึการเปลียนแปลงของเส้นโค้งเมือ X เพิมขึ น

β > 0, เมือ X เพิมขึ น จะทําให้ เพิมขึ น(โอกาสความน่าจะเป็นมากขึ น)β > 0, เมือ X เพิมขึ น จะทําให้ เพิมขึ น(โอกาสความน่าจะเป็นมากขึ น)

β < 0, เมือ X เพิมขึ น จะทําให้ ลดลง (โอกาสความนา่จะเป็นน้อยลง)β < 0, เมือ X เพิมขึ น จะทําให้ ลดลง (โอกาสความนา่จะเป็นน้อยลง)*** จะแปลผลเหมือนกบั Multiple regression ไมไ่ด้***เนืองจากตวัแปรตามไมใ่ช่คา่จํานวน แตเ่ป็น log(odds)*** จะแปลผลเหมือนกบั Multiple regression ไมไ่ด้***เนืองจากตวัแปรตามไมใ่ช่คา่จํานวน แตเ่ป็น log(odds)

Page 16: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and PresentationExp(B) ในโปรแกรม SPSS

Odds= Probability

1-Probability

Exp(B)=

Page 17: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการแปรผล Exp(B) ในโปรแกรม SPSSตวัแปรอสิระ

Intervalเมือ X เพิมขึ น1 หน่วยDichotomousเมือ X มีคา่ 1 เทียบเมือมีคา่ 0Polytomousเมือ X เป็นกลุม่ทีมีคา่ 1 เทียบกบักลุม่อ้างอิง

Exp(B) > 1โอกาสเพิมเป็นเทา่

Exp(B) < 1โอกาสลดลงร้อยละ=(1-Exp(B))*100

ตวัแปรตาม

Page 18: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation

แบบฝึกหดั Multiple regression“การบริโภคกบัหนี สนิครัวเรือน

ในจงัหวดักาญจนบรีุ ปี พ.ศ. 2543”

Page 19: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

ตวัแปรอิสระ ตวัแปรตามจํานวนแปลงทีดนิถือครองขนาดของครัวเรือนคา่ใช้จ่ายในสิงอํานวยความสะดวกคา่ใช้จ่ายด้านยานพาหนะการได้รับสง่เงินกลบั

หนี สินครัวเรือนไมมี่หนี = 0มีหนี = 1

Page 20: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

ตวัแปรอิสระจํานวนแปลงทีดนิถือครองขนาดของครัวเรือนคา่ใช้จ่ายในสิงอํานวยความสะดวกคา่ใช้จ่ายด้านยานพาหนะการได้รับสง่เงินกลบั

การใช้จ่ายฟุ่ มเฟือย-การมีรถยนต์

ตวัชี วดัสถานะเศรษฐกิจของครัวเรือนลกูมากยากจนจริงหรือ?การใช้จ่ายฟุ่ มเฟือย-ในบ้าน

รายได้ของครัวเรือน

Page 21: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

ตวัแปรตามหนี สิน

household debt

5337 46.3 46.3 46.36202 53.7 53.7 100.0

11539 100.0 100.0

Have no debtHave debtTotal

ValidFrequency Percent Valid Percent

CumulativePercent

การวดั ไมมี่หนี สิน= 0มีหนี สิน= 1

Page 22: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

จํานวนแปลงทีดิน

การวดัจํานวนโฉนดทีดิน,เอกสารสิทธิ, ฯลฯทีครัวเรือนถือครองหน่วย: แปลง

# of land parcels

3714 32.2 32.2 32.24163 36.1 36.1 68.32141 18.6 18.6 86.8823 7.1 7.1 94.0372 3.2 3.2 97.2177 1.5 1.5 98.777 .7 .7 99.427 .2 .2 99.615 .1 .1 99.78 .1 .1 99.8

10 .1 .1 99.93 .0 .0 99.91 .0 .0 99.91 .0 .0 99.93 .0 .0 100.01 .0 .0 100.01 .0 .0 100.01 .0 .0 100.01 .0 .0 100.0

11539 100.0 100.0

0123456789101112131415164045Total

ValidFrequency Percent Valid Percent

CumulativePercent

Page 23: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

ขนาดครัวเรือนg_member

2944 25.5 25.5 25.55524 47.9 47.9 73.43071 26.6 26.6 100.0

11539 100.0 100.0

1-2 members3-4 members5 members and overTotal

ValidFrequency Percent Valid Percent

CumulativePercent

การวดั ครัวเรือนขนาดเลก็ (1-2 คน) = 1ครัวเรือนขนาดกลาง (3-4 คน) = 2ครัวเรือนขนาดใหญ่ (5 คนขึ นไป) = 3

Page 24: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation

g_consum

3784 32.8 32.8 32.83644 31.6 31.6 64.44111 35.6 35.6 100.0

11539 100.0 100.0

0-10 (,000 baht)10-24.99 (,000 baht)25 (,000 baht) and overTotal

ValidFrequency Percent Valid Percent

CumulativePercent

การบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

คา่ใช้จ่ายในสิงอํานวยความสะดวกในบ้าน

การวดั คา่ใช้จ่ายไมถ่งึ 10,000 บาท = 1คา่ใช้จ่าย 10,000-24,999 บาท = 2คา่ใช้จ่าย 25,000 บาทขึ นไป= 3

Page 25: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation

g_vehicle

3241 28.1 28.1 28.13973 34.4 34.4 62.52606 22.6 22.6 85.11719 14.9 14.9 100.0

11539 100.0 100.0

0-29.99 (,000 baht)30-59.99 (,000 baht)60-499.99 (,000 baht)500 (,000 baht) and overTotal

ValidFrequency Percent Valid Percent

CumulativePercent

การบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

คา่ใช้จ่ายด้านยานพาหนะ

การวดั คา่ใช้จ่ายไมถ่งึ 30,000 บาท = 1คา่ใช้จ่าย 30,000-59,999 บาท = 2คา่ใช้จ่าย 60,000-499,999 บาท = 3คา่ใช้จ่าย 500,000 บาทขึ นไป= 4

Page 26: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

การได้รับเงินสง่กลบั

การวดั ครัวเรือนไมมี่เงินสง่กลบั = 0ครัวเรือนได้รับเงินสง่กลบั = 1

g_remitt

8779 76.1 76.1 76.12760 23.9 23.9 100.0

11539 100.0 100.0

Have no remittanceHave remittanceTotal

ValidFrequency Percent Valid Percent

CumulativePercent

Page 27: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

สถิติเชิงพรรณนาDescriptive Statistics

11539 0 1 .54 .49911539 0 45 1.25 1.45711539 1 3 2.01 .72211539 1 3 2.03 .82711539 1 4 2.24 1.02211539 0 1 .24 .42711539

household debt# of land parcelsg_memberg_consumg_vehicleg_remittValid N (listwise)

N Minimum Maximum Mean Std. Deviation

Page 28: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุ

สหสมัพนัธ์ระหวา่งตวัแปรCorrelations

1.000 ** ** ** ** *

.144** 1.000 ** ** ** **

.114** .130** 1.000 ** ** **

.093** .202** .102** 1.000 **

.160** .297** .204** .568** 1.000 **

-.023* .063** -.081** -.002 -.097** 1.000

household debt

# of land parcels

g_member

g_consum

g_vehicle

g_remitt

Spearman's rho

householddebt

# of landparcels g_member g_consum g_vehicle g_remitt

Correlation is significant at the 0.01 level (2-tailed).**.

Correlation is significant at the 0.05 level (2-tailed).*.

ใช้ Spearman เนืองจาก ตวัแปรสว่นใหญ่เป็นตวัแปรกลุม่

Page 29: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุLogistic Regression Analysis

Case Processing Summary

11539 100.00 .0

11539 100.00 .0

11539 100.0

Unweighted Casesa

Included in AnalysisMissing CasesTotal

Selected Cases

Unselected CasesTotal

N Percent

If weight is in effect, see classification table for the totalnumber of cases.

a.

Dependent Variable Encoding

01

Original ValueHave no debtHave debt

Internal Value

Categorical Variables Codings

3241 1.000 .000 .0003973 .000 1.000 .0002606 .000 .000 1.0001719 .000 .000 .0003784 1.000 .0003644 .000 1.0004111 .000 .0002944 1.000 .0005524 .000 1.0003071 .000 .000

0-29.99 (,000 baht)30-59.99 (,000 baht)60-499.99 (,000 baht)500 (,000 baht) and over

g_vehicle

0-10 (,000 baht)10-24.99 (,000 baht)25 (,000 baht) and over

g_consum

1-2 members3-4 members5 members and over

g_member

Frequency (1) (2) (3)Parameter coding

Reference

Page 30: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 0: Beginning block

Classification Tablea,b

0 5337 .00 6202 100.0

53.7

ObservedHave no debtHave debt

household debt

Overall Percentage

Step 0Have no debt Have debt

household debt PercentageCorrect

Predicted

Constant is included in the model.a.

The cut value is .500b.

Variables in the Equation

.150 .019 64.721 1 .000 1.162ConstantStep 0B S.E. Wald df Sig. Exp(B)

Odds(debt)

Page 31: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Omnibus Tests of Model Coefficients

625.496 9 .000625.496 9 .000625.496 9 .000

StepBlockModel

Step 1Chi-square df Sig.

Model Summary

15306.051a .053 .070Step1

-2 Loglikelihood

Cox & SnellR Square

NagelkerkeR Square

Estimation terminated at iteration number 3 becauseparameter estimates changed by less than .001.

a.

ยิงเลก็สมการยิง fitยิงดี

Page 32: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Classification Tablea

2388 2949 44.71653 4549 73.3

60.1

ObservedHave no debtHave debt

household debt

Overall Percentage

Step 1Have no debtHave debt

household debt PercentageCorrect

Predicted

The cut value is .500a.

Predicted (debt) If prob < .5 = 0 = ทํานายว่าไมมี่หนี สนิIf prob > .5 = 1 = ทํานายว่ามีหนี สนิ

Page 33: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

-.442 .054 65.875 1 .000 .643-.018 .047 .145 1 .704 .982

26.724 2 .000-.021 .056 .141 1 .707 .979.210 .050 17.766 1 .000 1.234

145.397 3 .000-.556 .075 55.129 1 .000 .573.021 .066 .104 1 .747 1.021.104 .066 2.516 1 .113 1.110

-.055 .046 1.446 1 .229 .947.161 .066 5.982 1 .014 1.175

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

การเลือกใช้ Ref. ก็มีผลทําให้การแปลผลยากง่ายตา่งกนั

Page 34: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

การบริโภคมากเทียบกบัการบริโภคน้อย: บริโภคมากน่าจะมีหนี สนิมากกวา่?

Categorical Variables Codings

3241 .000 .000 .0003973 1.000 .000 .0002606 .000 1.000 .0001719 .000 .000 1.0003784 .000 .0003644 1.000 .0004111 .000 1.0002944 .000 .0005524 1.000 .0003071 .000 1.000

0-29.99 (,000 baht)30-59.99 (,000 baht)60-499.99 (,000 baht)500 (,000 baht) and over

g_vehicle

0-10 (,000 baht)10-24.99 (,000 baht)25 (,000 baht) and over

g_consum

1-2 members3-4 members5 members and over

g_member

Frequency (1) (2) (3)Parameter coding

Reference

Page 35: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

.424 .048 79.263 1 .000 1.528

.442 .054 65.875 1 .000 1.55526.724 2 .000

.231 .052 19.471 1 .000 1.260

.021 .056 .141 1 .707 1.021145.397 3 .000

.578 .053 120.553 1 .000 1.782

.661 .063 108.359 1 .000 1.936

.556 .075 55.129 1 .000 1.744-.055 .046 1.446 1 .229 .947-.858 .052 277.245 1 .000 .424

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

Page 36: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

.424 .048 79.263 1 .000 1.528

.442 .054 65.875 1 .000 1.55526.724 2 .000

.231 .052 19.471 1 .000 1.260

.021 .056 .141 1 .707 1.021145.397 3 .000

.578 .053 120.553 1 .000 1.782

.661 .063 108.359 1 .000 1.936

.556 .075 55.129 1 .000 1.744-.055 .046 1.446 1 .229 .947-.858 .052 277.245 1 .000 .424

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั ครัวเรือนทีมีทีดินเพิมขึ น1 แปลงครัวเรือนมีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ เพิมขึ นร้อยละ17

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั ครัวเรือนทีมีทีดินเพิมขึ น1 แปลงครัวเรือนมีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ เพิมขึ น1.17 เทา่ ---หรือ

Exp(B) = 1.170 = 1.170 = 117 ครัวเรือนทีมีหนี สนิ1 100 ครัวเรือนไมมี่หนี สนิ

Page 37: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

.424 .048 79.263 1 .000 1.528

.442 .054 65.875 1 .000 1.55526.724 2 .000

.231 .052 19.471 1 .000 1.260

.021 .056 .141 1 .707 1.021145.397 3 .000

.578 .053 120.553 1 .000 1.782

.661 .063 108.359 1 .000 1.936

.556 .075 55.129 1 .000 1.744-.055 .046 1.446 1 .229 .947-.858 .052 277.245 1 .000 .424

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

.424 .048 79.263 1 .000 1.528

.442 .054 65.875 1 .000 1.55526.724 2 .000

.231 .052 19.471 1 .000 1.260

.021 .056 .141 1 .707 1.021145.397 3 .000

.578 .053 120.553 1 .000 1.782

.661 .063 108.359 1 .000 1.936

.556 .075 55.129 1 .000 1.744-.055 .046 1.446 1 .229 .947-.858 .052 277.245 1 .000 .424

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

การแปลผลสามารถทําได้สองกรณี1. แปลผลเป็นเทา่2. แปลผลเป็นร้อยละ

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั เมือครัวเรือนขนาดกลางเปรียบเทียบกบัครัวเรือนขนาดเลก็ พบว่าครัวเรือนมีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ มากกวา่ครัวเรือนขนาดเลก็ถงึ 1.528 เท่าเมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั เมือครัวเรือนขนาดกลางเปรียบเทียบกบัครัวเรือนขนาดเลก็ พบว่าครัวเรือนมีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ มากกวา่ครัวเรือนขนาดเลก็ร้อยละ 52.8

Page 38: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุBlock 1: Method = Enter

Variables in the Equation

.157 .016 95.331 1 .000 1.17092.187 2 .000

.424 .048 79.263 1 .000 1.528

.442 .054 65.875 1 .000 1.55526.724 2 .000

.231 .052 19.471 1 .000 1.260

.021 .056 .141 1 .707 1.021145.397 3 .000

.578 .053 120.553 1 .000 1.782

.661 .063 108.359 1 .000 1.936

.556 .075 55.129 1 .000 1.744-.055 .046 1.446 1 .229 .947-.858 .052 277.245 1 .000 .424

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt.a.

Page 39: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุการทํา Interaction ระหวา่งตวัแปร

การได้รับเงินสง่กลบัได้รับเงิน = 1ไมไ่ด้รับเงิน = 0

ขนาดครัวเรือนครัวเรือนเลก็ = 1ครัวเรือนกลาง = 2ครัวเรือนใหญ่ = 3

ตวัแปร interactionไมไ่ด้รับเงิน = 0ได้รับเงินและเป็นครัวเรือนเลก็ = 1ได้รับเงินและเป็นครัวเรือนกลาง = 2ได้รับเงินและเป็นครัวเรือนใหญ่ = 3

ความเชือ: การสง่เงินกลบัของครัวเรือนแตล่ะขนาดมีความแตกตา่งกนัหรือไม่?

Page 40: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุการทํา Interaction ระหวา่งตวัแปร

Variables in the Equation

.156 .016 94.916 1 .000 1.16959.375 2 .000

.386 .051 57.343 1 .000 1.471

.378 .063 36.181 1 .000 1.45927.355 2 .000

.234 .052 19.823 1 .000 1.263

.020 .056 .126 1 .723 1.020144.036 3 .000

.575 .053 119.539 1 .000 1.778

.658 .064 107.244 1 .000 1.930

.555 .075 54.765 1 .000 1.741-.299 .128 5.430 1 .020 .742.125 .061 4.144 1 .042 1.133

-.820 .055 224.831 1 .000 .440

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittmemb_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt, memb_remitt.

a.

ตวัแปร interaction กบัตวัแปรการได้รับเงินสง่กลบั Significant!

Page 41: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุการแปรผลตวัแปรการได้รับเงินสง่กลบั

Variables in the Equation

.156 .016 94.916 1 .000 1.16959.375 2 .000

.386 .051 57.343 1 .000 1.471

.378 .063 36.181 1 .000 1.45927.355 2 .000

.234 .052 19.823 1 .000 1.263

.020 .056 .126 1 .723 1.020144.036 3 .000

.575 .053 119.539 1 .000 1.778

.658 .064 107.244 1 .000 1.930

.555 .075 54.765 1 .000 1.741-.299 .128 5.430 1 .020 .742.125 .061 4.144 1 .042 1.133

-.820 .055 224.831 1 .000 .440

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittmemb_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt, memb_remitt.

a.

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั ครัวเรือนทีได้รับเงินสง่กลบัเปรียบเทียบกบัครัวเรือนทีไมไ่ด้รับ พบว่า ครัวเรือนทีได้รับเงินสง่กลบั มีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ ลดลง(1-.742)*100 = 25.8% หรือ ลดลงร้อยละ 25.8

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนั ครัวเรือนทีได้รับเงินสง่กลบัเปรียบเทียบกบัครัวเรือนทีไมไ่ด้รับ พบว่า ครัวเรือนทีได้รับเงินสง่กลบั มีโอกาสจะเป็นครัวเรือนทีมีหนี สนิ เหลือเพียงร้อยละ74.2 เมือเทียบกบัครัวเรือนทีไมไ่ด้รับเงินสง่กลบั

Page 42: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentationการบริโภคกบัหนี สนิครัวเรือนในจงัหวดักาญจนบรีุการแปรผลตวัแปร interaction

Variables in the Equation

.156 .016 94.916 1 .000 1.16959.375 2 .000

.386 .051 57.343 1 .000 1.471

.378 .063 36.181 1 .000 1.45927.355 2 .000

.234 .052 19.823 1 .000 1.263

.020 .056 .126 1 .723 1.020144.036 3 .000

.575 .053 119.539 1 .000 1.778

.658 .064 107.244 1 .000 1.930

.555 .075 54.765 1 .000 1.741-.299 .128 5.430 1 .020 .742.125 .061 4.144 1 .042 1.133

-.820 .055 224.831 1 .000 .440

parcelg_memberg_member(1)g_member(2)g_consumg_consum(1)g_consum(2)g_vehicleg_vehicle(1)g_vehicle(2)g_vehicle(3)g_remittmemb_remittConstant

Step1

a

B S.E. Wald df Sig. Exp(B)

Variable(s) entered on step 1: parcel, g_member, g_consum, g_vehicle, g_remitt, memb_remitt.

a.

ตวัแปร interactionไมไ่ด้รับเงิน = 0ได้รับเงินและเป็นครัวเรือนเลก็ = 1ได้รับเงินและเป็นครัวเรือนกลาง = 2ได้รับเงินและเป็นครัวเรือนใหญ่ = 3

เมือให้ปัจจยัอืนๆ มีความเทา่เทียมกนัคา่ของ interaction เพิมขึ นจะพบวา่ครัวเรือนมีโอกาสทีจะเป็นครัวเรือนทีมีหนี สนิ เพิมขึ น1.133 เทา่ นั นหมายความวา่ ....

ครัวเรือนทีได้รับเงินสง่กลบัยิงมีขนาดครัวเรือนใหญ่ยิงมีโอกาสจะมีหนี สนิสงู หรือเงินทีได้รับสง่กลบั อาจหมายถงึเงินทีสง่กลบัมาชําระหนี สนิของครัวเรือน!!!

Page 43: การวิเคราะห์โลจิท Logistic Regression Analysispirun.ku.ac.th/~fedutnw/pubs/da8010_logistic02.pdf · การแปรผล Exp(B) ในโปรแกรม

Thanut Wongsaichue, Ph.D. (Demography)Human and Community Resource Development

190693 Data Analysis and Presentation