SlideShare a Scribd company logo
NAME   :                                IDREES WARIS REG NO:                                3095SEMESTER :                           4THCOURSE :                               QTIA COURSE FACILITATOR:    SIR IMTIAZ ARIF1GENERALIZED LINEAR MODEL
MAIN POINTS TO BE DISCUSSED IN GZLM2What is GZLM or GRZ and why to use GZLM(History and Explanation)When to use GZLM (Assumptions)How to use GZLM in SPSS (Statistical Procedure)
What is Generalized linear model (GZLM)?3The Generalized Linear Model is a generalization of the general linear model (GLM) discussed separately with regard to Anova/Ancova andManova/Mancova models, as well as regression models. GZLM allows for dependent variables with non-normal distributions and for many link functions other than identity. GZLM supports not only traditional regression models but also logistic models for binary dependents, log-linear analysis of count data, Poisson regression for count data, gamma regression, complementary log-log models for interval-censored survival data, and many others.
HISTORY4Generalized Linear Model was first discussed by John Nelder and Robert Wedderbun in 1972 in an article.You may find its overview in article by Gill (2001)
Difference between General linear model(GLM) and Generalized linear model(GZLM)5General linear model (GLM) The general linear model (GLM) is a flexible statistical model that incorporates normally distributed dependent variables and categorical or continuous independent variables.GLM enables you to accommodate designs with empty cells, more readily interpret the results using profile plots of estimated means, and customize the linear model so that it directly addresses the research questions you ask.Anyone who regularly fits linear models, whether univariate, multivariate or repeated measures, will find the GLM procedure to be very useful.General Equation: Y= b + b₁X₁ + b₂X₂ +………+ bkXk + ℮
GZLM Extensions:6Correlated or clustered data:Generalized Estimating Equations (GEEs)Generalized Linear mixed Models (GLMMs)Hierarchical generalized linear models (HGLMs)Generalized additive models (GAMs)
Components of GZLM7There are 3 components of a generalized linear model	(or GLM):1. Random Component — identify the response variable (Y ) andspecify/assume a probability distribution for it.2. Systematic Component — specify what the explanatory or predictor variables are (e.g., X1, X2, etc). These variable enter in a linear manner α + β1X1 + β2X2 + . . . + βkXk3. Link Function— Specify the relationship between the mean or expected value of the random component	(i.e., E(Y )) and the systematic component.
Random ComponentLet N = sample size and suppose that we have Y1, Y2, . . . , YN observations on our response variable and that the observations are all independent. Y ’s that are discrete variables where Y is either8Counts (including cells of a contingency table):Number of people who die from AIDS during a given time period.Number of times a child tries to take a toy away from another child.Number of times patents generated by firms.These responses have a Poisson distribution.Dichotomous (binary) with a fixed numbers of trials.success/failurecorrect/incorrectagree/disagreeacademic/non-academic programThese responses have a Binomial distribution.
Systematic Component9As in ordinary regression, we were modeling means. The focus is on the expected value of our response variableE(Y ) = μWe want to investigate whether and how μ varies as a function of the levels of our predictor or explanatory variables, X’s.The systematic component of the model consists of a set of explanatory variables and some linear function of them.βo + β1x1 + β2x2 + β3x3 + . . . + βkxk.This linear combination of our explanatory variables is referred to as a “linear predictor”. This part of the model is very much like what you know with respect to ordinary linear regression
The Link Function10“Left hand” side of an equation/model — the random component; that is,E(Y ) = μ“Right hand” side of the equation — the systematic component; that is,α + β1x1 + β2x2 + . . . + βkxkWe now need to “link” the two sides.How is μ = E(Y ) related to α + β1x1 + β2x2 + . . . + βkxk?We do this using a “Link Function” =) g(μ)g(μ) = α + β1x1 + β2x2 + . . . + βkxk
More about the Link Function11The link function provides the relationship between the linear predictor and the mean of the distribution function. Important things about g(.):This function g(.) is “monotone” — as the systematic part gets larger, μ gets larger (or smaller).The relationship between E(Y ) and the systematic part can be non-linear.Some common links are:1. Identity(ordinary regression, ANOVA, ANCOVA): E(Y ) = α + βx2. Log link which is often used when Y is nonnegative (i.e., 0  Y ): log(E(Y )) = log(μ) = α + βxThis yields a “loglinear” model. 3. Logit link, which is often used when 0  μ  1 (e.g., when response is dichotomous/binary and we’re interested in a probability).log(μ/(1 − μ)) = α + βx
Link FunctionThe Canonical links12
When? (ASSUMPTIONS)13Not assumed. GZLM/GEE, compared to GLM, do not assume a normally distributed dependent variable (or normally distributed independents), nor linearity between the predictors and the dependent, nor homogeneity of variance for the range of the dependent variable. Linearity of the link function.Absence of high multicollinearityCentered dataData distributionIndependent vs. correlated dataData levelsMissing data
How to run GZLM in SPSS14Model Types  (Already given Common model types)Scale Response. Linear. Specifies Normal as the distribution and Identity as the link function. Gamma with log link. Specifies Gamma as the distribution and Log as the link function. Ordinal Response. Ordinal logistic. Specifies Multinomial (ordinal) as the distribution and Cumulative logit as the link function. Ordinal probit. Specifies Multinomial (ordinal) as the distribution and Cumulative probit as the link function. Counts. Poisson loglinear. Specifies Poisson as the distribution and Log as the link function. Negative binomial with log link. Specifies Negative binomial (with a value of 1 for the ancillary parameter) as the distribution and Log as the link function. To have the procedure estimate the value of the ancillary parameter, specify a custom model with Negative binomial distribution and select Estimate value in the Parameter group.
15Model Types continued…Binary Response or Events/Trials Data. Binary logistic. Specifies Binomial as the distribution and Logit as the link function.Binary probit. Specifies Binomial as the distribution and Probit as the link function.Interval censored survival. Specifies Binomial as the distribution and Complementary log-log as the link function.Mixture. Tweedie with log link. Specifies Tweedie as the distribution and Log as the link function.Tweedie with identity link. Specifies Tweedie as the distribution and Identity as the link function.Custom. Specify your own combination of distribution and link function.
16Model Types (8 Custom distributions)NormalInverse GaussianGammaMultinomialBinomialPoissonNegative BinomialTweedie
DISTRIBUTIONSNormalInverse Gaussian17
DISTRIBUTIONSGammaBinomial18
DISTRIBUTIONSPoissonNegative Binomial19
Distributions20TweedieTweedie distribution requires a parameter, p, which the researcher enters to determine the shape of the distribution:p=0: normal distributionp=1: Poisson distribution1< p< 2: for continuous data with exact zeros (the default in SPSS is 1.5)p=2: gamma distributionp>2: for positive continuous dataMultinomialDependent has a finite number of categories, has text string values, or is ordinal. The distribution among categories, not shown, is arbitrary.
15 custom Link functions21Normal, Gamma, Inverse Gaussian, Poisson and Twedie distributions:IdentityLogPower
22Negative binomial distributions Negative binomialBinomial distributions LogitProbitComplementary log-logNegative log Log complementOdds powerMultinomial distributions Cumulative logitCumulative ProbitCumulative CauchitCumulative Complementary log Cumulative negative log
Data for Analysis23Take data from SPSS 18.0 sample files of ships data sav.To study the effect of Ships typeYear of Construction &Period of Operation onNo. of damage incidentsTo run a Generalized Linear Models analysis, from the menus choose: Analyze   Generalized Linear Models     Generalized Linear Models...
24 Analyze  Generalized Linear Models   Generalized Linear Models...Type of Model Tab  (specify DV distribution and link function) On the Response tab, select a dependent variable. On the Predictors tab, select factors and covariates for use in predicting the dependent variable. (Factors are categorical predictors; they can be numeric or string and Covariates are scale predictors; they must be numeric) On the Model tab, specify model effects using the selected factors and covariates.EstimationStatisticsEM meansSaveExport
25Type of model tab will appear:Select Poisson log-linear as the type of model. This specifies a Poisson distribution with a log link function.Click the Response tab:Select Number of damage incidents as the dependent variable.Click the Predictors tab:Select Ship type, Year of construction, and Period of operation as factors.Select Logarithm of aggregate months of service as the offset.Click Options. Select Descending as the category order for factorsClick ContinueClick OK
26Click the Model tabSelect type (Ship type), construction (Year of construction), and operation (Period of operation) as main effects in the model.Click the Estimation tab.Select Pearson chi-square as the method for estimating the scale parameter.Click the EM Means tabSelect type (Ship type) and construction (Year of construction) as terms to display means for and select Pairwise as the contrast for each.Select Compute means for linear predictor as the scale. Select Sequential Sidak as the adjustment method.Click the Save tab.Select Predicted value of linear predictor and Standardized deviance residual. These values are saved to the active dataset and can help you diagnose any problems with the model fit.
Scatter Plot27To produce a scatter plot of Standardized Deviance Residual by Predicted Value of the Linear Predictor, from the menus choose:  Graphs    Chart Builder...Select the Scatter/Dot gallery and choose Simple Scatter.Select Standardized Deviance Residual as the y variable and Predicted Value of the Linear Predictor as the x variable.Click OK.
Research Papers and Thesis for Understanding28Development of an Accident Prediction Model using GLIM (Generalized Log-linear Model) and EB method: A case of Seoul (Korea)Log-Linear Models by Noah A. SmithFitting Tweedie’s Compound Poisson Model to Insurance Claims Data: Dispersion ModelingOn the Distribution of Discounted Loss Reserves Using Generalized Linear Models by Gordon K. Smyth (December 2001)The application of over dispersion and (GEE) Generalized Estimating Equations in repeated categorical data ( for understanding over dispersion, Poisson, negative binomial and GEE)Clustering of foot-based pitch contours in expressive speech by Esther Klabbers and Jan P. H. van SantenCollaborative filtering with interlaced generalized linear models by Nicolas Delannay, Michel VerleysenDISSERTATION OF STANFORD UNIVERSITY  GENERALIZED LINEAR MODELS WITH REGULARIZATION by Mee Young Park (September, 2006)

