1 Modeling Ordinal Associations Section 9.4 Roanna Gee.

Slides:



Advertisements
Similar presentations
Topic 12: Multiple Linear Regression
Advertisements

A. The Basic Principle We consider the multivariate extension of multiple linear regression – modeling the relationship between m responses Y 1,…,Y m and.
The %LRpowerCorr10 SAS Macro Power Estimation for Logistic Regression Models with Several Predictors of Interest in the Presence of Covariates D. Keith.
Simple Logistic Regression
The Chi-Square Test for Association
1 Contingency Tables: Tests for independence and homogeneity (§10.5) How to test hypotheses of independence (association) and homogeneity (similarity)
Loglinear Models for Independence and Interaction in Three-way Tables Veronica Estrada Robert Lagier.
Loglinear Contingency Table Analysis Karl L. Wuensch Dept of Psychology East Carolina University.
Generalized Linear Mixed Model English Premier League Soccer – 2003/2004 Season.
6.1.4 AIC, Model Selection, and the Correct Model oAny model is a simplification of reality oIf a model has relatively little bias, it tends to provide.
1 If we live with a deep sense of gratitude, our life will be greatly embellished.
April 25 Exam April 27 (bring calculator with exp) Cox-Regression
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang.
1 Experimental design and analyses of experimental data Lesson 6 Logistic regression Generalized Linear Models (GENMOD)
PSY 340 Statistics for the Social Sciences Chi-Squared Test of Independence Statistics for the Social Sciences Psychology 340 Spring 2010.
Adjusting for extraneous factors Topics for today Stratified analysis of 2x2 tables Regression Readings Jewell Chapter 9.
Linear statistical models 2009 Models for continuous, binary and binomial responses  Simple linear models regarded as special cases of GLMs  Simple linear.
Chapter 11 Survival Analysis Part 2. 2 Survival Analysis and Regression Combine lots of information Combine lots of information Look at several variables.
EPI 809/Spring Multiple Logistic Regression.
Sociology 601 Class12: October 8, 2009 The Chi-Squared Test (8.2) – expected frequencies – calculating Chi-square – finding p When (not) to use Chi-squared.
Deaths of snails vs exposure by species. Deaths of snails vs exposure by temperature.
Crosstabs and Chi Squares Computer Applications in Psychology.
OLS versus MLE Example YX Here is the data:
An Introduction to Logistic Regression
WLS for Categorical Data
Adjusting for extraneous factors Topics for today More on logistic regression analysis for binary data and how it relates to the Wolf and Mantel- Haenszel.
Linear statistical models 2009 Count data  Contingency tables and log-linear models  Poisson regression.
Logistic Regression with “Grouped” Data Lobster Survival by Size in a Tethering Experiment Source: E.B. Wilkinson, J.H. Grabowski, G.D. Sherwood, P.O.
Poisson Regression Caution Flags (Crashes) in NASCAR Winston Cup Races L. Winner (2006). “NASCAR Winston Cup Race Results for ,” Journal.
Logistic Regression II Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0.
AS 737 Categorical Data Analysis For Multivariate
Log-linear Models For 2-dimensional tables. Two-Factor ANOVA (Mean rot of potatoes) Bacteria Type Temp123 1=Cool 2=Warm.
Logistic Regression III: Advanced topics Conditional Logistic Regression for Matched Data Conditional Logistic Regression for Matched Data.
Regression Analysis (2)
April 11 Logistic Regression –Modeling interactions –Analysis of case-control studies –Data presentation.
EIPB 698E Lecture 10 Raul Cruz-Cano Fall Comments for future evaluations Include only output used for conclusions Mention p-values explicitly (also.
APPLICATION OF MULTIVARIATE ANALYSES TO FIND PREDICTORS OF MULTIPLE GESTATIONS FOLLOWING IN VITRO FERTILIZATION Krisztina Boda and Péter Kovács Department.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
2 December 2004PubH8420: Parametric Regression Models Slide 1 Applications - SAS Parametric Regression in SAS –PROC LIFEREG –PROC GENMOD –PROC LOGISTIC.
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
Introduction Many experiments result in measurements that are qualitative or categorical rather than quantitative. Humans classified by ethnic origin Hair.
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
GEE Approach Presented by Jianghu Dong Instructor: Professor Keumhee Chough (K.C.) Carrière.
1 Topic 2 LOGIT analysis of contingency tables. 2 Contingency table a cross classification Table containing two or more variables of classification, and.
FPP 28 Chi-square test. More types of inference for nominal variables Nominal data is categorical with more than two categories Compare observed frequencies.
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
Chapter 13 Inference for Counts: Chi-Square Tests © 2011 Pearson Education, Inc. 1 Business Statistics: A First Course.
1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements.
Applied Statistics Week 4 Exercise 3 Tick bites and suspicion of Borrelia Mihaela Frincu
1 STA 617 – Chp10 Models for matched pairs 10.4 Symmetry, Quasi-symmetry and Quasi-independence.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
Copyright © 2010 Pearson Education, Inc. Warm Up- Good Morning! If all the values of a data set are the same, all of the following must equal zero except.
Sigmoidal Response (knnl558.sas). Programming Example: knnl565.sas Y = completion of a programming task (1 = yes, 0 = no) X 2 = amount of programming.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
Logistic Regression Analysis Gerrit Rooks
Section 6.4 Inferences for Variances. Chi-square probability densities.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
University of Warwick, Department of Sociology, 2012/13 SO 201: SSAASS (Surveys and Statistics) (Richard Lampard) Logistic Regression II/ (Hierarchical)
Categorical Data Analysis
Analysis of matched data Analysis of matched data.
Determining and Interpreting Associations between Variables Cross-Tabs Chi-Square Correlation.
University of Warwick, Department of Sociology, 2014/15 SO 201: SSAASS (Surveys and Statistics) (Richard Lampard) Logistic Regression II/ (Hierarchical)
Caution Flags (Crashes) in NASCAR Winston Cup Races
ביצוע רגרסיה לוגיסטית. פרק ה-2
Categorical Data In Chapter 3 we introduced the idea of categorical data. In Chapter 15 we explored probability rules and when events are independent.
Modeling Ordinal Associations Bin Hu
Presentation transcript:

1 Modeling Ordinal Associations Section 9.4 Roanna Gee

2 National Opinion Survey 1991 General Social Survey Opinions were asked about a man and a woman having sexual relations before marriage.  Always Wrong  Almost Always  Wrong Only Sometimes  Not Wrong At All Opinions were also asked whether methods of birth control should be available to teenagers between the ages of 14 and 16.  Strongly Disagree  Disagree  Agree  Strongly Agree

3 Opinions on Premarital Sex and Teenage Birth Control Premarital Sex  i (row) Teenage Birth Control  j (column)   ij i Strongly DisagreeDisagreeAgreeStrongly Agree Always Wrong 81 (42.4) 7.6 (80.9) 68 (51.2) 3.1 (67.6) 60 (86.4) -4.1 (69.4) 38 (67.0) -4.8 (29.1) 247 Almost Always Wrong 24 (16.0) 2.3 (20.8) 26 (19.3) 1.8 (23.1) 29 (32.5) -0.8 (31.5) 14 (25.2) -2.8 (17.6) 93 Wrong Only Sometimes 18 (30.1) -2.7 (24.4) 41 (36.3) 1.0 (36.1) 74 (61.2) 2.2 (65.7) 42 (47.4) (48.8) 175 Not Wrong at All 36 (70.6) -6.1 (33.0) 57 (85.2) -4.6 (65.1) 161 (143.8) 2.4 (157.4) 157 (111.4) 6.8 (155.5) 411   ij j

4 log  ij =  + i + j Independence Model XY  ij =Expected count  =Mean log cell count i =Adjustment for Row i j =Adjustment for Column j X Y Degrees of Freedom = (r – 1)(c – 1)

5 Sample Calculation of  ij log †  23 = log (row total) + log(column total) – log(table total) = log 93 + log 324 – log 926 ≈ 3.48 so  23 ≈ exp(3.48) ≈ 32.5 or † log means natural logarithm  23 can be calculated as (93)(324)/(926) ≈ 32.5 P(A  B) n = P(A) P(B) n = (93/926)(324/926)(926)

6 Calculate  and i  is the mean of the logs of the expected all the cell counts.  = (log log log 111.4)/16 = i is the adjustment to  for row i—its mean less . 2 = (log log log log 25.2)/4 – = j is the adjustment to  for column j. 3 = X X Y X Y

7 Degrees of Freedom There are 4 rows and 4 columns giving us a total of 16 cells and therefore 16 degrees of freedom. For each parameter we add to the model, we lose one degree of freedom. We lose one degree for . We lose 3 degrees for the i ’s. (Since  i = 0, 4 = – 1 – 2 – 3.) We also lose 3 degrees for the j ’s. X X X X XX Y = 16 – 1 – 3 – 3 = 9 = rc – 1 – (r – 1) – (c – 1) = (r – 1)(c – 1)

8 Data and Independence Model Premarital Sex  i (row) Teenage Birth Control  j (column)   ij i Strongly DisagreeDisagreeAgreeStrongly Agree Always Wrong 81 (42.4) 68 (51.2) 60 (86.4) 38 (67.0) 247 Almost Always Wrong 24 (16.0) 26 (19.3) 29 (32.5) 14 (25.2) 93 Wrong Only Sometimes 18 (30.1) 41 (36.3) 74 (61.2) 42 (47.4) 175 Not Wrong at All 36 (70.6) 57 (85.2) 161 (143.8) 157 (111.4) 411   ij j

9 Pearson Residuals = -0.8 A standardized Pearson residual that exceeds 2 or 3 in absolute value indicates a lack of fit.

10 Data and Pearson Residuals Premarital Sex  i (row) Teenage Birth Control  j (column)   ij i Strongly DisagreeDisagreeAgreeStrongly Agree Always Wrong Almost Always Wrong Wrong Only Sometimes Not Wrong at All   ij j

11 SAS Code Independence Model data sex; input premar birth u v count linlin = u*v ; datalines; ; proc genmod; class premar birth; model count = premar birth / dist=poi link=log; run;

12 SAS Output Independence Model Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance Scaled Deviance Pearson Chi-Square Scaled Pearson X Log Likelihood Algorithm converged. Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept <.0001 premar <.0001 premar <.0001 premar <.0001 premar birth <.0001 birth birth birth Scale

13 Flat Plane

14 log  ij =  + i + j + ij Saturated Model: X Y ij =Adjustment for Cell ij XY Degrees of Freedom = 0 XY 23 = log n 23 –  – 2 – 3 = log 29 – –  ) –.3692 = XY X Y

15 log  ij =  + i + j +  u i v j  :linear-by linear association u i :row scores v j :column scores Linear-by-Linear Model XY The Linear-by-Linear model adds a parameter so we lose a degree of freedom: = (r – 1)(c – 1) – 1 = 8

16 SAS Code Linear-by-Linear Model data sex; input premar birth u v count linlin = u*v ; datalines; ; proc genmod; class premar birth; model count = premar birth linlin / dist=poi link=log; run;

17 SAS Output Linear by Linear Model Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance Scaled Deviance Pearson Chi-Square Scaled Pearson X Log Likelihood Algorithm converged. Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept premar <.0001 premar premar premar birth <.0001 birth <.0001 birth <.0001 birth linlin <.0001 Scale

18 Sample Calculation in the Linear-by-Linear Model log  23 =   u 2 v 3 = (2)(3) =  23 = exp(3.4511) = 31.5 X Y 18

19 Data and Linear-by-Linear Model Premarital Sex  i (row) Teenage Birth Control  j (column)   ij i Strongly DisagreeDisagreeAgreeStrongly Agree Always Wrong 81 (80.9) 68 (67.6) 60 (69.4) 38 (29.1) 247 Almost Always Wrong 24 (20.8) 26 (23.1) 29 (31.5) 14 (17.6) 93 Wrong Only Sometimes 18 (24.4) 41 (36.1) 74 (65.7) 42 (48.8) 175 Not Wrong at All 36 (33.0) 57 (65.1) 161 (157.4) 157 (155.5) 411   ij j

20 Constant Odds Ratio by Uniform Association Model

21 Odds Ratio and Example:

22 Saddle Movie