# Lecture 16: Logistic regression diagnostics, splines and interactions. Sandy Eckel 19 May 2007

Save this PDF as:

Size: px
Start display at page:

Download "Lecture 16: Logistic regression diagnostics, splines and interactions. Sandy Eckel 19 May 2007"

## Transcription

1 Lecture 16: Logistic regression diagnostics, splines and interactions Sandy Eckel 19 May

2 Logistic Regression Diagnostics Graphs to check assumptions Recall: Graphing was used to check the assumptions of linear regression Graphing binary outcomes for logistic regression is not as straightforward as graphing a continuous outcome for linear regression Several methods have been developed to visualize the logistic regression model for use in checking the assumptions Tables Graphs with lowess curves 2

3 Nepali breastfeeding study Example: data Breastfeeding tends to be protective for numerous infant health risks A study was conducted in Nepal to evaluate the odds of breastfeeding using a number of possible factors Outcome: breastfeeding (1=yes, 0=no) Primary predictor: baby s gender (1=F, 0=M) Secondary predictors: Child s age (0 to 76 months) Mother s age (17 to 52) Number of children (parity) (1 to 14) 3

4 How to look at the data? Binary Y and Binary (or categorical) X Breastfeeding vs. baby s gender both binary make a table! This method would work for any binary or categorical predictor 4

5 How to look at the data? Binary Y and Continuous X Breastfeeding vs. child s age Breastfeeding is binary Child s age is continuous Could make child s age categorical or binary by breaking it at the quartiles defining groups by years e.g. <1 year, 1 year, 2-3 years, 4+ years then use tables Or, we could graph the relationship 5

6 How to look at the data? Binary Y and Continuous X A scatter plot Actual breastfeeding breast fed age of child (months) This isn t very informative how can we fix this? 6

7 How to look at the data? Binary Y and Continuous X Allow a smoothed relationship The lowess command is a smoothed graph It s like a window has been pulled across the graph at each moment, the probability of a 1 within the window is graphed as the window moves, the probability of a 1 is shown as a line changing the width of the window yields different levels of smoothing 7

8 How to look at the data? Binary Y and Continuous X A scatter plot with Lowess curve Lowess smoother Probability of breastfeeding breast fed age of child (months) bandwidth =.9 Much more informative! Now we can talk about how the probability of breastfeeding changes with child s age - We want this to look like a nice logistic curve 8