More Related Content

What's hot (12)

PDF
Logistic regression
Rupak Roy
 
ODP
Multiple linear regression
James Neill
 
PPTX
Regression analysis in R
Alichy Sowmya
 
PDF
Outliers
Alexandru Dorobantu
 
PDF
Information Security 16- Information Flow.pdf
faiziikanwal47
 
PPTX
metadata.pptx
bhavyag24
 
PDF
Ordinal logistic regression
Dr Athar Khan
 
PPTX
Bivariate
Vikas Saini
 
PDF
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
PPTX
Web usage mining
shabnamfsayyad
 
PPTX
Secure Domination in graphs
Mahesh Gadhwal
 
Logistic regression
Rupak Roy
 
Multiple linear regression
James Neill
 
Regression analysis in R
Alichy Sowmya
 
Information Security 16- Information Flow.pdf
faiziikanwal47
 
metadata.pptx
bhavyag24
 
Ordinal logistic regression
Dr Athar Khan
 
Bivariate
Vikas Saini
 
Mining Frequent Patterns And Association Rules
Rashmi Bhat
 
Web usage mining
shabnamfsayyad
 
Secure Domination in graphs
Mahesh Gadhwal
 

Viewers also liked (18)

PPTX
Big_data_es_kozigazgatas
LogDrill
 
