Chapter 17.1 Poisson Regression Classic Poisson Example Number of deaths by horse kick, for each of 16 corps in the Prussian army, from 1875 to 1894.

Slides:



Advertisements
Similar presentations
Objectives 10.1 Simple linear regression
Advertisements

Forecasting Using the Simple Linear Regression Model and Correlation
Inference for Regression
REMINDER 1) GLM Review on Friday 2) Exam II on Monday.
Part III The General Linear Model Chapter 9 Regression.
Objectives (BPS chapter 24)
Part V The Generalized Linear Model Chapter 16 Introduction.
Count Data Harry R. Erwin, PhD School of Computing and Technology University of Sunderland.
CHAPTER 3 ECONOMETRICS x x x x x Chapter 2: Estimating the parameters of a linear regression model. Y i = b 1 + b 2 X i + e i Using OLS Chapter 3: Testing.
The Simple Regression Model
CHAPTER 4 ECONOMETRICS x x x x x Multiple Regression = more than one explanatory variable Independent variables are X 2 and X 3. Y i = B 1 + B 2 X 2i +
Chapter Topics Types of Regression Models
© 2000 Prentice-Hall, Inc. Chap Forecasting Using the Simple Linear Regression Model and Correlation.
Simple Linear Regression and Correlation
Chapter 7 Forecasting with Simple Regression
Lorelei Howard and Nick Wright MfD 2008
Introduction to Regression Analysis, Chapter 13,
Logistic Regression with “Grouped” Data Lobster Survival by Size in a Tethering Experiment Source: E.B. Wilkinson, J.H. Grabowski, G.D. Sherwood, P.O.
Inference for regression - Simple linear regression
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
- Interfering factors in the comparison of two sample means using unpaired samples may inflate the pooled estimate of variance of test results. - It is.
Correlation and Regression
Today: Quizz 8 Friday: GLM review Monday: Exam 2.
© Department of Statistics 2012 STATS 330 Lecture 26: Slide 1 Stats 330: Lecture 26.
Part IV The General Linear Model. Multiple Explanatory Variables Chapter 13.3 Fixed *Random Effects Paired t-test.
BIOL 4605/7220 Ch 13.3 Paired t-test GPT Lectures Cailin Xu October 26, 2011.
OPIM 303-Lecture #8 Jose M. Cruz Assistant Professor.
1 B IVARIATE AND MULTIPLE REGRESSION Estratto dal Cap. 8 di: “Statistics for Marketing and Consumer Research”, M. Mazzocchi, ed. SAGE, LEZIONI IN.
+ Chapter 12: Inference for Regression Inference for Linear Regression.
Part III The General Linear Model Chapter 10 GLM. ANOVA.
Regression. Population Covariance and Correlation.
BIOL 4605/7220 GPT Lectures Cailin Xu October 12, 2011 CH 9.3 Regression.
Chapter 14 Inference for Regression AP Statistics 14.1 – Inference about the Model 14.2 – Predictions and Conditions.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Lesson Multiple Regression Models. Objectives Obtain the correlation matrix Use technology to find a multiple regression equation Interpret the.
Copyright © Cengage Learning. All rights reserved. 13 Linear Correlation and Regression Analysis.
Chapter 17.5 Poisson ANCOVA. Classic Poisson Example Number of deaths by horse kick, for each of 16 corps in the Prussian army, from 1875 to 1894 The.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Copyright ©2011 Brooks/Cole, Cengage Learning Inference about Simple Regression Chapter 14 1.
Inferential Statistics. The Logic of Inferential Statistics Makes inferences about a population from a sample Makes inferences about a population from.
1 B IVARIATE AND MULTIPLE REGRESSION Estratto dal Cap. 8 di: “Statistics for Marketing and Consumer Research”, M. Mazzocchi, ed. SAGE, LEZIONI IN.
June 30, 2008Stat Lecture 16 - Regression1 Inference for relationships between variables Statistics Lecture 16.
- We have samples for each of two conditions. We provide an answer for “Are the two sample means significantly different from each other, or could both.
Logistic Regression. Example: Survival of Titanic passengers  We want to know if the probability of survival is higher among children  Outcome (y) =
Statistics 2: generalized linear models. General linear model: Y ~ a + b 1 * x 1 + … + b n * x n + ε There are many cases when general linear models are.
Remembering way back: Generalized Linear Models Ordinary linear regression What if we want to model a response that is not Gaussian?? We may have experiments.
Beginning Statistics Table of Contents HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2008 by Hawkes Learning Systems/Quant Systems, Inc.
Correlation. u Definition u Formula Positive Correlation r =
Chapter 9 Minitab Recipe Cards. Contingency tests Enter the data from Example 9.1 in C1, C2 and C3.
Lesson Testing the Significance of the Least Squares Regression Model.
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
Introduction For inference on the difference between the means of two populations, we need samples from both populations. The basic assumptions.
Inference for Regression (Chapter 14) A.P. Stats Review Topic #3
שיטות כמותיות בחקר רשתות פרופ' רן גלעדי המח' להנדסת מערכות תקשורת
Correlation and Simple Linear Regression
Inference for Regression
Hypothesis Tests: One Sample
Correlation and Simple Linear Regression
Inferences on Two Samples Summary
Chapter 12 Inference on the Least-squares Regression Line; ANOVA
Inference about Two Means: Independent Samples
Correlation and Simple Linear Regression
CHAPTER 12 More About Regression
Simple Linear Regression and Correlation
Chapter 14 Inference for Regression
Inference for Regression
Adding variables. There is a difference between assessing the statistical significance of a variable acting alone and a variable being added to a model.
Statistical Inference for the Mean: t-test
Correlation and Simple Linear Regression
Correlation and Simple Linear Regression
Presentation transcript:

Chapter 17.1 Poisson Regression

Classic Poisson Example Number of deaths by horse kick, for each of 16 corps in the Prussian army, from 1875 to 1894 Did the risk of death show an trend across years for the guard corps?

1. Construct Model – Graphical

1. Construct Model - Formal Write General Linear Model: General linear model inappropriate for count data: Variance likely increases with mean Fitted values may be negative Errors tend not to be normal Zeros are difficult to handle with transformations

1. Construct Model - Formal

2. Execute analysis & 3. Evaluate model glm1 <- glm(deaths~year, family=poisson(link=log), data=horsekick)

2. Execute analysis & 3. Evaluate model glm1 <- glm(deaths~year, family=poisson(link=log), data=horsekick)

4.State population and whether sample is representative. 5.Decide on mode of inference. Is hypothesis testing appropriate? 6.State H A / H o pair, tolerance for Type I error Statistic: Distribution:

7. ANODEV. Calculate change in fit (ΔG) due to explanatory variables. The F-statistic is not used for models with non-normal errors We will assess improvement in fit (ANODEV)

7. ANODEV. Calculate change in fit (ΔG) due to explanatory variables. > anova(glm1, test="Chisq") Analysis of Deviance Table Model: poisson, link: log Response: deaths Terms added sequentially (first to last) Df Deviance Resid. Df Resid. Dev Pr(>Chi) NULL year

8.Assess table in view of evaluation of residuals. – Residuals acceptable 9.Assess table in view of evaluation of residuals. – Reject H A : There was no apparent trend in deaths by horsekick over two decades (ΔG=0.611, p=0.4343) 10.Analysis of parameters of biological interest. – β year was not significant – report mean deaths/yr 16 deaths / 20 years = 0.8 deaths/year

library(pscl) library(Hmisc) prussian horsekick <- subset(prussian, corp=="G") names(horsekick) <- c("deaths","year","corps") glm0 <- glm(deaths ~ 1, family = poisson(link = log), data = horsekick) # intercept only glm1 <- glm(deaths ~ year, family = poisson(link = log), data = horsekick) plot(glm1, which=1, add.smooth=F, pch=16) plot(glm1$residuals, Lag(glm1$residuals), xlab="Residuals", ylab="Lagged residuals", pch=16) plot(deaths~year, data=horsekick, pch=16, axes=F, xlab="Year", ylab="Deaths (Guard corp)") axis(1, at=75:94, labels=1875:1894) axis(2, at=0:3) box() lines(horsekick$year, glm1$fitted) # with regression term lines(horsekick$year, glm0$fitted, lty=2) # intercept anova(glm1, test="Chisq")