Richard McElreath
February 08, 2019
1.8k

# L14 Statistical Rethinking Winter 2019

Lecture 14 of the Dec 2018 through March 2019 edition of Statistical Rethinking. Covers Chapter 12, ordered categorical outcomes and ordered categorical predictor variables.

## Richard McElreath

February 08, 2019

## Transcript

1. ### Ordered Categories, Both Left & Right Statistical Rethinking Winter 2019

Lecture 14 / Week 7
2. ### Ordered categories • How much do you like this class?

(1–7) • How important is income of a potential spouse? (1–10) • How often do you see bats? (never, sometimes, frequently) • Depth harbor seals dive? (shallow, middle, deep)
3. ### Ordered categories • Discrete outcomes • Defined minimum and maximum

• Defined order • “Distances” between categories unknown
4. ### Ordered categories • Hard to model • Not continuous •

Bounded (ceiling & floor) • Not counts • Common solution: ordered (aka ordinal) logistic regression • Good example of making a monster
5. None
6. None
7. None
8. None

10. ### How morally permissible is it to pull the lever? never

1 2 3 4 5 6 7 always
11. None
12. None
13. None
14. None
15. ### How morally permissible is it to push the man? never

1 2 3 4 5 6 7 always
16. None
17. None
18. ### How morally permissible is it to not pull the lever?

never 1 2 3 4 5 6 7 always
19. ### Three principles • Action: Harm caused by action is morally

worse than same harm caused by inaction. • Intention: Harm intended as means to goal worse than same harm foreseen as a side effect of goal. • Contact: Harm caused by physical contact worse than same harm without physical contact.

◦ ◦
24. ### Moral intuitions • data(Trolley) • 331 individuals, 30 scenarios, 9930

responses • How do responses vary with action, intention, contact? • Age, gender, individual? 1 2 3 4 5 6 7 0 500 1500 How permissible Frequency
25. ### 1 2 3 4 5 6 7 0 500 1500

How permissible Frequency 1 2 3 4 5 6 7 0 100 200 300 400 How permissible Frequency contact 1 2 3 4 5 6 7 0 200 600 1000 How permissible Frequency action 1 2 3 4 5 6 7 0 200 600 1000 How permissible Frequency intention
26. ### Ordered logit • A log-cumulative-odds link probability model  

.0/45&34 "/% .*9563&4 1 2 3 4 5 6 7 0 500 1000 1500 2000 response Frequency 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion 1 2 3 4 5 6 7 -2 -1 0 1 response log-cumulative-odds 'ĶĴłĿĲ ƉƉƉ 3FEFTDSJCJOH B EJTDSFUF EJTUSJCVUJPO VTJOH MPHDVNVMBUJWF PEET -Fę )JTUPHSBN PG EJTDSFUF SFTQPOTF JO UIF TBNQMF .JEEMF \$VNV
27. ### Ordered logit • A log-cumulative-odds link probability model  

.0/45&34 "/% .*9563&4 1 2 3 4 5 6 7 0 500 1000 1500 2000 response Frequency 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion 1 2 3 4 5 6 7 -2 -1 0 1 response log-cumulative-odds 'ĶĴłĿĲ ƉƉƉ 3FEFTDSJCJOH B EJTDSFUF EJTUSJCVUJPO VTJOH MPHDVNVMBUJWF PEET -Fę )JTUPHSBN PG EJTDSFUF SFTQPOTF JO UIF TBNQMF .JEEMF \$VNV
28. ### Ordered logit • A log-cumulative-odds link probability model  

.0/45&34 "/% .*9563&4 1 2 3 4 5 6 7 0 500 1000 1500 2000 response Frequency 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion 1 2 3 4 5 6 7 -2 -1 0 1 response log-cumulative-odds 'ĶĴłĿĲ ƉƉƉ 3FEFTDSJCJOH B EJTDSFUF EJTUSJCVUJPO VTJOH MPHDVNVMBUJWF PEET -Fę )JTUPHSBN PG EJTDSFUF SFTQPOTF JO UIF TBNQMF .JEEMF \$VNV
29. ### Ordered logit • A log-cumulative-odds link probability model UZ OBUVSBMMZ

DPOTUSBJOT JUTFMG UP OFWFS FYDFFEJOH B UPUBM QSPCB POF "OE CFDBVTF UIJT JT BO PSEFSFE EFOTJUZ XF LOPX UIBU UIF WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion
30. ### Ordered logit • A log-cumulative-odds link probability model UZ OBUVSBMMZ

DPOTUSBJOT JUTFMG UP OFWFS FYDFFEJOH B UPUBM QSPCB POF "OE CFDBVTF UIJT JT BO PSEFSFE EFOTJUZ XF LOPX UIBU UIF WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion cumulative log-odds
31. ### Ordered logit • A log-cumulative-odds link probability model UZ OBUVSBMMZ

DPOTUSBJOT JUTFMG UP OFWFS FYDFFEJOH B UPUBM QSPCB POF "OE CFDBVTF UIJT JT BO PSEFSFE EFOTJUZ XF LOPX UIBU UIF WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion cumulative log-odds response
32. ### Ordered logit • A log-cumulative-odds link probability model UZ OBUVSBMMZ

DPOTUSBJOT JUTFMG UP OFWFS FYDFFEJOH B UPUBM QSPCB POF "OE CFDBVTF UIJT JT BO PSEFSFE EFOTJUZ XF LOPX UIBU UIF WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion cumulative log-odds response category
33. ### Ordered logit • A log-cumulative-odds link probability model UZ OBUVSBMMZ

DPOTUSBJOT JUTFMG UP OFWFS FYDFFEJOH B UPUBM QSPCB POF "OE CFDBVTF UIJT JT BO PSEFSFE EFOTJUZ XF LOPX UIBU UIF WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion cumulative log-odds response category linear model
34. ### Ordered logit • A log-cumulative-odds link probability model WF MPHPEET

PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion  03%&3&% \$"5&(03*\$"- 065\$0.&4  UTFMG %P UIJT CZ UBLJOH  BOE TPMWJOH GPS 1S(Z J ≤ L) "GUFS B FCSB ZPV HFU 1S(Z J ≤ L) = FYQ(φL)  + FYQ(φL) . IU SFDPHOJ[F UIJT QSPCBCJMJUZ BT UIF MPHJTUJD TBNF BT JO UIF MBTU *U BSPTF JO UIF TBNF XBZ FTUBCMJTIJOH UIF MPHJTUJD GVODUJPO BT STF MJOL GPS UIF CJOPNJBM NPEFM #VU OPX XF IBWF B DVNVMBUJWF ODF UIF QSPCBCJMJUZ 1S(Z J ≤ L) JT DVNVMBUJWF XF TUJMM OFFE MJLFMJIPPET XIJDI BSF OPU DVNVMBUJWF 4P IPX EP
35. ### Ordered logit • A log-cumulative-odds link probability model WF MPHPEET

PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion  03%&3&% \$"5&(03*\$"- 065\$0.&4  UTFMG %P UIJT CZ UBLJOH  BOE TPMWJOH GPS 1S(Z J ≤ L) "GUFS B FCSB ZPV HFU 1S(Z J ≤ L) = FYQ(φL)  + FYQ(φL) . IU SFDPHOJ[F UIJT QSPCBCJMJUZ BT UIF MPHJTUJD TBNF BT JO UIF MBTU *U BSPTF JO UIF TBNF XBZ FTUBCMJTIJOH UIF MPHJTUJD GVODUJPO BT STF MJOL GPS UIF CJOPNJBM NPEFM #VU OPX XF IBWF B DVNVMBUJWF ODF UIF QSPCBCJMJUZ 1S(Z J ≤ L) JT DVNVMBUJWF XF TUJMM OFFE MJLFMJIPPET XIJDI BSF OPU DVNVMBUJWF 4P IPX EP
36. ### 1 2 3 4 5 6 7 0.0 0.2 0.4

