Generalized Linear Models

Slides:



Advertisements
Similar presentations
Workshop in R & GLMs: #3 Diane Srivastava University of British Columbia
Advertisements

- Word counts - Speech error counts - Metaphor counts - Active construction counts Moving further Categorical count data.
Analysis of Categorical Data Nick Jackson University of Southern California Department of Psychology 10/11/
Data: Crab mating patterns Data: Typists (Poisson with random effects) (Poisson Regression, ZIP model, Negative Binomial) Data: Challenger (Binomial with.
Log-linear and logistic models Generalised linear model ANOVA revisited Log-linear model: Poisson distribution logistic model: Binomial distribution Deviances.
Logistic Regression I Outline Introduction to maximum likelihood estimation (MLE) Introduction to Generalized Linear Models The simplest logistic regression.
PROC GLIMMIX: AN OVERVIEW
Generalised linear models
Final Review Session.
Log-linear and logistic models Generalised linear model ANOVA revisited Log-linear model: Poisson distribution logistic model: Binomial distribution Deviances.
Log-linear and logistic models
Linear statistical models 2008 Count data, contingency tables and log-linear models Expected frequency: Log-linear models are linear models of the log.
Generalised linear models Generalised linear model Exponential family Example: Log-linear model - Poisson distribution Example: logistic model- Binomial.
Linear and generalised linear models
Linear and generalised linear models
Linear and generalised linear models Purpose of linear models Least-squares solution for linear models Analysis of diagnostics Exponential family and generalised.
Linear statistical models 2009 Count data  Contingency tables and log-linear models  Poisson regression.
Regression Model Building Setting: Possibly a large set of predictor variables (including interactions). Goal: Fit a parsimonious model that explains variation.
Transforming the data Modified from: Gotelli and Allison Chapter 8; Sokal and Rohlf 2000 Chapter 13.
Generalized Linear Models
SAS Lecture 5 – Some regression procedures Aidan McDermott, April 25, 2005.
Fixed vs. Random Effects Fixed effect –we are interested in the effects of the treatments (or blocks) per se –if the experiment were repeated, the levels.
Chapter 3: Generalized Linear Models 3.1 The Generalization 3.2 Logistic Regression Revisited 3.3 Poisson Regression 1.
Applications The General Linear Model. Transformations.
ALISON BOWLING THE GENERAL LINEAR MODEL. ALTERNATIVE EXPRESSION OF THE MODEL.
Today: Lab 9ab due after lecture: CEQ Monday: Quizz 11: review Wednesday: Guest lecture – Multivariate Analysis Friday: last lecture: review – Bring questions.
Generalized Linear Models All the regression models treated so far have common structure. This structure can be split up into two parts: The random part:
Linear Model. Formal Definition General Linear Model.
University of Warwick, Department of Sociology, 2014/15 SO 201: SSAASS (Surveys and Statistics) (Richard Lampard) Week 7 Logistic Regression I.
Different Distributions David Purdie. Topics Application of GEE to: Binary outcomes: – logistic regression Events over time (rate): –Poisson regression.
Linear correlation and linear regression + summary of tests
Forecasting Choices. Types of Variable Variable Quantitative Qualitative Continuous Discrete (counting) Ordinal Nominal.
1 GLM I: Introduction to Generalized Linear Models By Curtis Gary Dean Distinguished Professor of Actuarial Science Ball State University By Curtis Gary.
Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R Hong Tran, April 21, 2015.
Mixed Effects Models Rebecca Atkins and Rachel Smith March 30, 2015.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
Generalized Linear Models (GLMs) and Their Applications.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
1 STA 617 – Chp12 Generalized Linear Mixed Models SAS for Model (12.3) with Matched Pairs from Table 12.1.
Université d’Ottawa - Bio Biostatistiques appliquées © Antoine Morin et Scott Findlay :32 1 Logistic regression.
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.
Logistic Regression Saed Sayad 1www.ismartsoft.com.
Dependent Variable Discrete  2 values – binomial  3 or more discrete values – multinomial  Skewed – e.g. Poisson Continuous  Non-normal.
Analysis of Covariance KNNL – Chapter 22. Analysis of Covariance Goal: To Compare treatments (1-Factor or Multiple Factors) after Controlling for Numeric.
Nonparametric Statistics
Week 7: General linear models Overview Questions from last week What are general linear models? Discussion of the 3 articles.
 Naïve Bayes  Data import – Delimited, Fixed, SAS, SPSS, OBDC  Variable creation & transformation  Recode variables  Factor variables  Missing.
LOGISTIC REGRESSION. Purpose  Logistical regression is regularly used when there are only two categories of the dependent variable and there is a mixture.
Logistic Regression: Regression with a Binary Dependent Variable.
Nonparametric Statistics
BINARY LOGISTIC REGRESSION
A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson.
Regression Analysis AGEC 784.
CHAPTER 7 Linear Correlation & Regression Methods
Notes on Logistic Regression
Chapter 13 Nonlinear and Multiple Regression
Active Learning Lecture Slides
Generalized Linear Models
Caution Flags (Crashes) in NASCAR Winston Cup Races
Generalized Linear Models (GLM) in R
Introduction to logistic regression a.k.a. Varbrul
Quantitative Methods What lies beyond?.
Nonparametric Statistics
What is Regression Analysis?
Quantitative Methods What lies beyond?.
Chapter 6 Logistic Regression: Regression with a Binary Dependent Variable Copyright © 2010 Pearson Education, Inc., publishing as Prentice-Hall.
Analysis of Covariance
Maximum Likelihood We have studied the OLS estimator. It only applies under certain assumptions In particular,  ~ N(0, 2 ) But what if the sampling distribution.
Generalized Additive Model
Presentation transcript:

Generalized Linear Models (know this) Generalized Linear Models An alternative to data transformations Principle is to make the model fit the data, rather than changing the data to fit the model Models include link functions that allow heterogeneous variances and nonlinearity Analysis and estimation are based on maximum likelihood methods Becoming more widely used - recommended by the experts Need some understanding of the underlying theory to implement properly Notes adapted from ASA GLMM Workshop, Long Beach, CA, 2010

Generalized Linear Models ANOVA/Regression model is fit to a non-normal data set Three elements: Random component – a probability distribution for Yi from the exponential family of distributions (this is known) Systematic component – represent the linear predictors (X variables) in the model Link function – links the random and systematic elements Form is mean + trt effect No error term

Log of Distribution = “Log-Likelihood” Binary responses (0 or 1) Probability of success follows a binomial distribution Logistic regression – response variables are binary (e.g. alive or dead); predictors can be categorical or continuous MLE Make multiple observations on Y and N Apply likelihood formula for a range of P values Determine which value of P has the greatest likelihood, given the data set “canonical parameter” Takes the form Y * function of P

Use an inverse function to convert means to the original scale Example – logit link µ can only vary from 0 to 1  can take on any value Logistic regression – response variables are binary (e.g. alive or dead); predictors can be categorical or continuous Use an inverse function to convert means to the original scale

Some Common Distributions & Link(s) Log linear models – good for analysis of contingency tables; do not distinguish response and predictor variables – based on a Poisson distribution

RBD Mixed Model Analyses with SAS (know this) RBD Mixed Model Analyses with SAS Distribution Treatments Fixed Blocks Fixed Blocks Random Normal (continuous) (PROC GLM) Linear Model (LM) (PROC MIXED) Linear Mixed Model (LMM) Non-normal (categories or counts) (PROC GENMOD) Generalized Linear Model (GLM) (PROC GLIMMIX) Mixed Model (GLMM) Mixed Models - contain both random and fixed effects Note that PROC GLM will only handle LM! PROC GLIMMIX can handle all of the situations above

Linear Models for an RBD in SAS (know this) Linear Models for an RBD in SAS Treatments fixed, Blocks fixed PROC GLM (normal) or PROC GENMOD (non-normal) all effects appear in model statement Model Response = Block Treatment; Treatments fixed, Blocks random PROC MIXED (normal) or PROC GLIMMIX (non-normal) Only fixed effects appear in model statement Model Response = Treatment; Random Block;

GLIMMIX basic syntax for an RBD proc glimmix; class treatment block; model response = treatment / link=log s dist=poisson; random block; lsmeans treatment/ilink diff; fixed effects go in the model statement random effects go in the random statement default means and standard errors from lsmeans statement are on a log scale ilink option gives back-transformed means on original scale and estimates standard errors on original scale diff option requests significant tests between all possible pairs of treatments in the trial,

Estimation in LMM, GLM, and GLMM (know this) Estimation in LMM, GLM, and GLMM Does not use Least Squares estimation Does not calculate Sums of Squares or Mean Squares Estimates are by Maximum Likelihood Output includes Source of variation degrees of freedom F tests and p-values Treatment means and standard errors Comparisons of means and standard errors