Logistic regression: binomial (+multinomial, ordered, conditional)

Vergelijkbare documenten
Selected Quantitative Methods Lecture 3 (Binomial) Logistic Regression

Logistische regressie analyse: een handleiding Inge Sieben 1 Liesbeth Linssen

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 8 februari 2010

Inhoud. Data. Analyse van tijd tot event data: van Edward Kaplan & Paul Meier tot David Cox

MLW -- Toets stroomblok 2.2: Epidemiologie en Biostatistiek

Bestaat er een betekenisvol verband tussen het geslacht en het voorkomen van dyslexie? Gebruik de Chi-kwadraattoets voor kruistabellen.

Introductie in flowcharts

** VOORBEELD VAN CAUSALE ANALYSE MET CONFOUNDER EN MEDIATOR **.. GET FILE='u:\)Research\ISSP-NL\ISSP \Data\issp_2013_2014_NL_def.sav'.

Oplossingen hoofdstuk 9

Analyse van kruistabellen

Online Resource 1. Title: Implementing the flipped classroom: An exploration of study behaviour and student performance

(1) De hoofdfunctie van ons gezelschap is het aanbieden van onderwijs. (2) Ons gezelschap is er om kunsteducatie te verbeteren

Voorbeeld regressie-analyse

Classification of triangles

Menu aansturing van SPSS voorbeeld in paragraaf 6.5 van hoofdstuk 6 over multipele regressie analyses van recidive bij jongens

Verband tussen twee variabelen

Add the standing fingers to get the tens and multiply the closed fingers to get the units.

Enkelvoudige lineaire regressie

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Tentamen Statistiek 2 voor TeMa (2S195) op dinsdag , uur.