0.6 0.8 1.0 response cumulative proportion Ordered logit • A log-cumulative-odds link probability model WF MPHPEET PG UIF MBSHFTU PCTFSWBCMF WBMVF NVTU CF +∞ XIJDI NF BT DVNVMBUJWF QSPCBCJMJUZ PG POF 5IJT BODIPST UIF EJTUSJ OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ  03%&3&% \$"5&(03*\$"- 065\$0.&4  UTFMG %P UIJT CZ UBLJOH  BOE TPMWJOH GPS 1S(Z J ≤ L) "GUFS B FCSB ZPV HFU 1S(Z J ≤ L) = FYQ(φL)  + FYQ(φL) . IU SFDPHOJ[F UIJT QSPCBCJMJUZ BT UIF MPHJTUJD TBNF BT JO UIF MBTU *U BSPTF JO UIF TBNF XBZ FTUBCMJTIJOH UIF MPHJTUJD GVODUJPO BT STF MJOL GPS UIF CJOPNJBM NPEFM #VU OPX XF IBWF B DVNVMBUJWF ODF UIF QSPCBCJMJUZ 1S(Z J ≤ L) JT DVNVMBUJWF XF TUJMM OFFE MJLFMJIPPET XIJDI BSF OPU DVNVMBUJWF 4P IPX EP
37. ### 1 2 3 4 5 6 7 0.0 0.2 0.4

