Loglinear models. STAT 526 Professor Olga Vitek

Size: px
Start display at page:

Download "Loglinear models. STAT 526 Professor Olga Vitek"

Transcription

1 Loglinear models STAT 526 Professor Olga Vitek April 19,

2 Can Use Poisson Likelihood To Model Both Poisson and Multinomial Counts 8-1

3 Recall: Poisson Distribution Probability distribution: Y - number of events in a fixed interval of space/time Y P oisson(λ) p(y) = e λ λ y y!, y = 0, 1,...; E(Y ) = var(y ) = λ Y 1, Y 2,..., Y c ind P oisson(λ i ), c i=1 Y i P oisson( c i=1 λ i ) c indep. Poisson r.v. total Multinomial P (Y 1 = n 1,..., Y c = n c = P (Y 1 = n 1,..., Y c = n c ) P ( i Y i = n) Y i = n) i = [ exp( λ i )λ n i i /n i! ] i exp( λ i ) ( λ i ) n /n! = n! n i! i i i i π n i i, π i = λ i λ i i 8-2

4 Models for Joint Distributions of Unordered Categorical Variables 8-3

5 Joint Distributions of Categorical Variables Convenient to model contingency tables two-way, but also more complex tables can express complex probabilistic relationships Treat all categorical variables symmetrically no distinction between predictor and response analogous to correlation of continuous variables Can be thought of as a model for a network of associations between categorical variables related to graphical models Example: modeling functional networks of genes (e.g. activated/non-activated ; substitutions of nucleotides) 8-4

6 2 R.V.: Independence Y ij P oisson(λ ij ) Of interest: effect of row i and column j on Y ij General model (Faraway Ch. 4): log E{Y ij } notation = log λ ij = log n π ij Assuming independence of rows and columns: log E{Y ij } notation = log n π i π j = log n + log π i + log π j = µ + α i + β j, where i e α i = j e β j = 1 ML estimation with Poisson likelihood ˆπ ij = eˆα i eˆβ j = ˆπ i ˆπ j ; ˆλ ij = n ˆπ ij Total number of parameters 1+(I 1)+(J 1) Same ˆλ ij as in X 2 test for independence Can use X 2 and G 2 tests to test goodness of fit 8-5

7 2 R.V.: Independence Alternative parametrization (Agresti Ch.8) log E{Y ij } = µ + α i + β j, α I = β J = 0 µ = log E{Y IJ } α i and β j are deviations of E{Y ij } from the reference cell (I, J) due to row i and column j Parametrization in R α 1 = β 1 = 0 and µ = log E{Y 11 } Will use this parametrization from now on. ML estimation with Poisson likelihood ˆλ ij = eˆµ+ˆα i+ˆβ j equivalent = n i+ n +j /n ˆπ ij Slide 2 = = i λ ij j λ ij = i eˆµ+ˆα i+ˆβ j j eˆµ+ˆα i+ˆβ j = eˆα i i eˆα i eˆβ j j eˆβ j = ˆπ i ˆπ j equivalent = n i+ n +j /n 2 As in ANOVA, all parametrizations produce identical estimates of probabilities and counts 8-6

8 2 R.V.: Saturated model Saturated model log E{Y ij } = µ + α i + β j + αβ ij µ = log E{Y 11 }, α 1 = β 1 = αβ i1 = αβ 1j = 0 Total number of parameters 1 + (I 1) + (J 1) + (I 1)(J 1) = IJ (i.e. describes each cell perfectly) ML estimation with Poisson likelihood Model diagnostics developed for Poisson regression (e.g. residuals) apply Test for independence of rows and columns H 0 : αβ ij = 0 vs H 0 : αβ ij 0 LR (G 2 ) test with (I 1)(J 1) df 8-7

9 3 R.V.: Mutual Indep. 3-way I J K cross-classification of r.v. X, Y and Z Assume the count Y ijk P oisson( E{Y ijk } ) X, Y and Z are mutually independent if π ijk = π i π j π k log E{Y ijk } = log n + log π i + log π j + log π k Total number of parameters 1 + (I 1) + (J 1) + (K 1) The log-linear model is log E{Y ijk } = µ + α i + β j + γ k µ = log E{Y 111 }, α 1 = β 1 = γ 1 = 0 ˆλ ijk = eˆµ+ˆα i+ˆβ j +ˆγ k equivalent = n i++ n +j+ n ++k /n 2 Slide 2 ˆπ ijk = i j eˆµ+ˆα i+ˆβ j +ˆγ k = eˆαi k eˆµ+ˆα i+ˆβ j +ˆγ k i eˆα i eˆβ j j eˆβ j eˆγ k k eˆγ k = ˆπ i ˆπ j ˆπ k equivalent = n i++ n +j+ n ++k /n 3 8-8

10 Example: Female Smoking A survey of women by age, and a follow-up study 20 years later. library(faraway) data(femsmoke) > head(femsmoke) y smoker dead age 1 2 yes yes no yes yes yes no yes yes yes no yes ct3 <- xtabs(y~smoker+dead+age, femsmoke) > ct3,, age = dead smoker yes no yes 2 53 no 1 61,, age = dead smoker yes no yes no

11 Example: Female Smoking Pearson X 2 test of mutual independence > summary(ct3) Call: xtabs(formula=y~smoker+dead+age, data=femsmoke) Number of cases in table: 1314 Number of factors: 3 Test for independence of all factors: Chisq = 790.6, df = 19, p-value = 2.140e-155 Log-linear model with mutual independence > fit1 <- glm(y~smoker+dead+age, femsmoke, family="poisson") Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) < 2e-16 *** smokerno e-05 *** deadno < 2e-16 *** age e-15 *** age e-09 *** age e-07 *** age e-10 *** age ** age ** (Dispersion parameter for poisson family taken to be 1) Null deviance: on 27 degrees of freedom Residual deviance: on 19 degrees of freedom AIC:

12 3 R.V.: Joint Independence Assume the count Y ijk P oisson( E{Y ijk } ) X and Y are dependent, but together they are independent of Z π ijk = π ij π k log E{Y ijk } = log n + log π ij + log π k Total number of parameters 1 + (IJ 1) + (K 1) The log-linear model is log E{Y ijk } = µ + α i + β j + αβ ij + γ k µ = log E{Y 111 }, α 1 = β 1 = γ 1 = αβ 1j = αβ i1 = 0 ˆλ ijk Slide 2 = eˆµ+ˆα i+ˆβ j + αβ ij +ˆγ k equivalent = n ij+ n ++k /n ˆπ ijk = i j eˆµ+ˆα i+ˆβ j + αβ ij +ˆγ k = k eˆµ+ˆα i+ˆβ j + αβ ij +ˆγ k i eˆα i+ˆβ j + αβ ij j eˆα i+ˆβ j + αβ ij eˆγ k k eˆγ k = ˆπ ij ˆπ k equivalent = n ij+ n ++k /n

13 Example: Female Smoking Model joint independence of smoker and dead from age (i.e. smoker and dead are dependent, but jointly independent of age). Only a minor improvement of model fit > fit2 <- glm(y~smoker*dead+age, femsmoke, family="poisson") Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) < 2e-16 *** smokerno e-06 *** deadno < 2e-16 *** age e-15 *** age e-09 *** age e-07 *** age e-10 *** age ** age ** smokerno:deadno ** (Dispersion parameter for poisson family taken to be 1) Null deviance: on 27 degrees of freedom Residual deviance: on 18 degrees of freedom AIC:

14 3 R.V.: Conditional Indep. P {X = i} and P {Y = j} are independent, given Z = k π ij k = π i k π j k weaker than mutual or joint independence The joint probability is then π ijk = π i k π j k π k = π ik π πjk k π π k k = π ikπ jk π k log E{Y ijk } = log n + log π ik + log π jk log π k The log-linear model is log E{Y ijk } = µ + α i + β j + γ k + αγ ik + βγ jk µ = log E{Y 111 }, α 1 = β 1 = γ 1 = αγ 1k = αγ i1 = βγ 1k = βγ j1 = 0 ˆπ ijk = = i j eˆµ+ˆα i+ˆβ j +ˆγ k + αγ ik + βγ jk k eˆµ+ˆα i+ˆβ j +ˆγ k + αγ ik + βγ jk eˆα i+ˆγ k + αγ ik i k eˆα i+ˆγ k + αγ ik j eˆβ j +ˆγ k + βγ jk k eˆβ j +ˆγ k + βγ jk k ˆγ k e ˆγ k 8-13

15 Example: Female Smoking Conditional indep. of (smoke, dead age) > fit3<-glm(y~smoker*age+dead*age,femsmoke,family="poisson") Estimate Std. Error z value Pr(> z ) (Intercept) smokerno age age ** age e-06 *** age e-09 *** age e-07 *** age *** deadno e-10 *** smokerno:age smokerno:age smokerno:age ** smokerno:age smokerno:age e-05 *** smokerno:age e-05 *** age25-34:deadno age35-44:deadno * age45-54:deadno *** age55-64:deadno e-07 *** age65-74:deadno e-16 *** age75+:deadno (Dispersion parameter for poisson family taken to be 1) Null deviance: on 27 degrees of freedom Residual deviance: on 7 degrees of freedom AIC:

16 3 R.V.: Uniform (Homogeneous) Association For each level of one variable, same association of the other two variables π ijk = π ij π jk π ik log E{Y ijk } = log n + log π ij + log π jk + log π ik The log-linear model is log E{Y ijk } = µ + α i + β j + γ k + αγ ik + βγ jk + αβ ij µ = log E{Y 111 }, α 1 = β 1 = γ k = αγ 1k = αγ i1 = βγ 1k = βγ j1 = αβ 1j + αβ i1 = 0 Not a saturated model, since no 3-way interaction ˆπ ijk = i j eˆµ+ˆα i+ˆβ j +ˆγ k + αγ ik + βγ jk + αβ ij k eˆµ+ˆα i+ˆβ j +ˆγ k + αγ ik + βγ jk + αβ ij = eˆα i+ˆγ k + αγ ik i k eˆα i+ˆγ k + αγ ik j eˆβ j +ˆγ k + βγ jk k eˆβ j +ˆγ k + βγ jk i eˆα i+ˆβ j + αβ ij j eˆα i+ˆβ j + αβ ij = ˆπ ij ˆπ jk ˆπ ik 8-15

17 Interpretation of Uniform Association Constant odds ratios between the levels of two variables, for each level of the third variable e.g. for i = 1, 2, j = 1, 2 and a given level k: log OR = log λ 11k λ 22k λ 12k λ 21k = αβ 11 + αβ 22 αβ 12 αβ 21 independent of k No easy way to estimate ˆλ ijk and ˆπ ijk based on cell counts 8-16

18 Example: Female Smoking > fit4 <- glm(y~smoker+age+dead+smoker:age+ smoker:dead+dead:age,femsmoke,family="poisson") Estimate Std. Error z value Pr(> z ) (Intercept) smokerno age age ** age e-06 *** age e-08 *** age e-06 *** age ** deadno e-09 *** smokerno:age smokerno:age smokerno:age * smokerno:age smokerno:age e-07 *** smokerno:age e-06 *** smokerno:deadno * age25-34:deadno age35-44:deadno * age45-54:deadno *** age55-64:deadno e-07 *** age65-74:deadno < 2e-16 *** age75+:deadno (Dispersion parameter for poisson family taken to be 1) Null deviance: on 27 degrees of freedom Residual deviance: on 6 degrees of freedom AIC:

19 3 R.V.: ML Estimation Joint Poisson probability of cell counts Y ijk i j k e λ ijk λ n ijk ijk n ijk! The log-likelihood l(µ) = i j k n ijk log λ ijk i j k λ ijk + C For the model with joint independence l(λ) = nµ + n i++ α i + n +j+ β j + i j k e µ+α i+β j +γ k + C i j k n ++k γ k n i++, n +j+, n ++k are sufficient statistics parameters are estimated in these terms 8-18

