# Computer exercise 4 Poisson Regression

Save this PDF as:

Size: px
Start display at page:

## Transcription

2 ii Figure 1: The number of people killed per year in road accidents in Sweden from year 1950 to year (Source: The Swedish Road Administration.) The variable data now consists of 9 columns but we are only interested in columns {1, 2, 5, 6}, i.e. {year, number of people killed, number of cars, amount of sold petrol}. We store the data in a structure array >> traffic = struct( year,data(:,1), killed,data(:,2), cars,data(:,5),... petrol,data(:,6)); Plot the number of people killed each year >> plot(traffic.year, traffic.killed, o ) Try also plotting the number of people killed vs. number of cars and the petrol consumption. Do you see any connections? From the plot it can be seen that the trend of increasing number of people killed is broken around year And from year 1970 the number starts to decrease. Some natural questions arises. Why did the number of people killed increase in years ? What was the reason for the brake of the increasing trend? (Hint: right-side driving (1967), front seat-belts in new cars (1969), mandatory use of front seat-belts (1975)).

3 iii 3 The Poisson regression model Lets say we have a sequence of count data, n i, i = 1,..., k, for some event, i.e. the number of perished in traffic accidents in a year. This count data is assumed to be observations from random variables N i Po(µ i ), (called responses or dependent variables) with mean value µ i = µ i (x i1,..., x ip ). The variables, x i1,..., x ip, are called explanatory variables 2 and are assumed to measure factors that influence the count data. We restrict µ i to be a log-linear function 3, And thus the probability that N i = n is, µ i = exp(β 0 + β 1 x i β p x ip ) (1) P(N i = n) = e µ i (µ i ) n n! = e eβ0+β1xi1+...+βpxip (e β 0+β 1 x i β px ip ) n, n = 0, 1, 2,.... (2) n! 3.1 Estimating model parameters β 0,..., β p To simplify the notation we introduce x i0 = 1 and can now write (1) as, p E[N i ] = µ i = exp β j x ij, (3) where N i Po(µ i ) for i = 1,..., k. The likelihood function is calculated as, L(β) = j=0 k P(N i = n i ) = k µ n i i n i! e µ i. (4) where µ i = µ i (β p ) is a function of β p = (β 0,..., β p ). The ML-estimates β p = (β 0,..., β p) are the values of β that maximize the likelihood function L(β). Often it is easier to maximize the log-likelihood function, l(β) = log(n i!) + n i log(µ i ) µ i. (5) By setting the first order derivates of the log-likelihood equal to zero, we get a system of (p+1) non-linear equations in β j, l(β) ( ) µ i ni = 1 = (n i µ i )x ij = 0, j = 0,..., p. (6) β j β j µ i Usually, the equation system must be solved with some numerical method, e.g. the Newton-Raphson algorithm, cf. Section in the textbook. This is also the method implemented in the function poiss_regress, which was written for the purpose of this lab and can be found in labfiles. Use the command >> type poiss_regress to see the code. Poisson regression model belongs to a class of models called generalized linear models. In a generalized linear model (GLM), the mean of the response, µ, is modeled as a monotonic (nonlinear) transformation 2 Several other names exist in the literature: independent variables, regressor variables, predictor variables. 3 Sometimes the model incorporates an extra term t i: µ i = t i exp(β 0 + β 1x i β 2x ip).