ANGSTSTOORNISSEN EN HYPOCHONDRIE: DIAGNOSTIEK EN BEHANDELING (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

SAMPLE 11 = + 11 = + + Exploring Combinations of Ten + + = = + + = + = = + = = 11. Step Up. Step Ahead

mlw stroom 2.2 Biostatistiek en Epidemiologie College 9: Herhaalde metingen (2) Syllabus Afhankelijke Data Hoofdstuk 4, 5.1, 5.2

Masterclass: advanced statistics. Bianca de Greef Sander van Kuijk Afdeling KEMTA

Oplossingen hoofdstuk XI

TYPE EXAMENVRAGEN VOOR TOEGEPASTE STATISTIEK

Pilot vragenlijst communicatieve redzaamheid

MyDHL+ Van Non-Corporate naar Corporate

Hartpatiënten Stoppen met Roken De invloed van eigen effectiviteit, actieplannen en coping plannen op het stoppen met roken

Settings for the C100BRS4 MAC Address Spoofing with cable Internet.

L.Net s88sd16-n aansluitingen en programmering.

ANOVA in SPSS. Hugo Quené. opleiding Taalwetenschap Universiteit Utrecht Trans 10, 3512 JK Utrecht 12 maart 2003

Adviseren over onderzoeksmethoden: Ontbrekende waarnemingen, uitbijters en nonrespons

mlw stroom 2.1: Statistisch modelleren

Zowel correlatie als regressie meten statistische samenhang Correlatie: geen oorzakelijk verband verondersteld: X Y

Het Effect van Verschil in Sociale Invloed van Ouders en Vrienden op het Alcoholgebruik van Adolescenten.

Ae Table 1: Aircraft data. In horizontal steady flight, the equations of motion are L = W and T = D.

Opgave 1: (zowel 2DM40 als 2S390)

LDA Topic Modeling. Informa5ekunde als hulpwetenschap. 9 maart 2015

Survival Analyse. Help! Statistiek! Survival Analyse: Overzicht. Voorbeeld: Whiplash onderzoek. Voorbeeld: Intensive Care Unit data

Esther Lee-Varisco Matt Zhang

Beknopte handleiding SPSS versie van 28

Examenvragen KBM/EMS 09-15

RECEPTEERKUNDE: PRODUCTZORG EN BEREIDING VAN GENEESMIDDELEN (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

Tentamen Biostatistiek 1 voor BMT (2DM40), op maandag 5 januari uur

Menu aansturing van SPSS voorbeeld in hoofdstuk 7 over Kaplan-Meier en Cox regressie survival analyses van recidive bij meisjes

ALGORITMIEK: answers exercise class 7

DEEL 1 Probleemstelling 1

Tentamen Biostatistiek 1 voor BMT (2DM40) woensdag 28 oktober 2009, uur

L.Net s88sd16-n aansluitingen en programmering.

University of Groningen

c. Geef de een-factor ANOVA-tabel. Formuleer H_0 and H_a. Wat is je conclusie?

De bijbel der SPSS procedures

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

MyDHL+ ProView activeren in MyDHL+

Meervoudige lineaire regressie

8+ 60 MIN Alleen te spelen in combinatie met het RIFUGIO basisspel. Only to be played in combination with the RIFUGIO basicgame.

OUTDOOR HD BULLET IP CAMERA PRODUCT MANUAL

Bijlage 3: Multiple regressie analyse

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Examination 2DL04 Friday 16 november 2007, hours.

1 vorig = omzet voorgaande jaar. Forward (Criterion: Probability-of-F-to-enter <=,050) 2 bezoek = aantal bezoeken vertegenwoordiger

* de percentages goed per klas en volgorde van afnemen. sort cases by klas volgorde. split file by klas volgorde. des var=goedboekperc.

LONDEN MET 21 GEVARIEERDE STADSWANDELINGEN 480 PAGINAS WAARDEVOLE INFORMATIE RUIM 300 FOTOS KAARTEN EN PLATTEGRONDEN

Relatie tussen Persoonlijkheid, Opleidingsniveau, Leeftijd, Geslacht en Korte- en Lange- Termijn Seksuele Strategieën

General info on using shopping carts with Ingenico epayments

Examenvragen KBM (herexamen)

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Tentamen Statistiek 2 voor TeMa (2S195) op dinsdag ,

DANKBAARHEID, PSYCHOLOGISCHE BASISBEHOEFTEN EN LEVENSDOELEN 1

TOEGANG VOOR NL / ENTRANCE FOR DUTCH : lator=c&camp=24759

Ontpopping. ORGACOM Thuis in het Museum

Value based healthcare door een quality improvement bril

Yes/No (if not you pay an additional EUR 75 fee to be a member in 2020

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica Tentamen Statistiek voor T (2S070) op vrijdag 8 oktober 1999, uur De u

OUTDOOR HD DOME IP CAMERA PRODUCT MANUAL GB - NL

3 I always love to do the shopping. A Yes I do! B No! I hate supermarkets. C Sometimes. When my mother lets me buy chocolate.

PRIVACYVERKLARING KLANT- EN LEVERANCIERSADMINISTRATIE

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

Chapter 4 Understanding Families. In this chapter, you will learn

Hoe met Windows 8 te verbinden met NDI Remote Office (NDIRO) How to connect With Windows 8 to NDI Remote Office (NDIRO

Lichamelijke factoren als voorspeller voor psychisch. en lichamelijk herstel bij anorexia nervosa. Physical factors as predictors of psychological and

10. Moderatie, mediatie en nog meer regressie

Firewall van de Speedtouch 789wl volledig uitschakelen?

Schoolsucces van Friese leerlingen in het voortgezet onderwijs de Boer, Hester

NMOZTMKUDLVDKECVLKBVESBKHWIDKPDF-WWUS Page File Size 9,952 KB 29 May, 2016

Read this story in English. My personal story

STUDYGUIDE for STATISTICS B (2DL08)

Bijlage 2: Informatie met betrekking tot goede praktijkvoorbeelden in Londen, het Verenigd Koninkrijk en Queensland

We berekenen nog de effectgrootte aan de hand van formule 4.2 en rapporteren:

INBURGERING 2015 / 16

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Tentamen Statistiek 2 voor TeMa (2S195) op vrijdag , 9-12 uur.

Transcriptie:

Logistic regression: binomial (+multinomial, ordered, conditional) Harry Ganzeboom March 12 2009 RESMA Course Data Analysis & Report #6

OLS assumptions Dependent variable is a score: Continuous Unbounded Varies linear with the predictor variable. However, our variables in fact are often a choice among categories: Discrete Limited range Often have a (partial) rank-order and sometimes have a distance May associate with predictor variables in irregular (non-linear) ways. Important special case: outcome variable is 0/1 (binary, binomial). Not: dummy. Logistic regression 2

Variations in SPSS LOGISTIC: for binary outcome variables NOMREG: for multinomial outcome variables. PLUM: for ordered multinomial outcome variables. LOGLINEAR: all sort of models, but discrete independent variables. All these programs will do binary logistic regression as a special case. The coefficients may look different (see O Connell and excercise). Logistic regression 3

0/1 dichotomy as dependent variable in OLS If you use OLS to model 0/1 outcomes (the linear probability model), the following problems will arise: The OLS assumption of homoskedasticity will not apply: the variation is very small at the extremes. This will bias the coefficients and invalidate the SE estimates. Predicted values may occur outside the 0/1 range. Both problems are most severe when you are modeling a variable that has an expected value (=mean) close to 0 or 1. This happens often in event analysis (next course). However, when you are modeling a variable in the 0.20..0.80 range, the linear probability model is in fact quite useful, at least to look at. Logistic regression 4

Example: being a student in ISSP06 Voorbeeld: studerend in ISSP2006. Data voor leeftijd 18-64, N=1575. Gemiddelde is 3.2%, oftewel.032. Student zijn is zeer sterk gedifferentieerd naar leeftijd. Het komt eigenlijk alleen bij jonge mensen voor. OLS Model: STUDENT = 0.239 -.0047 * AGECAT. De slope is zeer significant: t = 12.8. Data worden zeer slecht gerepresenteerd door het lineaire probabiliteitsmodel; verwachte kans op student zijn voor ouderen wordt negatief (-4%). Logistic regression 5

Logit = ln(odds) Dependent variable is a probability P (if Y=1) and 1-P (if Y=0). Odds [kansverhouding]: P / (1-P). P odds! However, odds is close to P at very low P. Logit [log kansverhouding]: ln(p/(1-p)). In any kind of logistic regression of nominal data, the dependent variable is the logit. So you should familiarize yourself with logarithms. Logistic regression 6

Logarithms (1) Logaritme X: tot welke macht moet je een grondtal verheffen om X te verkrijgen. Zie bv.: http://nl.wikipedia.org/wiki/logaritme. Grondtal 10: 10 log(100)=2 Grondtal 2: 2 log(64) = 6. Grondtal e = exp = 2.718: e log(100) = ln(100) = 4.61. Ln(a*b) = ln(a)+ln(b) exp(a+b) = exp(a)*exp(b) Ln(exp(a+b)) = a+b Vermenigvuldigen optellen Delen Aftrekken Machtverheffen vermenigvuldigen of delen Logistic regression 7

Logarithms (2) Ln(2.718) = 1 Ln(2) =.69 Ln(1) = 0 Ln(.5) = -.69 Ln (0) = oneindig = onbepaald Exp(1) = 2.718 Exp(0) = 1 Logistic regression 8

P versus odds Logistic regression 9

P versus logit (LN transformation) Logistic regression 10

Logit versus P Logistic regression 11

Logit, odds, and P Logit = ln(odd) = ln (P/(1-P)). Exp(logit) odds. Ln(odds) logit. P = 1 / (1+exp(-logit)) (this transformation will SPSS do for you in predicted value ). Logistic regression 12

Logistic regression in SPSS Analyze > regression > binary logistic The syntax of the model is different from REGR, but similar to UNIANOVA: Logistic Y with X1 X2. [additive, linear] Logistic Y with X1 X2 C1 /cat=c1. [+ categorical] Logistic Y with X1 X2 C1 X2*C1 /cat=c1. [+interaction] So, syntax provides for (A) automatic creation of dummy variables, and (B) automatic creation of interaction terms. Logistic regression 13

Tabel Case Processing Summary Case Processing Summary Unweighted Cases a Selected Cases Included in Analysis Unselected Cases Total a. Missing Cases Total If weight is in effect, see classification table for the total number of cases. N Percent 1575 100.0 0.0 1575 100.0 0.0 1575 100.0 Logistic regression 14

Tabel Dependent Variable Encoding Dependent Variable Encoding Original Value 0 1 Internal Value 0 1 Logistic regression 15

Tabel Omnibus Tests of Model coefficients Omnibus Tests of Model Coefficients Step 1 Step Block Chi-square df Sig. 187.933 1.000 187.933 1.000 Model 187.933 1.000 Logistic regression 16

Tabel Model Summary Step 1 a. -2 Log likelihood Model Summary Cox & Snell R Square Nagelkerke R Square 255.462 a.112.458 Estimation terminated at iteration number 9 because parameter estimates changed by less than.001. Logistic regression 17

Tabel Classification Table Classification Table a Predicted Observed Step 1 unempl 0 1 Overall Percentage a. The cut value is.500 unempl 0 1 Percentage Correct 1518 7 99.5 35 15 30.0 97.3 Logistic regression 18

Some good advice Do not leave the coding of the dependent variable to the program. Missing values always need scrutiny. There is no pairwise option. Use substitution to see effects of missing values patterns. Like in OLS, life becomes happier when you code your independent variables using a 0 and an interpretable unit. Significance of individual coefficients: t = b/se. With some practice, the multiplicative coefficients are easier to talk about than the logistic ones. Logistic regression 19

Table Variables in the Equation : Variables in the Equation B S.E. Wald df Sig. Exp(B) Step a 1agecat -.269.029 84.845 1.000.764 Constan 5.310.783 46.034 1.000 202.396 a. Variable(s) entered on step 1: agecat. Logistic regression 20

Logistische en multiplicatieve regressiecoëfficiënten B geeft de verandering in de logit (=log odds) van de afhankelijke variabele aan bij één eenheid verandering van X. Het model is lineair in de logits. Exp(B) is de multiplicatieve verandering in de odds met een eenheid verandering van X ten opzichte van odds baseline (=multiplicatieve intercept). Exp(B) < 1: afname van odds Exp(B) > 1: toename van odds Bij categorische variabelen kunnen we exp(b) interpreteren als een odds-ratio [OR] = verhouding tussen twee odds. Logistic regression 21

Multiplicatieve coefficienten en de odds-ratio OR Odds = exp (B0 + B1*X1) Odds = exp(b0)*exp(b1*x1) Als X= 0: odds = exp(b0)*exp(0) = exp(b0) Als X=1: odds = exp(b0)*exp(b1) Odd Ratio OR: exp(b0)*exp(b1) / exp(b0) = exp(b1) Logistic regression 22

Geen gestandaardiseerde B s Anders dan bij OLS heeft logistic geen gestandaardiseerde coefficienten. B s zijn daarom alleen met elkaar vergelijkbaar als hun eenheden vergelijkbaar zijn. Wil je toch gestandaardiseerde coefficienten hebben, dan zul je eerst zelf de X-en moeten standaardiseren (=voorzien van vergelijkbare meeteenheid). Logistic regression 23

Inferentiele statistiek Logistic geeft niet de bij OLS gebruikelijke T- toets: t = B/SE. Deze kun je wel zelf berekenen. Wald statistic is t 2. Vergelijk met Chi2 of F-tabel met 1, veel vrijheidsgraden. Kritieke waarde: 3.84. SE s behoren horen bij logits. Betrouwbaarheidsintervalllen rondom logits zijn symmetrisch, rondom multiplicatieve coefficienten zijn ze asymmetrisch. Logistic regression 24

Logistische regressie met nominale onafhankelijke variabelen Bij logistic behoef je niet zelf dummy-variabelen aan te maken by categorische X (het mag wel).../cat=x1 /contrast(x1)=indicator(1) geeft aan dat X1 categorisch is en 1 de referentiecategorie is. De output kan behoorlijk verwarrend zijn. Let goed op de Categorical variable codings. De Wald statistic is nu een test op gezamenlijke bijdrage van de dummy-variabelen. Logistic regression 25

Tabel Categorical variable codings Categorical Variables Codings Parameter coding agecat 19 22 30 40 50 60 Frequency (1) (2) (3) (4) (5) 22.000.000.000.000.000 53 1.000.000.000.000.000 276.000 1.000.000.000.000 453.000.000 1.000.000.000 379.000.000.000 1.000.000 363.000.000.000.000 1.000 Logistic regression 26

Homework Read O Connell 1-27. Practice the use of binary logistic in outcome University education with AGE and FEMALE in ESS, using LOGIST, NOMREG and PLUM. I will send around further specification. Logistic regression 27