Using the Margins Command to Estimate and Interpret Adjusted Predictions and Marginal Effects Richard Williams

Slides:



Advertisements
Similar presentations
Using Stata’s Margins Command to Estimate and Interpret Adjusted Predictions and Marginal Effects Richard Williams
Advertisements

Psych 5500/6500 t Test for Two Independent Groups: Power Fall, 2008.
Richard Williams (with assistance from Cheng Wang) Notre Dame Sociology August 2012 Annual Meetings of the.
Gologit2: Generalized Logistic Regression/ Partial Proportional Odds Models for Ordinal Dependent Variables Part 1: The gologit model & gologit2 program.
Issues in factorial design
Random Assignment Experiments
Topic 12 – Further Topics in ANOVA
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 12 l Multiple Regression: Predicting One Factor from Several Others.
1 SSS II Lecture 1: Correlation and Regression Graduate School 2008/2009 Social Science Statistics II Gwilym Pryce
Sociology 601 Class 13: October 13, 2009 Measures of association for tables (8.4) –Difference of proportions –Ratios of proportions –the odds ratio Measures.
Inference1 Data Analysis Inferential Statistics Research Methods Gail Johnson.
Econ 140 Lecture 151 Multiple Regression Applications Lecture 15.
Chapter 10: Hypothesis Testing
Analysis of frequency counts with Chi square
1Prof. Dr. Rainer Stachuletz Limited Dependent Variables P(y = 1|x) = G(  0 + x  ) y* =  0 + x  + u, y = max(0,y*)
Using Stata’s Margins Command to Estimate and Interpret Adjusted Predictions and Marginal Effects Richard Williams
Copyright ©2010 Pearson Education, Inc. publishing as Prentice Hall 9- 1 Basic Marketing Research: Using Microsoft Excel Data Analysis, 3 rd edition Alvin.
QUALITATIVE AND LIMITED DEPENDENT VARIABLE MODELS.
Chapter 4 Multiple Regression.
Factorial ANOVA 2-Way ANOVA, 3-Way ANOVA, etc.. Factorial ANOVA One-Way ANOVA = ANOVA with one IV with 1+ levels and one DV One-Way ANOVA = ANOVA with.
Clustered or Multilevel Data
An Introduction to Logistic Regression
1 Some terminology Population - the set of all cases about which we have some interest. Sample - the cases we have selected from the population (randomly)
Stat 112: Lecture 9 Notes Homework 3: Due next Thursday
Multiple Regression 2 Sociology 5811 Lecture 23 Copyright © 2005 by Evan Schofer Do not copy or distribute without permission.
So are how the computer determines the size of the intercept and the slope respectively in an OLS regression The OLS equations give a nice, clear intuitive.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 12: Multiple and Logistic Regression Marshall University.
Analysis of Variance. ANOVA Probably the most popular analysis in psychology Why? Ease of implementation Allows for analysis of several groups at once.
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
Hypothesis Testing:.
Bivariate Relationships Analyzing two variables at a time, usually the Independent & Dependent Variables Like one variable at a time, this can be done.
Multiple Regression. In the previous section, we examined simple regression, which has just one independent variable on the right side of the equation.
Moderation & Mediation
CHAPTER 16: Inference in Practice. Chapter 16 Concepts 2  Conditions for Inference in Practice  Cautions About Confidence Intervals  Cautions About.
Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Independent Samples t-Test (or 2-Sample t-Test)
 Is there a comparison? ◦ Are the groups really comparable?  Are the differences being reported real? ◦ Are they worth reporting? ◦ How much confidence.