9 Checking form of the model Lowess allows us to visualize how the probability of our outcome varies by a certain predictor We really want to graph log[p/(1-p)], because that function is assumed to be linear in logistic regression Get the lowess smooth of the probability and then you can transform the smoothed probability to the log odds scale Plot the `smoothed log odds versus the continuous covariate of interest This relation should look linear By looking at lowess plots within key subgroups, we can detect whether the relationship varies across covariates Looking at these plots helps us decide if interactions or splines are needed in the model 9

10 Assumptions of logistic regression Two assumptions: L the model fits the data I the observations are all independent Independence still cannot be assessed graphically; must know how the data were collected 10

11 How can we assess our model? L the model fits the data 3 methods for assessing model fit Look at the data Binary or categorical predictors: tables Do you see a need for interaction? Continuous predictors: lowess curves Do you see a need for interaction or splines? Graph observed probability vs. the predicted probability Use the X 2 Test of Goodness of Fit to assess the predicted probabilities 11

12 Assess model fit : Method 2 Graphing observed vs. predicted probabilities Run the model Save the predicted probability of breastfeeding for each child Plot observed vs predicted probabilities Observed breast fed Pr(bf) bandwidth =.8 Lowess smoother Predicted If the relationship is close to a straight line the predicted and observed probabilities are almost the same the model fits the data very well If not, try to add more X s, splines or interactions 12

13 Assess model fit : Method 3 X 2 Test of Goodness of Fit Run the model X 2 Test of Goodness of Fit Breaks data groups of equal size Compares observed and predicted numbers of observations in each group with a X 2 test (also called the Hosmer-Lemeshow X 2 Test) H 0 : the model fits the observed data well We want p>0.05 so we don t reject H 0 13

14 Method 3: X 2 Test of Goodness of Fit p = 0.20 > α = 0.05 Fail to reject H 0 ; conclude that the model fits the data reasonably well Conclusion matches the other methods Scatter plots showed same relationship as model the observed and predicted probabilities matched method 2: straight line the observed and predicted data matched method 3: p>

15 Summary: logistic regression model diagnostics There are no easy graphs for looking at binary outcome data use lowess split according to binary/categorical covariates to see how relationship between outcome and primary predictor varies Assessing model fit: 3 methods look at tables and graphs compare graph of observed vs. predicted p X 2 Test of Goodness of Fit: want large p-value 15

16 How do we add Flexibility in logistic regression? Same methods as in linear regression! Splines are used to allow the line to bend Interaction is used to allow different effects (difference in log odds ratio) for different groups 16

17 Example: Back to breastfeeding example Outcome: breastfeeding (1=yes, 0=no) Primary predictor: gender (1=F, 0=M) Secondary predictors: Child s age (0 to 76 months) Mother s age (17 to 52) need to center Number of children (parity) (1 to 14) need to center 17

18 Model A: gender p log = β + β1 1 p p 1 p ( Gender) log = ( Gender) 0 + Logit estimates Number of obs = 472 LR chi2(1) = 0.04 Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender (Intercept) baby s gender (1=F, 0=M) 18

19 Model B: gender and mother's age p log = β0 + β1 2 1 p p log 1 p ( Gender) + β ( Age 25) mom = ( Gender) ( Age 25) mom Logit estimates Number of obs = 472 LR chi2(2) = Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender age_momc (Intercept) baby s gender (1=F, 0=M) 19

20 Possible modification add a spline A plot of the log odds of the lowess smooth of breastfeeding versus mother s age reveals There may be a bend in the line at approximately mother s age = 25 We ll add a spline for mother s age>25 Boys Lowess smoother Logit transformed smooth Girls breast fed age of mother (years) bandwidth =.9 20

21 Possible modification add a spline For mother s age > 25 we center mother s age at 25 also, for convenience The spline is a new variable: (age mom 25) + = 0 if age < 25 = (age mom 25) if age >25 21

22 Model C: gender and mother's age with spline p log = β0 + β1 2 mom 3 1 p p log 1 p ( Gender) + β ( Age 25) + β ( Age 25) = mom ( Gender) ( Age 25) ( Age 25) mom + mom + Logit estimates Number of obs = 472 LR chi2(3) = Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender age_momc age_mom_sp (Intercept) baby s gender (1=F, 0=M) 22

23 Understanding the equation Write separate equations by age group log(odds) = (Gender) 0.25(Age-25) (Age-25) + For those with mothers under (Gender) 0.25(Age-25) For those with mothers over (Gender) 0.25(Age-25) (Age-25) = (Gender)+( )(Age-25) = (Gender) (Age-25) 23

24 Model C: Interpretation p log = β0 + β1 2 Age mom 3 Age mom 1 p ( Gender) + β ( 25) + β ( 25) β 0 : The log odds of breastfeeding for boys with 25-year-old mothers is baby s gender (1=F, 0=M) β 1 : Adjusting for mother s age, the log odds ratio of breastfeeding for girls vs. boys is β 2 : Adjusting for gender, the log odds ratio of breastfeeding corresponding to a one year difference in mother s age for mothers under 25 years is

25 Model C: Interpretation p log = β0 + β1 2 Age mom 3 Age mom 1 p ( Gender) + β ( 25) + β ( 25) β 2 +β 3 : Adjusting for gender, the log odds ratio of breastfeeding corresponding to a one year difference in mother s age for mothers over 25 years is β 3 : Adjusting for gender, the difference in the log odds ratio of breastfeeding corresponding to a one year difference in mother s age for mothers over 25 years compared with mothers under 25 years is Tough both to put in words and to understand, can be easier to understand mathematically! 25

26 Model C: Is the difference in the log odds ratio for mother s age statistically significant? p log = β0 + β1 2 Age mom 3 Age mom 1 p ( Gender) + β ( 25) + β ( 25) + H 0 : β 3 = 0 in the population i.e., the change in slope is 0, and the line does not bend in the population One variable added: use the Wald test Z=3.09, p=0.002, CI for β 3 = (0.08, 0.38) Reject H 0 Conclude that Model C is better than Model B 26

27 Breastfeeding example conclusion For boys and girls with mothers under 25 years of age, the odds that the mother will breastfeed the child decreases by a factor of exp(β 2 )=exp(-.24)=0.78 for each additional year of mother s age (95% CI: 0.69, 0.88) This relationship is significantly different for boys and girls with mothers over 25 years of age: for these children, the odds that the mother will breastfeed the child is approximately the same for each year of mother s age; the odds decreases by a factor of only exp(β 2 +β 3 )=0.98 for each additional year of mother s age (95% CI: 0.95, 1.02) 27

28 Model D: gender and number of children (parity) Logit estimates Number of obs = 472 LR chi2(2) = 9.99 Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender parityc (Intercept) Sketch of Model D p log 1 p = β 0 + β + β 1 2 ( Gender) ( Parity 8) log odds of breastfeeding baby s gender (1=F, 0=M) 8 Parity 28

29 Asessing the relationship in the data The relationship between logit(bf) and parity is very different for boys and girls Mothers of more children tend to breastfeed boys more breast fed breastfeed girls less Boys Lowess smoother Logit transformed smooth Girls # of kids mother had born alive bandwidth =.9 The relationship is about the same for boys and girls whose mothers have about 8 or fewer kids Could add a spline and an interaction term for only parity > 8 so that the slopes only differ then First we ll just add a spline 29

30 Model E: gender, parity, and parity spline Logit estimates Number of obs = 472 LR chi2(3) = Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender parityc parity_sp (Intercept) p log 1 p = β 0 + β + β + β Sketch of Model E ( Gender) ( Parity ( Parity 8) 8) baby s gender (1=F, 0=M) + log odds of breastfeeding 8 Parity 30

31 Understanding the equation Write separate equations by parity group log(odds) = (Gender) 0.17(Parity-8) (Parity-8) + For those with mothers with less than 8 children (Gender) 0.17(Parity-8) For those with mothers with at least 8 children (Gender) 0.17(Parity-8) (Parity-8) = (Gender) + ( )(Parity-8) = (Gender) (Parity-8) 31

32 Problem with the parity spline Model E forces the slope to be the same for boys and girls The lowess curve suggests slope should differ for boys and girls whose mothers had more than around 8 children Add an interaction term between the spline and gender that allows the slope to differ by gender only for those whose mothers have 8 or more children 32

33 The new variable Gender = 0 for boys (Parity 8) + = 0 for children of low parity families (Gender)x(Parity 8) + = 0 for boys = 0 for parity < 8 = (Parity 8) for girls with parity >=8 baby s gender (1=F, 0=M) 33

34 Model F: spline + interaction with spline Logit estimates Number of obs = 472 LR chi2(4) = Prob > chi2 = Log likelihood = Pseudo R2 = bf Coef. Std. Err. z P> z [95% Conf. Interval] gender parityc parity_sp parity_sp_~r (Intercept) p log 1 p + β 2 ( Parity = β 0 8) + β 1 + β Sketch of Model F ( Gender) 3 ( Parity 8) + log odds of breastfeeding + β 4 Gender ( Parity 8) + baby s gender (1=F, 0=M) 8 Parity 34

35 Understanding the equation Write separate equations by parity and gender log(odds) = (Gender) 0.17(Parity-8) (Parity-8) (Gender)x(Parity-8) + baby s gender (1=F, 0=M) For those with mothers with less than 8 children (Gender) 0.17(Parity-8) For boys with mothers with at least 8 children (Gender) 0.17(Parity-8) (Parity-8) = ( )(Parity-8) For girls with mothers with at least 8 children (Gender) 0.17(Parity-8) (Parity-8) (Gender)x(Parity-8) = ( ) +( )(Parity-8) 35

36 Interpretation Model F exp(β 0 ): The odds of breastfeeding for boys of mothers with 8 children is exp(-1.11) = 0.33 exp(β 1 ): Adjusting for mother s parity, the odds ratio of breastfeeding for girls vs. boys is 1.20 for children of mothers with less than 8 children exp(β 2 ): Adjusting for gender, the odds ratio of breastfeeding corresponding to a one child difference in parity for mothers with fewer than 8 children is.84 36

37 Interpretation Model F exp(β 2 +β 3 ): Among boys, the odds ratio of breastfeeding corresponding to a one child difference in parity for mothers with at least 8 children is 1.75 exp(β 2 +β 3 +β 4 ): Among girls, the odds ratio of breastfeeding corresponding to a one child difference in parity for mothers with at least 8 children is

38 Interpretation Model F Complicated to interpret the components on their own read on your own if you want! exp(β 3 ): The odds ratio of breastfeeding corresponding to a one child difference in parity is 2.08 times higher for boys whose mothers have at least 8 children than for boys whose mothers have fewer than 8 children exp(β 3 +β 4 ): The odds ratio of breastfeeding corresponding to a one child difference in parity is 0.74 times lower for girls whose mothers have at least 8 children than for girls whose mothers have fewer than 8 children exp(β 4 ): The odds ratio of breastfeeding corresponding to a one child difference in parity is 0.42 times lower for boys whose mothers have at least 8 children than for girls whose mothers have at least 8 children 38

39 Is the difference in the log odds ratio for parity by gender statistically significant? H 0 : β 4 = 0 in the population i.e. the change in slope for parity > 8 is the same for boys and girls in the population One variable added: use the Wald test Z=-2.18, p=0.029, CI for exp(β 3 ) = (0.19, 0.91) Reject H 0 Conclude that Model F is better than Model E p log 1 p + + β β 2 4 ( Parity = β 0 8) + + β 1 β Gender ( Parity ( Gender) 3 ( Parity 8) + 8) + 39

40 Conclusion Model F For children whose mothers have fewer than 8 children, the odds that the mother will breastfeed the child is about the same for boys and girls and decreases by a factor of exp(β 2 )=0.84 for each additional year of mother s age (95% CI: 0.77, 0.92). This relationship is significantly different for both boys and girls whose mothers have more than 8 children: For boys whose mothers have more than 8 children, the odds that the mother will breastfeed increases by a factor of exp{β 2 +β 3 }=1.75 for each additional year of mother s age (95% CI: 1.05, 2.93). For girls whose mothers have more than 8 children, the odds that the mother will breastfeed decreases by a factor of exp{β 2 +β 3 +β 4 }=0.74 for each additional year of mother s age (95% CI: 0.40, 1.37). 40

41 Comparing the models Variables Reference* Gender Parity 8 A Age (Age-25) Odds Ratio for Model B (Parity-8) C 1.09 D 1.06 E 1.07 F 1.20 (Gender)x (Parity-8) + Deviance *The table value for the reference group is the odds, not the odds ratio

42 Comparing the models Models C and F are both nested in Model A Models C and F cannot be directly compared to one another, but we can see which has a smaller p-value when compared to Model A C vs. A: X 2 = 26.5 with 2 df F vs. A: X 2 = 21.7 with 3 df Both p-values are very small <.0001, but the p- value for model C is slightly smaller 42

43 What next? Model C improves prediction beyond gender alone (Model A) more than Model F. Model C should be the next parent model, and we should test the new variables in Model F to see if they continue to improve prediction within the context of Model C When a tentative final model is identified, the assumptions of logistic regression should be checked 43

44 Summary of lecture 16 Logistic regression assumptions L the model fits the data I the observations are all independent Logistic regression diagnostics Look at the data: tables or logits of lowess curves Graph observed probability vs. the predicted probability Use the X 2 Test of Goodness of Fit to assess the predicted probabilities Splines and interactions add flexibility to the model When comparing nested models, a table of the coefficients and their CI s, or the odds ratios and their CI s helps the reader quickly compare models Two models not nested in one another cannot be directly compared One can identify a new parent model by comparing statistical significance 44

### 11. Analysis of Case-control Studies Logistic Regression

Research methods II 113 11. Analysis of Case-control Studies Logistic Regression This chapter builds upon and further develops the concepts and strategies described in Ch.6 of Mother and Child Health:

### REGRESSION LINES IN STATA

REGRESSION LINES IN STATA THOMAS ELLIOTT 1. Introduction to Regression Regression analysis is about eploring linear relationships between a dependent variable and one or more independent variables. Regression

### Multinomial and Ordinal Logistic Regression

Multinomial and Ordinal Logistic Regression ME104: Linear Regression Analysis Kenneth Benoit August 22, 2012 Regression with categorical dependent variables When the dependent variable is categorical,

### Statistics 104 Final Project A Culture of Debt: A Study of Credit Card Spending in America TF: Kevin Rader Anonymous Students: LD, MH, IW, MY

Statistics 104 Final Project A Culture of Debt: A Study of Credit Card Spending in America TF: Kevin Rader Anonymous Students: LD, MH, IW, MY ABSTRACT: This project attempted to determine the relationship

### Using Stata 11 & higher for Logistic Regression Richard Williams, University of Notre Dame, Last revised March 28, 2015

Using Stata 11 & higher for Logistic Regression Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised March 28, 2015 NOTE: The routines spost13, lrdrop1, and extremes are

### Logistic regression diagnostics

Logistic regression diagnostics Biometry 755 Spring 2009 Logistic regression diagnostics p. 1/28 Assessing model fit A good model is one that fits the data well, in the sense that the values predicted

### Overview Classes. 12-3 Logistic regression (5) 19-3 Building and applying logistic regression (6) 26-3 Generalizations of logistic regression (7)

Overview Classes 12-3 Logistic regression (5) 19-3 Building and applying logistic regression (6) 26-3 Generalizations of logistic regression (7) 2-4 Loglinear models (8) 5-4 15-17 hrs; 5B02 Building and

### I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN

Beckman HLM Reading Group: Questions, Answers and Examples Carolyn J. Anderson Department of Educational Psychology I L L I N O I S UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN Linear Algebra Slide 1 of

### MULTIPLE REGRESSION EXAMPLE

MULTIPLE REGRESSION EXAMPLE For a sample of n = 166 college students, the following variables were measured: Y = height X 1 = mother s height ( momheight ) X 2 = father s height ( dadheight ) X 3 = 1 if

### Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 21, 2015

Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 21, 2015 References: Long 1997, Long and Freese 2003 & 2006 & 2014,

### Lecture 10: Logistical Regression II Multinomial Data. Prof. Sharyn O Halloran Sustainable Development U9611 Econometrics II

Lecture 10: Logistical Regression II Multinomial Data Prof. Sharyn O Halloran Sustainable Development U9611 Econometrics II Logit vs. Probit Review Use with a dichotomous dependent variable Need a link

### III. INTRODUCTION TO LOGISTIC REGRESSION. a) Example: APACHE II Score and Mortality in Sepsis

III. INTRODUCTION TO LOGISTIC REGRESSION 1. Simple Logistic Regression a) Example: APACHE II Score and Mortality in Sepsis The following figure shows 30 day mortality in a sample of septic patients as

### Module 14: Missing Data Stata Practical

Module 14: Missing Data Stata Practical Jonathan Bartlett & James Carpenter London School of Hygiene & Tropical Medicine www.missingdata.org.uk Supported by ESRC grant RES 189-25-0103 and MRC grant G0900724

### 5. Ordinal regression: cumulative categories proportional odds. 6. Ordinal regression: comparison to single reference generalized logits

Lecture 23 1. Logistic regression with binary response 2. Proc Logistic and its surprises 3. quadratic model 4. Hosmer-Lemeshow test for lack of fit 5. Ordinal regression: cumulative categories proportional

### Odds ratios and logistic regression: further examples of their use and interpretation

The Stata Journal (2003) 3, Number 3, pp. 213 225 Odds ratios and logistic regression: further examples of their use and interpretation Susan M. Hailpern, MS, MPH Paul F. Visintainer, PhD School of Public

### Using Minitab for Regression Analysis: An extended example

Using Minitab for Regression Analysis: An extended example The following example uses data from another text on fertilizer application and crop yield, and is intended to show how Minitab can be used to

### Introduction to Stata

Introduction to Stata September 23, 2014 Stata is one of a few statistical analysis programs that social scientists use. Stata is in the mid-range of how easy it is to use. Other options include SPSS,

### Nonlinear Regression Functions. SW Ch 8 1/54/

Nonlinear Regression Functions SW Ch 8 1/54/ The TestScore STR relation looks linear (maybe) SW Ch 8 2/54/ But the TestScore Income relation looks nonlinear... SW Ch 8 3/54/ Nonlinear Regression General

### BRIEF OVERVIEW ON INTERPRETING COUNT MODEL RISK RATIOS

BRIEF OVERVIEW ON INTERPRETING COUNT MODEL RISK RATIOS An Addendum to Negative Binomial Regression Cambridge University Press (2007) Joseph M. Hilbe 2008, All Rights Reserved This short monograph is intended

### Generalized Linear Models

Generalized Linear Models We have previously worked with regression models where the response variable is quantitative and normally distributed. Now we turn our attention to two types of models where the

### Ordinal Regression. Chapter

Ordinal Regression Chapter 4 Many variables of interest are ordinal. That is, you can rank the values, but the real distance between categories is unknown. Diseases are graded on scales from least severe

### How to set the main menu of STATA to default factory settings standards

University of Pretoria Data analysis for evaluation studies Examples in STATA version 11 List of data sets b1.dta (To be created by students in class) fp1.xls (To be provided to students) fp1.txt (To be

Lecture 16: Generalized Additive Models Regression III: Advanced Methods Bill Jacoby Michigan State University http://polisci.msu.edu/jacoby/icpsr/regress3 Goals of the Lecture Introduce Additive Models

### Regression Analysis. Data Calculations Output

Regression Analysis In an attempt to find answers to questions such as those posed above, empirical labour economists use a useful tool called regression analysis. Regression analysis is essentially a

### Econ 371 Problem Set #3 Answer Sheet

Econ 371 Problem Set #3 Answer Sheet 4.3 In this question, you are told that a OLS regression analysis of average weekly earnings yields the following estimated model. AW E = 696.7 + 9.6 Age, R 2 = 0.023,

### Logit and Probit. Brad Jones 1. April 21, 2009. University of California, Davis. Bradford S. Jones, UC-Davis, Dept. of Political Science

Logit and Probit Brad 1 1 Department of Political Science University of California, Davis April 21, 2009 Logit, redux Logit resolves the functional form problem (in terms of the response function in the

### Discussion Section 4 ECON 139/239 2010 Summer Term II

Discussion Section 4 ECON 139/239 2010 Summer Term II 1. Let s use the CollegeDistance.csv data again. (a) An education advocacy group argues that, on average, a person s educational attainment would increase

### Unit 12 Logistic Regression Supplementary Chapter 14 in IPS On CD (Chap 16, 5th ed.)

Unit 12 Logistic Regression Supplementary Chapter 14 in IPS On CD (Chap 16, 5th ed.) Logistic regression generalizes methods for 2-way tables Adds capability studying several predictors, but Limited to

### HURDLE AND SELECTION MODELS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009

HURDLE AND SELECTION MODELS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. A General Formulation 3. Truncated Normal Hurdle Model 4. Lognormal

### Numerical integration of a function known only through data points

Numerical integration of a function known only through data points Suppose you are working on a project to determine the total amount of some quantity based on measurements of a rate. For example, you

### ESTIMATING AVERAGE TREATMENT EFFECTS: IV AND CONTROL FUNCTIONS, II Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics

ESTIMATING AVERAGE TREATMENT EFFECTS: IV AND CONTROL FUNCTIONS, II Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Quantile Treatment Effects 2. Control Functions

### Introduction to Analysis Methods for Longitudinal/Clustered Data, Part 3: Generalized Estimating Equations

Introduction to Analysis Methods for Longitudinal/Clustered Data, Part 3: Generalized Estimating Equations Mark A. Weaver, PhD Family Health International Office of AIDS Research, NIH ICSSC, FHI Goa, India,

### LOGISTIC REGRESSION ANALYSIS

LOGISTIC REGRESSION ANALYSIS C. Mitchell Dayton Department of Measurement, Statistics & Evaluation Room 1230D Benjamin Building University of Maryland September 1992 1. Introduction and Model Logistic

### Examining a Fitted Logistic Model

STAT 536 Lecture 16 1 Examining a Fitted Logistic Model Deviance Test for Lack of Fit The data below describes the male birth fraction male births/total births over the years 1931 to 1990. A simple logistic

### Adequacy of Biomath. Models. Empirical Modeling Tools. Bayesian Modeling. Model Uncertainty / Selection

Directions in Statistical Methodology for Multivariable Predictive Modeling Frank E Harrell Jr University of Virginia Seattle WA 19May98 Overview of Modeling Process Model selection Regression shape Diagnostics

### Regression Analysis: A Complete Example

Regression Analysis: A Complete Example This section works out an example that includes all the topics we have discussed so far in this chapter. A complete example of regression analysis. PhotoDisc, Inc./Getty

### e = random error, assumed to be normally distributed with mean 0 and standard deviation σ

1 Linear Regression 1.1 Simple Linear Regression Model The linear regression model is applied if we want to model a numeric response variable and its dependency on at least one numeric factor variable.

### 10 Dichotomous or binary responses

10 Dichotomous or binary responses 10.1 Introduction Dichotomous or binary responses are widespread. Examples include being dead or alive, agreeing or disagreeing with a statement, and succeeding or failing

### Inferential Statistics

Inferential Statistics Sampling and the normal distribution Z-scores Confidence levels and intervals Hypothesis testing Commonly used statistical methods Inferential Statistics Descriptive statistics are

### SUMAN DUVVURU STAT 567 PROJECT REPORT

SUMAN DUVVURU STAT 567 PROJECT REPORT SURVIVAL ANALYSIS OF HEROIN ADDICTS Background and introduction: Current illicit drug use among teens is continuing to increase in many countries around the world.

: Table of Contents... 1 Overview of Model... 1 Dispersion... 2 Parameterization... 3 Sigma-Restricted Model... 3 Overparameterized Model... 4 Reference Coding... 4 Model Summary (Summary Tab)... 5 Summary

### 13. Poisson Regression Analysis

136 Poisson Regression Analysis 13. Poisson Regression Analysis We have so far considered situations where the outcome variable is numeric and Normally distributed, or binary. In clinical work one often

### Linear Regression in SPSS

Linear Regression in SPSS Data: mangunkill.sav Goals: Examine relation between number of handguns registered (nhandgun) and number of man killed (mankill) checking Predict number of man killed using number

### Introduction. Survival Analysis. Censoring. Plan of Talk

Survival Analysis Mark Lunt Arthritis Research UK Centre for Excellence in Epidemiology University of Manchester 01/12/2015 Survival Analysis is concerned with the length of time before an event occurs.

### Using An Ordered Logistic Regression Model with SAS Vartanian: SW 541

Using An Ordered Logistic Regression Model with SAS Vartanian: SW 541 libname in1 >c:\=; Data first; Set in1.extract; A=1; PROC LOGIST OUTEST=DD MAXITER=100 ORDER=DATA; OUTPUT OUT=CC XBETA=XB P=PROB; MODEL

### The first three steps in a logistic regression analysis with examples in IBM SPSS. Steve Simon P.Mean Consulting www.pmean.com

The first three steps in a logistic regression analysis with examples in IBM SPSS. Steve Simon P.Mean Consulting www.pmean.com 2. Why do I offer this webinar for free? I offer free statistics webinars

### Lecture #2 Overview. Basic IRT Concepts, Models, and Assumptions. Lecture #2 ICPSR Item Response Theory Workshop

Basic IRT Concepts, Models, and Assumptions Lecture #2 ICPSR Item Response Theory Workshop Lecture #2: 1of 64 Lecture #2 Overview Background of IRT and how it differs from CFA Creating a scale An introduction

### 11 Logistic Regression - Interpreting Parameters

11 Logistic Regression - Interpreting Parameters Let us expand on the material in the last section, trying to make sure we understand the logistic regression model and can interpret Stata output. Consider

### Competing-risks regression

Competing-risks regression Roberto G. Gutierrez Director of Statistics StataCorp LP Stata Conference Boston 2010 R. Gutierrez (StataCorp) Competing-risks regression July 15-16, 2010 1 / 26 Outline 1. Overview

### Outline. Dispersion Bush lupine survival Quasi-Binomial family

Outline 1 Three-way interactions 2 Overdispersion in logistic regression Dispersion Bush lupine survival Quasi-Binomial family 3 Simulation for inference Why simulations Testing model fit: simulating the

### Parametric survival models

Parametric survival models ST3242: Introduction to Survival Analysis Alex Cook October 2008 ST3242 : Parametric survival models 1/17 Last time in survival analysis Reintroduced parametric models Distinguished

### Correlation and Simple Linear Regression

Correlation and Simple Linear Regression We are often interested in studying the relationship among variables to determine whether they are associated with one another. When we think that changes in a

### Logs Transformation in a Regression Equation

Fall, 2001 1 Logs as the Predictor Logs Transformation in a Regression Equation The interpretation of the slope and intercept in a regression change when the predictor (X) is put on a log scale. In this

### Basic Statistical and Modeling Procedures Using SAS

Basic Statistical and Modeling Procedures Using SAS One-Sample Tests The statistical procedures illustrated in this handout use two datasets. The first, Pulse, has information collected in a classroom

### International Statistical Institute, 56th Session, 2007: Phil Everson

Teaching Regression using American Football Scores Everson, Phil Swarthmore College Department of Mathematics and Statistics 5 College Avenue Swarthmore, PA198, USA E-mail: peverso1@swarthmore.edu 1. Introduction

### Statistics 305: Introduction to Biostatistical Methods for Health Sciences

Statistics 305: Introduction to Biostatistical Methods for Health Sciences Modelling the Log Odds Logistic Regression (Chap 20) Instructor: Liangliang Wang Statistics and Actuarial Science, Simon Fraser

### Applied Statistics. J. Blanchet and J. Wadsworth. Institute of Mathematics, Analysis, and Applications EPF Lausanne

Applied Statistics J. Blanchet and J. Wadsworth Institute of Mathematics, Analysis, and Applications EPF Lausanne An MSc Course for Applied Mathematicians, Fall 2012 Outline 1 Model Comparison 2 Model

### Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software

STATA Tutorial Professor Erdinç Please follow the directions once you locate the Stata software in your computer. Room 114 (Business Lab) has computers with Stata software 1.Wald Test Wald Test is used

### Using Hierarchical Linear Models to Measure Growth. Measurement Incorporated Hierarchical Linear Models Workshop

Using Hierarchical Linear Models to Measure Growth Measurement Incorporated Hierarchical Linear Models Workshop Chapter 6 Motivation Linear Growth Curves Quadratic Growth Curves Some other Growth Curves

### VI. Introduction to Logistic Regression

VI. Introduction to Logistic Regression We turn our attention now to the topic of modeling a categorical outcome as a function of (possibly) several factors. The framework of generalized linear models

### Chapter 18. Effect modification and interactions. 18.1 Modeling effect modification

Chapter 18 Effect modification and interactions 18.1 Modeling effect modification weight 40 50 60 70 80 90 100 male female 40 50 60 70 80 90 100 male female 30 40 50 70 dose 30 40 50 70 dose Figure 18.1:

### Using SAS Proc Mixed for the Analysis of Clustered Longitudinal Data

Using SAS Proc Mixed for the Analysis of Clustered Longitudinal Data Kathy Welch Center for Statistical Consultation and Research The University of Michigan 1 Background ProcMixed can be used to fit Linear

### Yiming Peng, Department of Statistics. February 12, 2013

Regression Analysis Using JMP Yiming Peng, Department of Statistics February 12, 2013 2 Presentation and Data http://www.lisa.stat.vt.edu Short Courses Regression Analysis Using JMP Download Data to Desktop

### ln(p/(1-p)) = α +β*age35plus, where p is the probability or odds of drinking

Dummy Coding for Dummies Kathryn Martin, Maternal, Child and Adolescent Health Program, California Department of Public Health ABSTRACT There are a number of ways to incorporate categorical variables into

### Title. Syntax. nlcom Nonlinear combinations of estimators. Nonlinear combination of estimators one expression. nlcom [ name: ] exp [, options ]

Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression

### Binary Logistic Regression

Binary Logistic Regression Main Effects Model Logistic regression will accept quantitative, binary or categorical predictors and will code the latter two in various ways. Here s a simple model including

### An assessment of consumer willingness to pay for Renewable Energy Sources use in Italy: a payment card approach.

An assessment of consumer willingness to pay for Renewable Energy Sources use in Italy: a payment card approach. -First findings- University of Perugia Department of Economics, Finance and Statistics 1

### Failure to take the sampling scheme into account can lead to inaccurate point estimates and/or flawed estimates of the standard errors.

Analyzing Complex Survey Data: Some key issues to be aware of Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised January 24, 2015 Rather than repeat material that is

### 1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

1 Final Review 2 Review 2.1 CI 1-propZint Scenario 1 A TV manufacturer claims in its warranty brochure that in the past not more than 10 percent of its TV sets needed any repair during the first two years

### Introduction to Multilevel Modeling Using HLM 6. By ATS Statistical Consulting Group

Introduction to Multilevel Modeling Using HLM 6 By ATS Statistical Consulting Group Multilevel data structure Students nested within schools Children nested within families Respondents nested within interviewers

### Handling missing data in Stata a whirlwind tour

Handling missing data in Stata a whirlwind tour 2012 Italian Stata Users Group Meeting Jonathan Bartlett www.missingdata.org.uk 20th September 2012 1/55 Outline The problem of missing data and a principled

### 2. Simple Linear Regression

Research methods - II 3 2. Simple Linear Regression Simple linear regression is a technique in parametric statistics that is commonly used for analyzing mean response of a variable Y which changes according

### Module 5: Multiple Regression Analysis

Using Statistical Data Using to Make Statistical Decisions: Data Multiple to Make Regression Decisions Analysis Page 1 Module 5: Multiple Regression Analysis Tom Ilvento, University of Delaware, College

### Simple linear regression

Simple linear regression Introduction Simple linear regression is a statistical method for obtaining a formula to predict values of one variable from another where there is a causal relationship between

### Developing Risk Adjustment Techniques Using the SAS@ System for Assessing Health Care Quality in the lmsystem@

Developing Risk Adjustment Techniques Using the SAS@ System for Assessing Health Care Quality in the lmsystem@ Yanchun Xu, Andrius Kubilius Joint Commission on Accreditation of Healthcare Organizations,

### SAS Software to Fit the Generalized Linear Model

SAS Software to Fit the Generalized Linear Model Gordon Johnston, SAS Institute Inc., Cary, NC Abstract In recent years, the class of generalized linear models has gained popularity as a statistical modeling

### Bivariate Analysis. Correlation. Correlation. Pearson's Correlation Coefficient. Variable 1. Variable 2

Bivariate Analysis Variable 2 LEVELS >2 LEVELS COTIUOUS Correlation Used when you measure two continuous variables. Variable 2 2 LEVELS X 2 >2 LEVELS X 2 COTIUOUS t-test X 2 X 2 AOVA (F-test) t-test AOVA

### business statistics using Excel OXFORD UNIVERSITY PRESS Glyn Davis & Branko Pecar

business statistics using Excel Glyn Davis & Branko Pecar OXFORD UNIVERSITY PRESS Detailed contents Introduction to Microsoft Excel 2003 Overview Learning Objectives 1.1 Introduction to Microsoft Excel

### Statistical Models in R

Statistical Models in R Some Examples Steven Buechler Department of Mathematics 276B Hurley Hall; 1-6233 Fall, 2007 Outline Statistical Models Structure of models in R Model Assessment (Part IA) Anova

### LOGIT AND PROBIT ANALYSIS

LOGIT AND PROBIT ANALYSIS A.K. Vasisht I.A.S.R.I., Library Avenue, New Delhi 110 012 amitvasisht@iasri.res.in In dummy regression variable models, it is assumed implicitly that the dependent variable Y

### Cool Tools for PROC LOGISTIC

Cool Tools for PROC LOGISTIC Paul D. Allison Statistical Horizons LLC and the University of Pennsylvania March 2013 www.statisticalhorizons.com 1 New Features in LOGISTIC ODDSRATIO statement EFFECTPLOT

### Online Appendix to Are Risk Preferences Stable Across Contexts? Evidence from Insurance Data

Online Appendix to Are Risk Preferences Stable Across Contexts? Evidence from Insurance Data By LEVON BARSEGHYAN, JEFFREY PRINCE, AND JOSHUA C. TEITELBAUM I. Empty Test Intervals Here we discuss the conditions

### Regression in Stata. Alicia Doyle Lynch Harvard-MIT Data Center (HMDC)

Regression in Stata Alicia Doyle Lynch Harvard-MIT Data Center (HMDC) Documents for Today Find class materials at: http://libraries.mit.edu/guides/subjects/data/ training/workshops.html Several formats

### DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9

DEPARTMENT OF PSYCHOLOGY UNIVERSITY OF LANCASTER MSC IN PSYCHOLOGICAL RESEARCH METHODS ANALYSING AND INTERPRETING DATA 2 PART 1 WEEK 9 Analysis of covariance and multiple regression So far in this course,

### Sydney Roberts Predicting Age Group Swimmers 50 Freestyle Time 1. 1. Introduction p. 2. 2. Statistical Methods Used p. 5. 3. 10 and under Males p.

Sydney Roberts Predicting Age Group Swimmers 50 Freestyle Time 1 Table of Contents 1. Introduction p. 2 2. Statistical Methods Used p. 5 3. 10 and under Males p. 8 4. 11 and up Males p. 10 5. 10 and under

### Raul Cruz-Cano, HLTH653 Spring 2013

Multilevel Modeling-Logistic Schedule 3/18/2013 = Spring Break 3/25/2013 = Longitudinal Analysis 4/1/2013 = Midterm (Exercises 1-5, not Longitudinal) Introduction Just as with linear regression, logistic

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

Auxiliary Variables in Mixture Modeling: 3-Step Approaches Using Mplus Tihomir Asparouhov and Bengt Muthén Mplus Web Notes: No. 15 Version 8, August 5, 2014 1 Abstract This paper discusses alternatives

### IAPRI Quantitative Analysis Capacity Building Series. Multiple regression analysis & interpreting results

IAPRI Quantitative Analysis Capacity Building Series Multiple regression analysis & interpreting results How important is R-squared? R-squared Published in Agricultural Economics 0.45 Best article of the

### TRINITY COLLEGE. Faculty of Engineering, Mathematics and Science. School of Computer Science & Statistics

UNIVERSITY OF DUBLIN TRINITY COLLEGE Faculty of Engineering, Mathematics and Science School of Computer Science & Statistics BA (Mod) Enter Course Title Trinity Term 2013 Junior/Senior Sophister ST7002

### especially with continuous

Handling interactions in Stata, especially with continuous predictors Patrick Royston & Willi Sauerbrei German Stata Users meeting, Berlin, 1 June 2012 Interactions general concepts General idea of a (two-way)

### Module 4 - Multiple Logistic Regression

Module 4 - Multiple Logistic Regression Objectives Understand the principles and theory underlying logistic regression Understand proportions, probabilities, odds, odds ratios, logits and exponents Be

### Nested Logit. Brad Jones 1. April 30, 2008. University of California, Davis. 1 Department of Political Science. POL 213: Research Methods

Nested Logit Brad 1 1 Department of Political Science University of California, Davis April 30, 2008 Nested Logit Interesting model that does not have IIA property. Possible candidate model for structured

### Example: Credit card default, we may be more interested in predicting the probabilty of a default than classifying individuals as default or not.

Statistical Learning: Chapter 4 Classification 4.1 Introduction Supervised learning with a categorical (Qualitative) response Notation: - Feature vector X, - qualitative response Y, taking values in C

### Poisson Models for Count Data

Chapter 4 Poisson Models for Count Data In this chapter we study log-linear models for count data under the assumption of a Poisson error structure. These models have many applications, not only to the

### Standard errors of marginal effects in the heteroskedastic probit model

Standard errors of marginal effects in the heteroskedastic probit model Thomas Cornelißen Discussion Paper No. 320 August 2005 ISSN: 0949 9962 Abstract In non-linear regression models, such as the heteroskedastic

### Interaction effects and group comparisons Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 20, 2015

Interaction effects and group comparisons Richard Williams, University of Notre Dame, http://www3.nd.edu/~rwilliam/ Last revised February 20, 2015 Note: This handout assumes you understand factor variables,

### Lecture 12: Generalized Linear Models for Binary Data

Lecture 12: Generalized Linear Models for Binary Data Dipankar Bandyopadhyay, Ph.D. BMTRY 711: Analysis of Categorical Data Spring 2011 Division of Biostatistics and Epidemiology Medical University of

### MORE ON LOGISTIC REGRESSION

DEPARTMENT OF POLITICAL SCIENCE AND INTERNATIONAL RELATIONS Posc/Uapp 816 MORE ON LOGISTIC REGRESSION I. AGENDA: A. Logistic regression 1. Multiple independent variables 2. Example: The Bell Curve 3. Evaluation