4 iv of a linear function of the explanatory variables, g(β 0 + β 1 x 1 + β 2 x 2...). The inverse of the transformation function g is called the canonical link function. In Poisson regression this function is the log function, but in other GLM s different link functions are used, see doc glmfit for a list of supported link functions in the Matlab function glmfit 4. Also, the response may take different distributions, such as the normal or the binomial distribution. Below, we will use related function glmval with the logarithmic link function to make predictions from the fitted model, see the code below. 4 Poisson regression of traffic data We will now try to fit the Poisson regression model to the traffic data of the number of people killed in road accidents. Above, we could see that there was a break in the trend of increasing number people killed around year , mainly because of the improvement in car safety due to the use of safety belts. Because of this it seems reasonable to fit our model to data starting from year >> traffic = struct( year,data(26:end,1), killed,data(26:end,2),... cars,data(26:end,5), petrol,data(26:end,6)); Question 1: Which are the explanatory variables? And which is the response? Redraw the plot from above for the reduced data set >> plot(traffic.year,traffic.killed, o ) >> figure(1), hold on We start the analysis with one explanatory variable, traffic.year. routine for the generalized linear models glmval >> X1 = [traffic.year-mean(traffic.year)]; >> n = traffic.killed; >> beta1 = poiss_regress(x1,n,1e-6); >> my_fit = glmval(beta1, X1, log ); >> plot(traffic.year, my_fit, b- ) Note usage of the prediction Question 2: What is your estimate of β? Convince yourself that this is the solution to (6). You can utilize the following code for this purpose: >> X0=ones(size(X1)); >> X=[X0, X1]; >> mu=exp(x*beta1); >> X *(n-mu) Does it appear to be the solution? Judging from the plot, is this model sufficient to describe the number of people killed in traffic accidents? Although this simple model seems to capture the overall trend, adding further explanatory variables may improve the fit. Thus, we try adding the number of cars as a variable in our model. 4 glmfit uses a method called weighted least squares to compute the β estimates.

5 v >> X2 = [traffic.year-mean(traffic.year), traffic.cars-mean(traffic.cars)]; >> beta2 = poiss_regress(x2,n,1e-6); >> my_fit = glmval(beta2, X2, log ); >> plot(traffic.year, my_fit, g- ) Question 3: Have your estimates β0 and β 1 improve the fit? changed? Does accounting for the number of cars It seems reasonable also to add the quantity of sold petrol as this would reflect the total mileage of all cars 5. >> X3 = [traffic.year-mean(traffic.year), traffic.cars-mean(traffic.cars),... traffic.petrol-mean(traffic.petrol)]; >> beta3 = poiss_regress(x3,n,1e-6); >> my_fit = glmval(beta3, X3, log ); >> plot(traffic.year, my_fit, r- ) Question 4: Have your estimates of β changed now? Use the command format long to display more digits. Which model do you choose? 4.1 Model selection - Deviance It is not always easy to decide, just by looking at the plot, which model to choose. Even though adding more variables improves the fit, it also increases the uncertainty of the estimates. One method to choose complexity of the model is to use the deviance and a hypothesis test. Let β p = {β 0, β 1,..., β p} be the ML-estimates of the model parameters {β 0, β 1,..., β p } of the full model with p explanatory variables and β q the estimates of a simpler model where only q (q < p) of the explanatory variables have been used. Then for large k, and under suitable regularity conditions, the deviance DEV = 2 (l(β p) l((β q))) (7) is approximately χ 2 (p q) distributed if the less complex model is true. Thus, it is possible to test if the simpler model can be rejected compared to the full model. Question 5: Use chi2inv to get the quantiles of the χ 2 distribution. Consider 5% significance level for your test. The deviance for model 3 compared to model 2 is calculated as >> DEV2 = 2*traffic.killed *([X0,X3]*beta3-[X0,X2]*beta2) 5 Assuming that the mean fuel consumption of a car has been constant over the years - a 1970 year model of a Volvo used about 10l per 100km which is approximately the same as for the 2000 year model. Of course, the year 2000 model has more than twice the horsepower.

