Advanced Quantitative Techniques

Slides:



Advertisements
Similar presentations
Analysis of Categorical Data Nick Jackson University of Southern California Department of Psychology 10/11/
Advertisements

Logistic Regression Psy 524 Ainsworth.
Logistic Regression I Outline Introduction to maximum likelihood estimation (MLE) Introduction to Generalized Linear Models The simplest logistic regression.
Logistic Regression.
Week 3. Logistic Regression Overview and applications Additional issues Select Inputs Optimize complexity Transforming Inputs.
Simple Logistic Regression
Logit & Probit Regression
1 BINARY CHOICE MODELS: LOGIT ANALYSIS The linear probability model may make the nonsense predictions that an event will occur with probability greater.
University of North Carolina at Chapel Hill
Logistic Regression Multivariate Analysis. What is a log and an exponent? Log is the power to which a base of 10 must be raised to produce a given number.
Chapter 8 Logistic Regression 1. Introduction Logistic regression extends the ideas of linear regression to the situation where the dependent variable,
Multinomial Logistic Regression
Introduction to Logistic Regression. Simple linear regression Table 1 Age and systolic blood pressure (SBP) among 33 adult women.
Ordinal Logistic Regression
Logistic Regression Biostatistics 510 March 15, 2007 Vanessa Perez.
Notes on Logistic Regression STAT 4330/8330. Introduction Previously, you learned about odds ratios (OR’s). We now transition and begin discussion of.
BIOST 536 Lecture 4 1 Lecture 4 – Logistic regression: estimation and confounding Linear model.
Generalized Linear Models
Logistic Regression II Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0.
Excepted from HSRP 734: Advanced Statistical Methods June 5, 2008.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
Multiple Regression and Model Building Chapter 15 Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
LOGISTIC REGRESSION A statistical procedure to relate the probability of an event to explanatory variables Used in epidemiology to describe and evaluate.
When and why to use Logistic Regression?  The response variable has to be binary or ordinal.  Predictors can be continuous, discrete, or combinations.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
Week 5: Logistic regression analysis Overview Questions from last week What is logistic regression analysis? The mathematical model Interpreting the β.
Regression & Correlation. Review: Types of Variables & Steps in Analysis.
The Chicago Guide to Writing about Multivariate Analysis, 2 nd edition. Interpreting multivariate OLS and logit coefficients Jane E. Miller, PhD.
Logistic Regression. Linear Regression Purchases vs. Income.
Statistical Analysis. Z-scores A z-score = how many standard deviations a score is from the mean (-/+) Z-scores thus allow us to transform the mean to.
1 Multivariable Modeling. 2 nAdjustment by statistical model for the relationships of predictors to the outcome. nRepresents the frequency or magnitude.
Multiple Logistic Regression STAT E-150 Statistical Methods.
AMMBR II Gerrit Rooks. Checking assumptions in logistic regression Hosmer & Lemeshow Residuals Multi-collinearity Cooks distance.
Qualitative and Limited Dependent Variable Models ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
1 Introduction to Modeling Beyond the Basics (Chapter 7)
Nonparametric Statistics
1 BINARY CHOICE MODELS: LOGIT ANALYSIS The linear probability model may make the nonsense predictions that an event will occur with probability greater.
The Probit Model Alexander Spermann University of Freiburg SS 2008.
LOGISTIC REGRESSION. Purpose  Logistical regression is regularly used when there are only two categories of the dependent variable and there is a mixture.
The Probit Model Alexander Spermann University of Freiburg SoSe 2009
Logistic Regression PLAN 6930.
Nonparametric Statistics
BINARY LOGISTIC REGRESSION
Logistic Regression APKC – STATS AFAC (2016).
CHAPTER 7 Linear Correlation & Regression Methods
Dr. Siti Nor Binti Yaacob
Notes on Logistic Regression
William Greene Stern School of Business New York University
Advanced Quantitative Techniques
Hypothesis Testing Review
Drop-in Sessions! When: Hillary Term - Week 1 Where: Q-Step Lab (TBC) Sign up with Alice Evans.
Generalized Linear Models
Introduction to logistic regression a.k.a. Varbrul
Multiple logistic regression
Jeffrey E. Korte, PhD BMTRY 747: Foundations of Epidemiology II
Nonparametric Statistics
Soc 3306a: ANOVA and Regression Models
University of North Carolina at Chapel Hill
ביצוע רגרסיה לוגיסטית. פרק ה-2
NURS 790: Methods for Research and Evidence Based Practice
Scatter Plots of Data with Various Correlation Coefficients
Chapter 2 Looking at Data— Relationships
Categorical Data Analysis Review for Final
Logistic Regression.
females males Analyses with discrete variables
Soc 3306a Lecture 11: Multivariate 4
Introduction to Logistic Regression
Modeling with Dichotomous Dependent Variables
Logistic Regression.
Presentation transcript:

Advanced Quantitative Techniques Logistic regressions

Difference between linear and logistic regression Linear (OLS) Regression Logistic Regression For an interval-ratio dependent variable For a categorical (usually binary)* dependent variable Predicts value of dependent variable given values of independent variables Predicts probability that dependent variable will show membership to a category given values of independent variables *For this class, we are only using interval-ratio or binary variables. Count variables (categorical variables with more than two outcomes) require a more advanced regression (Poisson regression).

Logistic / logit Open divorce.dta list divorce positives scatter divorce positives

Logistic / logit logistic divorce positives predict preddiv scatter preddiv positives

Logistic / logit Logit=ln(odds ratio) In Stata, there are two commands for logistic regression: logit and logistic. The logit command gives the regression coefficients to estimate the logit score. The logistic command gives us the odds ratios we need to interpret the effect size of the predictors. The logit is a function of the logistic regression: it is just a different way of presenting the same relationship between independent and dependent variables (see Acock, section 11.2)

Logistic / logit Open nlsy97_chapter11.dta We want to test the impact of some variables on the likelihood that a young person will drink alcohol summarize drank30 age97 pdrink97 dinner97 male if !missing(drank30, age97, pdrink97, dinner97, male)

Logistic Interpretation: The odds of drinking are multiplied by 1.169 for each more year of age. The odds of drinking are multiplied by 1.329 for each peer that drinks. The odds of drinking are multiplied by 0.942 for every day the person has dinner with their family. The LR chi2(4)=78.01, P<0.0001, means the model is statistically significant

Logit Coefficients tell the amount of increase in the predicted log odds of low = 1 that would be predicted by a 1 unit increase in the predictor, holding all other predictors constant. 

Comparing effects of variables It is hard to compare the effect of two independent variables using odds ratio when they are measured in different scales. For example, the variable male is binary (0 to 1), so it is simple to observe its effect in odds ratio terms. But it is hard to compare the effect of “male” with the effect of variable dinner97 (number of days the person has dinner with his or her family), which goes from 0 to 7. If he odds ratio of “male” tells us how more likely it is that a male will drink compared to a female, dinner97 tells us the probability change for each day. Beta coefficients standardize the effects, allowing a comparison based on standard deviations.

Comparing effect of variables listcoef, help If listcoef does not work, use findit listcoef to install command

Comparing effect of variables listcoef, help percent

Hypothesis testing 1. Wald chi-squared test: z reported by Stata in logistic regression. 2. Likelihood-ratio chi-squared test. Compare LR chi2 with and without the variable you want to test. To test variable “age97”: logistic drank30 male dinner97 pdrink97 estimates store a logistic drank30 age97 male dinner97 pdrink97 lrtest a

Hypothesis testing

Hypothesis testing Same process, but for each of the variables lrdrop1 (install command using ssc install lrdrop1)

Marginal effects We will use the variable race97 and dropping the variable male. We want to test the effect of a person being black compared to being white. Thus, we will drop observations where the person has other racial background. generate black = race97 – 1 replace black=. If race97>2

Marginal effects label define black 0 “White” 1 “Black” label define drank30 0 “No” 1 “Yes” label values drank30 drank30 label values black black logit drank30 age97 i.black pdrink97 dinner97

Marginal effects

Marginal effects The margins command tell the difference in the probability of having drunk in the last 30 days is an individual is black compared with an individual is white. Initially, we are setting the covariates at the mean. So the command will tell us what is the difference between blacks and whites who are average on the other covariates.

Marginal effects margins, dydx(black) atmeans dy/dx: derivate at the point selected (where all other variables are at the mean) Interpretation: a black individual that is 13.67 years old, etc. will be 8.6% less likely to drink that a white individual that is 13.67 years old, etc.

Marginal effects We can also test marginal effects at points other than the mean using the at( ) option. margins, at(pdrink97=(1 2 3 4 5)) atmeans

Marginal effects For an individual with pdrink97 coded 2 we estimate a 36% probability that he or she drank in the last 30 days

Marginal effects Estimated probability that an adolescent drank in last month adjusted for age, race, and frequency of family meals (testing all of those at the mean).

Marginal effects For an individual that has dinner with his or her family 3 times a week, we estimate a 39% probability that he or she drank in the last 30 days

Example 1 Use severity.dta

Example 1 Use severity.dta We are trying to see what predicts whether an individual thinks that prison sentences are too severe

Example 1

Example 1