20 Loglinear Models Summary Y ijk - count in cell (i, j, k); Y ijk P oisson(λ ijk ) Conditional on n = ijk n ijk, Y ijk Multinom(π ijk ). µ ijk = log E{Y 111 } - reference cell α i, β j, γ k - deviations of log E{Y ijk } from reference; α 1 = β 1 = γ 1 = 0. Residual Df = IJK # model params Model log E{Y ijk } = Mut. Indep µ + α i + β j + γ k Joint Indep. µ + α i + β j + γ k + (αβ) ij Cond. Indep. µ + α i + β j + γ k + (αγ) ik + (βγ) jk Unif. Assoc. µ + α i + β j + γ k + (αβ) ij + (αγ) ik + (βγ) jk Saturated µ + α i + β j + γ k + (αβ) ij + (αγ) ik + (βγ) jk + (αβγ) ijk Model π ijk = ˆλ ijk = Mut. Indep π i π j π k n i++ n +j+ n ++k /n 2 Joint Indep. π ij π k n ij+ n ++k /n Cond. Indep. π ik π jk /π k n i+k n +jk /n ++k Unif. Assoc. π ij π ik π jk Iterative Saturated π ijk n ijk 8-19

21 Models for Joint Distributions of Ordered Categorical Variables 8-20

22 2 R.V.: Linear-by-Linear Association Y ij P oisson(λ ij ) Of interest: effect of row i and column j on Y ij Assign scores u i to rows, u 1 u 2... u I Assign scores v j to columns, v 1 v 2... v J Log-linear model: log E{Y ij } notation = log λ ij = log n π ij = log n + α i + β j + γu i v j The log-linear model: log E{Y ij } = µ + α i + β j + γu i v j, where α 1 = β 1 = 0 µ = log E{Y 11 } γu 1 v 1, (= log E{Y 11 } when u 1 = v 1 coded as = 0) γ - quantifies (positive or negative) association Check sensitivity of conclusions to score coding 8-21

23 Interpretation of Linear-by-Linear Association Constant log-odds ratios for equally spaced scores e.g. for adjacent entries in both rows and columns of the table: log OR = log λ ij λ i+1, j+1 λ i, j+1 λ i+1, j = γ(u i+1 u i )(v j+1 v j ) same for non-adjacent equally-spaced scores 8-22

24 Example: Vote by Education Voting preference in 1996 pres. election > library(faraway) > data(nes96) > xtabs(~pid+educ, nes96) educ PID MS HSdrop HS Coll CCdeg BAdeg MAdeg strdem weakdem inddem indind indrep weakrep strrep Introduce scores u i and v i partyed$opid <- unclass(partyed$pid) partyed$oeduc <- unclass(partyed$educ) > partyed PID educ Freq opid oeduc 1 strdem MS weakdem MS inddem MS indind MS indrep MS weakrep MS

25 Example: Vote by Education Fit additive model (i.e. independence) Ignore potential order in the categories > fit5 <- glm(freq ~ PID + educ, partyed, family=poisson) Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) *** PIDweakDem PIDindDem e-07 *** PIDindind < 2e-16 *** PIDindRep e-09 *** PIDweakRep ** PIDstrRep educhsdrop e-06 *** educhs < 2e-16 *** educcoll < 2e-16 *** educccdeg e-11 *** educbadeg < 2e-16 *** educmadeg e-15 *** (Dispersion parameter for poisson family taken to be 1) Null deviance: on 48 degrees of freedom Residual deviance: on 36 degrees of freedom AIC:

26 Example: Vote by Education Incorporate the quantitative scores > fit6 <- glm(freq~pid+educ+i(opid*oeduc), partyed,family=poisson) Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) e-05 *** PIDweakDem * PIDindDem e-09 *** PIDindind < 2e-16 *** PIDindRep e-10 *** PIDweakRep e-05 *** PIDstrRep *** educhsdrop e-05 *** educhs < 2e-16 *** educcoll e-15 *** educccdeg e-06 *** educbadeg e-12 *** educmadeg e-06 *** I(oPID * oeduc) ** (Dispersion parameter for poisson family taken to be 1) Null deviance: on 48 degrees of freedom Residual deviance: on 35 degrees of freedom AIC:

27 2 R.V.: Column-Effect Model Y ij P oisson(λ ij ) Ordinal-by-nominal model (i.e. columns are not assigned scores) Treat education as nominal, but political preference as ordinal with scores u i, u 1... u I Log-linear model: log E{Y ij } notation = log λ ij = log n π ij = log n + α i + β j + γ j u i The log-linear model: log E{Y ij } = µ + α i + β j + γ j u i, where α 1 = β 1 = γ J = 0 µ = log E{Y 11 } γ 1 u 1, (= log E{Y 11 } when u 1 coded as = 0) γ j - separate parameter of u i for each column ˆγ j roughly equally spaced monotone if linear-by-linear model is appropriate 8-26

28 Constraints on γ j in Column-Effect Model An example of a 2 3 table: [ ] Y11 Y 12 Y 13 Y 21 Y 22 Y 23 In matrix form, setting u 1 = 1 and u 2 = 2: log E Y 11 Y 12 Y 13 Y 21 Y 22 Y 23 = µ α 2 β 2 β 3 γ 1 γ 2 α 1 and β 1 are constrained to avoid multicollinearity with intercept γ 3 is constrained to avoid multicollinearity with columns corresponding to µ and α2 constraint on γ J ensures the same interpretation of the intercept? 8-27

