sociology SO5032 Quantitative Research Methods Brendan Halpin, Sociology, University of Limerick Spring 2018 SO5032 Quantitative Research Methods

Similar documents
Categorical Outcomes. Statistical Modelling in Stata: Categorical Outcomes. R by C Table: Example. Nominal Outcomes. Mark Lunt.

Logistic Regression Analysis

West Coast Stata Users Group Meeting, October 25, 2007

[BINARY DEPENDENT VARIABLE ESTIMATION WITH STATA]

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 10, 2017

Multinomial Logit Models - Overview Richard Williams, University of Notre Dame, Last revised February 13, 2017

Final Exam - section 1. Thursday, December hours, 30 minutes

Maximum Likelihood Estimation Richard Williams, University of Notre Dame, Last revised January 13, 2018

Estimating Ordered Categorical Variables Using Panel Data: A Generalised Ordered Probit Model with an Autofit Procedure

gologit2 documentation Richard Williams, Department of Sociology, University of Notre Dame Last revised February 1, 2007

Module 4 Bivariate Regressions

Getting Started in Logit and Ordered Logit Regression (ver. 3.1 beta)

STA 4504/5503 Sample questions for exam True-False questions.

tm / / / / / / / / / / / / Statistics/Data Analysis User: Klick Project: Limited Dependent Variables{space -6}

Module 9: Single-level and Multilevel Models for Ordinal Responses. Stata Practical 1

Morten Frydenberg Wednesday, 12 May 2004

Getting Started in Logit and Ordered Logit Regression (ver. 3.1 beta)

Catherine De Vries, Spyros Kosmidis & Andreas Murr

Sociology Exam 3 Answer Key - DRAFT May 8, 2007

Professor Brad Jones University of Arizona POL 681, SPRING 2004 INTERACTIONS and STATA: Companion To Lecture Notes on Statistical Interactions

Your Name (Please print) Did you agree to take the optional portion of the final exam Yes No. Directions

List of figures. I General information 1

Econ 371 Problem Set #4 Answer Sheet. 6.2 This question asks you to use the results from column (1) in the table on page 213.

Quantitative Techniques Term 2

Allison notes there are two conditions for using fixed effects methods.

The data definition file provided by the authors is reproduced below: Obs: 1500 home sales in Stockton, CA from Oct 1, 1996 to Nov 30, 1998

Lecture 21: Logit Models for Multinomial Responses Continued

Problem Set 9 Heteroskedasticty Answers

Model fit assessment via marginal model plots

u panel_lecture . sum

Econometrics is. The estimation of relationships suggested by economic theory

Time series data: Part 2

Assignment #5 Solutions: Chapter 14 Q1.

EC327: Limited Dependent Variables and Sample Selection Binomial probit: probit

PASS Sample Size Software

Advanced Econometrics

9. Logit and Probit Models For Dichotomous Data

Example 2.3: CEO Salary and Return on Equity. Salary for ROE = 0. Salary for ROE = 30. Example 2.4: Wage and Education

Labor Force Participation and the Wage Gap Detailed Notes and Code Econometrics 113 Spring 2014

İnsan TUNALI 8 November 2018 Econ 511: Econometrics I. ASSIGNMENT 7 STATA Supplement

ECON Introductory Econometrics. Seminar 4. Stock and Watson Chapter 8

STATISTICAL METHODS FOR CATEGORICAL DATA ANALYSIS

Intro to GLM Day 2: GLM and Maximum Likelihood

Modeling wages of females in the UK

Estimating Heterogeneous Choice Models with Stata

Review questions for Multinomial Logit/Probit, Tobit, Heckit, Quantile Regressions

Limited Dependent Variables

To be two or not be two, that is a LOGISTIC question

F^3: F tests, Functional Forms and Favorite Coefficient Models

Econometric Methods for Valuation Analysis

Testing the Solow Growth Theory

Technical Documentation for Household Demographics Projection

An Examination of the Impact of the Texas Methodist Foundation Clergy Development Program. on the United Methodist Church in Texas

Sociology 704: Topics in Multivariate Statistics Instructor: Natasha Sarkisian. Binary Logit

1) The Effect of Recent Tax Changes on Taxable Income

Logit Models for Binary Data

Introduction to POL 217

*1A. Basic Descriptive Statistics sum housereg drive elecbill affidavit witness adddoc income male age literacy educ occup cityyears if control==1

An Introduction to Event History Analysis

Nonlinear Econometric Analysis (ECO 722) Answers to Homework 4

