1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.

Slides:



Advertisements
Similar presentations
Chapter 2 Describing Contingency Tables Reported by Liu Qi.
Advertisements

Lecture 11 (Chapter 9).
Three or more categorical variables
© Department of Statistics 2012 STATS 330 Lecture 32: Slide 1 Stats 330: Lecture 32.
Analysis of Categorical Data Nick Jackson University of Southern California Department of Psychology 10/11/
Logistic Regression I Outline Introduction to maximum likelihood estimation (MLE) Introduction to Generalized Linear Models The simplest logistic regression.
Simple Logistic Regression
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 Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical.
Log-linear Analysis - Analysing Categorical Data
1 If we live with a deep sense of gratitude, our life will be greatly embellished.
1 STA 517 – Introduction: Distribution and Inference 1.5 STATISTICAL INFERENCE FOR MULTINOMIAL PARAMETERS  Recall multi(n, =( 1,  2, …,  c ))  Suppose.
Log-Linear Models & Dependent Samples Feng Ye, Xiao Guo, Jing Wang.
Header= Verdana 28 pt., Red 1 STA 517 – Chapter 3: Inference for Contingency Tables 3. Inference for Contingency Tables 3.1 Confidence Intervals for Association.
EPI 809 / Spring 2008 Final Review EPI 809 / Spring 2008 Ch11 Regression and correlation  Linear regression Model, interpretation. Model, interpretation.
Instructor: K.C. Carriere
EPI 809/Spring Multiple Logistic Regression.
Categorical Data Analysis: Stratified Analyses, Matching, and Agreement Statistics Biostatistics March 2007 Carla Talarico.
Linear statistical models 2009 Count data  Contingency tables and log-linear models  Poisson regression.
Chapter 14 Inferential Data Analysis
Generalized Linear Models
Review of Lecture Two Linear Regression Normal Equation
Logistic Regression II Simple 2x2 Table (courtesy Hosmer and Lemeshow) Exposure=1Exposure=0 Disease = 1 Disease = 0.
GEE and Generalized Linear Mixed Models
9. Binary Dependent Variables 9.1 Homogeneous models –Logit, probit models –Inference –Tax preparers 9.2 Random effects models 9.3 Fixed effects models.
AS 737 Categorical Data Analysis For Multivariate
Overview of Meta-Analytic Data Analysis
Logistic Regression III: Advanced topics Conditional Logistic Regression for Matched Data Conditional Logistic Regression for Matched Data.
Biostatistics Case Studies 2005 Peter D. Christenson Biostatistician Session 4: Taking Risks and Playing the Odds: OR vs.
Fixed vs. Random Effects Fixed effect –we are interested in the effects of the treatments (or blocks) per se –if the experiment were repeated, the levels.
ALISON BOWLING THE GENERAL LINEAR MODEL. ALTERNATIVE EXPRESSION OF THE MODEL.
HSRP 734: Advanced Statistical Methods June 19, 2008.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
Generalized Linear Models All the regression models treated so far have common structure. This structure can be split up into two parts: The random part:
1 STA 617 – Chp9 Loglinear/Logit Models Loglinear / Logit Models  Chapter 5-7 logistic regression: GLM with logit link binomial / multinomial  Chapter.
Different Distributions David Purdie. Topics Application of GEE to: Binary outcomes: – logistic regression Events over time (rate): –Poisson regression.
Linear correlation and linear regression + summary of tests
April 4 Logistic Regression –Lee Chapter 9 –Cody and Smith 9:F.
Introduction to Multiple Imputation CFDR Workshop Series Spring 2008.
GEE Approach Presented by Jianghu Dong Instructor: Professor Keumhee Chough (K.C.) Carrière.
AnnMaria De Mars, Ph.D. The Julia Group Santa Monica, CA Categorical data analysis: For when your data DO fit in little boxes.
CHI SQUARE TESTS.
Generalized Linear Models (GLMs) & Categorical Data Analysis (CDA) in R Hong Tran, April 21, 2015.
ANALYSIS PLAN: STATISTICAL PROCEDURES
Logistic regression. Recall the simple linear regression model: y =  0 +  1 x +  where we are trying to predict a continuous dependent variable y from.
1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements.
STA617 Advanced Categorical Data Analysis
1 STA 517 – Chp4 Introduction to Generalized Linear Models 4.3 GENERALIZED LINEAR MODELS FOR COUNTS  count data - assume a Poisson distribution  counts.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
1 Follow the three R’s: Respect for self, Respect for others and Responsibility for all your actions.
1 STA 617 – Chp12 Generalized Linear Mixed Models SAS for Model (12.3) with Matched Pairs from Table 12.1.
1 STA 617 – Chp12 Generalized Linear Mixed Models Modeling Heterogeneity among Multicenter Clinical Trials  compare two groups on a response for.
1 Introduction to Modeling Beyond the Basics (Chapter 7)
Dependent Variable Discrete  2 values – binomial  3 or more discrete values – multinomial  Skewed – e.g. Poisson Continuous  Non-normal.
1 Fighting for fame, scrambling for fortune, where is the end? Great wealth and glorious honor, no more than a night dream. Lasting pleasure, worry-free.
Applied Epidemiologic Analysis - P8400 Fall 2002 Labs 6 & 7 Case-Control Analysis ----Logistic Regression Henian Chen, M.D., Ph.D.
Week 7: General linear models Overview Questions from last week What are general linear models? Discussion of the 3 articles.
Analysis of matched data Analysis of matched data.
BINARY LOGISTIC REGRESSION
Generalized Linear Models
Introduction to logistic regression a.k.a. Varbrul
If we can reduce our desire,
STAT 312 Introduction Z-Tests and Confidence Intervals for a
Categorical Data Analysis
Joyful mood is a meritorious deed that cheers up people around you
Applied Statistics Using SPSS
Chp 7 Logit Models for Multivariate Responses
Modeling Ordinal Associations Bin Hu
Presentation transcript:

1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary data  Multinomial for I>2 outcome categories  Others  Limitation: one parameter only, can be adjusted by scale parameter  inference

2 STA 617 – Chp10 Models for matched pairs Summary  Two-way contingency table – chapters 2, 3  Parameters: risk, odds  Comparison: relative risk, odds ratio  Estimation: delta method  Tests: chi-square, fisher’s exact test  Ordered two-way tables:  assign scores - Trend test M 2 =(n-1)r 2  uses an ordinal measure of monotone trend:  SAS: proc freq with option relarisk, chisq, exact, etc.

3 STA 617 – Chp10 Models for matched pairs Summary  Three-way (multi-way) tables – chapter 2, 3  Partial tables  Conditional and marginal odds ratio  Conditional and marginal independence  Inference – chapter 4-9:  Third or others variables are considered as covariates  modeling

4 STA 617 – Chp10 Models for matched pairs Summary – generalized linear models  Random component is exponential family (not necessary normal)  Systematic component – linear model  Link function – connect mean to Systematic component xbeta  Log  Logit  Identity

5 STA 617 – Chp10 Models for matched pairs Logistic regression  Chapters 5-7  SAS proc logistic, genmod  Binary outcome – logistic regression  Multinomial response  Nominal-baseline-category logit models  Ordinal – cumulative logit models

6 STA 617 – Chp10 Models for matched pairs Log-linear model  Chapters 8-9  Two-way table  Three-way tables  Multi-way tables  Model selection  Ordinal responses  Log-linear model for rates  SAS: genmod

7 STA 617 – Chp10 Models for matched pairs By far – cross sectional data  If the data are collected over time, the data for the same subject in different time points will be correlated.  Longitudinal data  Multivariate responses *  Non-linear models *

8 STA 617 – Chp10 Models for matched pairs Longitudinal data  Chapter 10 – two time points: matched pairs  Chapter 11 – repeated measures using marginal models (no random effects)  Chapter 12 – random effect model or generalized linear mixed models  Recent developments – publications for categorical responses since 2002 (final project)  Read one or two recent papers  20 minutes presentation

9 STA 617 – Chp10 Models for matched pairs models  Linear model (LMs) (t-tests, ANOVA, ANCOVA)  SAS: proc TTEST, ANOVA, REG, GLM  Generalized linear models (GLMs)  SAS: proc GENMOD, LOGISTIC, CATMOD  Linear mixed model (LMMs) – permitting heterogeneity of variance, variance structure is based on random effects and their variance components  SAS: proc MIXED  Generalized linear mixed models (GLMMs)  SAS: proc NLMIXED  Non-linear mixed model  SAS: proc NLMIXED

10 STA 617 – Chp10 Models for matched pairs Models for matched pairs  In this chapter, we introduce methods for comparing categorical responses for two samples when each observation in one sample pairs with an observation in the other.  For easy understanding, we assume n independent subjects and let Y i = (Y i1,Y i2,...,Y iti ) is the observation of subject i at different time.  In statistics, {Y 1,Y 2,...,Y n } are called longitudinal data  For fixed i, Y i is a time series; for fixed time j, {Y 1j,Y 2j,...,Y nj } is a sequence of independent random variables.  If t i = 2 for all i, {Y 1,Y 2,...,Y n } is called matched-pairs data. Note that the two samples {Y 11,Y 21,...,Y n1 } and {Y 12,Y 22,...,Y n2 } are not independent.

11 STA 617 – Chp10 Models for matched pairs Outline 10.1 Comparing Dependent Proportions; 10.2 Conditional Logistic Regression for Binary Matched Pairs; 10.3 Marginal Models for Squared Contingency Tables; 10.4 Symmetry, Quasi-symmetry and Quasi- independence; 10.5 Measure Agreement Between Observers; 10.6 Bradley-Terry Models for Paired Preferences.

12 STA 617 – Chp10 Models for matched pairs

13 STA 617 – Chp10 Models for matched pairs

14 STA 617 – Chp10 Models for matched pairs 10.1 COMPARING DEPENDENT PROPORTIONS

15 STA 617 – Chp10 Models for matched pairs

16 STA 617 – Chp10 Models for matched pairs

17 STA 617 – Chp10 Models for matched pairs

18 STA 617 – Chp10 Models for matched pairs Prime minister approval rating example

19 STA 617 – Chp10 Models for matched pairs SAS code /*section page 411*/ data tmp; p11=794/1600; p12=150/1600; p21=86/1600; p22=570/1600; p1plus=p11+p12; pplus1=p11+p21; se=sqrt( ((p12+p21)-(p12-p21)**2)/1600); lci=p1plus-pplus1-1.96*se; uci=p1plus-pplus1+1.96*se; z0=(86-150)/(86+150)**0.5; McNemarsTest=z0**2; pvalue=1-cdf('chisquare',McNemarsTest,1); se_ind=sqrt(p1plus*(1-p1plus)+ pplus1 *(1- pplus1 ))/sqrt(1600); /*assume independent*/ lci_ind=p1plus-pplus1-1.96*se_ind; uci_ind=p1plus-pplus1+1.96*se_ind; proc print; run;

20 STA 617 – Chp10 Models for matched pairs SAS code McNemar’s Test data matched; input first second count datalines; ; proc freq; weight count; tables first*second/ agree; exact mcnem; /*McNemars Test*/ proc catmod; weight count; response marginals; model first*second= (1 0, 1 1) ; run;

21 STA 617 – Chp10 Models for matched pairs  PROC FREQ  For square tables, the AGREE option in PROC FREQ provides the McNemar chi-squared statistic for binary matched pairs, the X 2 test of fit of the symmetry model (also called Bowker’s test), and Cohen’s kappa and weighted kappa with SE values.  The MCNEM keyword in the EXACT statement provides a small-sample binomial version of McNemar’s test.  PROC CATMOD provide the confidence interval for the difference of proportions.  The code forms a model for the marginal proportions in the first row and the first column, specifying a model matrix in the model statement that has an intercept parameter (the first column) that applies to both proportions and a slope parameter that applies only to the second; hence the second parameter is the difference between the second and first marginal proportions.

22 STA 617 – Chp10 Models for matched pairs Increased precision with dependent samples

23 STA 617 – Chp10 Models for matched pairs

24 STA 617 – Chp10 Models for matched pairs Fit marginal model data matched1; input case occasion response count datalines; ; proc logistic data=matched; weight count; model response=occasion; run; Xt proc genmod data=matched1 DESCENDING; weight count; model response=occasion/dist=bin link=identity;

25 STA 617 – Chp10 Models for matched pairs Google calculator ln((880 * 656) / (944*720) )=

26 STA 617 – Chp10 Models for matched pairs

27 STA 617 – Chp10 Models for matched pairs

28 STA 617 – Chp10 Models for matched pairs

29 STA 617 – Chp10 Models for matched pairs

30 STA 617 – Chp10 Models for matched pairs

31 STA 617 – Chp10 Models for matched pairs Matlab code for deriving previous MLE and SE % page 417 syms b n21 n12 LL=log(exp(b)^n21/(1+exp(b))^(n12+n21)); simplify(diff(LL,'b')) %result (n21-exp(b)*n12)/(1+exp(b)) %thus beta=log(n21/n12) simplify(diff(diff(LL,'b'),'b')) %result -exp(b)*(n12+n21)/(1+exp(b))^2

32 STA 617 – Chp10 Models for matched pairs Random effects in binary matched-pairs model  An alternative remedy to handling the huge number of nuisance parameters in logit model (10.8) treats as random effects.  Assume ~  This model is an example of a generalized linear mixed model, containing both random effects and the fixed effect beta.  Fit by proc NLMIXED  Chapter 12

33 STA 617 – Chp10 Models for matched pairs Logistic Regression for Matched Case–Control Studies  The two observations in a matched pair need not refer to the same subject.  For instance, case-control studies that match a single control with each case yield matched-pairs data.  Example: A case-control study of acute myocardial infarction (MI) among Navajo Indians matched 144 victims of MI according to age and gender with 144 people free of heart disease.

34 STA 617 – Chp10 Models for matched pairs  Now, for subject t in matched pair i, consider the model  the conditional ML estimate of OR is

35 STA 617 – Chp10 Models for matched pairs Conditional ML for matched pairs with multiple predictors

36 STA 617 – Chp10 Models for matched pairs Marginal models vs. conditional models  Section 10.1 Marginal model (McNemar’s test H0: =0)  Section 10.2 conditional model  Conditional ML  Random effects, NLMIXED