Statistics and Quantitative Analysis U4320 Segment 12: Extension of Multiple Regression Analysis Prof. Sharyn O’Halloran.
Correlation and Linear Regression. Evaluating Relations Between Interval Level Variables Up to now you have learned to evaluate differences between the.
Statistical analysis Prepared and gathered by Alireza Yousefy(Ph.D)
Hypothesis testing Intermediate Food Security Analysis Training Rome, July 2010.
Managerial Economics Demand Estimation & Forecasting.
MGS3100_04.ppt/Sep 29, 2015/Page 1 Georgia State University - Confidential MGS 3100 Business Analysis Regression Sep 29 and 30, 2015.
Regression Analysis A statistical procedure used to find relations among a set of variables.
Multiple Linear Regression ● For k>1 number of explanatory variables. e.g.: – Exam grades as function of time devoted to study, as well as SAT scores.
Lecture 7: What is Regression Analysis? BUEC 333 Summer 2009 Simon Woodcock.
Chapter 8 Delving Into The Use of Inference 8.1 Estimating with Confidence 8.2 Use and Abuse of Tests.
Issues in Estimation Data Generating Process:
Discussion of time series and panel models
Stat 112 Notes 9 Today: –Multicollinearity (Chapter 4.6) –Multiple regression and causal inference.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Review - Confidence Interval Most variables used in social science research (e.g., age, officer cynicism) are normally distributed, meaning that their.
1 Multivariable Modeling. 2 nAdjustment by statistical model for the relationships of predictors to the outcome. nRepresents the frequency or magnitude.
Warsaw Summer School 2015, OSU Study Abroad Program Advanced Topics: Interaction Logistic Regression.
Overview of Regression Analysis. Conditional Mean We all know what a mean or average is. E.g. The mean annual earnings for year old working males.
Regression Analysis: Part 2 Inference Dummies / Interactions Multicollinearity / Heteroscedasticity Residual Analysis / Outliers.
Leftover Slides from Week Five. Steps in Hypothesis Testing Specify the research hypothesis and corresponding null hypothesis Compute the value of a test.
ANOVA, Regression and Multiple Regression March
The Analysis of Variance ANOVA
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 11 Inference for Distributions of Categorical.
Regression Analysis: A statistical procedure used to find relations among a set of variables B. Klinkenberg G
Independent Samples ANOVA. Outline of Today’s Discussion 1.Independent Samples ANOVA: A Conceptual Introduction 2.The Equal Variance Assumption 3.Cumulative.
King Faisal University جامعة الملك فيصل Deanship of E-Learning and Distance Education عمادة التعلم الإلكتروني والتعليم عن بعد [ ] 1 جامعة الملك فيصل عمادة.
Introduction Sample surveys involve chance error. Here we will study how to find the likely size of the chance error in a percentage, for simple random.
Using Stata’s Margins Command to Estimate and Interpret Adjusted Predictions and Marginal Effects Richard Williams
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 13: Multiple, Logistic and Proportional Hazards Regression.
Hypothesis Testing Review
Simulation-Based Approach for Comparing Two Means
MGS 3100 Business Analysis Regression Feb 18, 2016
CHI SQUARE (χ2) Dangerous Curves Ahead!.
Presentation transcript:

Using the Margins Command to Estimate and Interpret Adjusted Predictions and Marginal Effects Richard Williams University of Notre Dame Stata Conference, Chicago, July 2011

Motivation for Paper Many journals place a strong emphasis on the sign and statistical significance of effects – but often there is very little emphasis on the substantive and practical significance Unlike scholars in some other fields, most Sociologists seem to know little about things like marginal effects or adjusted predictions, let alone use them in their work Many users of Stata seem to have been reluctant to adopt the margins command. The manual is long, the options are daunting, the output is sometimes unintelligible, the results are difficult to graph, and the advantages over older and simpler commands like adjust and mfx are not always understood

This presentation therefore tries to do the following Briefly explain what adjusted predictions and marginal effects are, and how they can contribute to the interpretation of results Show how older commands, like adjust, are generally inferior to margins and can even lead to incorrect conclusions and results Illustrate that margins can generate MEMs (marginal effects at the means), AMEs (Average Marginal Effects) and MERs (Marginal Effects at Representative Values), and show some of the pros and cons of each approach

Adjusted Predictions - New margins versus the old adjust

Model 1: Basic Model

Among other things, the results show that getting older is bad for your health – but just how bad is it??? Adjusted predictions (aka predictive margins) can make these results more tangible. With adjusted predictions, you specify values for each of the independent variables in the model, and then compute the probability of the event occurring for an individual who has those values So, for example, we will use the adjust command to compute the probability that an “average” 20 year old will have diabetes and compare it to the probability that an “average” 70 year old will