6 vi Question 5: Is the improvement with model 3 significant compared to model 2? Repeat the test for model 2 against model 1 and also model 3 against model 1? Which model do you choose? Do you think that there was a sufficient number of explanatory variables used to explain the traffic deaths? Why? 5 Prediction Now we want to use our model to predict the expected number of perished in traffic accidents six years from now, i.e. year In order to do this we first must have an estimate of the number of cars that year. Start by plotting the number of cars vs. year, >> figure(2) >> plot(traffic.year, traffic.cars, o ) >> hold on We will here use a simple linear model for the number of cars, y i, year x i y i = β 0 + β 1 x i + ε i (8) where the errors, ε i N(0, (σ ε ) 2 ), are assumed to be independent and identically distributed. This is called a linear regression model. It is possible to estimate the parameters with the maximum likelihood method similar as for the Poisson regression model above. Question 6: What is the likelihood function? Write it down. In Matlab, the function regress computes the least-squares (LS) estimates of the linear regression model. In the case of ε i being normally distributed, the LS method is equivalent to the ML method with exactly the same estimates. >> phat = regress(traffic.cars,[ones(length(traffic.cars),1) [1975:2005] ]) >> plot(1975:2016, phat(1)+phat(2)*[1975:2016], r ) >> cars_2016=phat(1)+phat(2)*2016; Evaluate the fit by looking at the residuals. >> res = traffic.cars-(phat(1)+phat(2)*traffic.year); >> figure(3), plot(traffic.year,res, o ) >> figure(4), normplot(res) Question 7: Do the residuals conform to the requirements of the model errors ε i? Using the following code provide with prediction of petrol consumption for 2016.

7 vii >> phat = regress(traffic.petrol,[x0 [1975:2012] ([1975:2012].^2) ]) >> plot(1975:2016, phat(1)+phat(2)*[1975:2016]+phat(3)*([1975:2016].^2), r ) >> petrol_2016=phat(1)+phat(2)*2016+phat(3)*2016^2; Notice that this time quadratic model had to be fit to the data. Question 8: Are you satisfied with the obtained fits for the petrol and the number of cars? However, for our purpose these rough estimates are sufficient. The expected number of perished can now be predicted using (1), >>x=[ mean(traffic.year) cars_2016-mean(traffic.cars) petrol_2016-mean(traffic.petrol)] >>my_2016=exp(beta3 *x) %----- Model Question 9: Is the prediction reasonable? Comment. Modify the code and predict the number of perished year Is the predicted number close to the "true" number which was 264 perished?

### 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

### 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

### Generalized Linear Models. Today: definition of GLM, maximum likelihood estimation. Involves choice of a link function (systematic component)

Generalized Linear Models Last time: definition of exponential family, derivation of mean and variance (memorize) Today: definition of GLM, maximum likelihood estimation Include predictors x i through

### 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

: 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

### LOGISTIC REGRESSION. Nitin R Patel. where the dependent variable, y, is binary (for convenience we often code these values as