PPT
Union Web2.0 adoption in insurance
Joseph A. Bayer
 
PPTX
Varjú Zoltán - Túlélőkészlet adatáradat esetére
Ágnes W. Kovács
 
PDF
Generalized Linear Models
Avinash Chamwad
 
PPTX
Balogh gyorgy modern_big_data_megoldasok_sec_world_2014
LogDrill
 
PDF
Generalized Linear Models with H2O
Sri Ambati
 
PDF
SAS Insurance Analytics Architecture
stuartdrose
 
PDF
Linear models for data science
Brad Klingenberg
 
PPTX
Regression Analysis
Salim Azad
 
PPTX
Linear model of Curriculum
Jonna May Berci
 
PPTX
Regression analysis
saba khan
 
PDF
Regression Analysis
nadiazaheer
 
PPT
Simple linear regression (final)
Harsh Upadhyay
 
PPTX
Presentation On Regression
alok tiwari
 
PPT
Regression analysis
Ravi shankar
 
PDF
Reading the Lindley-Smith 1973 paper on linear Bayes estimators
Christian Robert
 
PPT
Models of curriculum
Abdulrahman Al'uganda
 
PPT
Regression analysis ppt
Elkana Rorio
 
Big_data_es_kozigazgatas
LogDrill
 
Union Web2.0 adoption in insurance
Joseph A. Bayer
 
Varjú Zoltán - Túlélőkészlet adatáradat esetére
Ágnes W. Kovács
 
Generalized Linear Models
Avinash Chamwad
 
Balogh gyorgy modern_big_data_megoldasok_sec_world_2014
LogDrill
 
Generalized Linear Models with H2O
Sri Ambati
 
SAS Insurance Analytics Architecture
stuartdrose
 
Linear models for data science
Brad Klingenberg
 
Regression Analysis
Salim Azad
 
Linear model of Curriculum
Jonna May Berci
 
Regression analysis
saba khan
 
Regression Analysis
nadiazaheer
 
Simple linear regression (final)
Harsh Upadhyay
 
Presentation On Regression
alok tiwari
 
Regression analysis
Ravi shankar
 
Reading the Lindley-Smith 1973 paper on linear Bayes estimators
Christian Robert
 
Models of curriculum
Abdulrahman Al'uganda
 
Regression analysis ppt
Elkana Rorio
 
Ad

Similar to Final generalized linear modeling by idrees waris iugc (20)

PPTX
GLMs.pptx
pavankumar936548
 
PDF
Lecture slides stats1.13.l23.air
atutor_te
 
PPTX
Logistical Regression.pptx
Ramakrishna Reddy Bijjam
 
PPTX
correction maximum likelihood estimation method
qazikhanzla
 
PDF
StatsModelling
Vlasios Voudouris
 
PPTX
General Linear Model | Statistics
Transweb Global Inc
 
PDF
An Introduction to Generalized Linear Models 3rd Edition Annette J. Dobson
gbekoufontus
 
PDF
linear_tests_cheat_sheet linear_tests_cheat_sheet
ssusered0604
 
PPT
Intermediate Statistics 1
Michael Parent, Ed.D
 
PDF
2_GLMs_printable.pdf
Elio Laureano
 
PDF
Full Download An Introduction to Generalized Linear Models 3rd Edition Annett...
kohnponoko
 
PDF
Lecture 1.pdf
JamalBibi1
 
PPT
Google earth engine_GEE_Engineering_Presentation2.pptx
karamiommid
 
PPT
Logistic Regression in Case-Control Study
Satish Gupta
 
PDF
An Introduction to Generalized Linear Models 3rd Edition Annette J. Dobson
chobanrodro
 
PDF
Chapter 16
Matthew L Levy
 
PPTX
Quantum generalized linear models
Colleen Farrelly
 
PPTX
UNIT 3.pptx.......................................
vijayannamratha
 
PDF
Regression on gaussian symbols
Axel de Romblay
 
GLMs.pptx
pavankumar936548
 
Lecture slides stats1.13.l23.air
atutor_te
 
Logistical Regression.pptx
Ramakrishna Reddy Bijjam
 
correction maximum likelihood estimation method
qazikhanzla
 
StatsModelling
Vlasios Voudouris
 
General Linear Model | Statistics
Transweb Global Inc
 
An Introduction to Generalized Linear Models 3rd Edition Annette J. Dobson
gbekoufontus
 
linear_tests_cheat_sheet linear_tests_cheat_sheet
ssusered0604
 
Intermediate Statistics 1
Michael Parent, Ed.D
 
2_GLMs_printable.pdf
Elio Laureano
 
Full Download An Introduction to Generalized Linear Models 3rd Edition Annett...
kohnponoko
 
Lecture 1.pdf
JamalBibi1
 
Google earth engine_GEE_Engineering_Presentation2.pptx
karamiommid
 
Logistic Regression in Case-Control Study
Satish Gupta
 
An Introduction to Generalized Linear Models 3rd Edition Annette J. Dobson
chobanrodro
 
