Regression Methods for Survey Data
|
|
- Sophia Johns
- 6 years ago
- Views:
Transcription
1 Regression Methods for Survey Data Professor Ron Fricker! Naval Postgraduate School! Monterey, California! 3/26/13 Reading:! Lohr chapter 11! 1
2 Goals for this Lecture! Linear regression! Review of linear regression, including assumptions! Coding nominal independent variables! Running multiple regression in JMP and R! For complex sampling designs, must use R or other specialized software! Logistic regression! Useful for binary and ordinal dependent variables! Running logistic regression in JMP and R! For complex sampling designs, must use R or other specialized software! 3/26/13 2
3 Regression in Surveys! Useful for modeling responses to survey question(s) as function of external data and/or other survey data! Sometimes easier/more efficient then highdimensional multi-way tables! Useful for summarizing how changes in the independent variables (the Xs) affect the dependent variable (the Y ) 3/26/13 3
4 Simple Linear Regression! General expression for a simple linear regression model:! β 0 and are model parameters! ε Y i = β 0 + β 1 x i + ε i β 1 is the error or noise term! Can think of it as modeling the expected value of Y for a given or particular value of x:! ( ) = β 0 + β 1 x i E Y i x i So the result is a model of the mean of Y as a linear function of some independent variable! 3/26/13 4
5 Linear Regression Assumptions! Error terms often assumed independent 2 observations from a distribution! N σ Y N x i (0, ) 2 ~ ( β0 + β1 i, σ ) This encapsulates all the assumptions inherent in linear regression:! The error terms are independent and identically distributed! Dependent variable is normally distributed! Hence, it is not appropriate to apply this methodology when the Y is discrete! So, Y can t be based on closed-ended survey questions such as a 5-point Likert scale! 3/26/13 5
6 Applying Linear Models to Survey Data! As a minimum the Ys must be continuous and must be able to transform it to be symmetric! Combinations of discrete survey data may be approximately normally distributed! Factor analysis and principle components may be useful in this regard! Given some data, we will estimate the parameters with coefficients! E( Y x ) ŷ = ˆβ + ˆβ x i 0 1 i where ŷ is the predicted value of y 3/26/13 6
7 Linear Regression with Categorical Independent Variables! Because survey data often discrete, often have discrete independent variable in model! For example, how to put male and female categories in a regression equation?! Code them as indicator (dummy) variables! Two ways of making dummy variables:! Male = 1, female = 0!» Default in many programs!» Easy to code and interpret! Male = 1, female = -1!» Default in JMP for nominal variables!» Some consider results easier to interpret! Consider a model with only gender as the independent variable! 3/26/13 7
8 Example: Calculus Grade as a Function of Gender! Regression equation: females: y = x 0 males: y = x 1 0/1 coding Compares calc_grade to a baseline group (here, females) Regression equation: females: y = x1 males: y = x (-1) -1/1 coding Compares each group to overall average 3/26/13 8
9 How to Code k Levels! Two coding schemes: 0/1 and 1/0/-1! Use k-1 indicator variables! E.g., three level variable: a, b,, & c! 0/1: use one of the levels as a baseline! Ø Var_a = 1 if level=a, 0 otherwise! Ø Var_b = 1 if level=b, 0 otherwise! Ø Var_c exclude as redundant (baseline)! Example:! 3/26/13 9
10 How to Code k Levels (cont d)! 1/0/-1: use the mean as a baseline! Ø Variable[a] = 1 if variable=a, 0 if variable=b, -1 if variable=c! Ø Variable[b] = 1 if variable=b, 0 if variable=a, -1 if variable=c! Ø Variable[c] exclude as redundant! Example! 3/26/13 10
11 Fitting Simple Linear Regression Models! In JMP, can use either Analyze > Fit Y by X or Analyze > Fit Model! Fill in Y with (continuous) dependent variable! Put X in model by highlighting and then clicking X or Add! Click Run Model when done! In R, use the lm() function in the base package! Syntax lm(dep_var ~ indep_var, data=data.frame) Best to assign results to an object and then look at results using the summary() function! 3/26/13 11
12 Example: New Student Survey! Define a Y variable that represents the complete in-processing experience:! In-processing Total = sum(q2a-q2i)! 3/26/13 12
13 New Student Survey (continued)! Dependent variable looks roughly continuous and approximately normally distributed:! Sample Quantiles Normal Q-Q Plot Summary Statistics from JMP! Theoretical Quantiles Summary Statistics from R! > summary(new_student$ip_total) Min. 1st Qu. Median Mean 3rd Qu. Max. NA's /26/13 13
14 Example: Simple Linear Regression of Total Satisfaction on School in R! > model_results <- lm(ip_total ~ CurricNumber, data=new_student) > summary(model_results) Call: lm(formula = IP_total ~ CurricNumber, data = new_student) Residuals: Min 1Q Median 3Q Max Three 0/1 indicators for 4 schools! Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) <2e-16 *** CurricNumberGSEAS * CurricNumberGSOIS CurricNumberSIGS Signif. codes: 0 *** ** 0.01 * Residual standard error: on 151 degrees of freedom (16 observations deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 3 and 151 DF, p-value: Result: GSBPP students most satisfied with mean score of ! GSEAS least satisfied with mean score of =28.978! 3/26/13 14
15 From Simple to Multiple Regression! Simple linear regression: One Y variable and one x variable ( Y i = β 0 + β 1 x i + ε i )! Multiple regression: One Y variable and multiple x variables! Like simple regression, we re trying to model how Y depends on x! Only now we are building models where Y may depend on many xs! Y i = β 0 + β 1 x 1i + β 2 x 1i + + β k x ki + ε i 3/26/13 15
16 Multiple Regression in JMP (Assuming Simple Random Sampling)! In JMP, use Analyze > Fit Model to do multiple regression! Fill in Y with (continuous) dependent variable! Put Xs in model by highlighting and then clicking Add! Use Remove to take out Xs! Click Run Model when done! In R, same function and syntax as simple linear regression, just add more terms:! lm(dep_var ~ indep_var1 +indep_var2 + indep_var3, data=data.frame) 3/26/13 16
17 Example: Revisiting Satisfaction with In-processing (1)! GSEAS worst at in-processing? Or are CIVs and USAF least happy? Note this differs from R output because of different coding! But solution is the same: GSEAS = = ! 3/26/13 17
18 Satisfaction with In-processing (2)! Or are Singaporians unhappy? Making a new variable 3/26/13 18
19 Satisfaction with In-processing (3)! Final model?! Normal Quantile Plot 3/26/13 19
20 Equivalent Model in R (Assuming Simple Random Sampling)! > summary(model_results) Call: lm(formula = IP_total ~ Type_Student, data = new_student) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) *** Type_StudentOther FORNAT ** Type_StudentSingapore * Type_StudentUS Air Force Type_StudentUS Army ** Type_StudentUS Marine Corps * Type_StudentUS Navy ** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 148 degrees of freedom (16 observations deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 6 and 148 DF, p-value: /26/13 20
21 Now, Regression with Complex Sampling! Use the survey package and the svyglm() function! Don t specify family option for linear regression! As with other svy functions, must first specify the sampling design with the svydesign() function and then call it from the svyglm() function! Open question: When fitting regression models, is it necessary to account for sampling design?! Not always clear: It may be possible with some data to estimate relationships in the population without the design and/or weights! 3/26/13 21
22 Logistic Regression! Logistic regression! Response (Y) is binary representing event or not! Model estimates probability of event occurrence! p ln i 1 p i = β + β x + β x + + β x + ε 0 1 1i 2 2i k ki i In surveys, useful for modeling:! Probability respondent says yes (or no )! Can also dichotomize other questions! Probability respondent in a (binary) class! 3/26/13 22
23 Three Numbers for the Same Idea! Probability (p)! Example: Pr(Congress passes FY14 budget) = 1/3 = 0.333! Easily interpretable number between 0 and 1! Odds: p /(1-p)! Example: Odds of an FY14 budget are 1/2 = 0.50! Still interpretable, but not as easy as probability any number > 0! Log odds: ln(p/1-p)! + Very difficult to interpret any number from to! Log odds is often called logit! In spite of interpretation difficulty, the model is very useful (and the logit can be transformed to get the probabilities)! 3/26/13 23
24 Where Logistic Regression Fits! Independent or Predictor Variable! Continuous Categorical Dependent or Response! Continuous Categorical Linear regression! Logistic regression! Linear reg. w/ dummy variables! Logistic reg. w/ dummy variables! 3/26/13 24
25 Why Logistic Regression?! Some reasons:! Estimates of p bounded between 0 and 1! Resulting S curve fits many observed phenomenon! Model follows the same general principles as linear regression! In terms of surveys, discrete data very common! If a variable is not already binary, often relatively easy to convert into binary result (collapse appropriately across some categories)! 3/26/13 25
26 Estimating the Parameters! βs estimated via maximum likelihood! Given estimated βs, probability is calculated as! ˆp i = exp ( ˆβ 0 + ˆβ 1 x 1i + ˆβ 2 x 2i + + ˆβ k x ) ki 1+ exp ˆβ 0 + ˆβ 1 x 1i + ˆβ 2 x 2i + + ˆβ k x ki ( ) In JMP, after Fit Model, red triangle > Save Probability Formula! Creates a new column containing the estimated probabilities, one for each observation! In R, use the predict function on an object that contains the output of svyglm() 3/26/13 26
27 Fitting Logistic Regression Models (Assuming Simple Random Sampling)! In JMP, fit much like multiple regression: Analyze > Fit Model! Fill in Y with nominal binary dependent variable! Put Xs in model by highlighting and then clicking Add! Use Remove to take out Xs! Click Run Model when done! In R, use the svyglm function with the option family=quasibinomial() 3/26/13 27
28 Example: Logistic Regression in JMP for the New Student Survey Q1! Dichotomize Q1 into satisfied (4 or 5) and not satisfied (1, 2, or 3)! Model satisfied on Gender and Type Student! 3/26/13 28
29 Same Example in R! > new_student$satisfied_ind <- as.numeric(new_student$x1>3) > model_results <- glm(satisfied_ind ~ Sex + Type_Student, data=new_student, family=binomial) > summary(model_results) Call: glm(formula = satisfied_ind ~ Sex + Type_Student, family = binomial, data = new_student) Deviance Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) SexM * Type_StudentOther FORNAT Type_StudentSingapore Type_StudentUS Air Force Type_StudentUS Army Type_StudentUS Marine Corps Type_StudentUS Navy Signif. codes: 0 *** ** 0.01 * (Dispersion parameter for binomial family taken to be 1) Null deviance: on 161 degrees of freedom Residual deviance: on 154 degrees of freedom (9 observations deleted due to missingness) AIC: Number of Fisher Scoring iterations: 4 3/26/13 29
30 Interpreting the Output (1)! Exponentiating both sides of! p ln i 1 p i = β + β X + β X + + β X 0 1 1i 2 2i k ki gives! p i = exp( β ) 1 p 0 exp( β 1 X ) 1i exp( β k X ) ki i Note that the left side is the odds for the i th observation! A useful quantity, and one that is easy to associate the betas to when using a 0/1 coding scheme! 3/26/13 30
31 Interpreting the Output (2)! For example, in the baseline group all the indicators are 0, so ( ) exp β 0 Thus, is the baseline group odds here, civilian female: odds = exp( ) = 0.26 So, the odds a female civilian is satisfied are roughly 1 to 4 In terms of probability, p i = exp( β ) 1 p 0 i ˆp i = exp ˆβ 0 1+ exp ˆβ 0 ( ) ( ) = = /26/13 31
32 Interpreting the Output (3)! Other groups are excursions from the baseline using appropriate values of independent variables For example, consider Navy males: p i 1 p i = exp ( ) exp(1.3364) exp(1.9556) = 7.07 Odds male US Navy officer is satisfied are 7 to 1 In terms of probability, ˆp i = ( ) ( ) exp ˆβ 0 + ˆβ Male + ˆβ Navy 1+ exp ˆβ 0 + ˆβ Male + ˆβ Navy ( ) ( ) = exp = 1+ exp /26/13 32
33 Compare Model Output to Raw Data! Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) SexM * Type_StudentOther FORNAT Type_StudentSingapore Type_StudentUS Air Force Type_StudentUS Army Type_StudentUS Marine Corps Type_StudentUS Navy /26/13 33
34 Ordinal Logistic Regression! An extension of binary logistic regression when there are k > 2 dependent variable categories! For the ordered responses 1 j k 1, the model is! Pr(Y ln i j)! 1 Pr(Y i j) = α β X β X β X j 1 1i 2 2i k ki Note that the betas are constant across all the js; the only difference are the alpha intercept terms! This is a proportional odds model! In R, use polr() in the MASS library with SRS and svyolr() with complex designs! 3/26/13 34
35 An Example: New Student Survey Modeling All Q1 Likert Scale Levels! > model_results <- polr(as.factor(x1) ~ as.factor(type_student), data=new_student) > summary(model_results) Call: polr(formula = as.factor(x1) ~ as.factor(type_student), data = new_student) Coefficients: Value Std. Error t value as.factor(type_student)other FORNAT as.factor(type_student)singapore as.factor(type_student)us Air Force as.factor(type_student)us Army as.factor(type_student)us Marine Corps as.factor(type_student)us Navy Intercepts: Value Std. Error t value Residual Deviance: AIC: (9 observations deleted due to missingness) 3/26/13 35
36 Interpreting the Output (1)! More complicated to understand this type of model! Most relevant are the coefficients! Each is the estimate of how much the log-odds increases with a one unit change! Can calculate the probabilities as:! Pr Y i j ( ) ( ) ( ) = exp ˆα j ˆβ 1 x 1i ˆβ 2 x 2i ˆβ k x ki 1+ exp ˆα j ˆβ 1 x 1i ˆβ 2 x 2i ˆβ k x ki The minus signs are correct: this is the way the polr() function parameterizes the model! 3/26/13 36
37 Interpreting the Output (2)! So, for Navy students,! exp Similarly Pr Y i 2,, and! Pr( Y i 4) = Thus, the model estimates that!! Pr( Y i 1) = ( ) ( ) = ( ) = Pr( Y i 3) = exp Pr( Y i = j Naval Officer ) = 0.006, 0.041, 0.116, 0.650, 0.187, 3/26/13 37 j = 1 j = 2 j = 3 j = 4 j = 5
38 Interpreting the Output (3)! So, for Singaporean students,! exp Similarly Pr Y i 2,, and! Pr( Y i 4) = Thus, the model estimates that!! Pr( Y i 1) = ( ) ( ) = ( ) = Pr( Y i 3) = exp Pr( Y i = j Singapore Officer ) = 0.044, 0.232, 0.326, 0.369, 0.029, 3/26/13 38 j = 1 j = 2 j = 3 j = 4 j = 5
39 Using R with Complex Sampling! As we ve seen, key is the survey package by Thomas Lumley! See Other useful svy functions include svytable(), svyboxplot(), svyby(), svycdf(), svycoplot(), svycoxph() Good reference text:! Lumley, T. (2010). Complex Surveys: A Guide to Analysis using R. Wiley Series in Survey Methodology, John Wiley and Sons.! 3/26/13 39
40 Other Software for Analyzing Surveys With Complex Sampling Designs! Stata! SAS! SPSS! SUDAAN!! ü Not Excel or JMP! 3/26/13 40
41 What We Have Just Learned! Linear regression! Review of linear regression, including assumptions! Coding nominal independent variables! Running multiple regression in JMP and R! For complex sampling designs, must use R or other specialized software! Logistic regression! Useful for binary and ordinal dependent variables! Running logistic regression in JMP and R! For complex sampling designs, must use R or other specialized software! 3/26/13 41
Linear Regression Analysis for Survey Data. Professor Ron Fricker Naval Postgraduate School Monterey, California
Linear Regression Analysis for Survey Data Professor Ron Fricker Naval Postgraduate School Monterey, California 1 Goals for this Lecture Linear regression How to think about it for Lickert scale dependent
More information7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis
Lecture 6: Logistic Regression Analysis Christopher S. Hollenbeak, PhD Jane R. Schubart, PhD The Outcomes Research Toolbox Review Homework 2 Overview Logistic regression model conceptually Logistic regression
More informationGeneralised linear models. Response variable can take a number of different formats
Generalised linear models Response variable can take a number of different formats Structure Limitations of linear models and GLM theory GLM for count data GLM for presence \ absence data GLM for proportion
More informationLogistic Regression - problem 6.14
Logistic Regression - problem 6.14 Let x 1, x 2,, x m be given values of an input variable x and let Y 1,, Y m be independent binomial random variables whose distributions depend on the corresponding values
More informationIntroduction to Survey Analysis!
Introduction to Survey Analysis! Professor Ron Fricker! Naval Postgraduate School! Monterey, California! Reading Assignment:! 2/22/13 None! 1 Goals for this Lecture! Introduction to analysis for surveys!
More informationLogistic Regressions. Stat 430
Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to
More informationEPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7
Introduction to Generalized Univariate Models: Models for Binary Outcomes EPSY 905: Fundamentals of Multivariate Modeling Online Lecture #7 EPSY 905: Intro to Generalized In This Lecture A short review
More informationInteractions in Logistic Regression
Interactions in Logistic Regression > # UCBAdmissions is a 3-D table: Gender by Dept by Admit > # Same data in another format: > # One col for Yes counts, another for No counts. > Berkeley = read.table("http://www.utstat.toronto.edu/~brunner/312f12/
More informationBMI 541/699 Lecture 22
BMI 541/699 Lecture 22 Where we are: 1. Introduction and Experimental Design 2. Exploratory Data Analysis 3. Probability 4. T-based methods for continous variables 5. Power and sample size for t-based
More informationSimple logistic regression
Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a
More informationMatched Pair Data. Stat 557 Heike Hofmann
Matched Pair Data Stat 557 Heike Hofmann Outline Marginal Homogeneity - review Binary Response with covariates Ordinal response Symmetric Models Subject-specific vs Marginal Model conditional logistic
More informationLogistic Regression 21/05
Logistic Regression 21/05 Recall that we are trying to solve a classification problem in which features x i can be continuous or discrete (coded as 0/1) and the response y is discrete (0/1). Logistic regression
More informationExam Applied Statistical Regression. Good Luck!
Dr. M. Dettling Summer 2011 Exam Applied Statistical Regression Approved: Tables: Note: Any written material, calculator (without communication facility). Attached. All tests have to be done at the 5%-level.
More informationSTAT 7030: Categorical Data Analysis
STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012
More informationLogistic Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University
Logistic Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Logistic Regression 1 / 38 Logistic Regression 1 Introduction
More informationInvestigating Models with Two or Three Categories
Ronald H. Heck and Lynn N. Tabata 1 Investigating Models with Two or Three Categories For the past few weeks we have been working with discriminant analysis. Let s now see what the same sort of model might
More informationLecture 14: Introduction to Poisson Regression
Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why
More informationModelling counts. Lecture 14: Introduction to Poisson Regression. Overview
Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week
More informationAnalysing categorical data using logit models
Analysing categorical data using logit models Graeme Hutcheson, University of Manchester The lecture notes, exercises and data sets associated with this course are available for download from: www.research-training.net/manchester
More informationNATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours
NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3 4 5 6 Full marks
More informationGeneralized linear models for binary data. A better graphical exploratory data analysis. The simple linear logistic regression model
Stat 3302 (Spring 2017) Peter F. Craigmile Simple linear logistic regression (part 1) [Dobson and Barnett, 2008, Sections 7.1 7.3] Generalized linear models for binary data Beetles dose-response example
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent
More informationHierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!
Hierarchical Generalized Linear Models ERSH 8990 REMS Seminar on HLM Last Lecture! Hierarchical Generalized Linear Models Introduction to generalized models Models for binary outcomes Interpreting parameter
More information22s:152 Applied Linear Regression
22s:152 Applied Linear Regression Chapter 7: Dummy Variable Regression So far, we ve only considered quantitative variables in our models. We can integrate categorical predictors by constructing artificial
More informationSCHOOL OF MATHEMATICS AND STATISTICS. Linear and Generalised Linear Models
SCHOOL OF MATHEMATICS AND STATISTICS Linear and Generalised Linear Models Autumn Semester 2017 18 2 hours Attempt all the questions. The allocation of marks is shown in brackets. RESTRICTED OPEN BOOK EXAMINATION
More informationLinear Regression Models P8111
Linear Regression Models P8111 Lecture 25 Jeff Goldsmith April 26, 2016 1 of 37 Today s Lecture Logistic regression / GLMs Model framework Interpretation Estimation 2 of 37 Linear regression Course started
More informationLinear Regression. In this lecture we will study a particular type of regression model: the linear regression model
1 Linear Regression 2 Linear Regression In this lecture we will study a particular type of regression model: the linear regression model We will first consider the case of the model with one predictor
More informationRegression so far... Lecture 21 - Logistic Regression. Odds. Recap of what you should know how to do... At this point we have covered: Sta102 / BME102
Background Regression so far... Lecture 21 - Sta102 / BME102 Colin Rundel November 18, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical
More informationNATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )
NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3
More informationConsider fitting a model using ordinary least squares (OLS) regression:
Example 1: Mating Success of African Elephants In this study, 41 male African elephants were followed over a period of 8 years. The age of the elephant at the beginning of the study and the number of successful
More informationR Hints for Chapter 10
R Hints for Chapter 10 The multiple logistic regression model assumes that the success probability p for a binomial random variable depends on independent variables or design variables x 1, x 2,, x k.
More information9 Generalized Linear Models
9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models
More informationToday. HW 1: due February 4, pm. Aspects of Design CD Chapter 2. Continue with Chapter 2 of ELM. In the News:
Today HW 1: due February 4, 11.59 pm. Aspects of Design CD Chapter 2 Continue with Chapter 2 of ELM In the News: STA 2201: Applied Statistics II January 14, 2015 1/35 Recap: data on proportions data: y
More informationSTA102 Class Notes Chapter Logistic Regression
STA0 Class Notes Chapter 0 0. Logistic Regression We continue to study the relationship between a response variable and one or more eplanatory variables. For SLR and MLR (Chapters 8 and 9), our response
More information1. Logistic Regression, One Predictor 2. Inference: Estimating the Parameters 3. Multiple Logistic Regression 4. AIC and BIC in Logistic Regression
Logistic Regression 1. Logistic Regression, One Predictor 2. Inference: Estimating the Parameters 3. Multiple Logistic Regression 4. AIC and BIC in Logistic Regression 5. Target Marketing: Tabloid Data
More informationClass Notes: Week 8. Probit versus Logit Link Functions and Count Data
Ronald Heck Class Notes: Week 8 1 Class Notes: Week 8 Probit versus Logit Link Functions and Count Data This week we ll take up a couple of issues. The first is working with a probit link function. While
More informationExercise 5.4 Solution
Exercise 5.4 Solution Niels Richard Hansen University of Copenhagen May 7, 2010 1 5.4(a) > leukemia
More informationWeek 7 Multiple factors. Ch , Some miscellaneous parts
Week 7 Multiple factors Ch. 18-19, Some miscellaneous parts Multiple Factors Most experiments will involve multiple factors, some of which will be nuisance variables Dealing with these factors requires
More informationST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses
ST3241 Categorical Data Analysis I Multicategory Logit Models Logit Models For Nominal Responses 1 Models For Nominal Responses Y is nominal with J categories. Let {π 1,, π J } denote the response probabilities
More informationTruck prices - linear model? Truck prices - log transform of the response variable. Interpreting models with log transformation
Background Regression so far... Lecture 23 - Sta 111 Colin Rundel June 17, 2014 At this point we have covered: Simple linear regression Relationship between numerical response and a numerical or categorical
More informationSingle-level Models for Binary Responses
Single-level Models for Binary Responses Distribution of Binary Data y i response for individual i (i = 1,..., n), coded 0 or 1 Denote by r the number in the sample with y = 1 Mean and variance E(y) =
More informationA Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn
A Handbook of Statistical Analyses Using R Brian S. Everitt and Torsten Hothorn CHAPTER 6 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, and Colonic Polyps
More informationIntroducing Generalized Linear Models: Logistic Regression
Ron Heck, Summer 2012 Seminars 1 Multilevel Regression Models and Their Applications Seminar Introducing Generalized Linear Models: Logistic Regression The generalized linear model (GLM) represents and
More informationGeneralized linear models
Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models
More informationLog-linear Models for Contingency Tables
Log-linear Models for Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Log-linear Models for Two-way Contingency Tables Example: Business Administration Majors and Gender A
More informationInference. ME104: Linear Regression Analysis Kenneth Benoit. August 15, August 15, 2012 Lecture 3 Multiple linear regression 1 1 / 58
Inference ME104: Linear Regression Analysis Kenneth Benoit August 15, 2012 August 15, 2012 Lecture 3 Multiple linear regression 1 1 / 58 Stata output resvisited. reg votes1st spend_total incumb minister
More informationssh tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm
Kedem, STAT 430 SAS Examples: Logistic Regression ==================================== ssh abc@glue.umd.edu, tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm a. Logistic regression.
More informationRon Heck, Fall Week 8: Introducing Generalized Linear Models: Logistic Regression 1 (Replaces prior revision dated October 20, 2011)
Ron Heck, Fall 2011 1 EDEP 768E: Seminar in Multilevel Modeling rev. January 3, 2012 (see footnote) Week 8: Introducing Generalized Linear Models: Logistic Regression 1 (Replaces prior revision dated October
More informationNon-Gaussian Response Variables
Non-Gaussian Response Variables What is the Generalized Model Doing? The fixed effects are like the factors in a traditional analysis of variance or linear model The random effects are different A generalized
More informationVarious Issues in Fitting Contingency Tables
Various Issues in Fitting Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Complete Tables with Zero Entries In contingency tables, it is possible to have zero entries in a
More informationMultinomial Logistic Regression Models
Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word
More informationOn the Inference of the Logistic Regression Model
On the Inference of the Logistic Regression Model 1. Model ln =(; ), i.e. = representing false. The linear form of (;) is entertained, i.e. ((;)) ((;)), where ==1 ;, with 1 representing true, 0 ;= 1+ +
More informationDuration of Unemployment - Analysis of Deviance Table for Nested Models
Duration of Unemployment - Analysis of Deviance Table for Nested Models February 8, 2012 The data unemployment is included as a contingency table. The response is the duration of unemployment, gender and
More informationLet s see if we can predict whether a student returns or does not return to St. Ambrose for their second year.
Assignment #13: GLM Scenario: Over the past few years, our first-to-second year retention rate has ranged from 77-80%. In other words, 77-80% of our first-year students come back to St. Ambrose for their
More informationcor(dataset$measurement1, dataset$measurement2, method= pearson ) cor.test(datavector1, datavector2, method= pearson )
Tutorial 7: Correlation and Regression Correlation Used to test whether two variables are linearly associated. A correlation coefficient (r) indicates the strength and direction of the association. A correlation
More informationIntroduction to the Generalized Linear Model: Logistic regression and Poisson regression
Introduction to the Generalized Linear Model: Logistic regression and Poisson regression Statistical modelling: Theory and practice Gilles Guillot gigu@dtu.dk November 4, 2013 Gilles Guillot (gigu@dtu.dk)
More informationProportional Odds Logistic Regression. stat 557 Heike Hofmann
Proportional Odds Logistic Regression stat 557 Heike Hofmann Outline Proportional Odds Logistic Regression Model Definition Properties Latent Variables Intro to Loglinear Models Ordinal Response Y is categorical
More informationUnit 5 Logistic Regression Practice Problems
Unit 5 Logistic Regression Practice Problems SOLUTIONS R Users Source: Afifi A., Clark VA and May S. Computer Aided Multivariate Analysis, Fourth Edition. Boca Raton: Chapman and Hall, 2004. Exercises
More information8 Nominal and Ordinal Logistic Regression
8 Nominal and Ordinal Logistic Regression 8.1 Introduction If the response variable is categorical, with more then two categories, then there are two options for generalized linear models. One relies on
More informationBusiness Statistics. Lecture 9: Simple Regression
Business Statistics Lecture 9: Simple Regression 1 On to Model Building! Up to now, class was about descriptive and inferential statistics Numerical and graphical summaries of data Confidence intervals
More informationModeling Overdispersion
James H. Steiger Department of Psychology and Human Development Vanderbilt University Regression Modeling, 2009 1 Introduction 2 Introduction In this lecture we discuss the problem of overdispersion in
More informationReview: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:
Outline for today What is a generalized linear model Linear predictors and link functions Example: fit a constant (the proportion) Analysis of deviance table Example: fit dose-response data using logistic
More informationSTAT 510 Final Exam Spring 2015
STAT 510 Final Exam Spring 2015 Instructions: The is a closed-notes, closed-book exam No calculator or electronic device of any kind may be used Use nothing but a pen or pencil Please write your name and
More informationBinary Logistic Regression
The coefficients of the multiple regression model are estimated using sample data with k independent variables Estimated (or predicted) value of Y Estimated intercept Estimated slope coefficients Ŷ = b
More informationCh 6: Multicategory Logit Models
293 Ch 6: Multicategory Logit Models Y has J categories, J>2. Extensions of logistic regression for nominal and ordinal Y assume a multinomial distribution for Y. In R, we will fit these models using the
More informationReview of Multiple Regression
Ronald H. Heck 1 Let s begin with a little review of multiple regression this week. Linear models [e.g., correlation, t-tests, analysis of variance (ANOVA), multiple regression, path analysis, multivariate
More informationLogistic Regression. Interpretation of linear regression. Other types of outcomes. 0-1 response variable: Wound infection. Usual linear regression
Logistic Regression Usual linear regression (repetition) y i = b 0 + b 1 x 1i + b 2 x 2i + e i, e i N(0,σ 2 ) or: y i N(b 0 + b 1 x 1i + b 2 x 2i,σ 2 ) Example (DGA, p. 336): E(PEmax) = 47.355 + 1.024
More informationClassification. Chapter Introduction. 6.2 The Bayes classifier
Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode
More informationIntroduction to General and Generalized Linear Models
Introduction to General and Generalized Linear Models Generalized Linear Models - part III Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs.
More informationFinal Exam. Name: Solution:
Final Exam. Name: Instructions. Answer all questions on the exam. Open books, open notes, but no electronic devices. The first 13 problems are worth 5 points each. The rest are worth 1 point each. HW1.
More informationMSH3 Generalized linear model
Contents MSH3 Generalized linear model 7 Log-Linear Model 231 7.1 Equivalence between GOF measures........... 231 7.2 Sampling distribution................... 234 7.3 Interpreting Log-Linear models..............
More informationSTA 450/4000 S: January
STA 450/4000 S: January 6 005 Notes Friday tutorial on R programming reminder office hours on - F; -4 R The book Modern Applied Statistics with S by Venables and Ripley is very useful. Make sure you have
More informationUsing R in 200D Luke Sonnet
Using R in 200D Luke Sonnet Contents Working with data frames 1 Working with variables........................................... 1 Analyzing data............................................... 3 Random
More informationModel Estimation Example
Ronald H. Heck 1 EDEP 606: Multivariate Methods (S2013) April 7, 2013 Model Estimation Example As we have moved through the course this semester, we have encountered the concept of model estimation. Discussions
More informationCHAPTER 4 & 5 Linear Regression with One Regressor. Kazu Matsuda IBEC PHBU 430 Econometrics
CHAPTER 4 & 5 Linear Regression with One Regressor Kazu Matsuda IBEC PHBU 430 Econometrics Introduction Simple linear regression model = Linear model with one independent variable. y = dependent variable
More informationIntroduction to logistic regression
Introduction to logistic regression Tuan V. Nguyen Professor and NHMRC Senior Research Fellow Garvan Institute of Medical Research University of New South Wales Sydney, Australia What we are going to learn
More informationAge 55 (x = 1) Age < 55 (x = 0)
Logistic Regression with a Single Dichotomous Predictor EXAMPLE: Consider the data in the file CHDcsv Instead of examining the relationship between the continuous variable age and the presence or absence
More informationClassification: Logistic Regression and Naive Bayes Book Chapter 4. Carlos M. Carvalho The University of Texas McCombs School of Business
Classification: Logistic Regression and Naive Bayes Book Chapter 4. Carlos M. Carvalho The University of Texas McCombs School of Business 1 1. Classification 2. Logistic Regression, One Predictor 3. Inference:
More informationIntroduction to Generalized Models
Introduction to Generalized Models Today s topics: The big picture of generalized models Review of maximum likelihood estimation Models for binary outcomes Models for proportion outcomes Models for categorical
More informationA Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46
A Generalized Linear Model for Binomial Response Data Copyright c 2017 Dan Nettleton (Iowa State University) Statistics 510 1 / 46 Now suppose that instead of a Bernoulli response, we have a binomial response
More informationGeneralized Linear Models for Non-Normal Data
Generalized Linear Models for Non-Normal Data Today s Class: 3 parts of a generalized model Models for binary outcomes Complications for generalized multivariate or multilevel models SPLH 861: Lecture
More informationGeneralized Linear Models. Last time: Background & motivation for moving beyond linear
Generalized Linear Models Last time: Background & motivation for moving beyond linear regression - non-normal/non-linear cases, binary, categorical data Today s class: 1. Examples of count and ordered
More informationBooklet of Code and Output for STAD29/STA 1007 Midterm Exam
Booklet of Code and Output for STAD29/STA 1007 Midterm Exam List of Figures in this document by page: List of Figures 1 Packages................................ 2 2 Hospital infection risk data (some).................
More informationGeneralized Models: Part 1
Generalized Models: Part 1 Topics: Introduction to generalized models Introduction to maximum likelihood estimation Models for binary outcomes Models for proportion outcomes Models for categorical outcomes
More informationCLUe Training An Introduction to Machine Learning in R with an example from handwritten digit recognition
CLUe Training An Introduction to Machine Learning in R with an example from handwritten digit recognition Ad Feelders Universiteit Utrecht Department of Information and Computing Sciences Algorithmic Data
More informationR Output for Linear Models using functions lm(), gls() & glm()
LM 04 lm(), gls() &glm() 1 R Output for Linear Models using functions lm(), gls() & glm() Different kinds of output related to linear models can be obtained in R using function lm() {stats} in the base
More informationFitting Proportional Odds Models for Complex Sample Survey Data with SAS, IBM SPSS, Stata, and R Xing Liu Eastern Connecticut State University
Liu Fitting Proportional Odds Models for Complex Sample Survey Data with SAS, IBM SPSS, Stata, and R Xing Liu Eastern Connecticut State University An ordinal logistic regression model with complex sampling
More informationSTA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3
STA 303 H1S / 1002 HS Winter 2011 Test March 7, 2011 LAST NAME: FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 303 STA 1002 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator. Some formulae
More informationStatistical Modelling with Stata: Binary Outcomes
Statistical Modelling with Stata: Binary Outcomes Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 21/11/2017 Cross-tabulation Exposed Unexposed Total Cases a b a + b Controls
More informationBinary Regression. GH Chapter 5, ISL Chapter 4. January 31, 2017
Binary Regression GH Chapter 5, ISL Chapter 4 January 31, 2017 Seedling Survival Tropical rain forests have up to 300 species of trees per hectare, which leads to difficulties when studying processes which
More informationExperimental Design and Statistical Methods. Workshop LOGISTIC REGRESSION. Jesús Piedrafita Arilla.
Experimental Design and Statistical Methods Workshop LOGISTIC REGRESSION Jesús Piedrafita Arilla jesus.piedrafita@uab.cat Departament de Ciència Animal i dels Aliments Items Logistic regression model Logit
More information16.400/453J Human Factors Engineering. Design of Experiments II
J Human Factors Engineering Design of Experiments II Review Experiment Design and Descriptive Statistics Research question, independent and dependent variables, histograms, box plots, etc. Inferential
More informationLinear Regression. Data Model. β, σ 2. Process Model. ,V β. ,s 2. s 1. Parameter Model
Regression: Part II Linear Regression y~n X, 2 X Y Data Model β, σ 2 Process Model Β 0,V β s 1,s 2 Parameter Model Assumptions of Linear Model Homoskedasticity No error in X variables Error in Y variables
More informationEconometrics II. Seppo Pynnönen. Spring Department of Mathematics and Statistics, University of Vaasa, Finland
Department of Mathematics and Statistics, University of Vaasa, Finland Spring 2018 Part III Limited Dependent Variable Models As of Jan 30, 2017 1 Background 2 Binary Dependent Variable The Linear Probability
More informationLeftovers. Morris. University Farm. University Farm. Morris. yield
Leftovers SI 544 Lada Adamic 1 Trellis graphics Trebi Wisconsin No. 38 No. 457 Glabron Peatland Velvet No. 475 Manchuria No. 462 Svansota Trebi Wisconsin No. 38 No. 457 Glabron Peatland Velvet No. 475
More information22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression
22s:52 Applied Linear Regression Ch. 4 (sec. and Ch. 5 (sec. & 4: Logistic Regression Logistic Regression When the response variable is a binary variable, such as 0 or live or die fail or succeed then
More informationLecture 12: Effect modification, and confounding in logistic regression
Lecture 12: Effect modification, and confounding in logistic regression Ani Manichaikul amanicha@jhsph.edu 4 May 2007 Today Categorical predictor create dummy variables just like for linear regression
More informationIntroduction to the Analysis of Tabular Data
Introduction to the Analysis of Tabular Data Anthropological Sciences 192/292 Data Analysis in the Anthropological Sciences James Holland Jones & Ian G. Robertson March 15, 2006 1 Tabular Data Is there
More informationExample: Poisondata. 22s:152 Applied Linear Regression. Chapter 8: ANOVA
s:5 Applied Linear Regression Chapter 8: ANOVA Two-way ANOVA Used to compare populations means when the populations are classified by two factors (or categorical variables) For example sex and occupation
More information