LOGISTIC REGRESSION Nitin R Patel Logistic regression extends the ideas of multiple linear regression to the situation where the dependent variable, y, is binary (for convenience we often code these values

### Penalized Logistic Regression and Classification of Microarray Data

Penalized Logistic Regression and Classification of Microarray Data Milan, May 2003 Anestis Antoniadis Laboratoire IMAG-LMC University Joseph Fourier Grenoble, France Penalized Logistic Regression andclassification

### i=1 In practice, the natural logarithm of the likelihood function, called the log-likelihood function and denoted by

Statistics 580 Maximum Likelihood Estimation Introduction Let y (y 1, y 2,..., y n be a vector of iid, random variables from one of a family of distributions on R n and indexed by a p-dimensional parameter

### 4. Simple regression. QBUS6840 Predictive Analytics. https://www.otexts.org/fpp/4

4. Simple regression QBUS6840 Predictive Analytics https://www.otexts.org/fpp/4 Outline The simple linear model Least squares estimation Forecasting with regression Non-linear functional forms Regression

### Automated Biosurveillance Data from England and Wales, 1991 2011

Article DOI: http://dx.doi.org/10.3201/eid1901.120493 Automated Biosurveillance Data from England and Wales, 1991 2011 Technical Appendix This online appendix provides technical details of statistical

### Introduction to General and Generalized Linear Models

Introduction to General and Generalized Linear Models General Linear Models - part I Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby

### GENERALIZED LINEAR MODELS IN VEHICLE INSURANCE

ACTA UNIVERSITATIS AGRICULTURAE ET SILVICULTURAE MENDELIANAE BRUNENSIS Volume 62 41 Number 2, 2014 http://dx.doi.org/10.11118/actaun201462020383 GENERALIZED LINEAR MODELS IN VEHICLE INSURANCE Silvie Kafková

### Lecture 3: Linear methods for classification

Lecture 3: Linear methods for classification Rafael A. Irizarry and Hector Corrada Bravo February, 2010 Today we describe four specific algorithms useful for classification problems: linear regression,

### Logistic Regression (1/24/13)

STA63/CBB540: Statistical methods in computational biology Logistic Regression (/24/3) Lecturer: Barbara Engelhardt Scribe: Dinesh Manandhar Introduction Logistic regression is model for regression used

### Pattern Analysis. Logistic Regression. 12. Mai 2009. Joachim Hornegger. Chair of Pattern Recognition Erlangen University

Pattern Analysis Logistic Regression 12. Mai 2009 Joachim Hornegger Chair of Pattern Recognition Erlangen University Pattern Analysis 2 / 43 1 Logistic Regression Posteriors and the Logistic Function Decision

### 2.3. Finding polynomial functions. An Introduction:

2.3. Finding polynomial functions. An Introduction: As is usually the case when learning a new concept in mathematics, the new concept is the reverse of the previous one. Remember how you first learned

### Data Mining and Data Warehousing. Henryk Maciejewski. Data Mining Predictive modelling: regression

Data Mining and Data Warehousing Henryk Maciejewski Data Mining Predictive modelling: regression Algorithms for Predictive Modelling Contents Regression Classification Auxiliary topics: Estimation of prediction

### MATH4427 Notebook 2 Spring 2016. 2 MATH4427 Notebook 2 3. 2.1 Definitions and Examples... 3. 2.2 Performance Measures for Estimators...

MATH4427 Notebook 2 Spring 2016 prepared by Professor Jenny Baglivo c Copyright 2009-2016 by Jenny A. Baglivo. All Rights Reserved. Contents 2 MATH4427 Notebook 2 3 2.1 Definitions and Examples...................................

### Response variables assume only two values, say Y j = 1 or = 0, called success and failure (spam detection, credit scoring, contracting.

Prof. Dr. J. Franke All of Statistics 1.52 Binary response variables - logistic regression Response variables assume only two values, say Y j = 1 or = 0, called success and failure (spam detection, credit

### 15.1 The Structure of Generalized Linear Models

15 Generalized Linear Models Due originally to Nelder and Wedderburn (1972), generalized linear models are a remarkable synthesis and extension of familiar regression models such as the linear models described

### Linear Classification. Volker Tresp Summer 2015

Linear Classification Volker Tresp Summer 2015 1 Classification Classification is the central task of pattern recognition Sensors supply information about an object: to which class do the object belong

### Algebra 1 Course Information

Course Information Course Description: Students will study patterns, relations, and functions, and focus on the use of mathematical models to understand and analyze quantitative relationships. Through

### ANALYSIS, THEORY AND DESIGN OF LOGISTIC REGRESSION CLASSIFIERS USED FOR VERY LARGE SCALE DATA MINING

ANALYSIS, THEORY AND DESIGN OF LOGISTIC REGRESSION CLASSIFIERS USED FOR VERY LARGE SCALE DATA MINING BY OMID ROUHANI-KALLEH THESIS Submitted as partial fulfillment of the requirements for the degree of

### 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:

### Lecture 8: Gamma regression

Lecture 8: Gamma regression Claudia Czado TU München c (Claudia Czado, TU Munich) ZFS/IMS Göttingen 2004 0 Overview Models with constant coefficient of variation Gamma regression: estimation and testing

### Chapter 23. Inferences for Regression

Chapter 23. Inferences for Regression Topics covered in this chapter: Simple Linear Regression Simple Linear Regression Example 23.1: Crying and IQ The Problem: Infants who cry easily may be more easily

### AP Statistics. Chapter 4 Review

Name AP Statistics Chapter 4 Review 1. In a study of the link between high blood pressure and cardiovascular disease, a group of white males aged 35 to 64 was followed for 5 years. At the beginning of

### In addition to looking for applications that can be profitably examined algebraically,

The mathematics of stopping your car Eric Wood National Institute of Education, Singapore In addition to looking for applications that can be profitably examined algebraically, numerically

### Motor and Household Insurance: Pricing to Maximise Profit in a Competitive Market

Motor and Household Insurance: Pricing to Maximise Profit in a Competitive Market by Tom Wright, Partner, English Wright & Brockman 1. Introduction This paper describes one way in which statistical modelling

### ANNUITY LAPSE RATE MODELING: TOBIT OR NOT TOBIT? 1. INTRODUCTION

ANNUITY LAPSE RATE MODELING: TOBIT OR NOT TOBIT? SAMUEL H. COX AND YIJIA LIN ABSTRACT. We devise an approach, using tobit models for modeling annuity lapse rates. The approach is based on data provided

### Introduction to Logistic Regression

OpenStax-CNX module: m42090 1 Introduction to Logistic Regression Dan Calderon This work is produced by OpenStax-CNX and licensed under the Creative Commons Attribution License 3.0 Abstract Gives introduction

### NCSS Statistical Software Principal Components Regression. In ordinary least squares, the regression coefficients are estimated using the formula ( )

Chapter 340 Principal Components Regression Introduction is a technique for analyzing multiple regression data that suffer from multicollinearity. When multicollinearity occurs, least squares estimates

### Least Squares Estimation

Least Squares Estimation SARA A VAN DE GEER Volume 2, pp 1041 1045 in Encyclopedia of Statistics in Behavioral Science ISBN-13: 978-0-470-86080-9 ISBN-10: 0-470-86080-4 Editors Brian S Everitt & David

### Introduction to Predictive Modeling Using GLMs

Introduction to Predictive Modeling Using GLMs Dan Tevet, FCAS, MAAA, Liberty Mutual Insurance Group Anand Khare, FCAS, MAAA, CPCU, Milliman 1 Antitrust Notice The Casualty Actuarial Society is committed

### Institute of Actuaries of India Subject CT3 Probability and Mathematical Statistics

Institute of Actuaries of India Subject CT3 Probability and Mathematical Statistics For 2015 Examinations Aim The aim of the Probability and Mathematical Statistics subject is to provide a grounding in

### Important Probability Distributions OPRE 6301

Important Probability Distributions OPRE 6301 Important Distributions... Certain probability distributions occur with such regularity in real-life applications that they have been given their own names.

### KSTAT MINI-MANUAL. Decision Sciences 434 Kellogg Graduate School of Management

KSTAT MINI-MANUAL Decision Sciences 434 Kellogg Graduate School of Management Kstat is a set of macros added to Excel and it will enable you to do the statistics required for this course very easily. To

### LINEAR SYSTEMS. Consider the following example of a linear system:

LINEAR SYSTEMS Consider the following example of a linear system: Its unique solution is x +2x 2 +3x 3 = 5 x + x 3 = 3 3x + x 2 +3x 3 = 3 x =, x 2 =0, x 3 = 2 In general we want to solve n equations in

### Location matters. 3 techniques to incorporate geo-spatial effects in one's predictive model

Location matters. 3 techniques to incorporate geo-spatial effects in one's predictive model Xavier Conort xavier.conort@gear-analytics.com Motivation Location matters! Observed value at one location is

### Example: Boats and Manatees

Figure 9-6 Example: Boats and Manatees Slide 1 Given the sample data in Table 9-1, find the value of the linear correlation coefficient r, then refer to Table A-6 to determine whether there is a significant

### Regression Modeling Strategies

Frank E. Harrell, Jr. Regression Modeling Strategies With Applications to Linear Models, Logistic Regression, and Survival Analysis With 141 Figures Springer Contents Preface Typographical Conventions

### Multivariate Normal Distribution

Multivariate Normal Distribution Lecture 4 July 21, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Lecture #4-7/21/2011 Slide 1 of 41 Last Time Matrices and vectors Eigenvalues

### NON-LIFE INSURANCE PRICING USING THE GENERALIZED ADDITIVE MODEL, SMOOTHING SPLINES AND L-CURVES

NON-LIFE INSURANCE PRICING USING THE GENERALIZED ADDITIVE MODEL, SMOOTHING SPLINES AND L-CURVES Kivan Kaivanipour A thesis submitted for the degree of Master of Science in Engineering Physics Department

### 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

### GLM I An Introduction to Generalized Linear Models

GLM I An Introduction to Generalized Linear Models CAS Ratemaking and Product Management Seminar March 2009 Presented by: Tanya D. Havlicek, Actuarial Assistant 0 ANTITRUST Notice The Casualty Actuarial

### 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

### 0 Introduction to Data Analysis Using an Excel Spreadsheet

Experiment 0 Introduction to Data Analysis Using an Excel Spreadsheet I. Purpose The purpose of this introductory lab is to teach you a few basic things about how to use an EXCEL 2010 spreadsheet to do

### Linear Regression. use http://www.stat.columbia.edu/~martin/w1111/data/body_fat. 30 35 40 45 waist

Linear Regression In this tutorial we will explore fitting linear regression models using STATA. We will also cover ways of re-expressing variables in a data set if the conditions for linear regression

### CHAPTER 2 Estimating Probabilities

CHAPTER 2 Estimating Probabilities Machine Learning Copyright c 2016. Tom M. Mitchell. All rights reserved. *DRAFT OF January 24, 2016* *PLEASE DO NOT DISTRIBUTE WITHOUT AUTHOR S PERMISSION* This is a

### Lecture 6: Poisson regression

Lecture 6: Poisson regression Claudia Czado TU München c (Claudia Czado, TU Munich) ZFS/IMS Göttingen 2004 0 Overview Introduction EDA for Poisson regression Estimation and testing in Poisson regression

### Regression 3: Logistic Regression

Regression 3: Logistic Regression Marco Baroni Practical Statistics in R Outline Logistic regression Logistic regression in R Outline Logistic regression Introduction The model Looking at and comparing

### Solving Quadratic Equations by Factoring

4.7 Solving Quadratic Equations by Factoring 4.7 OBJECTIVE 1. Solve quadratic equations by factoring The factoring techniques you have learned provide us with tools for solving equations that can be written

### Logistic Regression. Jia Li. Department of Statistics The Pennsylvania State University. Logistic Regression

Logistic Regression Department of Statistics The Pennsylvania State University Email: jiali@stat.psu.edu Logistic Regression Preserve linear classification boundaries. By the Bayes rule: Ĝ(x) = arg max

### Maximum Likelihood Estimation of Logistic Regression Models: Theory and Implementation

Maximum Likelihood Estimation of Logistic Regression Models: Theory and Implementation Abstract This article presents an overview of the logistic regression model for dependent variables having two or

Lecture 4: Transformations Regression III: Advanced Methods William G. Jacoby Michigan State University Goals of the lecture The Ladder of Roots and Powers Changing the shape of distributions Transforming

### Assumptions. Assumptions of linear models. Boxplot. Data exploration. Apply to response variable. Apply to error terms from linear model

Assumptions Assumptions of linear models Apply to response variable within each group if predictor categorical Apply to error terms from linear model check by analysing residuals Normality Homogeneity

### 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

### INTRODUCTORY STATISTICS

INTRODUCTORY STATISTICS FIFTH EDITION Thomas H. Wonnacott University of Western Ontario Ronald J. Wonnacott University of Western Ontario WILEY JOHN WILEY & SONS New York Chichester Brisbane Toronto Singapore

### Logistic Regression (a type of Generalized Linear Model)

Logistic Regression (a type of Generalized Linear Model) 1/36 Today Review of GLMs Logistic Regression 2/36 How do we find patterns in data? We begin with a model of how the world works We use our knowledge

### 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

### LAGUARDIA COMMUNITY COLLEGE CITY UNIVERSITY OF NEW YORK DEPARTMENT OF MATHEMATICS, ENGINEERING, AND COMPUTER SCIENCE

LAGUARDIA COMMUNITY COLLEGE CITY UNIVERSITY OF NEW YORK DEPARTMENT OF MATHEMATICS, ENGINEERING, AND COMPUTER SCIENCE MAT 119 STATISTICS AND ELEMENTARY ALGEBRA 5 Lecture Hours, 2 Lab Hours, 3 Credits Pre-

### Introduction to Generalized Linear Models

to Generalized Linear Models Heather Turner ESRC National Centre for Research Methods, UK and Department of Statistics University of Warwick, UK WU, 2008 04 22-24 Copyright c Heather Turner, 2008 to Generalized

### Technology Step-by-Step Using StatCrunch

Technology Step-by-Step Using StatCrunch Section 1.3 Simple Random Sampling 1. Select Data, highlight Simulate Data, then highlight Discrete Uniform. 2. Fill in the following window with the appropriate

### 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

### Joint models for classification and comparison of mortality in different countries.

Joint models for classification and comparison of mortality in different countries. Viani D. Biatat 1 and Iain D. Currie 1 1 Department of Actuarial Mathematics and Statistics, and the Maxwell Institute

### Parametric versus Semi/nonparametric Regression Models

Parametric versus Semi/nonparametric Regression Models Hamdy F. F. Mahmoud Virginia Polytechnic Institute and State University Department of Statistics LISA short course series- July 23, 2014 Hamdy Mahmoud

### Integrated Resource Plan

Integrated Resource Plan March 19, 2004 PREPARED FOR KAUA I ISLAND UTILITY COOPERATIVE LCG Consulting 4962 El Camino Real, Suite 112 Los Altos, CA 94022 650-962-9670 1 IRP 1 ELECTRIC LOAD FORECASTING 1.1

### 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

### Recall this chart that showed how most of our course would be organized:

Chapter 4 One-Way ANOVA Recall this chart that showed how most of our course would be organized: Explanatory Variable(s) Response Variable Methods Categorical Categorical Contingency Tables Categorical

### Logistic regression: Model selection

Logistic regression: April 14 The WCGS data Measures of predictive power Today we will look at issues of model selection and measuring the predictive power of a model in logistic regression Our data set

### Lecture 6: Logistic Regression

Lecture 6: CS 194-10, Fall 2011 Laurent El Ghaoui EECS Department UC Berkeley September 13, 2011 Outline Outline Classification task Data : X = [x 1,..., x m]: a n m matrix of data points in R n. y { 1,

### Nonlinear Regression:

Zurich University of Applied Sciences School of Engineering IDP Institute of Data Analysis and Process Design Nonlinear Regression: A Powerful Tool With Considerable Complexity Half-Day : Improved Inference

### 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

74 In the Herb Business, Part III Factoring and Quadratic Equations In the herbal medicine business, you and your partner sold 120 bottles of your best herbal medicine each week when you sold at your original

### 11 Linear and Quadratic Discriminant Analysis, Logistic Regression, and Partial Least Squares Regression

Frank C Porter and Ilya Narsky: Statistical Analysis Techniques in Particle Physics Chap. c11 2013/9/9 page 221 le-tex 221 11 Linear and Quadratic Discriminant Analysis, Logistic Regression, and Partial

### Solving Quadratic Equations by Completing the Square

9. Solving Quadratic Equations by Completing the Square 9. OBJECTIVES 1. Solve a quadratic equation by the square root method. Solve a quadratic equation by completing the square. Solve a geometric application

### Definition 8.1 Two inequalities are equivalent if they have the same solution set. Add or Subtract the same value on both sides of the inequality.

8 Inequalities Concepts: Equivalent Inequalities Linear and Nonlinear Inequalities Absolute Value Inequalities (Sections 4.6 and 1.1) 8.1 Equivalent Inequalities Definition 8.1 Two inequalities are equivalent

### Programming Exercise 3: Multi-class Classification and Neural Networks

Programming Exercise 3: Multi-class Classification and Neural Networks Machine Learning November 4, 2011 Introduction In this exercise, you will implement one-vs-all logistic regression and neural networks

### Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data

Using Excel (Microsoft Office 2007 Version) for Graphical Analysis of Data Introduction In several upcoming labs, a primary goal will be to determine the mathematical relationship between two variable

### Transforming Bivariate Data

Math Objectives Students will recognize that bivariate data can be transformed to reduce the curvature in the graph of a relationship between two variables. Students will use scatterplots, residual plots,

### From the help desk: Demand system estimation

The Stata Journal (2002) 2, Number 4, pp. 403 410 From the help desk: Demand system estimation Brian P. Poi Stata Corporation Abstract. This article provides an example illustrating how to use Stata to

### A Short Tour of the Predictive Modeling Process

Chapter 2 A Short Tour of the Predictive Modeling Process Before diving in to the formal components of model building, we present a simple example that illustrates the broad concepts of model building.

### GLM, insurance pricing & big data: paying attention to convergence issues.

GLM, insurance pricing & big data: paying attention to convergence issues. Michaël NOACK - michael.noack@addactis.com Senior consultant & Manager of ADDACTIS Pricing Copyright 2014 ADDACTIS Worldwide.

### Prentice Hall Mathematics: Algebra 2 2007 Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

Core Standards of the Course Standard 1 Students will acquire number sense and perform operations with real and complex numbers. Objective 1.1 Compute fluently and make reasonable estimates. 1. Simplify

### Simple Predictive Analytics Curtis Seare

Using Excel to Solve Business Problems: Simple Predictive Analytics Curtis Seare Copyright: Vault Analytics July 2010 Contents Section I: Background Information Why use Predictive Analytics? How to use

### Regression Analysis. Regression Analysis MIT 18.S096. Dr. Kempthorne. Fall 2013

Lecture 6: Regression Analysis MIT 18.S096 Dr. Kempthorne Fall 2013 MIT 18.S096 Regression Analysis 1 Outline Regression Analysis 1 Regression Analysis MIT 18.S096 Regression Analysis 2 Multiple Linear

### Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.

Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity

### Gamma Distribution Fitting

Chapter 552 Gamma Distribution Fitting Introduction This module fits the gamma probability distributions to a complete or censored set of individual or grouped data values. It outputs various statistics

### E(y i ) = x T i β. yield of the refined product as a percentage of crude specific gravity vapour pressure ASTM 10% point ASTM end point in degrees F

Random and Mixed Effects Models (Ch. 10) Random effects models are very useful when the observations are sampled in a highly structured way. The basic idea is that the error associated with any linear,

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

### Course Objective This course is designed to give you a basic understanding of how to run regressions in SPSS.

SPSS Regressions Social Science Research Lab American University, Washington, D.C. Web. www.american.edu/provost/ctrl/pclabs.cfm Tel. x3862 Email. SSRL@American.edu Course Objective This course is designed

### AP Statistics Section :12.2 Transforming to Achieve Linearity

AP Statistics Section :12.2 Transforming to Achieve Linearity In Chapter 3, we learned how to analyze relationships between two quantitative variables that showed a linear pattern. When two-variable data

### Forecast. Forecast is the linear function with estimated coefficients. Compute with predict command

Forecast Forecast is the linear function with estimated coefficients T T + h = b0 + b1timet + h Compute with predict command Compute residuals Forecast Intervals eˆ t = = y y t+ h t+ h yˆ b t+ h 0 b Time

### , has mean A) 0.3. B) the smaller of 0.8 and 0.5. C) 0.15. D) which cannot be determined without knowing the sample results.

BA 275 Review Problems - Week 9 (11/20/06-11/24/06) CD Lessons: 69, 70, 16-20 Textbook: pp. 520-528, 111-124, 133-141 An SRS of size 100 is taken from a population having proportion 0.8 of successes. An

### Underwriting risk control in non-life insurance via generalized linear models and stochastic programming

Underwriting risk control in non-life insurance via generalized linear models and stochastic programming 1 Introduction Martin Branda 1 Abstract. We focus on rating of non-life insurance contracts. We

### Modeling Count Data from Hawk Migrations

ModelingCountDatafromHawkMigrations M.S. Plan B Project Report January 12, 2011 Fengying Miao M.S. Applied and Computational Mathematics Candidate Dr. Ronald Regal Advisor University of Minnesota Duluth

### Chapter 2, part 2. Petter Mostad

Chapter 2, part 2 Petter Mostad mostad@chalmers.se Parametrical families of probability distributions How can we solve the problem of learning about the population distribution from the sample? Usual procedure: