Package HGLMMM for Hierarchical Generalized Linear Models
|
|
- Whitney Terry
- 5 years ago
- Views:
Transcription
1 Package HGLMMM for Hierarchical Generalized Linear Models Marek Molas Emmanuel Lesaffre Erasmus MC Erasmus Universiteit - Rotterdam The Netherlands ERASMUSMC - Biostatistics / 52
2 Outline General syntax guide A bit of underlying theoretical concepts Example of analyses Comparison with existing methods Further developments ERASMUSMC - Biostatistics / 52
3 Examples Salamander data - crossed random effects Dialyzer data - longitudinal data Dialyzer data - correlated random effects Rats data - overdispersion modeling Cake data - AIC and model comparison ERASMUSMC - Biostatistics / 52
4 Hierarchical Generalized Linear Models Distribution of a response: exponential family density The mean of the distribution [ ] yθ b(θ) f(y;θ,φ) = exp + c(y,φ) φ E[y] = b (θ) = µ µ - the location of the distribution φ - the scale of a distribution or overdispersion ERASMUSMC - Biostatistics / 52
5 Hierarchical Generalized Linear Models The link function The linear predictor g(µ) = η η = Xβ + Zv Fixed effects in the mean structure - β Random effects in the mean structure - v assumed to originate form a distribution indexed by a dispersion parameter λ v. ERASMUSMC - Biostatistics / 52
6 Functions currently in the package HGLMMM HGLMfit - fitting function HGLMLikeDeriv - display derivatives of the fit HGLMLRTest - likelihood ratio test between two nested models BootstrapEnvelopeHGLM - creates bootstrap envelops for deviance residuals summary.hglm - prints out summary of the fit ERASMUSMC - Biostatistics / 52
7 HGLMfit syntax HGLMfit(DistResp = "Normal", DistRand = NULL, Link = NULL, LapFix = FALSE, ODEst = NULL, ODEstVal = 0, formulamain, formulaod, formularand, DataMain, DataRand, Offset = NULL, BinomialDen = NULL, StartBeta = NULL, StartVs = NULL, StartRGamma = NULL, INFO = TRUE, DEBUG = FALSE, na.action, contrasts = NULL, CONV = 1e-04) ERASMUSMC - Biostatistics / 52
8 HGLMfit syntax description DistResp - specify the distribution of the response as: "Normal", "Binomial", "Poisson", "Gamma" DistRand - specify the distribution of random effects: vector of distributions length equal to number of random components c("beta","gamma","igamma","normal") ERASMUSMC - Biostatistics / 52
9 HGLMfit syntax description Link - specify the link function for the response Canonical links available for Normal, Poisson and Binomial Gamma distribution has Log or Inverse link available LapFix - specify whether p v (h) is used for the estimation of the fixed effects If TRUE additional piece of code is used to estimate fixed effects as in Noh and Lee (2007) If FALSE hierarchical likelihood is used for estimation of fixed and random parameters ERASMUSMC - Biostatistics / 52
10 HGLMfit syntax description ODEst - specify whether the overdispersion parameter should be fixed or estimated if NULL it will be fixed for Poisson and Binomial, while estimated for Normal and Gamma if TRUE overdispersion structure will be estimated if FALSE overdispersion structure will be held fixed formulamain - specify the formula for the fixed structure of the model Formula with fixed and random components in the mean structure as in lme4 ERASMUSMC - Biostatistics / 52
11 HGLMfit syntax description formulaod - specify the dispersion structure (residual/overdispersion) One sided formula formularand - specify the dispersion structure of the random effects a list of one sided formulas, number of list entries must be equal to the number of the dispersion components DataMain - specify the main dataset, which will be used for formulamain and formulaod DataRand - a list containing the names of the data frames used for formularand ERASMUSMC - Biostatistics / 52
12 HGLMfit syntax description Offset - Offset variable in Poisson regression as log( µ t ) BinomialDen - specify the denominator of the Binomial distribution should be a vector of length equal to the number of observations StartBeta, StartVs, StartRGamma - specify starting values for fixed parameters, random effects and dispersion parameters of random effects respectively ODEstVal - supply values for overdispersion/ residual dispersion structure ERASMUSMC - Biostatistics / 52
13 Class HGLM objects - result of HGLMfit estimation Results - contains estimates Details - contains designs NAMES - contains labels for print out of the results CALL - contains the original call of the estimating function HGLMfit ERASMUSMC - Biostatistics / 52
14 Class HGLM objects - component Results Estimates of fixed and random effects in the mean structure Estimates of dispersion and (over)/residual dispersion parameters Gradient / Hessian / StdErrors of fixed, random and dispersion estimates Values of h-likelihood, marginal likelihood (REML) and conditional likelihood ERASMUSMC - Biostatistics / 52
15 Class HGLM objects - component Details Deviance residuals and standardized deviance residuals Involving proper hat matrix For outcome (assumed distribution) For random effects (assumed distribution) For (over)/residual dispersion (gamma distribution) For dispersion components (gamma distribution) ERASMUSMC - Biostatistics / 52
16 Other functions description HGLMLRTest Likelihood ratio test comparing two models - two arguments two objects of class HGLM HGLMLikeDeriv Gives gradients of fixed effects in the mean structure and variance components BootstrapEnvelopeHGLM Creates a 95% confidence intervals for correct residual diagnostics ERASMUSMC - Biostatistics / 52
17 Examples - Dialyzer data Dialyzer dataset Response is UFR Covariate of interest is TMP 3 centers involved - coded in a center variable Random effect - Dialyzer number Aim: Determine the relationship between UFR and TMP and determine if this relationship differs across the three centers, which use different systems to manipulate the TMP ERASMUSMC - Biostatistics / 52
18 Examples - Dialyzer data 2000 Center Center 2 Center 3 UFR TMP ERASMUSMC - Biostatistics / 52
19 Examples - Dialyzer data Standard analysis via SAS PROC MIXED Random intercept model Random intercept and slope model - no correlation Random intercept and slope model - fixed correlation Search over the grid for the correlation value ERASMUSMC - Biostatistics / 52
20 Dialyzer data - random intercept model dialyzer1<-dialyzer[complete.cases(dialyzer),] dialyzer1$ufrstd<-(dialyzer1$ufr-mean(dialyzer1$ufr))/sd(dialyzer1$ufr) DatasetRAEF<-data.frame(intercept=rep(1,41)) mod_dial1<-hglmfit(distresp = "Normal", DistRand = c("normal"), Link = "Identity", LapFix = FALSE, ODEst = TRUE, ODEstVal = 0, UFRSTD ~ TMP+as.factor(CENTER)+as.factor(CENTER):TMP+(1 DIALYZER), formulaod = ~ 1, list(one=~1), DataMain=dialyzer1, DataRand=list(DatasetRAEF), Offset = NULL, BinomialDen = NULL, StartBeta = NULL, StartVs = NULL, StartRGamma = NULL, INFO = TRUE, DEBUG = FALSE,contrasts = NULL, CONV = 1e-04) summary(mod_dial1) ERASMUSMC - Biostatistics / 52
21 Dialyzer data - random intercept/slope model mod_dial2<-hglmfit(distresp = "Normal", DistRand = c("normal","normal"), Link = "Identity", LapFix = FALSE, ODEst = TRUE, ODEstVal = 0, UFRSTD ~ TMP+as.factor(CENTER)+as.factor(CENTER):TMP+ (1 DIALYZER)+(TMP DIALYZER), formulaod = ~ 1, list(one=~1,two=~1), DataMain=dialyzer1, DataRand=list(DatasetRAEF,DatasetRAEF), Offset = NULL, BinomialDen = NULL, StartBeta = NULL, StartVs = NULL, StartRGamma = NULL, INFO = TRUE, DEBUG = FALSE,contrasts = NULL, CONV summary(mod_dial2) ERASMUSMC - Biostatistics / 52
22 Dialyzer data - known correlation parameter Assume correlation between random intercept and slope is known ρ = Fit model under independence - obtain estimates of variances of intercept and slope, construct variance covariance matrix using known correlation and computed variances Compute the cholesky decomposition of this matrix Change the design matrix of random effects Fit model update the estimates of variances and use it to construct new covariance matrix using known correlation Compute cholesky decomposition of a new matrix and refit the model after changing design matrix again When variance components of your fit are close to 1 stop the procedure ERASMUSMC - Biostatistics / 52
23 Dialyzer data - known correlation parameter If variances of random intercept and slope are assumed the same - only one step is required If correlation is unknown a grid search could be done This implies many iterations in nested loops - inefficient Possibly modification of the current code to do it at every iteration ERASMUSMC - Biostatistics / 52
24 Dialyzer data - known correlation parameter temp1<-as.vector(exp(mod_dial3$results$dispersion)) rho< Rcov<-matrix(c(temp1[1],rho*sqrt(temp1[1]*temp1[2]), rho*sqrt(temp1[1]*temp1[2]),temp1[2]),2,2) tempchol<-chol(rcov) originalz<-cbind(rep(1,nrow(dialyzer1)),dialyzer1$tmp) modifiedz<-originalz%*%t(tempchol) dialyzer1$newint<-modifiedz[,1] dialyzer1$newtmp<-modifiedz[,2] mod_dial3<-hglmfit(distresp = "Normal", DistRand = c("normal","normal"), Link = "Identity", LapFix = FALSE, ODEst = TRUE, ODEstVal = 0, UFRSTD ~ TMP+as.factor(CENTER)+as.factor(CENTER):TMP+ (NEWINT DIALYZER)+(NEWTMP DIALYZER), formulaod = ~ 1, list(one=~1,two=~1),datamain=dialyzer1, DataRand=list(DatasetRAEF,DatasetRAEF), Offset = NULL, BinomialDen = NULL, StartBeta = NULL, StartVs = NULL, StartRGamma = NULL, INFO = TRUE, DEBUG = FALSE,contras ERASMUSMC - Biostatistics / 52
25 Dialyzer data - known correlation parameter temp2<-as.vector(exp(mod_dial3$results$dispersion)) rho< temp3<-t(tempchol)%*%matrix(c(temp2[1],0,0,temp2[2]),2,2)%*%tempchol Rcov1<-matrix(c(temp3[1,1],rho*sqrt(temp3[1,1]*temp3[2,2]), rho*sqrt(temp3[1,1]*temp3[2,2]),temp3[2,2]),2,2) tempchol<-chol(rcov1) originalz<-cbind(rep(1,nrow(dialyzer1)),dialyzer1$tmp) modifiedz<-originalz%*%t(tempchol) dialyzer1$newint<-modifiedz[,1] dialyzer1$newtmp<-modifiedz[,2] ERASMUSMC - Biostatistics / 52
26 Dialyzer data - known correlation parameter Results ===== Fixed Coefficients - Mean Structure ===== Estimate Std. Error Z value Pr(> Z ) (Intercept) < 2e-16 *** TMP < 2e-16 *** as.factor(center) as.factor(center) TMP:as.factor(CENTER) *** TMP:as.factor(CENTER) *** --- ===== Overdispersion Parameters Estimated ===== Estimate Std. Error Z value Pr(> Z ) (Intercept) <2e-16 *** --- ERASMUSMC - Biostatistics / 52
27 Dialyzer data - known correlation parameter ===== Dispersion Parameters Estimated ===== Dispersion Component: DIALYZER Estimate Std. Error Z value Pr(> Z ) (Intercept) Dispersion Component: DIALYZER Estimate Std. Error Z value Pr(> Z ) (Intercept) ===== Likelihood Functions Value ===== H-likelihood : Marginal likelihood: REML likelihood : C-likelihood : ERASMUSMC - Biostatistics / 52
28 Examples - Dialyzer data BootstrapEnvelopeHGLM(mod_dial_final,19,67523) Sample Quantiles Theoretical Quantiles ERASMUSMC - Biostatistics / 52
29 Package HGLMMM Salamander data Dependent variable: success of salamanders mating Mate ij 60 male salamanders (i=1...60) + 60 female salamanders (j=1...60) Two populations of salamanders: whiteside (W) and roughbutt (R) 360 observations Question: does the type of salamander influence probability of a successful mating The model ( ) µij log = Intercept + TypeF j + TypeM i + TypeF j TypeM i + v i + v j 1 µ ij ERASMUSMC - Biostatistics / 52
30 Package HGLMMM Crossed random effects: Male Female ERASMUSMC - Biostatistics / 52
31 Package HGLMMM Gaussian quadrature infeasible We will perform the following analyses: GLM ignoring correlation in R glm() PQL analysis in SAS PROC GLIMMIX Mixed model using Laplace approximation in R lme4:::lmer() HL(0,1) in R HGLMMM package HL(1,1) in R HGLMMM package HL(1,1) + estimation of overdispersion φ in R HGLMMM package ERASMUSMC - Biostatistics / 52
32 Package HGLMMM Generalized linear model in SAS proc genmod data=sal descending; model mate=typefw typemw typefw*typemw/dist=binomial link=logit; run; Generalized linear model in R glm(cbind(mate,1-mate)~typef+typem+typef*typem, family=binomial(link=logit),data=salamander) ERASMUSMC - Biostatistics / 52
33 Package HGLMMM PQL model in SAS proc glimmix data=sal method=rspl; class female male; model mate=typefw typemw typefw*typemw/dist=binomial link=logit s random female male; random _residual_; run; GLMM using Laplace approximation in lme4:::lmer library(lme4) lmer(mate~typef+typem+typef*typem+(1 Male)+(1 Female), family=binomial(link=logit),data=salamander) ERASMUSMC - Biostatistics / 52
34 Package HGLMMM Hierarchical Generalized Linear Model - HL(0,1) library(hglmmm) RSal<-data.frame(int=rep(1,60)) HGLMfit(DistResp="Binomial",DistRand=c("Normal","Normal"), Link="Logit",LapFix=FALSE,ODEst=FALSE,ODEstVal=c(0), formulamain=mate~typef+typem+typef*typem+(1 Female)+(1 Male), formulaod=~1,formularand=list(one=~1,two=~1), DataMain=salamander,DataRand=list(RSal,RSal), Offset=NULL,BinomialDen=rep(1,360),INFO=TRUE,DEBUG=FALSE) Hierarchical Generalized Linear Model - HL(1,1) + overdispersion LapFix=TRUE ODEst=TRUE ERASMUSMC - Biostatistics / 52
35 Package HGLMMM Salamander data - point estimates Intercept TypeF TypeM TypeF*TypeM Female Male Phi glm PQL PQL OD lme HL(0,1) HL(1,1) HL(1,1)OD Whiteside female and Roughbutt male have lowest probability of success Both of the same population have similar probability of successful mating ERASMUSMC - Biostatistics / 52
36 Package HGLMMM Salamander data - test statistics Intercept TypeF TypeM TypeF*TypeM glm pql pql OD lme HL(0,1) HL(1,1) HL(1,1)OD ERASMUSMC - Biostatistics / 52
37 Package HGLMMM Rat data 30 rats 3 drugs 4 timepoints 120 observations White blood cell count and red blood cell count Response: number of cancer cell colonies Question: Is there a difference between the drugs ERASMUSMC - Biostatistics / 52
38 Package HGLMMM Poisson Model Quasi-Poisson model Dispersion component depends on WBC Diagnostic plots ERASMUSMC - Biostatistics / 52
39 Package HGLMMM Poisson model Rrat<-data.frame(WBC=tapply(rat$WhiteBloodCells,rat$Subject,mean), RBC=tapply(rat$RedBloodCells,rat$Subject,mean)) modrat1<-hglmfit(distresp="poisson",distrand=c("normal"),link="log", LapFix=FALSE,ODEst=FALSE,ODEstVal=c(0), formulamain= Y~WhiteBloodCells+RedBloodCells+as.factor(Drug)+(1 Subject), formulaod=~1,formularand=list(one=~1), DataMain=rat, DataRand=list(Rrat),INFO=TRUE,DEBUG=FALSE) ERASMUSMC - Biostatistics / 52
40 Package HGLMMM Sample Quantiles Theoretical Quantiles ERASMUSMC - Biostatistics / 52
41 Package HGLMMM Quasi-Poisson Model HGLMfit(DistResp="Poisson",DistRand=c("Normal"),Link="Log", LapFix=FALSE,ODEst=TRUE,ODEstVal=c(0), formulamain= Y~WhiteBloodCells+RedBloodCells+as.factor(Drug)+(1 Subject),,formulaOD=~1,formulaRand=list(one=~WBC+I(WBC^2)), DataMain=rat,DataRand=list(Rrat),INFO=TRUE,DEBUG=FALSE) ERASMUSMC - Biostatistics / 52
42 Package HGLMMM Diagnostics for Rat Model Quasi Poisson (y v) Deviance Residuals Absolute Deviance Residuals Scaled Fitted Values Scaled Fitted Values Normal Q Q Plot Histogram Sample Quantiles Frequency Theoretical Quantiles Deviance Residuals ERASMUSMC - Biostatistics / 52
43 Package HGLMMM Poisson Quasi-Poisson Quasi-Poisson PQL Intercept < < < <0.001 WBC < < <0.001 RBC < < <0.001 Drug= Drug= Phi Intercept WBC WBC ERASMUSMC - Biostatistics / 52
44 Package HGLMMM Cake data Dependent variable: breaking angle of cakes 270 cakes 3 recipes and 6 temperatures cakes baked in batches of 18 (3 recipes * 6 temperatures) Random effects for batch and random effect for recipe within batch Question: what is the effect of the baking temperature and recipe on the breaking angle The model η ijk = intercept + recipe j + temp k + recipe j temp k + v i + v ij ERASMUSMC - Biostatistics / 52
45 Package HGLMMM Models considered Breaking angle as normal or gamma random variable What distribution for random effects One or two random effects Which mean structure - do we need an interaction ERASMUSMC - Biostatistics / 52
46 Package HGLMMM Modeling strategy Start with a complex model Use AIC (marginal likelihood) for selection of the distribution of the response Use h-likelihood for selection of distribution of the random effects Use LR test (REML) to test variance component of random effect equal to zero Use LR test (marginal likelihood) to test for the interaction ERASMUSMC - Biostatistics / 52
47 Package HGLMMM Normal Model ===== Likelihood Functions Value ===== H-likelihood : Marginal likelihood: REML likelihood : C-likelihood : Gamma Model ===== Likelihood Functions Value ===== H-likelihood : Marginal likelihood: REML likelihood : C-likelihood : We proceed with the gamma model ERASMUSMC - Biostatistics / 52
48 Package HGLMMM Selection of random effects Effect 1 Effect2 H-likelihood Normal Normal Normal IGamma IGamma IGamma Gamma Gamma Beta Beta Lets keep Gaussian random effects ERASMUSMC - Biostatistics / 52
49 Package HGLMMM Do we need both random effects? > HGLMLRTest(modCake2,modCake7) H-likelihood of model 1 is higher Marginal likelihood comparison: LR test p-value: NA LR test statistics: LR difference df: 0 REML likelihood comparison: LR test p-value: LR test statistics: LR difference df: 1 We prefer the model with two random effects ERASMUSMC - Biostatistics / 52
50 Package HGLMMM Do we need interaction in the mean structure > HGLMLRTest(modCake2,modCake8) H-likelihood of model 1 is higher Marginal likelihood comparison: LR test p-value: LR test statistics: LR difference df: 10 REML likelihood comparison: LR test p-value: NA LR test statistics: LR difference df: 0 We prefer the simpler model ERASMUSMC - Biostatistics / 52
51 Package HGLMMM Further developments Make the package more compatible with R style Add estimation of random effects with known correlation Implement non-canonical links - probit, cloglog Use package MATRIX for large datasets Efficient computation of the matrix T(T T Σ 1 a T) 1 T T Σ 1 a Second order approximations ERASMUSMC - Biostatistics / 52
52 Package HGLMMM Currently known bugs ODEst=FALSE with Gaussian response does not work properly Full description of random effects in summary function intercept/subject/distribution Proper handling of missing values OTHER BUGS ARE WELCOME Thank you for your attention ERASMUSMC - Biostatistics / 52
Hierarchical Hurdle Models for Zero-In(De)flated Count Data of Complex Designs
for Zero-In(De)flated Count Data of Complex Designs Marek Molas 1, Emmanuel Lesaffre 1,2 1 Erasmus MC 2 L-Biostat Erasmus Universiteit - Rotterdam Katholieke Universiteit Leuven The Netherlands Belgium
More informationLinear, Generalized Linear, and Mixed-Effects Models in R. Linear and Generalized Linear Models in R Topics
Linear, Generalized Linear, and Mixed-Effects Models in R John Fox McMaster University ICPSR 2018 John Fox (McMaster University) Statistical Models in R ICPSR 2018 1 / 19 Linear and Generalized Linear
More informationGeneralized linear models
Generalized linear models Douglas Bates November 01, 2010 Contents 1 Definition 1 2 Links 2 3 Estimating parameters 5 4 Example 6 5 Model building 8 6 Conclusions 8 7 Summary 9 1 Generalized Linear Models
More informationSTAT 526 Advanced Statistical Methodology
STAT 526 Advanced Statistical Methodology Fall 2017 Lecture Note 10 Analyzing Clustered/Repeated Categorical Data 0-0 Outline Clustered/Repeated Categorical Data Generalized Linear Mixed Models Generalized
More informationProduct Held at Accelerated Stability Conditions. José G. Ramírez, PhD Amgen Global Quality Engineering 6/6/2013
Modeling Sub-Visible Particle Data Product Held at Accelerated Stability Conditions José G. Ramírez, PhD Amgen Global Quality Engineering 6/6/2013 Outline Sub-Visible Particle (SbVP) Poisson Negative Binomial
More informationChapter 1. Modeling Basics
Chapter 1. Modeling Basics What is a model? Model equation and probability distribution Types of model effects Writing models in matrix form Summary 1 What is a statistical model? A model is a mathematical
More informationMixed models in R using the lme4 package Part 7: Generalized linear mixed models
Mixed models in R using the lme4 package Part 7: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team University of
More informationMixed models in R using the lme4 package Part 5: Generalized linear mixed models
Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates Madison January 11, 2011 Contents 1 Definition 1 2 Links 2 3 Example 7 4 Model building 9 5 Conclusions 14
More informationMixed models in R using the lme4 package Part 5: Generalized linear mixed models
Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates 2011-03-16 Contents 1 Generalized Linear Mixed Models Generalized Linear Mixed Models When using linear mixed
More informationLecture 9 STK3100/4100
Lecture 9 STK3100/4100 27. October 2014 Plan for lecture: 1. Linear mixed models cont. Models accounting for time dependencies (Ch. 6.1) 2. Generalized linear mixed models (GLMM, Ch. 13.1-13.3) Examples
More informationA brief introduction to mixed models
A brief introduction to mixed models University of Gothenburg Gothenburg April 6, 2017 Outline An introduction to mixed models based on a few examples: Definition of standard mixed models. Parameter estimation.
More informationOutline. Mixed models in R using the lme4 package Part 5: Generalized linear mixed models. Parts of LMMs carried over to GLMMs
Outline Mixed models in R using the lme4 package Part 5: Generalized linear mixed models Douglas Bates University of Wisconsin - Madison and R Development Core Team UseR!2009,
More informationRegression models. Generalized linear models in R. Normal regression models are not always appropriate. Generalized linear models. Examples.
Regression models Generalized linear models in R Dr Peter K Dunn http://www.usq.edu.au Department of Mathematics and Computing University of Southern Queensland ASC, July 00 The usual linear regression
More informationGeneralized Linear Models for Non-Normal Data
Generalized Linear Models for Non-Normal Data Today s Class: 3 parts of a generalized model Models for binary outcomes Complications for generalized multivariate or multilevel models SPLH 861: Lecture
More informationAn R # Statistic for Fixed Effects in the Linear Mixed Model and Extension to the GLMM
An R Statistic for Fixed Effects in the Linear Mixed Model and Extension to the GLMM Lloyd J. Edwards, Ph.D. UNC-CH Department of Biostatistics email: Lloyd_Edwards@unc.edu Presented to the Department
More informationContrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models:
Contrasting Marginal and Mixed Effects Models Recall: two approaches to handling dependence in Generalized Linear Models: Marginal models: based on the consequences of dependence on estimating model parameters.
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) T In 2 2 tables, statistical independence is equivalent to a population
More informationReview. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis
Review Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1 / 22 Chapter 1: background Nominal, ordinal, interval data. Distributions: Poisson, binomial,
More informationGeneralized linear mixed models for biologists
Generalized linear mixed models for biologists McMaster University 7 May 2009 Outline 1 2 Outline 1 2 Coral protection by symbionts 10 Number of predation events Number of blocks 8 6 4 2 2 2 1 0 2 0 2
More informationHierarchical Generalized Linear Model Approach For Estimating Of Working Population In Kepulauan Riau Province
IOP Conference Series: Earth and Environmental Science PAPER OPEN ACCESS Hierarchical Generalized Linear Model Approach For Estimating Of Working Population In Kepulauan Riau Province To cite this article:
More informationSCHOOL OF MATHEMATICS AND STATISTICS. Linear and Generalised Linear Models
SCHOOL OF MATHEMATICS AND STATISTICS Linear and Generalised Linear Models Autumn Semester 2017 18 2 hours Attempt all the questions. The allocation of marks is shown in brackets. RESTRICTED OPEN BOOK EXAMINATION
More informationNon-Gaussian Response Variables
Non-Gaussian Response Variables What is the Generalized Model Doing? The fixed effects are like the factors in a traditional analysis of variance or linear model The random effects are different A generalized
More informationGeneralized Linear Models. Kurt Hornik
Generalized Linear Models Kurt Hornik Motivation Assuming normality, the linear model y = Xβ + e has y = β + ε, ε N(0, σ 2 ) such that y N(μ, σ 2 ), E(y ) = μ = β. Various generalizations, including general
More informationGeneralized Linear Models
York SPIDA John Fox Notes Generalized Linear Models Copyright 2010 by John Fox Generalized Linear Models 1 1. Topics I The structure of generalized linear models I Poisson and other generalized linear
More informationYou can specify the response in the form of a single variable or in the form of a ratio of two variables denoted events/trials.
The GENMOD Procedure MODEL Statement MODEL response = < effects > < /options > ; MODEL events/trials = < effects > < /options > ; You can specify the response in the form of a single variable or in the
More informationCitation for the original published paper (version of record):
http://www.diva-portal.org This is the published version of a paper published in The R Journal. Citation for the original published paper (version of record): Rönnegård, L., Shen, X., Alam, M. (010) Hglm:
More informationGeneralized Linear Models 1
Generalized Linear Models 1 STA 2101/442: Fall 2012 1 See last slide for copyright information. 1 / 24 Suggested Reading: Davison s Statistical models Exponential families of distributions Sec. 5.2 Chapter
More informationTento projekt je spolufinancován Evropským sociálním fondem a Státním rozpočtem ČR InoBio CZ.1.07/2.2.00/
Tento projekt je spolufinancován Evropským sociálním fondem a Státním rozpočtem ČR InoBio CZ.1.07/2.2.00/28.0018 Statistical Analysis in Ecology using R Linear Models/GLM Ing. Daniel Volařík, Ph.D. 13.
More informationIntroduction to lnmle: An R Package for Marginally Specified Logistic-Normal Models for Longitudinal Binary Data
Introduction to lnmle: An R Package for Marginally Specified Logistic-Normal Models for Longitudinal Binary Data Bryan A. Comstock and Patrick J. Heagerty Department of Biostatistics University of Washington
More informationAge 55 (x = 1) Age < 55 (x = 0)
Logistic Regression with a Single Dichotomous Predictor EXAMPLE: Consider the data in the file CHDcsv Instead of examining the relationship between the continuous variable age and the presence or absence
More informationGeneralized Linear Models
Generalized Linear Models 1/37 The Kelp Data FRONDS 0 20 40 60 20 40 60 80 100 HLD_DIAM FRONDS are a count variable, cannot be < 0 2/37 Nonlinear Fits! FRONDS 0 20 40 60 log NLS 20 40 60 80 100 HLD_DIAM
More informationTwo Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00
Two Hours MATH38052 Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER GENERALISED LINEAR MODELS 26 May 2016 14:00 16:00 Answer ALL TWO questions in Section
More informationLinear Regression. Data Model. β, σ 2. Process Model. ,V β. ,s 2. s 1. Parameter Model
Regression: Part II Linear Regression y~n X, 2 X Y Data Model β, σ 2 Process Model Β 0,V β s 1,s 2 Parameter Model Assumptions of Linear Model Homoskedasticity No error in X variables Error in Y variables
More informationStatistical Methods III Statistics 212. Problem Set 2 - Answer Key
Statistical Methods III Statistics 212 Problem Set 2 - Answer Key 1. (Analysis to be turned in and discussed on Tuesday, April 24th) The data for this problem are taken from long-term followup of 1423
More informationST3241 Categorical Data Analysis I Generalized Linear Models. Introduction and Some Examples
ST3241 Categorical Data Analysis I Generalized Linear Models Introduction and Some Examples 1 Introduction We have discussed methods for analyzing associations in two-way and three-way tables. Now we will
More informationGeneralized Linear. Mixed Models. Methods and Applications. Modern Concepts, Walter W. Stroup. Texts in Statistical Science.
Texts in Statistical Science Generalized Linear Mixed Models Modern Concepts, Methods and Applications Walter W. Stroup CRC Press Taylor & Francis Croup Boca Raton London New York CRC Press is an imprint
More informationLinear Regression Models P8111
Linear Regression Models P8111 Lecture 25 Jeff Goldsmith April 26, 2016 1 of 37 Today s Lecture Logistic regression / GLMs Model framework Interpretation Estimation 2 of 37 Linear regression Course started
More informationSections 4.1, 4.2, 4.3
Sections 4.1, 4.2, 4.3 Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1/ 32 Chapter 4: Introduction to Generalized Linear Models Generalized linear
More informationThe hglm Package (version 1.2)
The hglm Package (version 1.2) Lars Rönnegård Dalarna University Xia Shen Uppsala University Moudud Alam Dalarna University Abstract This vignette describes the R hglm package via a series of applications
More informationSTA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis. 1. Indicate whether each of the following is true (T) or false (F).
STA 4504/5503 Sample Exam 1 Spring 2011 Categorical Data Analysis 1. Indicate whether each of the following is true (T) or false (F). (a) (b) (c) (d) (e) In 2 2 tables, statistical independence is equivalent
More informationIntroduction to General and Generalized Linear Models
Introduction to General and Generalized Linear Models Generalized Linear Models - part II Henrik Madsen Poul Thyregod Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs.
More informationGeneralized Linear Models. Last time: Background & motivation for moving beyond linear
Generalized Linear Models Last time: Background & motivation for moving beyond linear regression - non-normal/non-linear cases, binary, categorical data Today s class: 1. Examples of count and ordered
More informationClass Notes: Week 8. Probit versus Logit Link Functions and Count Data
Ronald Heck Class Notes: Week 8 1 Class Notes: Week 8 Probit versus Logit Link Functions and Count Data This week we ll take up a couple of issues. The first is working with a probit link function. While
More informationReview: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:
Outline for today What is a generalized linear model Linear predictors and link functions Example: fit a constant (the proportion) Analysis of deviance table Example: fit dose-response data using logistic
More informationNon-maximum likelihood estimation and statistical inference for linear and nonlinear mixed models
Optimum Design for Mixed Effects Non-Linear and generalized Linear Models Cambridge, August 9-12, 2011 Non-maximum likelihood estimation and statistical inference for linear and nonlinear mixed models
More informationSTAT 510 Final Exam Spring 2015
STAT 510 Final Exam Spring 2015 Instructions: The is a closed-notes, closed-book exam No calculator or electronic device of any kind may be used Use nothing but a pen or pencil Please write your name and
More informationAnalysis of Count Data A Business Perspective. George J. Hurley Sr. Research Manager The Hershey Company Milwaukee June 2013
Analysis of Count Data A Business Perspective George J. Hurley Sr. Research Manager The Hershey Company Milwaukee June 2013 Overview Count data Methods Conclusions 2 Count data Count data Anything with
More informationR Package glmm: Likelihood-Based Inference for Generalized Linear Mixed Models
R Package glmm: Likelihood-Based Inference for Generalized Linear Mixed Models Christina Knudson, Ph.D. University of St. Thomas user!2017 Reviewing the Linear Model The usual linear model assumptions:
More informationGeneralized linear models
Generalized linear models Christopher F Baum ECON 8823: Applied Econometrics Boston College, Spring 2016 Christopher F Baum (BC / DIW) Generalized linear models Boston College, Spring 2016 1 / 1 Introduction
More informationChapter 4: Generalized Linear Models-II
: Generalized Linear Models-II Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu] D. Bandyopadhyay
More informationOverdispersion Workshop in generalized linear models Uppsala, June 11-12, Outline. Overdispersion
Biostokastikum Overdispersion is not uncommon in practice. In fact, some would maintain that overdispersion is the norm in practice and nominal dispersion the exception McCullagh and Nelder (1989) Overdispersion
More informationExample. Multiple Regression. Review of ANOVA & Simple Regression /749 Experimental Design for Behavioral and Social Sciences
36-309/749 Experimental Design for Behavioral and Social Sciences Sep. 29, 2015 Lecture 5: Multiple Regression Review of ANOVA & Simple Regression Both Quantitative outcome Independent, Gaussian errors
More informationH-LIKELIHOOD ESTIMATION METHOOD FOR VARYING CLUSTERED BINARY MIXED EFFECTS MODEL
H-LIKELIHOOD ESTIMATION METHOOD FOR VARYING CLUSTERED BINARY MIXED EFFECTS MODEL Intesar N. El-Saeiti Department of Statistics, Faculty of Science, University of Bengahzi-Libya. entesar.el-saeiti@uob.edu.ly
More informationLogistic Regression - problem 6.14
Logistic Regression - problem 6.14 Let x 1, x 2,, x m be given values of an input variable x and let Y 1,, Y m be independent binomial random variables whose distributions depend on the corresponding values
More informationLecture 14: Introduction to Poisson Regression
Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu 8 May 2007 1 / 52 Overview Modelling counts Contingency tables Poisson regression models 2 / 52 Modelling counts I Why
More informationModelling counts. Lecture 14: Introduction to Poisson Regression. Overview
Modelling counts I Lecture 14: Introduction to Poisson Regression Ani Manichaikul amanicha@jhsph.edu Why count data? Number of traffic accidents per day Mortality counts in a given neighborhood, per week
More informationA Handbook of Statistical Analyses Using R. Brian S. Everitt and Torsten Hothorn
A Handbook of Statistical Analyses Using R Brian S. Everitt and Torsten Hothorn CHAPTER 6 Logistic Regression and Generalised Linear Models: Blood Screening, Women s Role in Society, and Colonic Polyps
More informationGeneralized Linear Mixed-Effects Models. Copyright c 2015 Dan Nettleton (Iowa State University) Statistics / 58
Generalized Linear Mixed-Effects Models Copyright c 2015 Dan Nettleton (Iowa State University) Statistics 510 1 / 58 Reconsideration of the Plant Fungus Example Consider again the experiment designed to
More informationMultivariate Regression Models in R: The mcglm package
Multivariate Regression Models in R: The mcglm package Prof. Wagner Hugo Bonat R Day Laboratório de Estatística e Geoinformação - LEG Universidade Federal do Paraná - UFPR 15 de maio de 2018 Introduction
More informationGeneralized Linear Models: An Introduction
Applied Statistics With R Generalized Linear Models: An Introduction John Fox WU Wien May/June 2006 2006 by John Fox Generalized Linear Models: An Introduction 1 A synthesis due to Nelder and Wedderburn,
More informationSTA216: Generalized Linear Models. Lecture 1. Review and Introduction
STA216: Generalized Linear Models Lecture 1. Review and Introduction Let y 1,..., y n denote n independent observations on a response Treat y i as a realization of a random variable Y i In the general
More informationThe hglm Package. Xia Shen Uppsala University
The hglm Package Lars Rönnegård Dalarna University Xia Shen Uppsala University Moudud Alam Dalarna University Abstract This vignette describes the R hglm package via a series of applications that may be
More informationNormal distribution We have a random sample from N(m, υ). The sample mean is Ȳ and the corrected sum of squares is S yy. After some simplification,
Likelihood Let P (D H) be the probability an experiment produces data D, given hypothesis H. Usually H is regarded as fixed and D variable. Before the experiment, the data D are unknown, and the probability
More informationUNIVERSITY OF TORONTO. Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS. Duration - 3 hours. Aids Allowed: Calculator
UNIVERSITY OF TORONTO Faculty of Arts and Science APRIL 2010 EXAMINATIONS STA 303 H1S / STA 1002 HS Duration - 3 hours Aids Allowed: Calculator LAST NAME: FIRST NAME: STUDENT NUMBER: There are 27 pages
More informationSection Poisson Regression
Section 14.13 Poisson Regression Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Data Analysis II 1 / 26 Poisson regression Regular regression data {(x i, Y i )} n i=1,
More informationR Output for Linear Models using functions lm(), gls() & glm()
LM 04 lm(), gls() &glm() 1 R Output for Linear Models using functions lm(), gls() & glm() Different kinds of output related to linear models can be obtained in R using function lm() {stats} in the base
More informationHierarchical Generalized Linear Models. ERSH 8990 REMS Seminar on HLM Last Lecture!
Hierarchical Generalized Linear Models ERSH 8990 REMS Seminar on HLM Last Lecture! Hierarchical Generalized Linear Models Introduction to generalized models Models for binary outcomes Interpreting parameter
More informationLecture 3.1 Basic Logistic LDA
y Lecture.1 Basic Logistic LDA 0.2.4.6.8 1 Outline Quick Refresher on Ordinary Logistic Regression and Stata Women s employment example Cross-Over Trial LDA Example -100-50 0 50 100 -- Longitudinal Data
More informationOutline of GLMs. Definitions
Outline of GLMs Definitions This is a short outline of GLM details, adapted from the book Nonparametric Regression and Generalized Linear Models, by Green and Silverman. The responses Y i have density
More informationGeneralized linear models
Generalized linear models Outline for today What is a generalized linear model Linear predictors and link functions Example: estimate a proportion Analysis of deviance Example: fit dose- response data
More informationGeneralized Linear Models. stat 557 Heike Hofmann
Generalized Linear Models stat 557 Heike Hofmann Outline Intro to GLM Exponential Family Likelihood Equations GLM for Binomial Response Generalized Linear Models Three components: random, systematic, link
More informationLogistic regression. 11 Nov Logistic regression (EPFL) Applied Statistics 11 Nov / 20
Logistic regression 11 Nov 2010 Logistic regression (EPFL) Applied Statistics 11 Nov 2010 1 / 20 Modeling overview Want to capture important features of the relationship between a (set of) variable(s)
More informationParametric Modelling of Over-dispersed Count Data. Part III / MMath (Applied Statistics) 1
Parametric Modelling of Over-dispersed Count Data Part III / MMath (Applied Statistics) 1 Introduction Poisson regression is the de facto approach for handling count data What happens then when Poisson
More informationZERO INFLATED POISSON REGRESSION
STAT 6500 ZERO INFLATED POISSON REGRESSION FINAL PROJECT DEC 6 th, 2013 SUN JEON DEPARTMENT OF SOCIOLOGY UTAH STATE UNIVERSITY POISSON REGRESSION REVIEW INTRODUCING - ZERO-INFLATED POISSON REGRESSION SAS
More informationUNIVERSITY OF TORONTO Faculty of Arts and Science
UNIVERSITY OF TORONTO Faculty of Arts and Science December 2013 Final Examination STA442H1F/2101HF Methods of Applied Statistics Jerry Brunner Duration - 3 hours Aids: Calculator Model(s): Any calculator
More informationGeneralized Linear Models Introduction
Generalized Linear Models Introduction Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Generalized Linear Models For many problems, standard linear regression approaches don t work. Sometimes,
More informationStat/F&W Ecol/Hort 572 Review Points Ané, Spring 2010
1 Linear models Y = Xβ + ɛ with ɛ N (0, σ 2 e) or Y N (Xβ, σ 2 e) where the model matrix X contains the information on predictors and β includes all coefficients (intercept, slope(s) etc.). 1. Number of
More information11. Generalized Linear Models: An Introduction
Sociology 740 John Fox Lecture Notes 11. Generalized Linear Models: An Introduction Copyright 2014 by John Fox Generalized Linear Models: An Introduction 1 1. Introduction I A synthesis due to Nelder and
More informationST3241 Categorical Data Analysis I Multicategory Logit Models. Logit Models For Nominal Responses
ST3241 Categorical Data Analysis I Multicategory Logit Models Logit Models For Nominal Responses 1 Models For Nominal Responses Y is nominal with J categories. Let {π 1,, π J } denote the response probabilities
More informationCorrelated Data: Linear Mixed Models with Random Intercepts
1 Correlated Data: Linear Mixed Models with Random Intercepts Mixed Effects Models This lecture introduces linear mixed effects models. Linear mixed models are a type of regression model, which generalise
More informationNotes for week 4 (part 2)
Notes for week 4 (part 2) Ben Bolker October 3, 2013 Licensed under the Creative Commons attribution-noncommercial license (http: //creativecommons.org/licenses/by-nc/3.0/). Please share & remix noncommercially,
More informationIntroduction to the R Statistical Computing Environment
Introduction to the R Statistical Computing Environment John Fox McMaster University ICPSR 2012 John Fox (McMaster University) Introduction to R ICPSR 2012 1 / 34 Outline Getting Started with R Statistical
More informationGeneralized Linear Models
Generalized Linear Models Advanced Methods for Data Analysis (36-402/36-608 Spring 2014 1 Generalized linear models 1.1 Introduction: two regressions So far we ve seen two canonical settings for regression.
More informationSAS Syntax and Output for Data Manipulation: CLDP 944 Example 3a page 1
CLDP 944 Example 3a page 1 From Between-Person to Within-Person Models for Longitudinal Data The models for this example come from Hoffman (2015) chapter 3 example 3a. We will be examining the extent to
More informationSpring RMC Professional Development Series January 14, Generalized Linear Mixed Models (GLMMs): Concepts and some Demonstrations
Spring RMC Professional Development Series January 14, 2016 Generalized Linear Mixed Models (GLMMs): Concepts and some Demonstrations Ann A. O Connell, Ed.D. Professor, Educational Studies (QREM) Director,
More informationLab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p )
Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p. 376-390) BIO656 2009 Goal: To see if a major health-care reform which took place in 1997 in Germany was
More informationGeneralized Linear Models (GLZ)
Generalized Linear Models (GLZ) Generalized Linear Models (GLZ) are an extension of the linear modeling process that allows models to be fit to data that follow probability distributions other than the
More informationA strategy for modelling count data which may have extra zeros
A strategy for modelling count data which may have extra zeros Alan Welsh Centre for Mathematics and its Applications Australian National University The Data Response is the number of Leadbeater s possum
More informationIntroduction (Alex Dmitrienko, Lilly) Web-based training program
Web-based training Introduction (Alex Dmitrienko, Lilly) Web-based training program http://www.amstat.org/sections/sbiop/webinarseries.html Four-part web-based training series Geert Verbeke (Katholieke
More informationRegression: Main Ideas Setting: Quantitative outcome with a quantitative explanatory variable. Example, cont.
TCELL 9/4/205 36-309/749 Experimental Design for Behavioral and Social Sciences Simple Regression Example Male black wheatear birds carry stones to the nest as a form of sexual display. Soler et al. wanted
More informationModeling Overdispersion
James H. Steiger Department of Psychology and Human Development Vanderbilt University Regression Modeling, 2009 1 Introduction 2 Introduction In this lecture we discuss the problem of overdispersion in
More informationGeneralized Models: Part 1
Generalized Models: Part 1 Topics: Introduction to generalized models Introduction to maximum likelihood estimation Models for binary outcomes Models for proportion outcomes Models for categorical outcomes
More informationLinear model A linear model assumes Y X N(µ(X),σ 2 I), And IE(Y X) = µ(x) = X β, 2/52
Statistics for Applications Chapter 10: Generalized Linear Models (GLMs) 1/52 Linear model A linear model assumes Y X N(µ(X),σ 2 I), And IE(Y X) = µ(x) = X β, 2/52 Components of a linear model The two
More informationGeneralized linear mixed models (GLMMs) for dependent compound risk models
Generalized linear mixed models (GLMMs) for dependent compound risk models Emiliano A. Valdez, PhD, FSA joint work with H. Jeong, J. Ahn and S. Park University of Connecticut Seminar Talk at Yonsei University
More informationNow consider the case where E(Y) = µ = Xβ and V (Y) = σ 2 G, where G is diagonal, but unknown.
Weighting We have seen that if E(Y) = Xβ and V (Y) = σ 2 G, where G is known, the model can be rewritten as a linear model. This is known as generalized least squares or, if G is diagonal, with trace(g)
More information36-463/663: Multilevel & Hierarchical Models
36-463/663: Multilevel & Hierarchical Models (P)review: in-class midterm Brian Junker 132E Baker Hall brian@stat.cmu.edu 1 In-class midterm Closed book, closed notes, closed electronics (otherwise I have
More informationGeneralised linear models. Response variable can take a number of different formats
Generalised linear models Response variable can take a number of different formats Structure Limitations of linear models and GLM theory GLM for count data GLM for presence \ absence data GLM for proportion
More informationValue Added Modeling
Value Added Modeling Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Background for VAMs Recall from previous lectures
More informationChapter 22: Log-linear regression for Poisson counts
Chapter 22: Log-linear regression for Poisson counts Exposure to ionizing radiation is recognized as a cancer risk. In the United States, EPA sets guidelines specifying upper limits on the amount of exposure
More information36-309/749 Experimental Design for Behavioral and Social Sciences. Sep. 22, 2015 Lecture 4: Linear Regression
36-309/749 Experimental Design for Behavioral and Social Sciences Sep. 22, 2015 Lecture 4: Linear Regression TCELL Simple Regression Example Male black wheatear birds carry stones to the nest as a form
More information