The results show that a 20 year old has less than a 1 percent chance of having diabetes, while an otherwise-comparable 70 year old has an 11 percent chance. But what does “average” mean? In this case, we used the common, but not universal, practice of using the mean values for the other independent variables (female, black) that are in the model. The margins command easily (in fact more easily) produces the same results

Model 2: Squared term added

In this model, adjust reports a much higher predicted probability of diabetes than before – 37 percent as opposed to 11 percent! But, luckily, adjust is wrong. Because it does not know that age and age2 are related, it uses the mean value of age2 in its calculations, rather than the correct value of 70 squared. While there are ways to fix this, using the margins command and factor variables is a safer solution. The use of factor variables tells margins that age and age^2 are not independent of each other and it does the calculations accordingly. In this case it leads to a much smaller (and also correct) estimate of 10.3 percent.

Model 3: Interaction Term

Once again, adjust gets it wrong If female = 0, femage must also equal zero But adjust does not know that, so it uses the average value of femage instead. Margins does know that the different components of the interaction term are related, and does the calculation right.

Model 4: Multiple dummies

More depressing news for old people: now adjust says they have a 32 percent chance of having diabetes But once again adjust is wrong: If you are in the oldest age group, you can’t also have partial membership in some other age category. 0, not the means, is the correct value to use for the other age variables when computing probabilities. Margins realizes this and does it right again.

Marginal Effects – MEMs, AMEs, & MERs

MEMs – Marginal Effects at the Means

The results tell us that, if you had two otherwise-average individuals, one white, one black, the black’s probability of having diabetes would be 2.9 percent higher. And what do we mean by average? With MEMs, average is defined as having the mean value for the other independent variables in the model, i.e years old, 10.5 percent black, and 52.5 percent female.

MEMs are easy to explain. They have been widely used. Indeed, for a long time, MEMs were the only option with Stata, because that is all the old mfx command supported. But, many do not like MEMs. While there are people who are years old, there is nobody who is 10.5 percent black or 52.5 percent female. Further, the means are only one of many possible sets of values that could be used – and a set of values that no real person could actually have seems troublesome. For these and other reasons, many researchers prefer AMEs.

AMEs – Average Marginal Effects

Intuitively, the AME for black is computed as follows: Go to the first case. Treat that person as though s/he were white, regardless of what the person’s race actually is. Leave all other independent variable values as is. Compute the probability this person (if he or she were white) would have diabetes Now do the same thing, this time treating the person as though they were black. The difference in the two probabilities just computed is the marginal effect for that case Repeat the process for every case in the sample Compute the average of all the marginal effects you have computed. This gives you the AME for black.

In effect, you are comparing two hypothetical populations – one all white, one all black – that have the exact same values on the other independent variables in the model. Since the only difference between these two populations is their race, race must be the cause of the differences in their likelihood of diabetes. Many people like the fact that all of the data is being used, not just the means, and feel that this leads to superior estimates. Others, however, are not convinced that treating men as though they are women, and women as though they are men, really is a better way of computing marginal effects.

The biggest problem with both of the last two approaches, however, may be that they only produce a single estimate of the marginal effect. However “average” is defined, averages can obscure difference in effects across cases. In reality, the effect that variables like race have on the probability of success varies with the characteristics of the person, e.g. racial differences could be much greater for older people than for younger. If we really only want a single number for the effect of race, we might as well just estimate an OLS regression, as OLS coefficients and AMEs are often very similar to each other.

MERs (Marginal Effects at Representative Values) may therefore often be a superior alternative. MERs can be both intuitively meaningful, while showing how the effects of variables vary by other characteristics of the individual. With MERs, you choose ranges of values for one or more variables, and then see how the marginal effects differ across that range.

Earlier, the AME for black was 4 percent. But, when we estimate marginal effects for different ages, we see that the effect of black differs greatly by age. It is less than 1 percent for 20 year olds and almost 9 percent for those aged 70. Similarly, while the AME for gender was only 0.6 percent, at different ages the effect is much smaller or much higher than that. In a large model, it may be cumbersome to specify representative values for every variable, but you can do so for those of greatest interest.