Chapter 16
Matthew L Levy
 
Quantum generalized linear models
Colleen Farrelly
 
UNIT 3.pptx.......................................
vijayannamratha
 
Regression on gaussian symbols
Axel de Romblay
 
Ad

More from Id'rees Waris (18)

DOCX
New Microsoft Word Document
Id'rees Waris
 
PPT
Idrees
Id'rees Waris
 
PDF
Ijtihad 2
Id'rees Waris
 
PPT
General overview of theories of developmental psych
Id'rees Waris
 
DOC
Tcs1 by idrees waris iugc
Id'rees Waris
 
PPTX
Conjoint by idrees iugc
Id'rees Waris
 
DOCX
Interest rate by idrees iugc
Id'rees Waris
 
PPTX
Tcs by idrees waris iugc
Id'rees Waris
 
DOCX
Proctor and gamble by idrees iugc
Id'rees Waris
 
PPT
Strategy by idrees waris IUGC
Id'rees Waris
 
DOCX
Tapal by idrees IUGC
Id'rees Waris
 
PPTX
Bata case by idrees IUGC
Id'rees Waris
 
PPT
Compile logistic1 Idrees waris IUGC
Id'rees Waris
 
PPTX
Demand mgt in scm idrees waris IUGC
Id'rees Waris
 
PPTX
Demand mgt in scm
Id'rees Waris
 
PPTX
Logistic in scm mngt idrees waris IUGC
Id'rees Waris
 
PPTX
Operations management iqra university
Id'rees Waris
 
PPTX
Vantage point ppt iqra university
Id'rees Waris
 
New Microsoft Word Document
Id'rees Waris
 
Ijtihad 2
Id'rees Waris
 
General overview of theories of developmental psych
Id'rees Waris
 
Tcs1 by idrees waris iugc
Id'rees Waris
 
Conjoint by idrees iugc
Id'rees Waris
 
Interest rate by idrees iugc
Id'rees Waris
 
Tcs by idrees waris iugc
Id'rees Waris
 
Proctor and gamble by idrees iugc
Id'rees Waris
 
Strategy by idrees waris IUGC
Id'rees Waris
 
Tapal by idrees IUGC
Id'rees Waris
 
Bata case by idrees IUGC
Id'rees Waris
 
Compile logistic1 Idrees waris IUGC
Id'rees Waris
 
Demand mgt in scm idrees waris IUGC
Id'rees Waris
 
Demand mgt in scm
Id'rees Waris
 
Logistic in scm mngt idrees waris IUGC
Id'rees Waris
 
Operations management iqra university
Id'rees Waris
 
Vantage point ppt iqra university
Id'rees Waris
 

Recently uploaded (20)

PDF
Buy Boys Long Sleeve T-shirts at Port 213
Port 213
 
PDF
LEWIONICS SCO Company Profile UAE JULY 2025
Natalie Lewes
 
PPTX
6 Critical Factors to Evaluate Before Starting a Retail Business
RUPAL AGARWAL
 
PDF
Factors Influencing Demand For Plumbers In Toronto GTA:
Homestars
 
PDF
Digital Marketing Masterclass by Lalit Sethia.
creationritu568
 
PDF
Securiport - A Global Leader
Securiport
 
PDF
Keppel Investor Day 2025 Presentation Slides GCAT.pdf
KeppelCorporation
 
PPTX
Why-Your-BPO-Startup-Must-Track-Attrition-from-Day-One.pptx.pptx
Orage technologies
 
PDF
15 Essential Cloud Podcasts Every Tech Professional Should Know in 2025
Amnic
 
PDF
DIM_COURSE_3_BLOCK_3 (1) compentation.pdf
mohamedismail977252
 
PDF
NJ GST Collection Summary - June2025.pdf
writer28
 
PPTX
Understanding ISO 42001 Standard: AI Governance & Compliance Insights from Ad...
Adeptiv AI
 
PDF
Concept Topology in Architectural Build Addendum.pdf
Brij Consulting, LLC
 
PDF
Why Unipac Equipment Leads the Way Among Gantry Crane Manufacturers in Singap...
UnipacEquipment
 
PDF
Rostyslav Chayka: Управління командою за допомогою AI (UA)
Lviv Startup Club
 
PDF
Redefining Punjab’s Growth Story_ Mohit Bansal and the Human-Centric Vision o...
Mohit Bansal GMI
 
PDF
Raman Bhaumik - A Passion For Service
Raman Bhaumik
 
PDF
Thane Stenner - An Industry Expert
Thane Stenner
 
PDF
Blind Spots in Business: Unearthing Hidden Challenges in Today's Organizations
Crimson Business Consulting
 
PPTX
2025 July - ABM for B2B in Hubspot - Demand Gen HUG.pptx
mjenkins13
 
Buy Boys Long Sleeve T-shirts at Port 213
Port 213
 
LEWIONICS SCO Company Profile UAE JULY 2025
Natalie Lewes
 
6 Critical Factors to Evaluate Before Starting a Retail Business
RUPAL AGARWAL
 
Factors Influencing Demand For Plumbers In Toronto GTA:
Homestars
 
Digital Marketing Masterclass by Lalit Sethia.
creationritu568
 
Securiport - A Global Leader
Securiport
 
Keppel Investor Day 2025 Presentation Slides GCAT.pdf
KeppelCorporation
 
Why-Your-BPO-Startup-Must-Track-Attrition-from-Day-One.pptx.pptx
Orage technologies
 