29 Example: Vote by Education Column-Effect Model > fit7<-glm(freq~pid+educ+educ:opid,partyed,family=poisson) Coefficients: (1 not defined because of singularities) Estimate Std. Error z value Pr(> z ) (Intercept) e-05 *** PIDweakDem PIDindDem e-05 *** PIDindind e-14 *** PIDindRep *** PIDweakRep PIDstrRep educhsdrop * educhs e-06 *** educcoll *** educccdeg educbadeg *** educmadeg * educms:opid * educhsdrop:opid * educhs:opid educcoll:opid educccdeg:opid educbadeg:opid educmadeg:opid NA NA NA NA Null deviance: on 48 degrees of freedom Residual deviance: on 30 degrees of freedom AIC:

30 Ordinal Models Summary Y ij - count in row i, column j; Y ij P oisson(λ ij ) Conditional on i Nominal Categories α i, β j - row and column effects, j n ij, Y ij Multinomial(π ij ). I i=1 α i = J j=1 β j = I i=1 (αβ) ij = J j=1 (αβ) ij = 0 Ordinal Categories u i, v j - continuous scores of rows/columns γ or γ i, γ j - parameters, I i=1 γ i = J j=1 γ j = 0. Model log E{Y ij } = Residual Df Independence µ + α i + β j (I 1)(J 1) Linear-by-linear µ + α i + β j + γ(u i v j ) (I 1)(J 1) 1 Row-effect µ + α i + β j + γ i v j (I 1)(J 2) Column-effect µ + α i + β j + γ j u i (I-2)(J-1) Saturated µ + α i + β j + (αβ) ij

31 Multinomial Response as Function of Predictors: Surrogate Log Linear Models 8-30

32 Example: Housing Satisfaction of householders with housing (Venable and Ripley Sec. 7.3) > head(housing) Sat Infl Type Cont Freq 1 Low Low Tower Low 21 2 Medium Low Tower Low 21 3 High Low Tower Low 28 4 Low Medium Tower Low 34 5 Medium Medium Tower Low 22 6 High Medium Tower Low > xtabs(freq~infl+type+cont, data=housing),, Cont = Low Type Infl Tower Apartment Atrium Terrace Low Medium High ,, Cont = High Type Infl Tower Apartment Atrium Terrace Low Medium High

33 Null Model Model Sat as multinomial response; Influence, Contact and Type as predictors A different offset per covariate pattern Offset = 3-way interaction of all predictors Same probabilities or response categories across all covariate patterns log E{Y ijkl } = µ ijk + δ l = [ µ + α i + β j + γ k + (αβ) ij + (αγ) ik + (βγ) jk + (αβγ) ijk ] + δl Constraints on α, β, γ, δ and on the interactions > fit <- glm(freq ~ Infl*Type*Cont + Sat, family=poisson, data=housing) Coefficients: Estimate Std. Error z value Pr(> z ) (Intercept) 3.136e e < 2e-16 *** InflMedium 2.733e e InflHigh e e TypeApartment 3.666e e * TypeAtrium e e *** TypeTerrace e e ***... (Dispersion parameter for poisson family taken to be 1) Null deviance: on 71 degrees of freedom Residual deviance: on 46 degrees of freedom 8-32

34 Additive Contribution of Individual Predictors Testing whether Sat depends on each of the 3 predictors individually A different offset per covariate pattern The probabilities of response categories are affected by one predictor across all covariate patterns log E{Y ijkl } = µ ijk + δ l + (αδ) il, or log E{Y ijkl } = µ ijk + δ l + (βδ) jl, or log E{Y ijkl } = µ ijk + δ l + (γδ) kl Constraints on α, β, γ, δ and on the interactions > addterm(fit, ~. + Sat:(Infl+Type+Cont), test="chisq") Single term additions Model: Freq ~ Infl * Type * Cont + Sat Df Deviance AIC LRT Pr(Chi) <none> Infl:Sat < 2.2e-16 *** Type:Sat e-11 *** Cont:Sat Infl: max reduction in resid. deviance & AIC 8-33

35 Additive Contributions of All Predictors Add main effects of all predictors A different offset per covariate pattern Same effect of each predictor on probabilities of response categories, regardless of the value of the other predictors Constraints on α, β, γ, δ and on the interactions log E{Y ijkl } = µ ijk + δ l + (αδ) il + (βδ) jl + (γδ) kl fit1 <- update(fit,.~. + Sat:(Infl+Type+Cont)) Residual deviance: on 34 degrees of freedom Add higher-order interactions to represent non-additive effects of predictors on Sat log E{Y ijkl } = µ ijk + δ l + (αδ) il + (βδ) jl + (γδ) kl (αβδ) ijl + (αγδ) ikl + (βγδ) jkl addterm(fit1,.~.+sat:(infl+type+cont)^2, test="chisq") None significant Next analysis steps: plot predicted probabilities and counts; analysis of residuals 8-34

36 Compare to Multinom. Reg. Multinomial regression: > library(nnet) > fit.multinom <- multinom(sat ~ Infl + Type + Cont, weights=freq, data=housing) Coefficients: (Intercept) InflMedium InflHigh TypeApartment Medium High Residual Deviance: Different deviances due to different saturated models. In multinom the saturated model models subjects; in surrogate linear model it models covariate pattern Can compare the predicted probabilities p1 <- predict(fit.multinom, type="probs") Saturated model with multinom fit.saturated <- multinom(sat ~ Infl * Type * Cont, weights=freq, data=housing) anova(fit.multinom, fit.saturated) LR test statistic = residual deviance in surrogate linear model. 8-35

37 Models with Poisson Likelihood: Summary Model E{response} as function of predictors Count response: Poisson regression Count response with overdispersion: Quasipoisson or Negative Binomial regression Multinomial response: Surrogate log linear models Multivariate associations of categorical variables in contingency tables Nominal random variables: Loglinear models Ordinal random variables: Linear-by-linear model Row-effect and column-effect models 8-36

STAT 526 Advanced Statistical Methodology

STAT 526 Advanced Statistical Methodology STAT 526 Advanced Statistical Methodology Fall 2017 Lecture Note 7 Contingency Table 0-0 Outline Introduction to Contingency Tables Testing Independence in Two-Way Contingency Tables Modeling Ordinal Associations

More information

Homework 10 - Solution