Why do the youth in Jamaica neither study nor work? Evidence from JSLC 2001

3. Multinomial response models

COMPLEMENTARITY ANALYSIS IN MULTINOMIAL

Duration Models: Parametric Models

Valuing Environmental Impacts: Practical Guidelines for the Use of Value Transfer in Policy and Project Appraisal

You created this PDF from an application that is not licensed to print to novapdf printer (

Heteroskedasticity. . reg wage black exper educ married tenure

proc genmod; model malform/total = alcohol / dist=bin link=identity obstats; title 'Table 2.7'; title2 'Identity Link';

Table 4. Probit model of union membership. Probit coefficients are presented below. Data from March 2008 Current Population Survey.

The Multivariate Regression Model

Description Remarks and examples References Also see

Cameron ECON 132 (Health Economics): FIRST MIDTERM EXAM (A) Fall 17

Sean Howard Econometrics Final Project Paper. An Analysis of the Determinants and Factors of Physical Education Attendance in the Fourth Quarter

Effect of Education on Wage Earning

The relationship between GDP, labor force and health expenditure in European countries

Econometrics II Multinomial Choice Models

Hierarchical Generalized Linear Models. Measurement Incorporated Hierarchical Linear Models Workshop

Discrete Choice Modeling

Auxiliary Variables in Mixture Modeling: 3-Step Approaches Using Mplus

Dummy Variables. 1. Example: Factors Affecting Monthly Earnings

Statistical Models of Stocks and Bonds. Zachary D Easterling: Department of Economics. The University of Akron

Dummy variables 9/22/2015. Are wages different across union/nonunion jobs. Treatment Control Y X X i identifies treatment

Calculating the Probabilities of Member Engagement

Two-stage least squares examples. Angrist: Vietnam Draft Lottery Men, Cohorts. Vietnam era service

Advanced Industrial Organization I Identi cation of Demand Functions

Lecture 10: Alternatives to OLS with limited dependent variables, part 1. PEA vs APE Logit/Probit

STATA Program for OLS cps87_or.do

Proceedings of the 5th WSEAS International Conference on Economy and Management Transformation (Volume II)

Longitudinal Logistic Regression: Breastfeeding of Nepalese Children

Introduction to fractional outcome regression models using the fracreg and betareg commands

ECON Introductory Econometrics Seminar 2, 2015

Labor Market Returns to Two- and Four- Year Colleges. Paper by Kane and Rouse Replicated by Andreas Kraft

Example 7.1: Hourly Wage Equation Average wage for women

CHAPTER 12 EXAMPLES: MONTE CARLO SIMULATION STUDIES

Handout seminar 6, ECON4150

Stat 328, Summer 2005

Prof. Dr. Ben Jann. University of Bern, Institute of Sociology, Fabrikstrasse 8, CH-3012 Bern

Impact of Household Income on Poverty Levels

Girma Tefera*, Legesse Negash and Solomon Buke. Department of Statistics, College of Natural Science, Jimma University. Ethiopia.

Duration Models: Modeling Strategies

Transcription:

1 SO5032 Quantitative Research Methods Brendan Halpin, Sociology, University of Limerick Spring 2018

Lecture 10: Multinomial regression baseline category extension of binary What if we have multiple possible outcomes, not just two? 2 Logistic regression is binary: yes/no Many interesting dependent variables have multiple categories voting intention by party first destination after second-level education housing tenure type We can use binary logistic by recoding into two categories dropping all but two categories But that would lose information

Lecture 10: Multinomial regression baseline category extension of binary Multinomial logistic regression Another idea: Pick one of the J categories as baseline For each of J 1 other categories, fit binary models contrasting that category with baseline Multinomial logistic effectively does that, fitting J 1 models simultaneously log P(Y = j) P(Y = J) = α j + β j X, j = 1,..., c 1 Which category is baseline is not critically important, but better for interpretation if it is reasonably large and coherent (i.e. "Other" is a poor choice)

Lecture 10: Multinomial regression baseline category extension of binary Predicting p from formula log π j π J = α j + β j X π j π J = e α j +β j X π j = π J e α j +β j X J 1 J 1 π J = 1 π k = 1 π J π J = k=1 k=1 e α k+β k X 1 1 + J 1 = 1 k=1 eα k+β k X J k=1 eα k+β k X π j = e α j +β j X J k=1 eα k+β k X

Lecture 10: Multinomial regression Interpreting example, inference Example 5 Let s attempt to predict housing tenure Owner occupier Local authority renter Private renter using age and employment status Employed Unemployed Not in labour force mlogit ten3 age i.eun

Lecture 10: Multinomial regression Interpreting example, inference Stata output Multinomial logistic regression Number of obs = 15490 LR chi2(6) = 1256.51 Prob > chi2 = 0.0000 Log likelihood = -10204.575 Pseudo R2 = 0.0580 ------------------------------------------------------------------------------ ten3 Coef. Std. Err. z P> z [95% Conf. Interval] -------------+---------------------------------------------------------------- 1 (base outcome) -------------+---------------------------------------------------------------- 2 age -.0103121.0012577-8.20 0.000 -.012777 -.0078471 eun 2 1.990774.1026404 19.40 0.000 1.789603 2.191946 3 1.25075.0522691 23.93 0.000 1.148304 1.353195 _cons -1.813314.0621613-29.17 0.000-1.935148-1.69148 -------------+---------------------------------------------------------------- 3 age -.0389969.0018355-21.25 0.000 -.0425945 -.0353994 eun 2.4677734.1594678 2.93 0.003.1552223.7803245 3.4632419.063764 7.26 0.000.3382668.5882171 _cons -.76724.0758172-10.12 0.000 -.915839 -.6186411 ------------------------------------------------------------------------------

Lecture 10: Multinomial regression Interpreting example, inference Interpretation 7 Stata chooses category 1 (owner) as baseline Each panel is similar in interpretation to a binary regression on that category versus baseline Effects are on the log of the odds of being in category j versus the baseline

Lecture 10: Multinomial regression Interpreting example, inference Inference At one level inference is the same: Wald test for H o : β k = 0 LR test between nested models However, each variable has J 1 parameters Better to consider the LR test for dropping the variable across all contrasts: H 0 : β 1 k = β 2 k =... = β j k = 0 Thus retain a variable even for contrasts where it is insignificant as long as it has an effect overall Which category is baseline affects the parameter estimates but not the fit (log-likelihood, predicted values, LR test on variables)

Ordinal logit Predicting ordinal outcomes 9 While mlogit is attractive for multi-category outcomes, it is imparsimonious For nominal variables this is necessary, but for ordinal variables there should be a better way We consider one useful model (others exist) logit

The proportional odds model 10 The most commonly used ordinal logistic model has another logic It assumes the ordinal variable is based on an unobserved latent variable Unobserved cutpoints divide the latent variable into the groups indexed by the observed ordinal variable The model estimates the effects on the log of the odds of being higher rather than lower across the cutpoints

The model 11 For j = 1 to J 1, log P(Y > j) P(Y <= j) = α j + βx Only one β per variable, whose interpretation is the effect on the odds of being higher rather than lower One α per contrast, taking account of the fact that there are different proportions in each one

J 1 contrasts again, but different But rather than compare categories against a baseline it splits into high and low, with all the data involved each time

An example 13 Using data from the BHPS, we predict the probability of each of 5 ordered responses to the assertion "homosexual relationships are wrong" Answers from 1: strongly agree, to 5: strongly disagree Sex and age as predictors descriptively women and younger people are more likely to disagree (i.e., have high values)

Ordered logistic: Stata output 14 Ordered logistic regression Number of obs = 12725 LR chi2(2) = 2244.14 Prob > chi2 = 0.0000 Log likelihood = -17802.088 Pseudo R2 = 0.0593 ------------------------------------------------------------------------------ ropfamr Coef. Std. Err. z P> z [95% Conf. Interval] -------------+---------------------------------------------------------------- 2.rsex.8339045.033062 25.22 0.000.7691041.8987048 rage -.0371618.0009172-40.51 0.000 -.0389595 -.035364 -------------+---------------------------------------------------------------- /cut1-3.833869.0597563-3.950989-3.716749 /cut2-2.913506.0547271-3.02077-2.806243 /cut3-1.132863.0488522-1.228612-1.037115 /cut4.3371151.0482232.2425994.4316307 ------------------------------------------------------------------------------

Interpretation 15 The betas are straightforward: The effect for women is.8339. The OR is e.8339 or 2.302 Women s odds of being on the "approve" rather than the "disapprove" side of each contrast are 2.302 times as big as men s Each year of age reduced the log-odds by.03716 (OR 0.964). The cutpoints are odd: Stata sets up the model in terms of cutpoints in the latent variable, so they are actually α j

Linear predictor 16 Thus the α + βx or linear predictor for the contrast between strongly agree (1) and the rest is (2-5 versus 1) 3.834 + 0.8339 female 0.03716 age Between strongly disagree (5) and the rest (1-4 versus 5) and so on. 0.3371 + 0.8339 female 0.03716 age

Predicted log odds 17

Predicted log odds per contrast 18 The predicted log-odds lines are straight and parallel The highest relates to the 1-4 vs 5 contrast Parallel lines means the effect of a variable is the same across all contrasts Exponentiating, this means that the multiplicative effect of a variable is the same on all contrasts: hence "proportional odds" This is a key assumption

Predicted probabilities relative to contrasts 19

Predicted probabilities relative to contrasts 20 We predict the probabilities of being above a particular contrast in the standard way Since age has a negative effect, downward sloping sigmoid curves Sigmoid curves are also parallel (same shape, shifted left-right) We get probabilities for each of the five states by subtraction

Inference 21 The key elements of inference are standard: Wald tests and LR tests Since there is only one parameter per variable it is more straightforward than MNL However, the key assumption of proportional odds (that there is only one parameter per variable) is often wrong. The effect of a variable on one contrast may differ from another Long and Freese s SPost Stata add-on contains a test for this

Compare with linear regression: ologit 22. ologit ropfamr i.rsex rage Iteration 0: log likelihood = -18924.158 Iteration 1: log likelihood = -17818.231 Iteration 2: log likelihood = -17802.121 Iteration 3: log likelihood = -17802.088 Iteration 4: log likelihood = -17802.088 Ordered logistic regression Number of obs = 12,725 LR chi2(2) = 2244.14 Prob > chi2 = 0.0000 Log likelihood = -17802.088 Pseudo R2 = 0.0593 ropfamr Coef. Std. Err. z P> z [95% Conf. Interval] rsex female.8339045.033062 25.22 0.000.7691041.8987048 rage -.0371618.0009172-40.51 0.000 -.0389595 -.035364 /cut1-3.833869.0597563-3.950989-3.716749 /cut2-2.913506.0547271-3.02077-2.806243 /cut3-1.132863.0488522-1.228612-1.037115 /cut4.3371151.0482232.2425994.4316307

Compare with linear regression: regression 23. reg ropfamr i.rsex rage Source SS df MS Number of obs = 12,725 F(2, 12722) = 1157.61 Model 2675.45318 2 1337.72659 Prob > F = 0.0000 Residual 14701.4919 12,722 1.15559597 R-squared = 0.1540 Adj R-squared = 0.1538 Total 17376.9451 12,724 1.36568257 Root MSE = 1.075 ropfamr Coef. Std. Err. t P> t [95% Conf. Interval] rsex female.4938903.0191483 25.79 0.000.4563568.5314238 rage -.0208292.0005083-40.98 0.000 -.0218255 -.0198329 _cons 4.073714.0274276 148.53 0.000 4.019952 4.127476

Testing proportional odds 24 It is possible to fit each contrast as a binary logit The brant command does this, and tests that the parameter estimates are the same across the contrast It needs to use Stata s old-fashioned xi: prefix to handle categorical variables: xi: ologit ropfamr i.rsex rage brant, detail

Brant test output 25. brant, detail Estimated coefficients from j-1 binary regressions y>1 y>2 y>3 y>4 _Irsex_2 1.0198492.91316651.76176797.8150246 rage -.02716537 -.03064454 -.03652048 -.04571137 _cons 3.2067856 2.5225826 1.1214759 -.00985108 Brant Test of Parallel Regression Assumption Variable chi2 p>chi2 df -------------+-------------------------- All 101.13 0.000 6 -------------+-------------------------- _Irsex_2 15.88 0.001 3 rage 81.07 0.000 3 ---------------------------------------- A significant test statistic provides evidence that the parallel regression assumption has been violated.

What to do? 26 In this case the assumption is violated for both variables, but looking at the individual estimates, the differences are not big It s a big data set (14k cases) so it s easy to find departures from assumptions However, the departures can be meaningful. In this case it is worth fitting the "Generalised Ordinal Logit" model

Generalised Ordinal Logit This extends the proportional odds model in this fashion log P(Y > j) P(Y <= j) = α j + β j x That is, each variable has a per-contrast parameter At the most imparsimonious this is like a reparameterisation of the MNL in ordinal terms However, can constrain βs to be constant for some variables Get something intermediate, with violations of PO accommodated, but the parsimony of a single parameter where that is acceptable Download Richard William s gologit2 to fit this model: ssc install gologit2