0.6 0.8 1.0 response cumulative proportion Ordered logit • A log-cumulative-odds link probability model OE TUBOEBSEJ[FT JU BU UIF TBNF UJNF *G ZPV TUBSU JOTUFBE XJUI JOEJWJEVBM QSPCBCJMJUJFT PG FBDI PVUDPNF UIFO ZPVÔE IBWF UP EBSEJ[F UIFTF QSPCBCJMJUJFT UP FOTVSF UIFZ TVN UP FYBDUMZ POF *U U UP CF FBTJFS UP KVTU TUBSU XJUI UIF DVNVMBUJWF QSPCBCJMJUZ BOE SL CBDLXBSET UP UIF JOEJWJEVBM QSPCBCJMJUJFT * LOPX UIJT TFFNT VU *ÔMM XBML ZPV UISPVHI JU U XF XBOU JT GPS UIF DVNVMBUJWF MPHPEET PG BO PCTFSWFE WBMVF Z J VBMUPPSMFTTUIBO TPNF QPTTJCMF WBMVF L UP CF MPH 1S(Z J ≤ L)  − 1S(Z J ≤ L) = φL,  L JT B DPOUJOVPVT WBMVF EJGGFSFOU GPS FBDI PCTFSWBCMF WBMVF L BLF UIJT WBMVF JOUP B MJOFBS NPEFM JO B CJU 'PS OPX JUÔT KVTU B EFS 5IF BCPWF GVODUJPO JT KVTU B EJSFDU FNCPEJNFOU PG UIF MPH E DVNVMBUJWF EFOTJUZ PCKFDUJWFT XFÔWF TUBUFE TP GBS *U BDUVBMMZ IJOH FMTF BU BMM /PX XF TPMWF GPS UIF DVNVMBUJWF QSPCBCJMJUZ  03%&3&% \$"5&(03*\$"- 065\$0.&4  UTFMG %P UIJT CZ UBLJOH  BOE TPMWJOH GPS 1S(Z J ≤ L) "GUFS B FCSB ZPV HFU 1S(Z J ≤ L) = FYQ(φL)  + FYQ(φL) . IU SFDPHOJ[F UIJT QSPCBCJMJUZ BT UIF MPHJTUJD TBNF BT JO UIF MBTU *U BSPTF JO UIF TBNF XBZ FTUBCMJTIJOH UIF MPHJTUJD GVODUJPO BT STF MJOL GPS UIF CJOPNJBM NPEFM #VU OPX XF IBWF B DVNVMBUJWF ODF UIF QSPCBCJMJUZ 1S(Z J ≤ L) JT DVNVMBUJWF XF TUJMM OFFE MJLFMJIPPET XIJDI BSF OPU DVNVMBUJWF 4P IPX EP IJT UIJOH 8FMM JUÔT B QSPCBCJMJUZ EFOTJUZ TP ZPV DBO VTF JU UP F MJLFMJIPPE PG BOZ PCTFSWBUJPO Z J  #Z EFGJOJUJPO JO B EJTDSFUF  03%&3&% \$"5&(03*\$"- 065\$0.&4  MG %P UIJT CZ UBLJOH  BOE TPMWJOH GPS 1S(Z J ≤ L) "GUFS B B ZPV HFU 1S(Z J ≤ L) = FYQ(φL)  + FYQ(φL) . SFDPHOJ[F UIJT QSPCBCJMJUZ BT UIF MPHJTUJD TBNF BT JO UIF MBTU BSPTF JO UIF TBNF XBZ FTUBCMJTIJOH UIF MPHJTUJD GVODUJPO BT MJOL GPS UIF CJOPNJBM NPEFM #VU OPX XF IBWF B DVNVMBUJWF F UIF QSPCBCJMJUZ 1S(Z J ≤ L) JT DVNVMBUJWF TUJMM OFFE MJLFMJIPPET XIJDI BSF OPU DVNVMBUJWF 4P IPX EP T UIJOH 8FMM JUÔT B QSPCBCJMJUZ EFOTJUZ TP ZPV DBO VTF JU UP JLFMJIPPE PG BOZ PCTFSWBUJPO Z J  #Z EFGJOJUJPO JO B EJTDSFUF EFOTJUZ UIF MJLFMJIPPE PG BOZ PCTFSWBUJPO Z J = L NVTU CF 1S(Z J = L) = 1S(Z J ≤ L) − 1S(Z J ≤ L − ).  ZT UIBU TJODF UIF MPHJTUJD JT DVNVMBUJWF XF DBO DPNQVUF UIF CBCJMJUZ PG FYBDUMZ Z J = L CZ TVCUSBDUJOH UIF DVNVMBUJWF QSPC OF PCTFSWBCMF WBMVF MPXFS UIBO L UJOH UIF (-. JO UIF φ 8FÔSF BMNPTU SFBEZ UP XBML UISPVHI
38. ### • Cutpoints: vector of intercepts • Linear model influences every

category Ordered logit E UIF QPTUFSJPS EJTUSJCVUJPO JT DPNQVUFE UIF VTVBM XBZ IFBE BOE TFF IPX JUT EPOF JO DPEF GPSN \$POWFOUJPOT GPS XSJUJOH NBUIFNBUJDBM PSEFSFE MPHJU WBSZ B MPU 8FMM VTF UIJT DPOWFOUJPO 3J ∼ 0SEFSFEMPHJU(φJ, κ) [probability of data] φJ =  [linear model] κL ∼ /PSNBM(, .) [common prior for each intercept] YQSFTT UIF NPEFM NPSF MJUFSBMMZ BT XFMM 3J ∼ \$BUFHPSJDBM(Q) [probability of data] Q = R [probabilities of each value L] QL = RL − RL− GPS , > L >  Q, =  − RL− MPHJU(RL) = κL − φJ [cumulative logit link] φJ = UFSNT PG MJOFBS NPEFM [linear model] κL ∼ /PSNBM(, .) [common prior for each intercept] EJTUSJCVUJPO JT SFBMMZ KVTU B DBUFHPSJDBM EJTUSJCVUJPO UIBU UBLFT B WFDUPS Q = , Q, Q} PG QSPCBCJMJUJFT PG FBDI SFTQPOTF WBMVF CFMPX UIF NBYJNVN SFTQPOTF
39. ### Ordered logit  03%&3&% \$"5&(03*\$"- 065\$0.&4 DPEF BMM UIF SPVUJOF

JOUFSNFEJBUF DBMDVMBUJPOT BCPWF 4P UP ĕU UIF CBTJD NPEF OP QSFEJDUPS WBSJBCMFT (ǎǏǡǒ ʚǶ 0'(ǿ '\$./ǿ  ʡ *-'*"\$/ǿ Ǎ Ǣ 0/+*\$)/. ȀǢ 0/+*\$)/. ʡ )*-(ǿ Ǎ Ǣ ǎǡǒ Ȁ Ȁ Ǣ /ʙ'\$./ǿ ʙɶ- .+*). ȀǢ #\$).ʙǑ Ǣ *- .ʙǐ Ȁ ćBU [FSP JO UIF *-'*"\$/ JT B QMBDFIPMEFS GPS UIF MJOFBS NPEFM UIBU XFMM *G ZPV XBOU UP VTF UIJT NPEFM JO ,0+ JOTUFBE ZPVMM OFFE UP TQFDJGZ UIF . UIF DVUQPJOUT 0UIFSXJTF JUMM IBWF B WFSZ IBSE UJNF HFUUJOH TUBSUFE ćF FY JNQPSUBOU CVU UIFJS PSEFSJOH PO UIF MPHDVNVMBUJWFPEET TDBMF JT JNQPSUBO XPSL (ǎǏǡǒ, ʚǶ ,0+ǿ '\$./ǿ - .+*). ʡ *-'*"\$/ǿ Ǎ Ǣ ǿǎǢǏǢǐǢǑǢǒǢǓȀ ȀǢ ǿǎǢǏǢǐǢǑǢǒǢǓȀ ʡ )*-(ǿ Ǎ Ǣ ǎǡǒ Ȁ Ȁ Ǣ /ʙ Ǣ PPE CZ TVCUSBDUJPO QL = 1S(ZJ = L) = 1S(ZJ ≤ L) − 1S(ZJ ≤ L − )  VF MJOF TFHNFOUT JO 'ĶĴłĿĲ ƉƊƍ BSF UIFTF MJLFMJIPPET DPNQVUFE CZ TVCUSBDUJPO 8JUI O IBOE UIF QPTUFSJPS EJTUSJCVUJPO JT DPNQVUFE UIF VTVBM XBZ UT HP BIFBE BOE TFF IPX JUT EPOF JO DPEF GPSN \$POWFOUJPOT GPS XSJUJOH NBUIFNBUJDBM PG UIF PSEFSFE MPHJU WBSZ B MPU 8FMM VTF UIJT DPOWFOUJPO 3J ∼ 0SEFSFEMPHJU(φJ, κ) [probability of data] φJ =  [linear model] κL ∼ /PSNBM(, .) [common prior for each intercept] DBO FYQSFTT UIF NPEFM NPSF MJUFSBMMZ BT XFMM 3J ∼ \$BUFHPSJDBM(Q) [probability of data] Q = R [probabilities of each value L] QL = RL − RL− GPS , > L >  Q, =  − RL− MPHJU(RL) = κL − φJ [cumulative logit link] φJ = UFSNT PG MJOFBS NPEFM [linear model] κL ∼ /PSNBM(, .) [common prior for each intercept] SEFSFE EJTUSJCVUJPO JT SFBMMZ KVTU B DBUFHPSJDBM EJTUSJCVUJPO UIBU UBLFT B WFDUPS Q =
40. ### Ordered logit  03%&3&% \$"5&(03*\$"- 065\$0.&4 DPEF BMM UIF SPVUJOF

JOUFSNFEJBUF DBMDVMBUJPOT BCPWF 4P UP ĕU UIF CBTJD NPEF OP QSFEJDUPS WBSJBCMFT (ǎǏǡǒ ʚǶ 0'(ǿ '\$./ǿ  ʡ *-'*"\$/ǿ Ǎ Ǣ 0/+*\$)/.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ʙǶǏǢǏʙǶǎǢǐʙǍǢǑʙǎǢǒʙǏǢǓʙǏǡǒȀ Ȁ ćF QPTUFSJPS EJTUSJCVUJPO PG UIF DVUQPJOUT JT PO UIF MPHDVNVMBUJWFPEET TDBMF +- \$.ǿ (ǎǏǡǒ Ǣ  +/#ʙǏ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/ 0/+*\$)/.ȁǎȂ ǶǎǡǖǏ ǍǡǍǐ ǶǎǡǖǓ ǶǎǡǕǔ ǎǑǓǍ ǎ 0/+*\$)/.ȁǏȂ ǶǎǡǏǔ ǍǡǍǏ Ƕǎǡǐǎ ǶǎǡǏǐ ǏǍǖǎ ǎ 0/+*\$)/.ȁǐȂ ǶǍǡǔǏ ǍǡǍǏ ǶǍǡǔǒ ǶǍǡǓǕ ǏǑǕǍ ǎ 0/+*\$)/.ȁǑȂ ǍǡǏǒ ǍǡǍǏ ǍǡǏǏ ǍǡǏǕ ǏǔǍǎ ǎ 0/+*\$)/.ȁǒȂ ǍǡǕǖ ǍǡǍǏ ǍǡǕǒ ǍǡǖǏ Ǐǐǔǐ ǎ 0/+*\$)/.ȁǓȂ ǎǡǔǔ ǍǡǍǐ ǎǡǔǏ ǎǡǕǎ ǏǐǑǒ ǎ 4JODF UIFSF JT B MPU PG EBUB IFSF UIF QPTUFSJPS GPS FBDI JOUFSDFQU JT RVJUF QSFDJTFMZ F BT ZPV DBO TFF GSPN UIF UJOZ TUBOEBSE EFWJBUJPOT 5P HFU DVNVMBUJWF QSPCBCJMJUJFT C
41. ### Back to probability scale Ȁ Ǣ /ʙ Ǣ ./-/ʙ'\$./ǿǎʙǶǏǢǏʙǶǎǢǐʙǍǢǑʙǎǢǒʙǏǢǓʙǏǡǒȀ Ȁ

ćF QPTUFSJPS EJTUSJCVUJPO PG UIF DVUQPJOUT JT PO UIF MPHDVNVMBUJWFPEET TDBMF 3 DPEF  +- \$.ǿ (ǎǏǡǒ Ǣ  +/#ʙǏ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/ 0/+*\$)/.ȁǎȂ ǶǎǡǖǏ ǍǡǍǐ ǶǎǡǖǓ ǶǎǡǕǔ ǎǑǓǍ ǎ 0/+*\$)/.ȁǏȂ ǶǎǡǏǔ ǍǡǍǏ Ƕǎǡǐǎ ǶǎǡǏǐ ǏǍǖǎ ǎ 0/+*\$)/.ȁǐȂ ǶǍǡǔǏ ǍǡǍǏ ǶǍǡǔǒ ǶǍǡǓǕ ǏǑǕǍ ǎ 0/+*\$)/.ȁǑȂ ǍǡǏǒ ǍǡǍǏ ǍǡǏǏ ǍǡǏǕ ǏǔǍǎ ǎ 0/+*\$)/.ȁǒȂ ǍǡǕǖ ǍǡǍǏ ǍǡǕǒ ǍǡǖǏ Ǐǐǔǐ ǎ 0/+*\$)/.ȁǓȂ ǎǡǔǔ ǍǡǍǐ ǎǡǔǏ ǎǡǕǎ ǏǐǑǒ ǎ 4JODF UIFSF JT B MPU PG EBUB IFSF UIF QPTUFSJPS GPS FBDI JOUFSDFQU JT RVJUF QSFDJTFMZ FTUJNBUFE BT ZPV DBO TFF GSPN UIF UJOZ TUBOEBSE EFWJBUJPOT 5P HFU DVNVMBUJWF QSPCBCJMJUJFT CBDL 3 DPEF  \$)1Ǿ'*"\$/ǿ* !ǿ(ǎǏǡǒȀȀ 0/+*\$)/.ȁǎȂ 0/+*\$)/.ȁǏȂ 0/+*\$)/.ȁǐȂ 0/+*\$)/.ȁǑȂ 0/+*\$)/.ȁǒȂ 0/+*\$)/.ȁǓȂ ǍǡǎǏǕǐǐǏǒ ǍǡǏǎǖǕǎǏǔ ǍǡǐǏǔǓǕǎǖ ǍǡǒǓǎǒǔǒǎ ǍǡǔǍǕǔǐǎǍ ǍǡǕǒǑǐǒǒǖ "OE PG DPVSTF UIPTF BSF UIF TBNF BT UIF WBMVFT JO 0(Ǿ+-Ǿ& UIBU XF DPNQVUFE FBSMJFS #VU OPX XF BMTP IBWF B QPTUFSJPS EJTUSJCVUJPO BSPVOE UIFTF WBMVFT BOE XFSF SFBEZ UP BEE QSF EJDUPS WBSJBCMFT JO UIF OFYU TFDUJPO  "EEJOH QSFEJDUPS WBSJBCMFT ćJT ĘVSSZ PG DPNQVUBUJPO IBT HPUUFO VT WFSZ MJUUMF TP GBS BTJEF GSPN B #BZFTJBO SFQSFTFOUBUJPO PG B IJTUPHSBN #VU BMM PG JU IBT CFFO OFDFTTBSZ JO PSEFS UP QSFQBSF UIF NPEFM GPS UIF BEEJUJPO PG QSFEJDUPS WBSJBCMFT UIBU PCFZ UIF PSEFSFE - .+*). ʡ *-'*"\$/ǿ Ǎ Ǣ ǿǎǢǏǢǐǢǑǢǒǢǓȀ ȀǢ ǿǎǢǏǢǐǢǑǢǒǢǓȀ ʡ )*-(ǿ Ǎ Ǣ ǎǡǒ Ȁ Ȁ Ǣ /ʙ Ǣ ./-/ʙ'\$./ǿǎʙǶǏǢǏʙǶǎǢǐʙǍǢǑʙǎǢǒʙǏǢǓʙǏǡǒȀ Ȁ ćF QPTUFSJPS EJTUSJCVUJPO PG UIF DVUQPJOUT JT PO UIF MPHDVNVMBUJWFPEET TDBMF 3 DPEF  +- \$.ǿ (ǎǏǡǒ Ǣ  +/#ʙǏ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/ 0/+*\$)/.ȁǎȂ ǶǎǡǖǏ ǍǡǍǐ ǶǎǡǖǓ ǶǎǡǕǔ ǎǑǓǍ ǎ 0/+*\$)/.ȁǏȂ ǶǎǡǏǔ ǍǡǍǏ Ƕǎǡǐǎ ǶǎǡǏǐ ǏǍǖǎ ǎ 0/+*\$)/.ȁǐȂ ǶǍǡǔǏ ǍǡǍǏ ǶǍǡǔǒ ǶǍǡǓǕ ǏǑǕǍ ǎ 0/+*\$)/.ȁǑȂ ǍǡǏǒ ǍǡǍǏ ǍǡǏǏ ǍǡǏǕ ǏǔǍǎ ǎ 0/+*\$)/.ȁǒȂ ǍǡǕǖ ǍǡǍ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 ǎ 0/+*\$)/.ȁǓȂ ǎǡǔǔ ǍǡǍǐ ǎǡǔǏ ǎǡǕǎ ǏǐǑǒ ǎ 4JODF UIFSF JT B MPU PG EBUB IFSF UIF QPTUFSJPS GPS FBDI JOUFSDFQU JT RVJUF QSFDJTFMZ FTUJNBUFE BT ZPV DBO TFF GSPN UIF UJOZ TUBOEBSE EFWJBUJPOT 5P HFU DVNVMBUJWF QSPCBCJMJUJFT CBDL 3 DPEF  \$)1Ǿ'*"\$/ǿ* !ǿ(ǎǏǡǒȀȀ 0/+*\$)/.ȁǎȂ 0/+*\$)/.ȁǏȂ 0/+*\$)/.ȁǐȂ 0/+*\$)/.ȁǑȂ 0/+*\$)/.ȁǒȂ 0/+*\$)/.ȁǓȂ ǍǡǎǏǕǐǐǏǒ ǍǡǏǎǖǕǎǏǔ ǍǡǐǏǔǓǕǎǖ ǍǡǒǓǎǒǔǒǎ ǍǡǔǍǕǔǐǎǍ ǍǡǕǒǑǐǒǒǖ "OE PG DPVSTF UIPTF BSF UIF TBNF BT UIF WBMVFT JO 0(Ǿ+-Ǿ& UIBU XF DPNQVUFE FBSMJFS #VU OPX XF BMTP IBWF B QPTUFSJPS EJTUSJCVUJPO BSPVOE UIFTF WBMVFT BOE XFSF SFBEZ UP BEE QSF EJDUPS WBSJBCMFT JO UIF OFYU TFDUJPO  "EEJOH QSFEJDUPS WBSJBCMFT ćJT ĘVSSZ PG DPNQVUBUJPO IBT HPUUFO VT WFSZ MJUUMF TP GBS BTJEF GSPN B #BZFTJBO SFQSFTFOUBUJPO PG B IJTUPHSBN #VU BMM PG JU IBT CFFO OFDFTTBSZ JO PSEFS UP QSFQBSF UIF NPEFM GPS UIF BEEJUJPO PG QSFEJDUPS WBSJBCMFT UIBU PCFZ UIF PSEFSFE DPOTUSBJOU PO UIF PVUDPNFT 1 2 3 4 5 6 7 0.0 0.2 0.4 0.6 0.8 1.0 response cumulative proportion
43. ### Adding predictor variables BSF UIF NPEFM GPS UIF BEEJUJPO PG

QSFEJDUPS WBSJBCMFT UIBU PCFZ UIF PSEFSFE DPOTUS PVUDPNFT JODMVEF QSFEJDUPS WBSJBCMFT XF EFĕOF UIF MPHDVNVMBUJWFPEET PG FBDI SFTQPOTF PG JUT JOUFSDFQU αL BOE B UZQJDBM MJOFBS NPEFM 4VQQPTF GPS FYBNQMF XF XBOU UP DUPS Y UP UIF NPEFM 8FMM EP UIJT CZ EFĕOJOH B MJOFBS NPEFM φJ = βYJ  ćFO F UJWF MPHJU CFDPNFT MPH 1S(ZJ ≤ L)  − 1S(ZJ ≤ L) = αL − φJ φJ = βYJ N BVUPNBUJDBMMZ FOTVSFT UIF DPSSFDU PSEFSJOH PG UIF PVUDPNF WBMVFT XIJMF TUJMM N IF MJLFMJIPPE PG FBDI JOEJWJEVBM WBMVF BT UIF QSFEJDUPS YJ DIBOHFT WBMVF 8IZ JT NPEFM φ TVCUSBDUFE GSPN FBDI JOUFSDFQU #FDBVTF JG XF EFDSFBTF UIF MPHDVNVMB In general: Trolley data:  \$POUBDU  *OUFOUJPO  "DUJPO BOE JOUFOUJPO  \$POUBDU BOE JOUFOUJPO ćF MBTU UXP SFQSFTFOU JOUFSBDUJPOTUIF JOĘVFODF PG JOUFOUJPO NBZ EFQFOE VQPO UI OFPVT QSFTFODF PG BDUJPO PS DPOUBDU *MM VTF UIF JOEJDBUPS WBSJBCMFT EJSFDUMZ UIJT UJN PG BO JOEFY WBSJBCMF ćJT XJMM MFU NF TIPX ZPV B VTFGVM USJDL GPS EFĕOJOH JOUFSBDU DBO NBLF ZPVS NPEFMT FBTJFS UP SFBE BOE EFCVH ćF MPHDVNVMBUJWFPEET PG FBDI SFTQPOTF L XJMM OPX CF MPH 1S(ZJ ≤ L)  − 1S(ZJ ≤ L) = αL − φJ φJ = β" "J + β\$ \$J + B*,J *J B*,J = β* + β*" "J + β*\$ \$J XIFSF "J JOEJDBUFT UIF WBMVF PG /\$*) PO SPX J *J JOEJDBUFT UIF WBMVF PG \$)/ )/\$*) BOE \$J JOEJDBUFT UIF WBMVF PG *)// PO SPX J 8IBU XFWF EPOF IFSF JT EFĕOF UIF
44. ### Adding predictor variables OEFY WBSJBCMF ćJT XJMM MFU NF TIPX

ZPV B VTFGVM USJDL GPS EFĕOJOH JOUFSBDUJPOT UI BLF ZPVS NPEFMT FBTJFS UP SFBE BOE EFCVH F MPHDVNVMBUJWFPEET PG FBDI SFTQPOTF L XJMM OPX CF MPH 1S(ZJ ≤ L)  − 1S(ZJ ≤ L) = αL − φJ φJ = β" "J + β\$ \$J + B*,J *J B*,J = β* + β*" "J + β*\$ \$J "J JOEJDBUFT UIF WBMVF PG /\$*) PO SPX J *J JOEJDBUFT UIF WBMVF PG \$)/ )/\$*) PO SPX JOEJDBUFT UIF WBMVF PG *)// PO SPX J 8IBU XFWF EPOF IFSF JT EFĕOF UIF MPHPE QPTTJCMF SFTQPOTF UP CF BO BEEJUJWF NPEFM PG UIF GFBUVSFT PG UIF TUPSZ DPSSFTQPOEJOH FTQPOTF 'PS UIF JOUFSBDUJPOT PG JOUFOUJPO XJUI BDUJPO BOE DPOUBDU * VTFE BO BDDFTTP NPEFM B*  ćJT KVTU NBLFT UIF OPUBUJPO DMFBSFS CZ EFĕOJOH UIF SFMBUJPOTIJQ CFUXF PO BOE SFTQPOTF BT B GVODUJPO PG UIF PUIFS WBSJBCMFT :PV DPVME TVCTUJUVUF B* JOUP U DIBOHJOH BOZUIJOH V ĕU UIJT NPEFM KVTU BT ZPVE FYQFDU CZ BEEJOH UIF TMPQFT BOE QSFEJDUPS WBSJBCMFT \$ QBSBNFUFS JOTJEF *-'*"\$/ )FSFT B XPSLJOH NPEFM MJOFBS NPEFM B*  ćJT KVTU NBLFT UIF OPUBUJPO DMFBSFS CZ EFĕOJOH UIF SFMBUJPOTIJQ JOUFOUJPO BOE SFTQPOTF BT B GVODUJPO PG UIF PUIFS WBSJBCMFT :PV DPVME TVCTUJUVUF B XJUIPVU DIBOHJOH BOZUIJOH :PV ĕU UIJT NPEF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#*2 /# (ǡ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/   ǶǎǡǏǑ ǍǡǍǖ Ƕǎǡǐǖ ǶǎǡǍǕ ǎǍǐǕ ǎ   ǶǍǡǑǐ ǍǡǍǕ ǶǍǡǒǓ ǶǍǡǐǎ ǖǏǔ ǎ  ǶǍǡǐǑ ǍǡǍǔ ǶǍǡǑǒ ǶǍǡǏǑ ǎǎǓǕ ǎ  ǶǍǡǏǖ ǍǡǍǓ ǶǍǡǐǕ ǶǍǡǏǍ ǕǍǓ ǎ  ǶǍǡǑǔ ǍǡǍǒ ǶǍǡǒǓ ǶǍǡǐǖ ǎǍǑǏ ǎ   .0/45&34 "/% .*9563&4 *WF TVQQSFTTFE UIF DVUQPJOUT ćFZ BSFOU PG NVDI JOUFSFTU BU UIF NPNFOU #VU MPPL BU UIF QPTUFSJPS EJTUSJCVUJPOT PG UIF TMPQFT ćFZ BSF BMM SFMJBCMZ OFHBUJWF &BDI PG UIFTF TUPSZ GFB UVSFT SFEVDFT UIF SBUJOHUIF BDDFQUBCJMJUZ PG UIF TUPSZ 1MPUUJOH UIF NBSHJOBM QPTUFSJPS EJT USJCVUJPOT NBLFT UIF SFMBUJWF FČFDU TJ[FT NVDI DMFBSFS PEF  +'*/ǿ +- \$.ǿ(ǎǏǡǓȀ Ǣ 3'\$(ʙǿǶǎǡǑǢǍȀ Ȁ bA bI bC bIA bIC -1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 Value
46. ### Plotting ordered logits • Oh, bother: Posterior prediction a vector

of probabilities, one for each level of outcome • How to plot this? • Several useful options
47. ### 1 2 3 4 5 6 7 0 1 0.0

0.5 1.0 intention probability action=0, contact=0 0 0.0 0.5 1.0 intention probability action=1, contac 0 150 200 uency action=0, contact=0 200 uency action=1, contac Figure 12.6
48. ### Figure 12.6  03%&3&% \$"5&(03*\$"- 065\$0.&4  0 1 0.0

0.5 1.0 intention probability action=0, contact=0 0 1 0.0 0.5 1.0 intention probability action=1, contact=0 0 1 0.0 0.5 1.0 intention probability action=0, contact=1 00 150 200 quency action=0, contact=0 200 quency action=1, contact=0 50 250 quency action=0, contact=1
49. ### Ordered categorical predictors • Not just outcomes, also predictors •

Ordinary metric predictor assumes each unit change same change (on linear scale) • Ordered category predictor: Each level could have different size of influence, but all effects in same direction (monotonic) • Example: Education  03%&3&% \$"5&(03*\$"- 13&%*\$5034  PSEJOBM WBMVF JT UIF TBNF -VDLJMZ XF EPOU IBWF UP 8F DBO DPOTUSVDU PSEFSFE FČFDUT BT XFMM BT PSEFSFE PVUDPNFT ćF 5SPMMFZ EBUB GSPN UIF QSFWJPVT TFDUJPO DPOUBJOT B HPPE FYBNQMF -FUT MPPL BU UIF 0 WBSJBCMF XIJDI DPOUBJOT MFWFMT PG DPNQMFUFE FEVDBUJPO GPS FBDI JOEJWJEVBM 3 DPEF  '\$--4ǿ- /#\$)&\$)"Ȁ /ǿ-*'' 4Ȁ  ʚǶ -*'' 4 ' 1 '.ǿɶ 0Ȁ ȁǎȂ ǫ# '*-Ǫ.  "- ǫ ǫ' ( )/-4 #**'ǫ ǫ-0/  "- ǫ ȁǑȂ ǫ \$"# #**' -0/ ǫ ǫ./ -Ǫ.  "- ǫ ǫ\$' #**'ǫ ȁǔȂ ǫ*( *'' " ǫ ǫ*( \$"# #**'ǫ ćFSF BSF  EJČFSFOU MFWFMT PG DPNQMFUFE FEVDBUJPO JO UIF TBNQMF 6OGPSUVOBUFMZ UIFZ BSFOU
50. ### Ordered categorical predictors • Strategy • Each level gets a

unique parameter • Parameters sum to total maximum effect of education • Assign prior to total effect and to proportions of total effect  03%&3&% \$"5&(03*\$"- 13&%*\$5034  PSEJOBM WBMVF JT UIF TBNF -VDLJMZ XF EPOU IBWF UP 8F DBO DPOTUSVDU PSEFSFE FČFDUT BT XFMM BT PSEFSFE PVUDPNFT ćF 5SPMMFZ EBUB GSPN UIF QSFWJPVT TFDUJPO DPOUBJOT B HPPE FYBNQMF -FUT MPPL BU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FT GSPN  UP  JO UIF SJHIU PSEFS PG BTDFOEJOH DPNQMFUFE FEVDB
51. ### Ordered categorical predictors • Linear predictor equation: 0Ǿ) 2 DPOUBJOT

WBMVFT GSPN  UP  JO UIF SJHIU PSEFS PG BTDFOEJOH DPNQMFUF X GPS UIF GVO QBSU ćF OPUJPO XJUI PSEFSFE QSFEJDUPS WBSJBCMFT JT UIBU FBDI TU NFT XJUI JUT PXO JODSFNFOUBM PS NBSHJOBM FČFDU PO UIF PVUDPNF PS MJOFBS NQMJFT XF XBOU UP JOGFS VTJOH B QBSBNFUFS FBDI PG UIPTF JODSFNFOUBM FČFD JPO MFWFMT XFMM OFFE  QBSBNFUFST ćF ĕSTU MFWFM &MFNFOUBSZ 4DIPPM X OUP UIF JOUFSDFQU ćFO UIF ĕSTU JODSFNFOU DPNFT GSPN NPWJOH GSPN &MF P .JEEMF 4DIPPM *O UIBU DBTF XFMM BEE UIF ĕSTU FČFDU UP UIF MJOFBS NPEFM φJ = δ + PUIFS TUVČ IF QBSBNFUFS δ JT UIF FČFDU PG DPNQMFUJOH .JEEMF 4DIPPM BOE iPUIFS TUVČw S UFSNT ZPV XBOU JO ZPVS MJOFBS NPEFM "OPUIFS JOEJWJEVBM HPFT PO UP ĕOJTI NF )JHI 4DIPPM BOE UIBU JOEJWJEVBMT MJOFBS NPEFM JT φJ = δ + δ + PUIFS TUVČ  JT UIF JODSFNFOUBM FČFDU PG ĕOJTIJOH TPNF CVU OPU BMM )JHI 4DIPPM *U BEEJOH BOPUIFS JODSFNFOUBM FČFDU GPS FBDI DPNQMFUFE MFWFM "O JOEJWJEV F %FHSFF MFWFM  HFUT UIF MJOFBS NPEFM effect of first increment of education
52. ### JNQMJFT XF XBOU UP JOGFS VTJOH B QBSBNFUFS FBDI PG

UIPTF JODSFNFOUBM FČ BUJPO MFWFMT XFMM OFFE  QBSBNFUFST ćF ĕSTU MFWFM &MFNFOUBSZ 4DIPPM JOUP UIF JOUFSDFQU ćFO UIF ĕSTU JODSFNFOU DPNFT GSPN NPWJOH GSPN & UP .JEEMF 4DIPPM *O UIBU DBTF XFMM BEE UIF ĕSTU FČFDU UP UIF MJOFBS NPEF φJ = δ + PUIFS TUVČ UIF QBSBNFUFS δ JT UIF FČFDU PG DPNQMFUJOH .JEEMF 4DIPPM BOE iPUIFS TUV FS UFSNT ZPV XBOU JO ZPVS MJOFBS NPEFM "OPUIFS JOEJWJEVBM HPFT PO UP ĕOJT PNF )JHI 4DIPPM BOE UIBU JOEJWJEVBMT MJOFBS NPEFM JT φJ = δ + δ + PUIFS TUVČ δ JT UIF JODSFNFOUBM FČFDU PG ĕOJTIJOH TPNF CVU OPU BMM )JHI 4DIPPM JT BEEJOH BOPUIFS JODSFNFOUBM FČFDU GPS FBDI DPNQMFUFE MFWFM "O JOEJWJE BUF %FHSFF MFWFM  HFUT UIF MJOFBS NPEFM φJ =  K= δK + PUIFS TUVČ IJT TVN PG BMM UIF δ QBSBNFUFST JT UIF NBYJNVN FEVDBUJPO FČFDU *U XJMM C U GPS JOUFSQSFUBUJPO JG XF DBMM UIJT NBYJNVN TVN BO PSEJOBSZ DPFďDJFOU M Ordered categorical predictors • Linear predictor equation: effect of second increment of education
53. ### Ordered categorical predictors • Linear predictor equation: all 7 increments

of education F UIF QBSBNFUFS δ JT UIF FČFDU PG DPNQMFUJOH .JEEMF 4DIPPM BOE iPUIFS TUVČw JT B UIFS UFSNT ZPV XBOU JO ZPVS MJOFBS NPEFM "OPUIFS JOEJWJEVBM HPFT PO UP ĕOJTI UIF U 4PNF )JHI 4DIPPM BOE UIBU JOEJWJEVBMT MJOFBS NPEFM JT φJ = δ + δ + PUIFS TUVČ F δ JT UIF JODSFNFOUBM FČFDU PG ĕOJTIJOH TPNF CVU OPU BMM )JHI 4DIPPM *U HPF IJT BEEJOH BOPUIFS JODSFNFOUBM FČFDU GPS FBDI DPNQMFUFE MFWFM "O JOEJWJEVBM X VBUF %FHSFF MFWFM  HFUT UIF MJOFBS NPEFM φJ =  K= δK + PUIFS TUVČ UIJT TVN PG BMM UIF δ QBSBNFUFST JT UIF NBYJNVN FEVDBUJPO FČFDU *U XJMM CF WFSZ FOU GPS JOUFSQSFUBUJPO JG XF DBMM UIJT NBYJNVN TVN BO PSEJOBSZ DPFďDJFOU MJLF β&
54. ### Ordered categorical predictors • Make all deltas sum to 1,

and use leading coefficient for maximum effect:  .0/45&34 "/% .*9563&4 UIF δ QBSBNFUFST CF GSBDUJPOT PG JU *G XF BMTP NBLF B EVNNZ δ =  UIFO BMM WFSZ DPNQBDUMZ -JLF UIJT φJ = β& &J− K= δK + PUIFS TUVČ J JT UIF DPNQMFUFE FEVDBUJPO MFWFM PG JOEJWJEVBM J /PX UIF TVN PG BMM FČFDUT XF DBO JOUFSQSFU UIF NBYJNVN FEVDBUJPO FČFDU CZ MPPLJOH BU β&  *O UIF DBT VBM XJUI &J =  β& EPFTU BQQFBS JO UIF MJOFBS NPEFM CFDBVTF β&δ =  T β& NPWF BMTP IFMQT VT EFĕOF QSJPST *G UIF QSJPS FYQFDUBUJPO JT UIBU BMM PG UIF F TBNF JODSFNFOUBM FČFDU UIFO XF XBOU BMM UIF δK T UP IBWF UIF TBNF QSJPS 8F X BOE TUJMM TFU B TFQBSBUF QSJPS GPS NBYJNVN FČFDU PO β&  β& DBO CF OFHBUJWF B maximum effect of education
55. ### Ordered categorical predictors • Make all deltas sum to 1,

and use leading coefficient for maximum effect: BOE XF DBO JOUFSQSFU UIF NBYJNVN FEVDBUJPO FČFDU CZ MPPLJOH BU β&  *O UIF DBTF OEJWJEVBM XJUI &J =  β& EPFTU BQQFBS JO UIF MJOFBS NPEFM CFDBVTF β&δ =  ćJT β& NPWF BMTP IFMQT VT EFĕOF QSJPST *G UIF QSJPS FYQFDUBUJPO JT UIBU BMM PG UIF M IBWF UIF TBNF JODSFNFOUBM FČFDU UIFO XF XBOU BMM UIF δK T UP IBWF UIF TBNF QSJPS 8F DB IBU OPX BOE TUJMM TFU B TFQBSBUF QSJPS GPS NBYJNVN FČFDU PO β&  β& DBO CF OFHBUJWF BT O XIJDI DBTF BMM PG UIF JODSFNFOUBM FČFDUT BSF JODSFNFOUBMMZ OFHBUJWF * BQQSFDJBUF UIBU BMM PG UIJT JT SBUIFS CJ[BSSF 8F BSF EFFQ JOTJEF UIF UJEF QSFEJDUJP JOF \$IBQUFS  OPX 6OEFSTUBOEJOH BMXBZT DPNFT XJUI VTF BOE QSBDUJDF 4P MFUT C EVDBUJPO JOUP UIF PSEFSFE MPHJU NPEFM BT BO PSEFSFE QSFEJDUPS 'JSTU IFSFT B NBUIFNB FSTJPO PG UIF GVMM NPEFM ćF QSPCBCJMJUZ PG UIF PVUDPNF BOE UIF MJOFBS NPEFM BSF 3J ∼ 0SEFSFEMPHJU(φJ, κ) φJ = β& &J− K= δK + β" "* + β* *J + β\$ \$J "OE TP XF OFFE B CVODI PG QSJPST ćF QSJPST GPS UIF DVUQPJOUT BSF PO UIF MPHJU TDBMF TP VTF PVS SFHVMBS J[JOH QSJPS XJUI TUBOEBSE EFWJBUJPO  ćF TMPQFT HFU OBSSPXFS QSJP BDI PG UIFTF JT B MPHPEET EJČFSFODF κL ∼ /PSNBM(, .) β", β*, β\$, β& ∼ /PSNBM(, ) MM TFU B TFQBSBUF QSJPS GPS NBYJNVN FČFDU PO β&  β& DBO CF OFHBUJWF BT XFMM PG UIF JODSFNFOUBM FČFDUT BSF JODSFNFOUBMMZ OFHBUJWF UIBU BMM PG UIJT JT SBUIFS CJ[BSSF 8F BSF EFFQ JOTJEF UIF UJEF QSFEJDUJPO FO  OPX 6OEFSTUBOEJOH BMXBZT DPNFT XJUI VTF BOE QSBDUJDF 4P MFUT CVJME IF PSEFSFE MPHJU NPEFM BT BO PSEFSFE QSFEJDUPS 'JSTU IFSFT B NBUIFNBUJDBM MM NPEFM ćF QSPCBCJMJUZ PG UIF PVUDPNF BOE UIF MJOFBS NPEFM BSF 3J ∼ 0SEFSFEMPHJU(φJ, κ) φJ = β& &J− K= δK + β" "* + β* *J + β\$ \$J B CVODI PG QSJPST ćF QSJPST GPS UIF DVUQPJOUT BSF PO UIF MPHJU TDBMF TP XFMM J[JOH QSJPS XJUI TUBOEBSE EFWJBUJPO  ćF TMPQFT HFU OBSSPXFS QSJPST B MPHPEET EJČFSFODF κL ∼ /PSNBM(, .) β", β*, β\$, β& ∼ /PSNBM(, ) δ ∼ %JSJDIMFU(α) IF OFX QBSU ćF QSJPS GPS UIF δ WFDUPS JT B %ĶĿĶİĵĹĲŁ ıĶŀŁĿĶįłŁĶļĻ TUSJCVUJPO JT UIF NVMUJWBSJBUF FYUFOTJPO PG UIF CFUB EJTUSJCVUJPO 8F NFU
56. ### Dirichlet (dee-ree-klay) • Dirichlet: Distribution of N probabilities • A

distribution of distributions • Generalization of beta distribution • Shape determined by vector of N parameters • Each parameter is a pseudo-count • Large value means that category more probable Johann Peter Gustav Lejeune Dirichlet (1805–1859)
57. ### 1 2 3 4 5 6 7 0.0 0.1 0.2

0.3 0.4 index probability alpha = 2 φJ = β& K= δK + β" "* + β* *J + β\$ \$J "OE TP XF OFFE B CVODI PG QSJPST ćF QSJPST GPS UIF DVUQPJOUT BSF PO UIF MPHJU T VTF PVS SFHVMBS J[JOH QSJPS XJUI TUBOEBSE EFWJBUJPO  ćF TMPQFT HFU OBSSP FBDI PG UIFTF JT B MPHPEET EJČFSFODF κL ∼ /PSNBM(, .) β", β*, β\$, β& ∼ /PSNBM(, ) δ ∼ %JSJDIMFU(α) ćF MBTU MJOF JT UIF OFX QBSU ćF QSJPS GPS UIF δ WFDUPS JT B %ĶĿĶİĵĹĲŁ ıĶŀŁĿ ćF %JSJDIMFU EJTUSJCVUJPO JT UIF NVMUJWBSJBUF FYUFOTJPO PG UIF CFUB EJTUSJCVUJ UIF CFUB EJTUSJCVUJPO FBSMJFS JO UIJT DIBQUFS -JLF UIF CFUB UIF %JSJDIMFU JT B EJT QSPCBCJMJUJFT WBMVFT CFUXFFO [FSP BOE POF UIBU BMM TVN UP POF ćF CFUB JT B GPS UXP QSPCBCJMJUJFT ćF %JSJDIMFU JT B EJTUSJCVUJPO GPS BOZ OVNCFS "OE KVTU UIF %JSJDIMFU JT QBSBNFUFSJ[FE CZ QTFVEPDPVOUT PG PCTFSWBUJPOT *O UIF CFUB UI QBSBNFUFST α BOE β UIF QSJPS DPVOUT PG TVDDFTT BOE GBJMVSFT SFTQFDUJWFMZ *O U UIFSF JT B KVTU B MPOH WFDUPS α XJUI QTFVEPDPVOUT GPS FBDI QPTTJCJMJUZ *G XF BTT WBMVF UP FBDI JU JT B VOJGPSN QSJPS ćF MBSHFS UIF α WBMVFT UIF NPSF QSJPS JOGP UIF QSPCBCJMJUJFT BSF BMM UIF TBNF 8FMM VTF B WFSZ XFBL QSJPS XJUI FBDI WBMVF JOTJEF α CFJOH  -FUT TJNVM QSJPS BOE WJTVBMJ[F UIF JNQMJDBUJPOT GPS QSJPS WFDUPST PG δ WBMVFT 3 DPEF  '\$--4ǿ"/**'.Ȁ . /ǡ. ǿǎǕǍǒȀ  '/ ʚǶ -\$-\$#' /ǿ ǎǍ Ǣ '+#ʙ- +ǿǏǢǔȀ Ȁ ./-ǿ '/Ȁ  03%&3&% \$"5&(03*\$"- 13&%*\$5034 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability 'ĶĴłĿĲ ƉƊƏ 4JNVMBUFE ESBXT G MFU QSJPS XJUI α = {, , , , IJHIMJHIUFE WFDUPS JTOU TQFDJBM C UP TIPX IPX NVDI WBSJBUJPO DBO HMF WFDUPS ćJT QSJPS EPFTOU F QSPCBCJMJUJFT UP CF FRVBM *OTUF UIBU BOZ PG UIF QSPCBCJMJUJFT DPVME TNBMMFS UIBO UIF PUIFST )0( ȁǎǣǎǍǢ ǎǣǔȂ ǍǡǎǍǒǐ ǍǡǏǒǍǑ Ǎǡǎǖǎǔ ǍǡǎǏǑǎ ǍǡǍǕǔǔ ǡǡǡ 8F FOE VQ XJUI  WFDUPST PG  QSPCBCJMJUJFT FBDI TVNNJOH UP  -FUT QMPU UIF
58. ### 1 2 3 4 5 6 7 0.0 0.1 0.2

0.3 0.4 index probability alpha = 2 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability alpha = 4 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability alpha = 8 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability alpha = 16 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability alpha = 32 1 2 3 4 5 6 7 0.0 0.1 0.2 0.3 0.4 index probability alpha = 64
59. ### Ordered categorical predictors • Use some advanced ulam features •

Explicit typing of variables (simplex) • Vector construction (append_row) *'ʙ\$! '. ǿ\$ʙʙ#Ǣǫ'&ǫǢ*'ǡ'+#ǿǫ'&ǫǢǍǡǔȀȀ Ȁ 'ĶĴłĿĲ ƉƊƏ EJTQMBZT UIF SFTVMU *WF IJHIMJHIUFE POF PG UIF WFDUPST UP TIPX UIF WBSJBUJPO JO B TJOHMF WFDUPS ćF QSJPS EPFTOU FYQFDU BMM PG UIF QSPCBCJMJUJFT UP CF UIF TBNF TP NVDI BT JU EPFTOU FYQFDU BOZ QBSUJDVMBS WBMVF UP CF CJHHFS PS TNBMMFS UIBO UIF PUIFST *O DPEJOH UIJT NPEFM XF OFFE TPNF WBSJBCMF ĕEEMJOH UP IBOEMF UIF δ =  CJU -FU NF TIPX ZPV UIF NPEFM DPEF BOE UIFO FYQMBJO 3 DPEF  / ʚǶ '\$./ǿ  ʙ ɶ- .+*). Ǣ /\$*) ʙ ɶ/\$*)Ǣ \$)/ )/\$*) ʙ ɶ\$)/ )/\$*)Ǣ *)// ʙ ɶ*)//Ǣ  ʙ .ǡ\$)/ " -ǿ ɶ 0Ǿ) 2 ȀǢ ȕ 0Ǿ) 2 . ) \$) 3 '+# ʙ - +ǿǏǢǔȀ Ȁ ȕ  '/ +-\$*- (ǎǏǡǒ ʚǶ 0'(ǿ '\$./ǿ  ʡ *- - Ǿ'*"\$./\$ǿ +#\$ Ǣ &++ ȀǢ +#\$ ʚǶ ȉ.0(ǿ  '/Ǿ%ȁǎǣȂ Ȁ ʔ ȉ/\$*) ʔ  ȉ\$)/ )/\$*) ʔ ȉ*)//Ǣ &++ ʡ )*-('ǿ Ǎ Ǣ ǎǡǒ ȀǢ ǿǢ ǢǢȀ ʡ )*-('ǿ Ǎ Ǣ ǎ ȀǢ 1 /*-ȁǕȂǣ  '/Ǿ% ʚʚǶ ++ )Ǿ-*2ǿ Ǎ Ǣ  '/ ȀǢ .\$(+' 3ȁǔȂǣ  '/ ʡ \$-\$#' /ǿ '+# Ȁ ȀǢ   .0/45&34 "/% .*9563&4 /ʙ/ Ǣ #\$).ʙǐ Ǣ *- .ʙǐ Ȁ ćF UPQ QBSU KVTU CVJMET UIF EBUB MJTU ćJT JT GBNJMJBS UP ZPV CZ OPX /PUJDF UIBU UIF EBUB MJTU DPOUBJOT UIF '+# QSJPS 8FSF QBTTJOH JU JO BT iEBUB w CVU JU JT KVTU UIF EFĕOJUJPO PG UIF %JSJDIMFU QSJPS JO UIF GPSNVMB ćF NPEFM JUTFMG JT KVTU MJLF UIF NPEFMT JO UIF QSFWJPVT TFDUJPO FYDFQU GPS UIF  UFSN JO UIF MJOFBS NPEFM BOE UIF MBTU UXP MJOFT PG UIF GPSNVMB
60. ### Ordered categorical predictors POF PS BOZ PUIFS DPOTUBOU IBT B

TQFDJBM OBNF B ŀĶĺĽĹĲŅ 4UBO LJOEMZ QSPWJEFT B TQFDJBM WBSJBCMF UZQF .\$(+' 3 XIJDI FOGPSDFT UIF TVNUPPOF DPOTUSBJOU GPS ZPV "OE UIFO XF DBO BTTJHO UIF  '/ WFDUPS UIF %JSJDIMFU QSJPS "OE JU SVOT ćJT NPEFM TBNQMFT NPSF TMPXMZ UIBO UIF PUIFS NPEFMT TP GBS JO UIF CPPL #VU JU TUJMM XPOU UBLF UIBU MPOH 0O NZ NPTU BODJFOU  FEJUJPO MBQUPQ JU UPPL  NJO VUFT UPUBM *G ZPV EPOU IBWF  DPSFT TP UIBU UIF  DIBJOT DBO SVO JO QBSBMMFM JUMM UBLF MPOHFS 3FHBSEMFTT JU JT JNQPSUBOU UP HFU DPNGPSUBCMF XJUI XBJUJOH GPS B HPPE BQQSPYJNBUJPO PG UIF QPTUFSJPS JOTUFBE PG VTJOH TPNF UFSSJCMFCVUGBTU BQQSPYJNBUJPO -FUT MPPL BU UIF NBSHJOBM QPTUFSJPS EJTUSJCVUJPOT MFBWJOH PVU UIPTF BOOPZJOH 0/+*\$)/. F  +- \$.ǿ (ǎǏǡǒ Ǣ  +/#ʙǏ Ǣ *(\$/ʙǫ0/+*\$)/.ǫ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/  ǶǍǡǐǎ Ǎǡǎǔ ǶǍǡǒǔ ǶǍǡǍǒ ǔǓǎ ǎ  ǶǍǡǖǓ ǍǡǍǒ ǶǎǡǍǐ ǶǍǡǕǕ ǎǒǒǕ ǎ  ǶǍǡǔǏ ǍǡǍǑ ǶǍǡǔǔ ǶǍǡǓǓ ǎǓǔǓ ǎ  ǶǍǡǔǎ ǍǡǍǑ ǶǍǡǔǔ ǶǍǡǓǑ ǎǑǐǔ ǎ  '/ȁǎȂ ǍǡǏǏ Ǎǡǎǐ ǍǡǍǒ ǍǡǑǔ ǎǎǏǕ ǎ  '/ȁǏȂ ǍǡǎǑ ǍǡǍǖ ǍǡǍǐ Ǎǡǐǎ ǎǕǑǔ ǎ  '/ȁǐȂ ǍǡǏǍ Ǎǡǎǎ ǍǡǍǒ ǍǡǐǕ ǎǓǖǓ ǎ  '/ȁǑȂ Ǎǡǎǔ ǍǡǎǍ ǍǡǍǑ ǍǡǐǑ ǎǖǓǐ ǎ  '/ȁǒȂ ǍǡǍǒ ǍǡǍǓ ǍǡǍǎ ǍǡǎǏ ǓǏǒ ǎ  '/ȁǓȂ ǍǡǎǍ ǍǡǍǓ ǍǡǍǏ ǍǡǏǎ ǎǔǑǒ ǎ  '/ȁǔȂ Ǎǡǎǐ ǍǡǍǕ ǍǡǍǐ ǍǡǏǔ ǏǍǖǏ ǎ   .0/45&34 "/% .*9563&4 Elem 0.0 0.3 0.6 0.0 0.3 0.0 0.2 0.4 0.0 0.4 0.0 0.3 0.6 -0.29 MidSch -0.24 -0.2 SHS 0.0 0.3 0.6 0.0 0.3 -0.31 -0.09 -0.27 HSG -0.25 -0.07 -0.15 -0.1 SCol 0.0 0.3 0.6 0.0 0.2 0.4 -0.25 -0.11 -0.14 -0.02 0.07 Bach 0.0 0.4 -0.26 -0.14 0.0 0.3 0.6 -0.15 -0.13 0.0 0.3 0.6 0 -0.09 0.0 0.2 0.4 0.0 0.2 0.4 Mast 'ĶĴłĿĲ ƉƊƐ 1PTUFSJPS EJTUSJCVUJPO PG JODSFNFOUBM FEVDBUJPO FČFDUT &WFSZ BEEJUJPOBM MFWFM PG FEVDBUJPO UFOET UP BEE B MJUUMF NPSF EJTBQQSPWBM FYDFQU
61. ### Ordered categorical predictors "OE JU SVOT ćJT NPEFM TBNQMFT NPSF

TMPXMZ UIBO UIF PUIFS NPEFMT TP GBS JO UIF CPPL #VU JU TUJMM XPOU UBLF UIBU MPOH 0O NZ NPTU BODJFOU  FEJUJPO MBQUPQ JU UPPL  NJO VUFT UPUBM *G ZPV EPOU IBWF  DPSFT TP UIBU UIF  DIBJOT DBO SVO JO QBSBMMFM JUMM UBLF MPOHFS 3FHBSEMFTT JU JT JNQPSUBOU UP HFU DPNGPSUBCMF XJUI XBJUJOH GPS B HPPE BQQSPYJNBUJPO PG UIF QPTUFSJPS JOTUFBE PG VTJOH TPNF UFSSJCMFCVUGBTU BQQSPYJNBUJPO -FUT MPPL BU UIF NBSHJOBM QPTUFSJPS EJTUSJCVUJPOT MFBWJOH PVU UIPTF BOOPZJOH 0/+*\$)/. 3 DPEF  +- \$.ǿ (ǎǏǡǒ Ǣ  +/#ʙǏ Ǣ *(\$/ʙǫ0/+*\$)/.ǫ Ȁ ( ) . ǒǡǒʉ ǖǑǡǒʉ )Ǿ !! #/  ǶǍǡǐǎ Ǎǡǎǔ ǶǍǡǒǔ ǶǍǡǍǒ ǔǓǎ ǎ  ǶǍǡǖǓ ǍǡǍǒ ǶǎǡǍǐ ǶǍǡǕǕ ǎǒǒǕ ǎ  ǶǍǡǔǏ ǍǡǍǑ ǶǍǡǔǔ ǶǍǡǓǓ ǎǓǔǓ ǎ  ǶǍǡǔǎ ǍǡǍǑ ǶǍǡǔǔ ǶǍǡǓǑ ǎǑǐǔ ǎ  '/ȁǎȂ ǍǡǏǏ Ǎǡǎǐ ǍǡǍǒ ǍǡǑǔ ǎǎǏǕ ǎ  '/ȁǏȂ ǍǡǎǑ ǍǡǍǖ ǍǡǍǐ Ǎǡǐǎ ǎǕǑǔ ǎ  '/ȁǐȂ ǍǡǏǍ Ǎǡǎǎ ǍǡǍǒ ǍǡǐǕ ǎǓǖǓ ǎ  '/ȁǑȂ Ǎǡǎǔ ǍǡǎǍ ǍǡǍǑ ǍǡǐǑ ǎǖǓǐ ǎ  '/ȁǒȂ ǍǡǍǒ ǍǡǍǓ ǍǡǍǎ ǍǡǎǏ ǓǏǒ ǎ  '/ȁǓȂ ǍǡǎǍ ǍǡǍǓ ǍǡǍǏ ǍǡǏǎ ǎǔǑǒ ǎ  '/ȁǔȂ Ǎǡǎǐ ǍǡǍǕ ǍǡǍǐ ǍǡǏǔ ǏǍǖǏ ǎ MPPL BU UIFN BT B NVMUJWBSJBUF EJTUSJCVUJPO ćF FBTJFTU XBZ UP EP UIJT JT UIF VTF +\$-.  '/Ǿ' '. ʚǶ ǿǫ' (ǫǢǫ\$#ǫǢǫ ǫǢǫ ǫǢǫ*'ǫǢǫ#ǫǢǫ./ǫǢǫ-ǫȀ +\$-.ǿ (ǎǏǡǒ Ǣ +-.ʙǫ '/ǫ Ǣ ' '.ʙ '/Ǿ' '. Ȁ ćJT JT EJTQMBZFE BT 'ĶĴłĿĲ ƉƊƐ 'JSTU OPUJDF UIBU BMM PG UIFTF QBSBNFUFST BSF OFHBUJ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