Homework 10 - Solution STAT 526 - Spring 2011 Homework 10 - Solution Olga Vitek Each part of the problems 5 points 1. Faraway Ch. 4 problem 1 (page 93) : The dataset parstum contains cross-classified data on marijuana usage

More information

Proportional Odds Logistic Regression. stat 557 Heike Hofmann

Proportional Odds Logistic Regression. stat 557 Heike Hofmann Proportional Odds Logistic Regression stat 557 Heike Hofmann Outline Proportional Odds Logistic Regression Model Definition Properties Latent Variables Intro to Loglinear Models Ordinal Response Y is categorical

More information

Log-linear Models for Contingency Tables

Log-linear Models for Contingency Tables Log-linear Models for Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Log-linear Models for Two-way Contingency Tables Example: Business Administration Majors and Gender A

More information

MSH3 Generalized linear model

MSH3 Generalized linear model Contents MSH3 Generalized linear model 7 Log-Linear Model 231 7.1 Equivalence between GOF measures........... 231 7.2 Sampling distribution................... 234 7.3 Interpreting Log-Linear models..............

More information

Categorical Variables and Contingency Tables: Description and Inference

Categorical Variables and Contingency Tables: Description and Inference Categorical Variables and Contingency Tables: Description and Inference STAT 526 Professor Olga Vitek March 3, 2011 Reading: Agresti Ch. 1, 2 and 3 Faraway Ch. 4 3 Univariate Binomial and Multinomial Measurements

More information

Poisson Regression. The Training Data

Poisson Regression. The Training Data The Training Data Poisson Regression Office workers at a large insurance company are randomly assigned to one of 3 computer use training programmes, and their number of calls to IT support during the following

More information

STA 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). 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 information

STA 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). 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 information

Correspondence Analysis

Correspondence Analysis Correspondence Analysis Q: when independence of a 2-way contingency table is rejected, how to know where the dependence is coming from? The interaction terms in a GLM contain dependence information; however,

More information

ST3241 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 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 information

Ch 6: Multicategory Logit Models

Ch 6: Multicategory Logit Models 293 Ch 6: Multicategory Logit Models Y has J categories, J>2. Extensions of logistic regression for nominal and ordinal Y assume a multinomial distribution for Y. In R, we will fit these models using the

More information

Stat 8053, Fall 2013: Multinomial Logistic Models

Stat 8053, Fall 2013: Multinomial Logistic Models Stat 8053, Fall 2013: Multinomial Logistic Models Here is the example on page 269 of Agresti on food preference of alligators: s is size class, g is sex of the alligator, l is name of the lake, and f is

More information

Multinomial Logistic Regression Models

Multinomial Logistic Regression Models Stat 544, Lecture 19 1 Multinomial Logistic Regression Models Polytomous responses. Logistic regression can be extended to handle responses that are polytomous, i.e. taking r>2 categories. (Note: The word

More information

8 Nominal and Ordinal Logistic Regression

8 Nominal and Ordinal Logistic Regression 8 Nominal and Ordinal Logistic Regression 8.1 Introduction If the response variable is categorical, with more then two categories, then there are two options for generalized linear models. One relies on

More information

Poisson Regression. Gelman & Hill Chapter 6. February 6, 2017

Poisson Regression. Gelman & Hill Chapter 6. February 6, 2017 Poisson Regression Gelman & Hill Chapter 6 February 6, 2017 Military Coups Background: Sub-Sahara Africa has experienced a high proportion of regime changes due to military takeover of governments for

More information

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as

ij i j m ij n ij m ij n i j Suppose we denote the row variable by X and the column variable by Y ; We can then re-write the above expression as page1 Loglinear Models Loglinear models are a way to describe association and interaction patterns among categorical variables. They are commonly used to model cell counts in contingency tables. These

More information

Stat 315c: Transposable Data Rasch model and friends

Stat 315c: Transposable Data Rasch model and friends Stat 315c: Transposable Data Rasch model and friends Art B. Owen Stanford Statistics Art B. Owen (Stanford Statistics) Rasch and friends 1 / 14 Categorical data analysis Anova has a problem with too much

More information

Homework 5 - Solution

Homework 5 - Solution STAT 526 - Spring 2011 Homework 5 - Solution Olga Vitek Each part of the problems 5 points 1. Agresti 10.1 (a) and (b). Let Patient Die Suicide Yes No sum Yes 1097 90 1187 No 203 435 638 sum 1300 525 1825

More information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: )

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) ST3241 Categorical Data Analysis. (Semester II: ) NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION (SOLUTIONS) Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3

More information

Linear Regression Models P8111

Linear 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 information

STAT 526 Spring Final Exam. Thursday May 5, 2011

STAT 526 Spring Final Exam. Thursday May 5, 2011 STAT 526 Spring 2011 Final Exam Thursday May 5, 2011 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points will

More information

2 Describing Contingency Tables

2 Describing Contingency Tables 2 Describing Contingency Tables I. Probability structure of a 2-way contingency table I.1 Contingency Tables X, Y : cat. var. Y usually random (except in a case-control study), response; X can be random

More information

Generalized linear models

Generalized 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 information

Various Issues in Fitting Contingency Tables

Various Issues in Fitting Contingency Tables Various Issues in Fitting Contingency Tables Statistics 149 Spring 2006 Copyright 2006 by Mark E. Irwin Complete Tables with Zero Entries In contingency tables, it is possible to have zero entries in a

More information

Two Hours. Mathematical formula books and statistical tables are to be provided THE UNIVERSITY OF MANCHESTER. 26 May :00 16:00

Two 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 information

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours

NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION. ST3241 Categorical Data Analysis. (Semester II: ) April/May, 2011 Time Allowed : 2 Hours NATIONAL UNIVERSITY OF SINGAPORE EXAMINATION Categorical Data Analysis (Semester II: 2010 2011) April/May, 2011 Time Allowed : 2 Hours Matriculation No: Seat No: Grade Table Question 1 2 3 4 5 6 Full marks

More information

Describing Contingency tables

Describing Contingency tables Today s topics: Describing Contingency tables 1. Probability structure for contingency tables (distributions, sensitivity/specificity, sampling schemes). 2. Comparing two proportions (relative risk, odds

More information

Review of Multinomial Distribution If n trials are performed: in each trial there are J > 2 possible outcomes (categories) Multicategory Logit Models

Review of Multinomial Distribution If n trials are performed: in each trial there are J > 2 possible outcomes (categories) Multicategory Logit Models Chapter 6 Multicategory Logit Models Response Y has J > 2 categories. Extensions of logistic regression for nominal and ordinal Y assume a multinomial distribution for Y. 6.1 Logit Models for Nominal Responses

More information

Normal 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,

Normal 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 information

Review: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:

Review: 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 information

STAT 526 Spring Midterm 1. Wednesday February 2, 2011

STAT 526 Spring Midterm 1. Wednesday February 2, 2011 STAT 526 Spring 2011 Midterm 1 Wednesday February 2, 2011 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points

More information

Solution to Tutorial 7

Solution to Tutorial 7 1. (a) We first fit the independence model ST3241 Categorical Data Analysis I Semester II, 2012-2013 Solution to Tutorial 7 log µ ij = λ + λ X i + λ Y j, i = 1, 2, j = 1, 2. The parameter estimates are

More information

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links

Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Communications of the Korean Statistical Society 2009, Vol 16, No 4, 697 705 Goodness-of-Fit Tests for the Ordinal Response Models with Misspecified Links Kwang Mo Jeong a, Hyun Yung Lee 1, a a Department

More information

UNIVERSITY 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 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 information

9 Generalized Linear Models

9 Generalized Linear Models 9 Generalized Linear Models The Generalized Linear Model (GLM) is a model which has been built to include a wide range of different models you already know, e.g. ANOVA and multiple linear regression models

More information

A Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46

A Generalized Linear Model for Binomial Response Data. Copyright c 2017 Dan Nettleton (Iowa State University) Statistics / 46 A Generalized Linear Model for Binomial Response Data Copyright c 2017 Dan Nettleton (Iowa State University) Statistics 510 1 / 46 Now suppose that instead of a Bernoulli response, we have a binomial response

More information

Review. 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 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 information

Poisson Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University

Poisson Regression. James H. Steiger. Department of Psychology and Human Development Vanderbilt University Poisson Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University James H. Steiger (Vanderbilt University) Poisson Regression 1 / 49 Poisson Regression 1 Introduction

More information

Sample solutions. Stat 8051 Homework 8

Sample solutions. Stat 8051 Homework 8 Sample solutions Stat 8051 Homework 8 Problem 1: Faraway Exercise 3.1 A plot of the time series reveals kind of a fluctuating pattern: Trying to fit poisson regression models yields a quadratic model if

More information

Lecture 14: Introduction to Poisson Regression

Lecture 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 information

Modelling counts. Lecture 14: Introduction to Poisson Regression. Overview

Modelling 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 information

Sections 3.4, 3.5. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis

Sections 3.4, 3.5. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis Sections 3.4, 3.5 Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1 / 22 3.4 I J tables with ordinal outcomes Tests that take advantage of ordinal

More information

Testing Independence

Testing Independence Testing Independence Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM 1/50 Testing Independence Previously, we looked at RR = OR = 1

More information

One-Way Tables and Goodness of Fit

One-Way Tables and Goodness of Fit Stat 504, Lecture 5 1 One-Way Tables and Goodness of Fit Key concepts: One-way Frequency Table Pearson goodness-of-fit statistic Deviance statistic Pearson residuals Objectives: Learn how to compute the

More information

STAT 705: Analysis of Contingency Tables

STAT 705: Analysis of Contingency Tables STAT 705: Analysis of Contingency Tables Timothy Hanson Department of Statistics, University of South Carolina Stat 705: Analysis of Contingency Tables 1 / 45 Outline of Part I: models and parameters Basic

More information

MSH3 Generalized linear model Ch. 6 Count data models

MSH3 Generalized linear model Ch. 6 Count data models Contents MSH3 Generalized linear model Ch. 6 Count data models 6 Count data model 208 6.1 Introduction: The Children Ever Born Data....... 208 6.2 The Poisson Distribution................. 210 6.3 Log-Linear

More information

A 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 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 information

Generalized logit models for nominal multinomial responses. Local odds ratios

Generalized logit models for nominal multinomial responses. Local odds ratios Generalized logit models for nominal multinomial responses Categorical Data Analysis, Summer 2015 1/17 Local odds ratios Y 1 2 3 4 1 π 11 π 12 π 13 π 14 π 1+ X 2 π 21 π 22 π 23 π 24 π 2+ 3 π 31 π 32 π

More information

Categorical Predictor Variables

Categorical Predictor Variables Categorical Predictor Variables We often wish to use categorical (or qualitative) variables as covariates in a regression model. For binary variables (taking on only 2 values, e.g. sex), it is relatively

More information

Statistical Methods III Statistics 212. Problem Set 2 - Answer Key

Statistical 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 information

Hypothesis Testing hypothesis testing approach

Hypothesis Testing hypothesis testing approach Hypothesis Testing In this case, we d be trying to form an inference about that neighborhood: Do people there shop more often those people who are members of the larger population To ascertain this, we

More information

Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3)

Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3) Stat 8053, Fall 2013: Poisson Regression (Faraway, 2.1 & 3) The random component y x Po(λ(x)), so E(y x) = λ(x) = Var(y x). Linear predictor η(x) = x β Link function log(e(y x)) = log(λ(x)) = η(x), for

More information

Simple logistic regression

Simple logistic regression Simple logistic regression Biometry 755 Spring 2009 Simple logistic regression p. 1/47 Model assumptions 1. The observed data are independent realizations of a binary response variable Y that follows a

More information

Categorical data analysis Chapter 5

Categorical data analysis Chapter 5 Categorical data analysis Chapter 5 Interpreting parameters in logistic regression The sign of β determines whether π(x) is increasing or decreasing as x increases. The rate of climb or descent increases

More information

Survival Analysis I (CHL5209H)

Survival Analysis I (CHL5209H) Survival Analysis Dalla Lana School of Public Health University of Toronto olli.saarela@utoronto.ca January 7, 2015 31-1 Literature Clayton D & Hills M (1993): Statistical Models in Epidemiology. Not really

More information

Lecture 8: Summary Measures

Lecture 8: Summary Measures Lecture 8: Summary Measures Dipankar Bandyopadhyay, Ph.D. BMTRY 711: Analysis of Categorical Data Spring 2011 Division of Biostatistics and Epidemiology Medical University of South Carolina Lecture 8:

More information

Generalized Linear Models

Generalized 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 information

Logistic Regression - problem 6.14

Logistic 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 information

Logistic Regressions. Stat 430

Logistic Regressions. Stat 430 Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to

More information

Sections 2.3, 2.4. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis 1 / 21

Sections 2.3, 2.4. Timothy Hanson. Department of Statistics, University of South Carolina. Stat 770: Categorical Data Analysis 1 / 21 Sections 2.3, 2.4 Timothy Hanson Department of Statistics, University of South Carolina Stat 770: Categorical Data Analysis 1 / 21 2.3 Partial association in stratified 2 2 tables In describing a relationship

More information

STA102 Class Notes Chapter Logistic Regression

STA102 Class Notes Chapter Logistic Regression STA0 Class Notes Chapter 0 0. Logistic Regression We continue to study the relationship between a response variable and one or more eplanatory variables. For SLR and MLR (Chapters 8 and 9), our response

More information

Lecture 12: Effect modification, and confounding in logistic regression

Lecture 12: Effect modification, and confounding in logistic regression Lecture 12: Effect modification, and confounding in logistic regression Ani Manichaikul amanicha@jhsph.edu 4 May 2007 Today Categorical predictor create dummy variables just like for linear regression

More information

Improving the Precision of Estimation by fitting a Generalized Linear Model, and Quasi-likelihood.

Improving the Precision of Estimation by fitting a Generalized Linear Model, and Quasi-likelihood. Improving the Precision of Estimation by fitting a Generalized Linear Model, and Quasi-likelihood. P.M.E.Altham, Statistical Laboratory, University of Cambridge June 27, 2006 This article was published

More information

LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R. Liang (Sally) Shan Nov. 4, 2014

LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R. Liang (Sally) Shan Nov. 4, 2014 LISA Short Course Series Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R Liang (Sally) Shan Nov. 4, 2014 L Laboratory for Interdisciplinary Statistical Analysis LISA helps VT researchers

More information

Chapter 4: Generalized Linear Models-II

Chapter 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 information

SCHOOL OF MATHEMATICS AND STATISTICS. Linear and Generalised Linear Models

SCHOOL 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 information

Non-Gaussian Response Variables

Non-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 information

Generalized linear models

Generalized 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 information

Lecture 01: Introduction

Lecture 01: Introduction Lecture 01: Introduction Dipankar Bandyopadhyay, Ph.D. BMTRY 711: Analysis of Categorical Data Spring 2011 Division of Biostatistics and Epidemiology Medical University of South Carolina Lecture 01: Introduction

More information

MSH3 Generalized linear model

MSH3 Generalized linear model Contents MSH3 Generalized linear model 5 Logit Models for Binary Data 173 5.1 The Bernoulli and binomial distributions......... 173 5.1.1 Mean, variance and higher order moments.... 173 5.1.2 Normal limit....................

More information

BMI 541/699 Lecture 22

BMI 541/699 Lecture 22 BMI 541/699 Lecture 22 Where we are: 1. Introduction and Experimental Design 2. Exploratory Data Analysis 3. Probability 4. T-based methods for continous variables 5. Power and sample size for t-based

More information

STAT 525 Fall Final exam. Tuesday December 14, 2010

STAT 525 Fall Final exam. Tuesday December 14, 2010 STAT 525 Fall 2010 Final exam Tuesday December 14, 2010 Time: 2 hours Name (please print): Show all your work and calculations. Partial credit will be given for work that is partially correct. Points will

More information

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2

Multilevel Models in Matrix Form. Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Multilevel Models in Matrix Form Lecture 7 July 27, 2011 Advanced Multivariate Statistical Methods ICPSR Summer Session #2 Today s Lecture Linear models from a matrix perspective An example of how to do

More information

Section 4.6 Simple Linear Regression

Section 4.6 Simple Linear Regression Section 4.6 Simple Linear Regression Objectives ˆ Basic philosophy of SLR and the regression assumptions ˆ Point & interval estimation of the model parameters, and how to make predictions ˆ Point and interval

More information

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution James V. Lambers Department of Mathematics The University of Southern Mississippi James V. Lambers Statistical Data Analysis

More information

Sections 4.1, 4.2, 4.3

Sections 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 information

Matched Pair Data. Stat 557 Heike Hofmann

Matched Pair Data. Stat 557 Heike Hofmann Matched Pair Data Stat 557 Heike Hofmann Outline Marginal Homogeneity - review Binary Response with covariates Ordinal response Symmetric Models Subject-specific vs Marginal Model conditional logistic

More information

Classification. Chapter Introduction. 6.2 The Bayes classifier

Classification. Chapter Introduction. 6.2 The Bayes classifier Chapter 6 Classification 6.1 Introduction Often encountered in applications is the situation where the response variable Y takes values in a finite set of labels. For example, the response Y could encode

More information

Data-analysis and Retrieval Ordinal Classification

Data-analysis and Retrieval Ordinal Classification Data-analysis and Retrieval Ordinal Classification Ad Feelders Universiteit Utrecht Data-analysis and Retrieval 1 / 30 Strongly disagree Ordinal Classification 1 2 3 4 5 0% (0) 10.5% (2) 21.1% (4) 42.1%

More information

Latent Class Analysis for Models with Error of Measurement Using Log-Linear Models and An Application to Women s Liberation Data

Latent Class Analysis for Models with Error of Measurement Using Log-Linear Models and An Application to Women s Liberation Data Journal of Data Science 9(2011), 43-54 Latent Class Analysis for Models with Error of Measurement Using Log-Linear Models and An Application to Women s Liberation Data Haydar Demirhan Hacettepe University

More information

STA 450/4000 S: January

STA 450/4000 S: January STA 450/4000 S: January 6 005 Notes Friday tutorial on R programming reminder office hours on - F; -4 R The book Modern Applied Statistics with S by Venables and Ripley is very useful. Make sure you have

More information

Regression models. Generalized linear models in R. Normal regression models are not always appropriate. Generalized linear models. Examples.

Regression 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 information

Neural networks (not in book)

Neural networks (not in book) (not in book) Another approach to classification is neural networks. were developed in the 1980s as a way to model how learning occurs in the brain. There was therefore wide interest in neural networks

More information

Review of One-way Tables and SAS

Review of One-way Tables and SAS Stat 504, Lecture 7 1 Review of One-way Tables and SAS In-class exercises: Ex1, Ex2, and Ex3 from http://v8doc.sas.com/sashtml/proc/z0146708.htm To calculate p-value for a X 2 or G 2 in SAS: http://v8doc.sas.com/sashtml/lgref/z0245929.htmz0845409

More information

Class Notes: Week 8. Probit versus Logit Link Functions and Count Data

Class 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 information

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3

STA 303 H1S / 1002 HS Winter 2011 Test March 7, ab 1cde 2abcde 2fghij 3 STA 303 H1S / 1002 HS Winter 2011 Test March 7, 2011 LAST NAME: FIRST NAME: STUDENT NUMBER: ENROLLED IN: (circle one) STA 303 STA 1002 INSTRUCTIONS: Time: 90 minutes Aids allowed: calculator. Some formulae

More information

Stat/F&W Ecol/Hort 572 Review Points Ané, Spring 2010

Stat/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 information

Model Estimation Example

Model Estimation Example Ronald H. Heck 1 EDEP 606: Multivariate Methods (S2013) April 7, 2013 Model Estimation Example As we have moved through the course this semester, we have encountered the concept of model estimation. Discussions

More information

Correlation and regression

Correlation and regression 1 Correlation and regression Yongjua Laosiritaworn Introductory on Field Epidemiology 6 July 2015, Thailand Data 2 Illustrative data (Doll, 1955) 3 Scatter plot 4 Doll, 1955 5 6 Correlation coefficient,

More information

22s:152 Applied Linear Regression. RECALL: The Poisson distribution. Let Y be distributed as a Poisson random variable with the single parameter λ.

22s:152 Applied Linear Regression. RECALL: The Poisson distribution. Let Y be distributed as a Poisson random variable with the single parameter λ. 22s:152 Applied Linear Regression Chapter 15 Section 2: Poisson Regression RECALL: The Poisson distribution Let Y be distributed as a Poisson random variable with the single parameter λ. P (Y = y) = e

More information

Exam Applied Statistical Regression. Good Luck!

Exam Applied Statistical Regression. Good Luck! Dr. M. Dettling Summer 2011 Exam Applied Statistical Regression Approved: Tables: Note: Any written material, calculator (without communication facility). Attached. All tests have to be done at the 5%-level.

More information

STAT 7030: Categorical Data Analysis

STAT 7030: Categorical Data Analysis STAT 7030: Categorical Data Analysis 5. Logistic Regression Peng Zeng Department of Mathematics and Statistics Auburn University Fall 2012 Peng Zeng (Auburn University) STAT 7030 Lecture Notes Fall 2012

More information

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis

7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis Lecture 6: Logistic Regression Analysis Christopher S. Hollenbeak, PhD Jane R. Schubart, PhD The Outcomes Research Toolbox Review Homework 2 Overview Logistic regression model conceptually Logistic regression

More information

The material for categorical data follows Agresti closely.

The material for categorical data follows Agresti closely. Exam 2 is Wednesday March 8 4 sheets of notes The material for categorical data follows Agresti closely A categorical variable is one for which the measurement scale consists of a set of categories Categorical

More information

Generalized Linear Models

Generalized Linear Models Generalized Linear Models Methods@Manchester Summer School Manchester University July 2 6, 2018 Generalized Linear Models: a generic approach to statistical modelling www.research-training.net/manchester2018

More information

Adejumo, Heumann, Toutenburg: Modelling Negative Binomial as a substitute model to Poisson for raters agreement on ordinal scales with sparse data

Adejumo, Heumann, Toutenburg: Modelling Negative Binomial as a substitute model to Poisson for raters agreement on ordinal scales with sparse data Adejumo, Heumann, Toutenburg: Modelling Negative Binomial as a substitute model to Poisson for raters agreement on ordinal scales with sparse data Sonderforschungsbereich 386, Paper 387 (2004) Online unter:

More information

BIOS 625 Fall 2015 Homework Set 3 Solutions

BIOS 625 Fall 2015 Homework Set 3 Solutions BIOS 65 Fall 015 Homework Set 3 Solutions 1. Agresti.0 Table.1 is from an early study on the death penalty in Florida. Analyze these data and show that Simpson s Paradox occurs. Death Penalty Victim's

More information

Chapter 3: Generalized Linear Models

Chapter 3: Generalized Linear Models 92 Chapter 3: Generalized Linear Models 3.1 Components of a GLM 1. Random Component Identify response variable Y. Assume independent observations y 1,...,y n from particular family of distributions, e.g.,

More information

Interactions in Logistic Regression

Interactions in Logistic Regression Interactions in Logistic Regression > # UCBAdmissions is a 3-D table: Gender by Dept by Admit > # Same data in another format: > # One col for Yes counts, another for No counts. > Berkeley = read.table("http://www.utstat.toronto.edu/~brunner/312f12/

More information