15 Essential Cloud Podcasts Every Tech Professional Should Know in 2025
Amnic
 
DIM_COURSE_3_BLOCK_3 (1) compentation.pdf
mohamedismail977252
 
NJ GST Collection Summary - June2025.pdf
writer28
 
Understanding ISO 42001 Standard: AI Governance & Compliance Insights from Ad...
Adeptiv AI
 
Concept Topology in Architectural Build Addendum.pdf
Brij Consulting, LLC
 
Why Unipac Equipment Leads the Way Among Gantry Crane Manufacturers in Singap...
UnipacEquipment
 
Rostyslav Chayka: Управління командою за допомогою AI (UA)
Lviv Startup Club
 
Redefining Punjab’s Growth Story_ Mohit Bansal and the Human-Centric Vision o...
Mohit Bansal GMI
 
Raman Bhaumik - A Passion For Service
Raman Bhaumik
 
Thane Stenner - An Industry Expert
Thane Stenner
 
Blind Spots in Business: Unearthing Hidden Challenges in Today's Organizations
Crimson Business Consulting
 
2025 July - ABM for B2B in Hubspot - Demand Gen HUG.pptx
mjenkins13
 

Final generalized linear modeling by idrees waris iugc

  • 1. NAME : IDREES WARIS REG NO: 3095SEMESTER : 4THCOURSE : QTIA COURSE FACILITATOR: SIR IMTIAZ ARIF1GENERALIZED LINEAR MODEL
  • 2. MAIN POINTS TO BE DISCUSSED IN GZLM2What is GZLM or GRZ and why to use GZLM(History and Explanation)When to use GZLM (Assumptions)How to use GZLM in SPSS (Statistical Procedure)
  • 3. What is Generalized linear model (GZLM)?3The Generalized Linear Model is a generalization of the general linear model (GLM) discussed separately with regard to Anova/Ancova andManova/Mancova models, as well as regression models. GZLM allows for dependent variables with non-normal distributions and for many link functions other than identity. GZLM supports not only traditional regression models but also logistic models for binary dependents, log-linear analysis of count data, Poisson regression for count data, gamma regression, complementary log-log models for interval-censored survival data, and many others.
  • 4. HISTORY4Generalized Linear Model was first discussed by John Nelder and Robert Wedderbun in 1972 in an article.You may find its overview in article by Gill (2001)
  • 5. Difference between General linear model(GLM) and Generalized linear model(GZLM)5General linear model (GLM) The general linear model (GLM) is a flexible statistical model that incorporates normally distributed dependent variables and categorical or continuous independent variables.GLM enables you to accommodate designs with empty cells, more readily interpret the results using profile plots of estimated means, and customize the linear model so that it directly addresses the research questions you ask.Anyone who regularly fits linear models, whether univariate, multivariate or repeated measures, will find the GLM procedure to be very useful.General Equation: Y= b + b₁X₁ + b₂X₂ +………+ bkXk + ℮
  • 6. GZLM Extensions:6Correlated or clustered data:Generalized Estimating Equations (GEEs)Generalized Linear mixed Models (GLMMs)Hierarchical generalized linear models (HGLMs)Generalized additive models (GAMs)
  • 7. Components of GZLM7There are 3 components of a generalized linear model (or GLM):1. Random Component — identify the response variable (Y ) andspecify/assume a probability distribution for it.2. Systematic Component — specify what the explanatory or predictor variables are (e.g., X1, X2, etc). These variable enter in a linear manner α + β1X1 + β2X2 + . . . + βkXk3. Link Function— Specify the relationship between the mean or expected value of the random component (i.e., E(Y )) and the systematic component.
  • 8. Random ComponentLet N = sample size and suppose that we have Y1, Y2, . . . , YN observations on our response variable and that the observations are all independent. Y ’s that are discrete variables where Y is either8Counts (including cells of a contingency table):Number of people who die from AIDS during a given time period.Number of times a child tries to take a toy away from another child.Number of times patents generated by firms.These responses have a Poisson distribution.Dichotomous (binary) with a fixed numbers of trials.success/failurecorrect/incorrectagree/disagreeacademic/non-academic programThese responses have a Binomial distribution.
  • 9. Systematic Component9As in ordinary regression, we were modeling means. The focus is on the expected value of our response variableE(Y ) = μWe want to investigate whether and how μ varies as a function of the levels of our predictor or explanatory variables, X’s.The systematic component of the model consists of a set of explanatory variables and some linear function of them.βo + β1x1 + β2x2 + β3x3 + . . . + βkxk.This linear combination of our explanatory variables is referred to as a “linear predictor”. This part of the model is very much like what you know with respect to ordinary linear regression
  • 10. The Link Function10“Left hand” side of an equation/model — the random component; that is,E(Y ) = μ“Right hand” side of the equation — the systematic component; that is,α + β1x1 + β2x2 + . . . + βkxkWe now need to “link” the two sides.How is μ = E(Y ) related to α + β1x1 + β2x2 + . . . + βkxk?We do this using a “Link Function” =) g(μ)g(μ) = α + β1x1 + β2x2 + . . . + βkxk
  • 11. More about the Link Function11The link function provides the relationship between the linear predictor and the mean of the distribution function. Important things about g(.):This function g(.) is “monotone” — as the systematic part gets larger, μ gets larger (or smaller).The relationship between E(Y ) and the systematic part can be non-linear.Some common links are:1. Identity(ordinary regression, ANOVA, ANCOVA): E(Y ) = α + βx2. Log link which is often used when Y is nonnegative (i.e., 0 Y ): log(E(Y )) = log(μ) = α + βxThis yields a “loglinear” model. 3. Logit link, which is often used when 0 μ 1 (e.g., when response is dichotomous/binary and we’re interested in a probability).log(μ/(1 − μ)) = α + βx
  • 13. When? (ASSUMPTIONS)13Not assumed. GZLM/GEE, compared to GLM, do not assume a normally distributed dependent variable (or normally distributed independents), nor linearity between the predictors and the dependent, nor homogeneity of variance for the range of the dependent variable. Linearity of the link function.Absence of high multicollinearityCentered dataData distributionIndependent vs. correlated dataData levelsMissing data
  • 14. How to run GZLM in SPSS14Model Types (Already given Common model types)Scale Response. Linear. Specifies Normal as the distribution and Identity as the link function. Gamma with log link. Specifies Gamma as the distribution and Log as the link function. Ordinal Response. Ordinal logistic. Specifies Multinomial (ordinal) as the distribution and Cumulative logit as the link function. Ordinal probit. Specifies Multinomial (ordinal) as the distribution and Cumulative probit as the link function. Counts. Poisson loglinear. Specifies Poisson as the distribution and Log as the link function. Negative binomial with log link. Specifies Negative binomial (with a value of 1 for the ancillary parameter) as the distribution and Log as the link function. To have the procedure estimate the value of the ancillary parameter, specify a custom model with Negative binomial distribution and select Estimate value in the Parameter group.
  • 15. 15Model Types continued…Binary Response or Events/Trials Data. Binary logistic. Specifies Binomial as the distribution and Logit as the link function.Binary probit. Specifies Binomial as the distribution and Probit as the link function.Interval censored survival. Specifies Binomial as the distribution and Complementary log-log as the link function.Mixture. Tweedie with log link. Specifies Tweedie as the distribution and Log as the link function.Tweedie with identity link. Specifies Tweedie as the distribution and Identity as the link function.Custom. Specify your own combination of distribution and link function.
  • 16. 16Model Types (8 Custom distributions)NormalInverse GaussianGammaMultinomialBinomialPoissonNegative BinomialTweedie
  • 20. Distributions20TweedieTweedie distribution requires a parameter, p, which the researcher enters to determine the shape of the distribution:p=0: normal distributionp=1: Poisson distribution1< p< 2: for continuous data with exact zeros (the default in SPSS is 1.5)p=2: gamma distributionp>2: for positive continuous dataMultinomialDependent has a finite number of categories, has text string values, or is ordinal. The distribution among categories, not shown, is arbitrary.
  • 21. 15 custom Link functions21Normal, Gamma, Inverse Gaussian, Poisson and Twedie distributions:IdentityLogPower
  • 22. 22Negative binomial distributions Negative binomialBinomial distributions LogitProbitComplementary log-logNegative log Log complementOdds powerMultinomial distributions Cumulative logitCumulative ProbitCumulative CauchitCumulative Complementary log Cumulative negative log
  • 23. Data for Analysis23Take data from SPSS 18.0 sample files of ships data sav.To study the effect of Ships typeYear of Construction &Period of Operation onNo. of damage incidentsTo run a Generalized Linear Models analysis, from the menus choose: Analyze   Generalized Linear Models     Generalized Linear Models...
  • 24. 24 Analyze  Generalized Linear Models   Generalized Linear Models...Type of Model Tab (specify DV distribution and link function) On the Response tab, select a dependent variable. On the Predictors tab, select factors and covariates for use in predicting the dependent variable. (Factors are categorical predictors; they can be numeric or string and Covariates are scale predictors; they must be numeric) On the Model tab, specify model effects using the selected factors and covariates.EstimationStatisticsEM meansSaveExport
  • 25. 25Type of model tab will appear:Select Poisson log-linear as the type of model. This specifies a Poisson distribution with a log link function.Click the Response tab:Select Number of damage incidents as the dependent variable.Click the Predictors tab:Select Ship type, Year of construction, and Period of operation as factors.Select Logarithm of aggregate months of service as the offset.Click Options. Select Descending as the category order for factorsClick ContinueClick OK
  • 26. 26Click the Model tabSelect type (Ship type), construction (Year of construction), and operation (Period of operation) as main effects in the model.Click the Estimation tab.Select Pearson chi-square as the method for estimating the scale parameter.Click the EM Means tabSelect type (Ship type) and construction (Year of construction) as terms to display means for and select Pairwise as the contrast for each.Select Compute means for linear predictor as the scale. Select Sequential Sidak as the adjustment method.Click the Save tab.Select Predicted value of linear predictor and Standardized deviance residual. These values are saved to the active dataset and can help you diagnose any problems with the model fit.
  • 27. Scatter Plot27To produce a scatter plot of Standardized Deviance Residual by Predicted Value of the Linear Predictor, from the menus choose:  Graphs    Chart Builder...Select the Scatter/Dot gallery and choose Simple Scatter.Select Standardized Deviance Residual as the y variable and Predicted Value of the Linear Predictor as the x variable.Click OK.
  • 28. Research Papers and Thesis for Understanding28Development of an Accident Prediction Model using GLIM (Generalized Log-linear Model) and EB method: A case of Seoul (Korea)Log-Linear Models by Noah A. SmithFitting Tweedie’s Compound Poisson Model to Insurance Claims Data: Dispersion ModelingOn the Distribution of Discounted Loss Reserves Using Generalized Linear Models by Gordon K. Smyth (December 2001)The application of over dispersion and (GEE) Generalized Estimating Equations in repeated categorical data ( for understanding over dispersion, Poisson, negative binomial and GEE)Clustering of foot-based pitch contours in expressive speech by Esther Klabbers and Jan P. H. van SantenCollaborative filtering with interlaced generalized linear models by Nicolas Delannay, Michel VerleysenDISSERTATION OF STANFORD UNIVERSITY GENERALIZED LINEAR MODELS WITH REGULARIZATION by Mee Young Park (September, 2006)

Editor's Notes

  • #3: Correlated or clustered dataThe standard GLM assumes that the observations are uncorrelated. Extensions have been developed to allow for correlation between observations, as occurs for example in longitudinal studies and clustered designs:Generalized estimating equations (GEEs) allow for the correlation between observations without the use of an explicit probability model for the origin of the correlations, so there is no explicit likelihood. They are suitable when the random effects and their variances are not of inherent interest, as they allow for the correlation without explaining its origin. The focus is on estimating the average response over the population (&quot;population-averaged&quot; effects) rather than the regression parameters that would enable prediction of the effect of changing one or more components of X on a given individual. GEEs are usually used in conjunction with Huber-White standard errors. [4][5]Generalized linear mixed models (GLMMs) are an extension to GLMs that includes random effects in the linear predictor, giving an explicit probability model that explains the origin of the correlations. The resulting &quot;subject-specific&quot; parameter estimates are suitable when the focus is on estimating the effect of changing one or more components of X on a given individual. GLMMs are a particular type of multilevel model (mixed model). In general, fitting GLMMs is more computationally complex and intensive than fitting GEEs.Hierarchical generalized linear models (HGLMs) are similar to GLMMs apart from two distinctions:The random effects can have any distribution in the exponential family, whereas current GLMMs nearly always have normal random effects;They are not as computationally intensive, as instead of integrating out the random effects they are based on a modified form of likelihood known as the hierarchical likelihood or h-likelihood.The theoretical basis and accuracy of the methods used in HGLMs have been the subject of some debate in the statistical literature. As of 2008, the method is only available in one statistical software package, namely
  • #5: Canonical means: conforming to a general rule reduced to the simplest or clearest scheme possible the simplest form of a matrix (specifically the form of a square matrix that has zero off-diagonals).
  • #6: AssumptionsNot assumed. GZLM/GEE, compared to GLM, do not assume a normally distributed dependent variable (or normally distributed independents), nor linearity between the predictors and the dependent, nor homogeneity of variance for the range of the dependent variable. Linearity of the link function. The researcher still must select a link function such that there is a linear relation between the linear predictor (the right-hand side of the model equation) and the link function of the dependent. For example, in logistic regression models, one must check to see if there is &quot;linearity in the logit,&quot; meaning the linear predictor is in fact linearly related to the logit of the dependent. Absence of high multicollinearity. As in other linear models, presence of high multicollinearity among the independents will inflate standard errors and confound interpretation of the relative contributions of the independents. Centered data. As in regression, centering may be necessary either to reduce multicollinearity or to make interpretation of coefficients meaningful. Centering is almost always recommended for independent variables which are components of interaction terms in a logistic model. Data distribution. The independents may be of any distribution so long as linearity of the link function is maintained. The dependent may assume any of a wide variety of distributions, including normal, inverse normal (inverse Gaussian), binomial, multinomial, and Poisson. Independent vs. correlated data . In GZLM, observations are assumed to be independent. In GEE, observations are assumed to be independent between subjects within any given time period, cluster, or repeated measures factor, but are assumed to be dependent within the same subject across repeated measures factors. That is, GEE assumes between-subjects independence and within-subjects dependence. In practical terms, if there are repeated measures, GEE, not GZLM, should be chosen and the repeated measures properly specified. Data levels. In both GZLM and GEE, the dependent (response) variable may be binary, counts, scale, or events-in-trials. &quot;Scale&quot; means interval or ordinal if it can be assumed that ordinal values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. For ordinal response variables, the model type should be multinomial (ordinal) logistic or ordinal probit. Factors are categorical. Covariates are scale variables. Weight and offset variables, if any, are also assumed to be scale. In GEE, the variables specified as repeated measures within-subjects effects, or the variables used to define subjects, cannot be used as dependent variables. Missing data. As in other forms of statistical analysis, missing data can lead to biased coefficients unless data are missing completely at random.  
  • #7: Interpretation: There seems to be a Shopping style effect; on average, &quot;biweekly&quot; customers spend $378.52, while &quot;weekly&quot; customers spend $404.55, and &quot;often&quot; customers spend $406.76. There also appears to be a Gender effect; on average, males in the sample spend $430.30 compared to $365.66 for females. Lastly, there may be an interaction effect between Gender and Shopping style, because the mean differences in amount spent by shopping style vary between genders. For example, &quot;biweekly&quot; male customers tend to spend more than &quot;often&quot; male customers, but this trend is reversed for &quot;biweekly&quot; and &quot;often&quot; female customers. The N column in the table shows there are unequal cell sizes. Most customers prefer to shop on a weekly basis. The standard deviations appear relatively homogenous, although you should check Levene&apos;s test and the spread-versus-level plots to be sure. Dependent variable Amount spent: This table tests the null hypothesis that the variance of the error term is constant across the cells defined by the combination of factor levelsSince the significance value of the test, 0.330, is greater than 0.10, there is no reason to believe that the equal variances assumption is violated. Thus, the small differences in group standard deviations observed in the descriptive statistics table are due to random variationThe spread-versus-level plot is a scatterplot of the cell means and standard deviations from the descriptive statistics tableIt provides a visual test of the equal variances assumption, with the added benefit of helping you to assess whether violations of the assumption are due to a relationship between the cell means and standard deviationsThere is no apparent pattern in this plot, so there is no indication of such a relationship here. The tests of between-subjects effects help you to determine the significance of a factor. However, they do not indicate how the levels of a factor differ. The post hoc tests show the differences in model-predicted means for each pair of factor levels. The first column displays the different post hoc testsThe next two columns display the pair of factor levels being tested. When the significance value for the difference in Amount spent for a pair of factor levels is less than 0.05, an asterisk (*) is printed by the differenceIn this case, there do not appear to be significant differences in the spending habits of &quot;biweekly&quot;, &quot;weekly&quot;, or &quot;often&quot; customers. Tamhane&apos;s T2 is generally more appropriate than Tukey&apos;s HSD when there are unequal cell sizes, but the results in this case are largely the sameThe confidence intervals for Tamhane&apos;s T2 are only slightly wider than those for Tukey&apos;s HSD. Since the results of these two tests are not very different, it is safe for you to look at the results of the homogenous subsets, which are available for Tukey&apos;s HSD but not for Tamhane&apos;s T2. The homogenous subsets table takes the results of the post hoc tests and shows them in a more easily interpretable formIn the subset columns the factor levels that do not have significantly different effects are displayed in the same columnIn this example, the first subset contains the &quot;biweekly&quot;, &quot;weekly&quot;, and &quot;often&quot; customers.  These are all the customers, so there are no other subsets.  The post hoc tests suggest that efforts at enticing customers to shop more often than usual is wasted because they will not spend significantly more. However, the post hoc test results do not account for the levels of other factors, thus ignoring the possibility of an interaction effect with Gender seen in the descriptive statistics table. See the estimated marginal means to see how this might change your conclusionsThis table displays the model-estimated marginal means and standard errors of Amount spent at the factor combinations of Gender and Shopping style. This table is useful for exploring the possible interaction effect between these two factorsIn this example, a male customer who makes purchases weekly is expected to spend about $440.96, while one who makes purchases more often is expected to spend $407.77. A female customer who makes purchases weekly is expected to spend $361.72, while one who makes purchases more often is expected to spend $405.72. Thus, there is a difference between &quot;weekly&quot; and &quot;often&quot; customers, depending upon the gender of the customer. This fact suggests an interaction effect between Gender and Shopping style. If there were no interaction, you would expect the difference between shopping styles to remain constant for male and female customers. The interaction can be seen more easily in the profile plotsThe profile plot is a visual representation of the marginal means table.The factor levels of Shopping style are shown along the horizontal axisSeparate lines are produced for each level of Gender.  Alternately, the factor levels of Gender could be shown along the horizontal axis, with separate lines produced for each level of Shopping style.  If there were no interaction effect, the lines in the table would be parallel. Instead, you can see that the difference in spending between &quot;weekly&quot; and &quot;often&quot; customers is greater for female customers, as the line for male customers slopes downward and that for female customers slopes upward.  This is a strong interaction effect and is unlikely to be due to chance, but you should check the tests of between-subjects effects for confirmation of its significanceThis is an analysis of variance table. Each term in the model, plus the model as a whole, is tested for its ability to account for variation in the dependent variable. Note that variable labels are not displayed in this table.  The significance value for each term, except STYLE, is less than 0.05. Therefore each term, except STYLE, is statistically significant.  The partial eta squared statistic reports the &quot;practical&quot; significance of each term, based upon the ratio of the variation (sum of squares) accounted for by the term, to the sum of the variation accounted for by the term and the variation left to error.Larger values of partial eta squared indicate a greater amount of variation accounted for by the model term, to a maximum of 1. Here the individual terms, while statistically significant, do not have great effect on the value of Amount spent.  The GLM Univariate procedure is useful for modeling the linear relationship between a dependent scale variable and one or more categorical and scale predictors. If you have only one factor, you can alternatively use the One-Way ANOVA procedure. If you only have covariates, use the Linear Regression procedure for more model-building, residual-checking, and output options
  • #8: 15 custom Link functionsIdentity. f(x)=x. The dependent variable is not transformed. This link can be used with any distribution.• Complementary log-log. f(x)=log(−log(1−x)). This is appropriate only with the binomial distribution.• Cumulative Cauchit. f(x) = tan(π (x – 0.5)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.• Cumulative complementary log-log. f(x)=ln(−ln(1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.• Cumulative logit. f(x)=ln(x / (1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.• Cumulative negative log-log. f(x)=−ln(−ln(x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.• Cumulative probit. f(x)=Φ−1(x), applied to the cumulative probability of each category of the response, where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the multinomial distribution.• Log. f(x)=log(x). This link can be used with any distribution.• Log complement. f(x)=log(1−x). This is appropriate only with the binomial distribution.• Logit. f(x)=log(x / (1−x)). This is appropriate only with the binomial distribution.• Negative binomial. f(x)=log(x / (x+k−1)), where k is the ancillary parameter of the negative binomial distribution. This is appropriate only with the negative binomial distribution.• Negative log-log. f(x)=−log(−log(x)). This is appropriate only with the binomial distribution.• Odds power. f(x)=[(x/(1−x))α−1]/α, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This is appropriate only with the binomial distribution.• Probit. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the binomial distribution.• Power. f(x)=xα, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This link can be used with any distribution.