ST3241 Categorical Data Analysis I Two-way Contingency Tables. Odds Ratio and Tests of Independence
|
|
- Prudence Underwood
- 5 years ago
- Views:
Transcription
1 ST3241 Categorical Data Analysis I Two-way Contingency Tables Odds Ratio and Tests of Independence 1
2 Inference For Odds Ratio (p. 24) For small to moderate sample size, the distribution of sample odds ratio ˆθ is highly skewed. For θ = 1, ˆθ cannot be much smaller that θ, but it can be much larger than θ with nonnegligible probability. Consider log odds ratio, log θ X and Y are independent implies log θ = 0. 2
3 Log Odds Ratio Log odds ratio is symmetric about zero in the sense that reversal of rows or reversal of columns changes its sign only. The sample log odds ratio, log ˆθ has a less skewed distribution and can be approximated by the normal distribution well. The asymptotic standard error of log ˆθ is given by ASE(log ˆθ) = 1 n n n n 22 3
4 Confidence Intervals A large sample confidence interval for log θ is given by log(ˆθ) ± z α/2 ASE(log ˆθ) A large sample confidence interval for θ is given by exp[log(ˆθ) ± z α/2 ASE(log ˆθ)] 4
5 Sample Odds Ratio = Example: Aspirin Usage Sample log odds ratio, log ˆθ = log(1.832) = ASE of log ˆθ = % confidence interval for log θ equals ± The corresponding confidence interval for θ is (e 0.365, e ) or (1.44,2.33). 5
6 Recall SAS Output Estimates of the Relative Risk (Row1/Row2) Type of Study Value 95% Confidence Limits Case-Control (Odds Ratio) Cohort (Col1 Risk) Cohort (Col2 Risk) Sample Size =
7 A Simple R Function For Odds Ratio > odds.ratio < function(x, pad.zeros = FALSE, conf.level=0.95) { if(pad.zeros) { if(any(x==0)) x<-x+0.5 } theta<-x[1,1]*x[2,2]/(x[2,1]*x[1,2]) ASE<-sqrt(sum(1/x)) CI<-exp(log(theta) + c(-1,1)*qnorm(0.5*(1+conf.level))*ase) list(estimator=theta, ASE=ASE, conf.interval=ci, conf.level=conf.level) } 7
8 Notes (p. 25) Recall the formula for sample odds ratio ˆθ = n 11n 22 n 12 n 21 The sample odds ratio is 0 or if any n ij = 0 and it is undefined if both entries in a row or column are zero. Consider the slightly modified formula θ = (n )(n ) (n )(n ) In the ASE formula also, n ij s are replaced by n ij
9 Observations A sample odds ratio does not mean that p 1 is times p 2. A simple relation: OddsRatio = p 1/(1 p 1 ) p 2 /(1 p 2 ) = RelativeRisk 1 p 2 1 p 1 If p 1 and p 2 are close to 0, the odds ratio and relative risk take similar values. This relationship between odds ratio and relative risk is useful. 9
10 Example: Smoking Status and Myocardial Infarction Ever Myocardial Smoker Infarction Controls Yes No Odds Ratio=? (3.8222) How do we get relative risk? (2.4152) 10
11 Chi-Squared Tests (p.27) To test H 0 that the cell probabilities equal certain fixed values {π ij }. Let {n ij } be the cell frequencies and n be the total sample size. Then µ ij = nπ ij are the expected cell frequencies under H 0. Pearson (1900) s chi-squared test statistic χ 2 = (n ij µ ij ) 2 µ ij 11
12 Some Properties This statistic takes its minimum value of zero when all n ij = µ ij. For a fixed sample size, greater differences between {n ij } and {µ ij } produce larger χ 2 values and stronger evidence against H 0. The χ 2 statistic has approximately a chi-squared distribution with appropriate degrees of freedom for large sample sizes. 12
13 The likelihood ratio Likelihood-Ratio Test (p. 28) Λ = maximum likelihood when H 0 is true maximum likelihood when parameters are unrestricted In mathematical notation, if L(θ) denotes the likelihood function with θ as the set of parameters and the null hypothesis is H 0 : θ Θ 0 against H 1 : θ Θ 1, the likelihood ratio is given by Λ = sup θ Θ 0 L(θ) sup θ (Θ0 Θ 1 ) L(θ) 13
14 Properties Likelihood ratio cannot exceed 1. Small likelihood ratio implies deviation from H 0. Likelihood ratio test statistic is 2 log Λ, which has a chi-squared distribution with appropriate degrees of freedom for large samples. For a two-way contingency table, this statistic reduces to G 2 = 2 n ij log( n ij µ ij ) The test statistics χ 2 and G 2 have the same large sample distribution under null hypothesis. 14
15 Tests of Independence (p.30) To test: H 0 : π ij = π i+ π +j for all i and j. Equivalently, H 0 : µ ij = nπ ij = nπ i+ π +j. Usually, {π i+ } and {π +j } are unknown. We estimate them, using sample proportions µ ˆ ij = np i+ p +j = n n i+n +j n 2 = n i+n +j n These {ˆµ ij } are called estimated expected cell frequencies 15
16 Test Statistics Pearson s Chi-square test statistic χ 2 = I i=1 J j=1 (n ij ˆµ ij ) 2 ˆµ ij Likelihood ratio test statistic G 2 = 2 I i=1 J j=1 n ij log( n ij ˆµ ij ) Both of them have large sample chi-squared distribution with (I 1)(J 1) degrees of freedom. 16
17 Party Identification By Gender (p.31) Party Identification Gender Democrat Independent Republican Total Females (261.4) (70.7) (244.9) Males (182.6) (49.3) (171.1) Total
18 Example: Continued The test statistics are: χ 2 = 7.01 and G 2 = 7.00 Degrees of freedom = (I 1)(J 1) = (2 1)(3 1) = 2. p-value = Thus, the above test statistics suggest that party identification and gender are associated. 18
19 data Survey; length Party $ 12; input Gender $ Party $ count; datalines; Female Democrat 279 Female Independent 73 Female Republican 225 Male Democrat 165 Male Independent 47 Male Republican 191 ; run; SAS Codes: Read The Data 19
20 SAS Codes: Use Proc Freq proc freq data=survey order=data; weight count; tables gender*party / chisq expected nopercent norow nocol; run; 20
21 Output The FREQ Procedure Table of Gender by Party Gender Party Frequency Expected Democrat Independent Republican Total Female Male Total
22 Output Statistics for Table of Gender by Party Statistic DF Value Prob Chi-Square Likelihood Ratio Chi-Square Mantel-Haenszel Chi-Square Phi Coefficient Contingency Coefficient Cramer s V Sample Size =
23 R Codes >gendergap<-matrix(c(279,73,225,165,47,191), byrow=t,ncol=3) >dimnames(gendergap)<list(gender=c("female","male"), PartyID=c("Democrat","Independent", "Republican")) >gendergap PartyID Gender Democrat Independent Republican Female Male
24 R Codes >chisq.test(gendergap) Pearson s Chi-squared test data: gendergap X-squared = , df = 2,p-value =
25 An Alternative Way >Gender<-c("Female","Female","Female","Male", "Male","Male") >Party<-c("Democrat","Independent", "Republican", "Democrat","Independent", "Republican") >count<-c(279,73,225,165,47,191) >gender1<-data.frame(gender,party,count) >gender<-xtabs(count Gender+Party, data=gender1) >gender >summary(gender) 25
26 Party Output Gender Democrat Independent Republican Female Male Call: xtabs(formula = count Gender + Party, data = gender1) Number of cases in table: 980 Number of factors: 2 Test for independence of all factors: Chisq = 7.01, df = 2, p-value =
27 Table of Expected Cell Counts > rowsum<-apply(gender,1,sum) > colsum<-apply(gender,2,sum) > n<-sum(gender) > gd<-outer(rowsum,colsum/n, make.dimnames=t) 27
28 Table of Expected Cell Counts > gd Democrat Independent Republican Female Male
29 Residuals (p.31) To understand better the nature of evidence against H0, a cell by cell comparison of observed and estimated frequencies is necessary. Define, adjusted residuals r ij = n ij ˆµ ij ˆµij (1 p i+ )(1 p +j ) If H 0 is true, each r ij has a large sample standard normal distribution. If r ij in a cell exceeds 2 then it indicates lack of fit of H 0 in that cell. The sign also describes the nature of association. 29
30 Computing Residuals in R > rowp<-rowsum/n %Row marginal prob. > colp<-colsum/n %Column marginal prob. > pd<-outer(1-rowp,1-colp, make.dimnames=t) > resid<-(gender-gd)/sqrt(gd*pd) > resid 30
31 Residuals Output Party Gender Democrat Independent Republican Female Male
32 Some Comments (p.33) Pearson s χ 2 tests only indicate the degree of evidence for an association, but they cannot answer other questions like nature of association etc. These χ 2 tests are not always applicable. We need large data sets to apply them. Approximation is often poor when n/(ij) < 5. The values of χ 2 or G 2 do not depend on the ordering of the rows. Thus we ignore some information when there is ordinal data. 32
33 Testing Independence For Ordinal Data (p.34) For ordinal data, it is important to look for types of associations when there is dependence. It is quite common to assume that as the levels of X increases, responses on Y tend to increases or responses on Y tends to decrease to ward higher levels of X. The most simple and common analysis assigns scores to categories and measures the degree of linear trend or correlation. The method used is known as Mantel-Haenszel Chi-Square test (Mantel and Haenszel 1959). 33
34 Linear Trend Alternative to Independence Let u 1 u 2 u I denote scores for the rows. Let v 1 v 2 v J denote scores for the columns. The scores have the same ordering as the category levels. Define the correlation between X and Y as r = I J i=1 j=1 u i v j n ij ( I i=1 u i n i+ )( J j=1 v j n +j )/n [ I u 2 i n i+ ( I u i n i+ ) 2 /n][ J vj 2n +j ( J v j n +j ) 2 /n] i=1 i=1 j=1 j=1 34
35 Test For Linear Trend Alternative Independence between the variables implies that its true value equals zero. The larger the correlation is in absolute value, the farther the data fall from independence in this linear dimension. A test statistic is given by M 2 = (n 1)r 2. For large samples, it has approximately a chi-squared distribution with 1 degrees of freedom. 35
36 Infant Malformation and Mothers Alcohol Consumption Malformation Alcohol Consumption Absent(0) Present(1) Total 0 17, ,114 <1 14, ,
37 Infant Malformation and Mothers Alcohol Consumption Malformation Alcohol Percent Adjusted Consumption Absent(0) Present(1) Total Present Residual 0 17, , <1 14, ,
38 Example: Tests For Independence Pearson s χ 2 = 12.1, d.f. = 4, p-value = Likelihood Ratio Test, G 2 = 6.2, d.f. = 4, p-value =.19. The two tests give inconsistent signals. The percent present and adjusted residuals suggest that there may be a linear trend. 38
39 Test For Linear Trend Assign scores, v 1 = 0, v 2 = 1 and u 1 = 0, u 2 = 0.5, u 3 = 1.5, u 4 = 4.0 and u 5 = 7.0. We have, r = 0.014, n = 32, 574 and M 2 =6.6 with p-value = It suggests strong evidence of a linear trend for infant malformation with alcohol consumption of mothers. 39
40 SAS Codes data infants; input malform alcohol count datalines; ; run; proc format; value malform 2= Present 1= Absent ; value Alcohol 0= 0 0.5= <1 1.5= = = >=6 ; run; 40
41 SAS Codes proc freq data = infants; format malform malform. alcohol alcohol.; weight count; tables alcohol*malform / chisq cmh1 norow nocol nopercent; run; 41
42 Partial Output Statistic DF Value Prob Chi-Square Likelihood Ratio Chi-Square Mantel-Haenszel Chi-Square Phi Coefficient Contingency Coefficient Cramer s V
43 Partial Output Cochran-Mantel-Haenszel Statistics (Based on Table Scores) Statistic Alternative Hypothesis DF Value Prob Nonzero Correlation Total Sample Size =
44 Notes The correlation r has limited use as a descriptive measure of tables. Different choices of monotone scores usually give similar results. However, it may not happen when the data are very unbalanced, i.e. when some categories have many more observations than other categories. If we had taken (1, 2, 3, 4, 5) as the row scores in our example, then M 2 = 1.83 and p-value = 0.18 gives a much weaker conclusion. It is usually better to use one s own judgment by selecting scores that reflect distances between categories. 44
45 SAS Codes data infantsx; input malform alcoholx count datalines; ; run; proc freq data = infantsx; weight count; tables alcoholx*malform / cmh1 norow nocol nopercent; run; 45
46 Partial Output Cochran-Mantel-Haenszel Statistics (Based on Table Scores) Statistic Alternative Hypothesis DF Value Prob Nonzero Correlation Total Sample Size =
47 Fisher s Tea Tasting Experiment (p.39) Guess Poured First Poured First Milk Tea Total Milk Tea Total
48 Example: Tea Tasting To test whether she can tell accurately. To test H 0 : θ = 1 against H 1 : θ > 1. We cannot use previously discussed tests as we have a very small sample size. 48
49 Fisher s Exact Test For a 2 2 table, under the assumption of independence, i.e. θ = 1, the conditional distribution of n 11 given the row and column totals is hypergeometric. For given row and column marginal totals, the value for n 11 determines the other three cell counts. Thus, the hypergeometric formula expresses probabilities for the four cell counts in terms of n 11 alone. 49
50 Fisher s Exact Test When θ = 1, the probability of a particular value n 11 for that count equals p(n 11 ) = n 1+ n 11 n 2+ n +1 n 11 n n +1 To test independence, the p-value is the sum of hypergeometric probabilities for outcomes at least as favorable to the alternative hypothesis as the observed outcome. 50
51 Example: Tea Tasting The outcomes at least as favorable as the observed data is n 1 1 = 3 and 4 given the row and column totals. Hence, p(3) = 0 B C C A 0 B C C A 0 B C C A = =.2286, p(4) = 0 B C C A 0 B C C A 0 B C C A = 1 70 =
52 Example: Tea Tasting Therefore, p-value = P (3) + P (4) = There is not much evidence against the null hypothesis of independence. The experiment did not establish an association between the actual order of pouring and the guess. 52
53 SAS Codes: Exact Test data tea; input poured $ guess $ datalines; Milk Milk 3 Milk Tea 1 Tea Milk 1 Tea Tea 3 ; proc freq data=tea order=data; weight count; tables poured*guess / exact; run; 53
54 Partial Output Fisher s Exact Test Cell (1,1) Frequency (F) 3 Left-sided Pr <= F Right-sided Pr >= F Table Probability (P) Two-sided Pr <= P Sample Size = 8 54
55 R Codes > Poured<-c("Milk","Milk","Tea","Tea") > Guess<-c("Milk","Tea","Milk","Tea") > count<-c(3,1,1,3) > teadata<-data.frame(poured,guess,count) > tea<-xtabs(count Poured+Guess,data=teadata) > fisher.test(tea,alternative="greater") 55
56 Output Fisher s Exact Test for Count Data data: tea p-value = alternative hypothesis: true odds ratio is greater than 1 95 percent confidence interval: Inf sample estimates: odds ratio
ST3241 Categorical Data Analysis I Two-way Contingency Tables. 2 2 Tables, Relative Risks and Odds Ratios
ST3241 Categorical Data Analysis I Two-way Contingency Tables 2 2 Tables, Relative Risks and Odds Ratios 1 What Is A Contingency Table (p.16) Suppose X and Y are two categorical variables X has I categories
More informationEpidemiology Wonders of Biostatistics Chapter 13 - Effect Measures. John Koval
Epidemiology 9509 Wonders of Biostatistics Chapter 13 - Effect Measures John Koval Department of Epidemiology and Biostatistics University of Western Ontario What is being covered 1. risk factors 2. risk
More informationTesting 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 informationSTAT 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 informationSections 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 informationOrdinal Variables in 2 way Tables
Ordinal Variables in 2 way Tables Edps/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology c Board of Trustees, University of Illinois Fall 2018 C.J. Anderson (Illinois) Ordinal Variables
More informationBIOS 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 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 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 information3 Way Tables Edpsy/Psych/Soc 589
3 Way Tables Edpsy/Psych/Soc 589 Carolyn J. Anderson Department of Educational Psychology I L L I N O I S university of illinois at urbana-champaign c Board of Trustees, University of Illinois Spring 2017
More informationCategorical Data Analysis Chapter 3
Categorical Data Analysis Chapter 3 The actual coverage probability is usually a bit higher than the nominal level. Confidence intervals for association parameteres Consider the odds ratio in the 2x2 table,
More informationEpidemiology Principle of Biostatistics Chapter 14 - Dependent Samples and effect measures. John Koval
Epidemiology 9509 Principle of Biostatistics Chapter 14 - Dependent Samples and effect measures John Koval Department of Epidemiology and Biostatistics University of Western Ontario What is being covered
More informationn y π y (1 π) n y +ylogπ +(n y)log(1 π).
Tests for a binomial probability π Let Y bin(n,π). The likelihood is L(π) = n y π y (1 π) n y and the log-likelihood is L(π) = log n y +ylogπ +(n y)log(1 π). So L (π) = y π n y 1 π. 1 Solving for π gives
More informationCDA Chapter 3 part II
CDA Chapter 3 part II Two-way tables with ordered classfications Let u 1 u 2... u I denote scores for the row variable X, and let ν 1 ν 2... ν J denote column Y scores. Consider the hypothesis H 0 : X
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 informationMeans or "expected" counts: j = 1 j = 2 i = 1 m11 m12 i = 2 m21 m22 True proportions: The odds that a sampled unit is in category 1 for variable 1 giv
Measures of Association References: ffl ffl ffl Summarize strength of associations Quantify relative risk Types of measures odds ratio correlation Pearson statistic ediction concordance/discordance Goodman,
More informationLecture 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 informationThree-Way Contingency Tables
Newsom PSY 50/60 Categorical Data Analysis, Fall 06 Three-Way Contingency Tables Three-way contingency tables involve three binary or categorical variables. I will stick mostly to the binary case to keep
More information13.1 Categorical Data and the Multinomial Experiment
Chapter 13 Categorical Data Analysis 13.1 Categorical Data and the Multinomial Experiment Recall Variable: (numerical) variable (i.e. # of students, temperature, height,). (non-numerical, categorical)
More information2 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 informationCategorical 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 informationIntroduction 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 informationSolution 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 informationAnalysis of Categorical Data Three-Way Contingency Table
Yu Lecture 4 p. 1/17 Analysis of Categorical Data Three-Way Contingency Table Yu Lecture 4 p. 2/17 Outline Three way contingency tables Simpson s paradox Marginal vs. conditional independence Homogeneous
More informationChi-Square. Heibatollah Baghi, and Mastee Badii
1 Chi-Square Heibatollah Baghi, and Mastee Badii Different Scales, Different Measures of Association Scale of Both Variables Nominal Scale Measures of Association Pearson Chi-Square: χ 2 Ordinal Scale
More informationTopic 21 Goodness of Fit
Topic 21 Goodness of Fit Contingency Tables 1 / 11 Introduction Two-way Table Smoking Habits The Hypothesis The Test Statistic Degrees of Freedom Outline 2 / 11 Introduction Contingency tables, also known
More informationSome comments on Partitioning
Some comments on Partitioning Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM 1/30 Partitioning Chi-Squares We have developed tests
More informationij 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 informationDiscrete Multivariate Statistics
Discrete Multivariate Statistics Univariate Discrete Random variables Let X be a discrete random variable which, in this module, will be assumed to take a finite number of t different values which are
More informationLecture 9. Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests
Lecture 9 Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests Univariate categorical data Univariate categorical data are best summarized in a one way frequency table.
More informationSTAT 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 informationMultiple Sample Categorical Data
Multiple Sample Categorical Data paired and unpaired data, goodness-of-fit testing, testing for independence University of California, San Diego Instructor: Ery Arias-Castro http://math.ucsd.edu/~eariasca/teaching.html
More informationCh 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 informationLogistic regression: Miscellaneous topics
Logistic regression: Miscellaneous topics April 11 Introduction We have covered two approaches to inference for GLMs: the Wald approach and the likelihood ratio approach I claimed that the likelihood ratio
More informationStatistics 3858 : Contingency Tables
Statistics 3858 : Contingency Tables 1 Introduction Before proceeding with this topic the student should review generalized likelihood ratios ΛX) for multinomial distributions, its relation to Pearson
More informationCohen s s Kappa and Log-linear Models
Cohen s s Kappa and Log-linear Models HRP 261 03/03/03 10-11 11 am 1. Cohen s Kappa Actual agreement = sum of the proportions found on the diagonals. π ii Cohen: Compare the actual agreement with the chance
More informationMultinomial 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 informationReview of Statistics 101
Review of Statistics 101 We review some important themes from the course 1. Introduction Statistics- Set of methods for collecting/analyzing data (the art and science of learning from data). Provides methods
More informationLecture 23. November 15, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License. Your use of this material constitutes acceptance of that license and the conditions of use of materials on this
More informationSTA 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 informationInference for Binomial Parameters
Inference for Binomial Parameters Dipankar Bandyopadhyay, Ph.D. Department of Biostatistics, Virginia Commonwealth University D. Bandyopadhyay (VCU) BIOS 625: Categorical Data & GLM 1 / 58 Inference for
More informationFrequency Distribution Cross-Tabulation
Frequency Distribution Cross-Tabulation 1) Overview 2) Frequency Distribution 3) Statistics Associated with Frequency Distribution i. Measures of Location ii. Measures of Variability iii. Measures of Shape
More informationChapter 19. Agreement and the kappa statistic
19. Agreement Chapter 19 Agreement and the kappa statistic Besides the 2 2contingency table for unmatched data and the 2 2table for matched data, there is a third common occurrence of data appearing summarised
More informationNATIONAL 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 informationShort Course Introduction to Categorical Data Analysis
Short Course Introduction to Categorical Data Analysis Alan Agresti Distinguished Professor Emeritus University of Florida, USA Presented for ESALQ/USP, Piracicaba Brazil March 8-10, 2016 c Alan Agresti,
More informationReview 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 informationSTAT 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 informationAnalytic Methods for Applied Epidemiology: Framework and Contingency Table Analysis
Analytic Methods for Applied Epidemiology: Framework and Contingency Table Analysis 2014 Maternal and Child Health Epidemiology Training Pre-Training Webinar: Friday, May 16 2-4pm Eastern Kristin Rankin,
More informationSession 3 The proportional odds model and the Mann-Whitney test
Session 3 The proportional odds model and the Mann-Whitney test 3.1 A unified approach to inference 3.2 Analysis via dichotomisation 3.3 Proportional odds 3.4 Relationship with the Mann-Whitney test Session
More informationNATIONAL 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 informationMeasures of Association for I J tables based on Pearson's 2 Φ 2 = Note that I 2 = I where = n J i=1 j=1 J i=1 j=1 I i=1 j=1 (ß ij ß i+ ß +j ) 2 ß i+ ß
Correlation Coefficient Y = 0 Y = 1 = 0 ß11 ß12 = 1 ß21 ß22 Product moment correlation coefficient: ρ = Corr(; Y ) E() = ß 2+ = ß 21 + ß 22 = E(Y ) E()E(Y ) q V ()V (Y ) E(Y ) = ß 2+ = ß 21 + ß 22 = ß
More informationSimple 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 informationLecture 41 Sections Mon, Apr 7, 2008
Lecture 41 Sections 14.1-14.3 Hampden-Sydney College Mon, Apr 7, 2008 Outline 1 2 3 4 5 one-proportion test that we just studied allows us to test a hypothesis concerning one proportion, or two categories,
More informationBIOMETRICS INFORMATION
BIOMETRICS INFORMATION (You re 95% likely to need this information) PAMPHLET NO. # 41 DATE: September 18, 1992 SUBJECT: Power Analysis and Sample Size Determination for Contingency Table Tests Statistical
More informationReview 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 informationTA: Sheng Zhgang (Th 1:20) / 342 (W 1:20) / 343 (W 2:25) / 344 (W 12:05) Haoyang Fan (W 1:20) / 346 (Th 12:05) FINAL EXAM
STAT 301, Fall 2011 Name Lec 4: Ismor Fischer Discussion Section: Please circle one! TA: Sheng Zhgang... 341 (Th 1:20) / 342 (W 1:20) / 343 (W 2:25) / 344 (W 12:05) Haoyang Fan... 345 (W 1:20) / 346 (Th
More informationSuppose that we are concerned about the effects of smoking. How could we deal with this?
Suppose that we want to study the relationship between coffee drinking and heart attacks in adult males under 55. In particular, we want to know if there is an association between coffee drinking and heart
More informationCategorical 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 informationSections 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 informationSTAT Chapter 13: Categorical Data. Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure).
STAT 515 -- Chapter 13: Categorical Data Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure). Many studies allow for more than 2 categories. Example
More informationLecture 5: ANOVA and Correlation
Lecture 5: ANOVA and Correlation Ani Manichaikul amanicha@jhsph.edu 23 April 2007 1 / 62 Comparing Multiple Groups Continous data: comparing means Analysis of variance Binary data: comparing proportions
More informationStatistics - Lecture 04
Statistics - Lecture 04 Nicodème Paul Faculté de médecine, Université de Strasbourg file:///users/home/npaul/enseignement/esbs/2018-2019/cours/04/index.html#40 1/40 Correlation In many situations the objective
More informationUnit 9: Inferences for Proportions and Count Data
Unit 9: Inferences for Proportions and Count Data Statistics 571: Statistical Methods Ramón V. León 12/15/2008 Unit 9 - Stat 571 - Ramón V. León 1 Large Sample Confidence Interval for Proportion ( pˆ p)
More informationChapter 2: Describing Contingency Tables - II
: Describing Contingency Tables - II Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu]
More informationPsych 230. Psychological Measurement and Statistics
Psych 230 Psychological Measurement and Statistics Pedro Wolf December 9, 2009 This Time. Non-Parametric statistics Chi-Square test One-way Two-way Statistical Testing 1. Decide which test to use 2. State
More informationSTA6938-Logistic Regression Model
Dr. Ying Zhang STA6938-Logistic Regression Model Topic 2-Multiple Logistic Regression Model Outlines:. Model Fitting 2. Statistical Inference for Multiple Logistic Regression Model 3. Interpretation of
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 information10: Crosstabs & Independent Proportions
10: Crosstabs & Independent Proportions p. 10.1 P Background < Two independent groups < Binary outcome < Compare binomial proportions P Illustrative example ( oswege.sav ) < Food poisoning following church
More informationEpidemiology Wonders of Biostatistics Chapter 11 (continued) - probability in a single population. John Koval
Epidemiology 9509 Wonders of Biostatistics Chapter 11 (continued) - probability in a single population John Koval Department of Epidemiology and Biostatistics University of Western Ontario What is being
More informationOne-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 informationLecture 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 informationMore Statistics tutorial at Logistic Regression and the new:
Logistic Regression and the new: Residual Logistic Regression 1 Outline 1. Logistic Regression 2. Confounding Variables 3. Controlling for Confounding Variables 4. Residual Linear Regression 5. Residual
More informationSTP 226 EXAMPLE EXAM #3 INSTRUCTOR:
STP 226 EXAMPLE EXAM #3 INSTRUCTOR: Honor Statement: I have neither given nor received information regarding this exam, and I will not do so until all exams have been graded and returned. Signed Date PRINTED
More informationData are sometimes not compatible with the assumptions of parametric statistical tests (i.e. t-test, regression, ANOVA)
BSTT523 Pagano & Gauvreau Chapter 13 1 Nonparametric Statistics Data are sometimes not compatible with the assumptions of parametric statistical tests (i.e. t-test, regression, ANOVA) In particular, data
More information6 Applying Logistic Regression Models
6 Applying Logistic Regression Models I Model Selection and Diagnostics I.1 Model Selection # of x s can be entered in the model: Rule of thumb: # of events (both [Y = 1] and [Y = 0]) per x 10. Need to
More informationTopics on Statistics 3
Topics on Statistics 3 Pejman Mahboubi April 24, 2018 1 Contingency Tables Assume we ask a sample of 1127 Americans if they believe in an afterlife world. The table below cross classifies the sample based
More informationSTA102 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 informationElementary Statistics Lecture 3 Association: Contingency, Correlation and Regression
Elementary Statistics Lecture 3 Association: Contingency, Correlation and Regression Chong Ma Department of Statistics University of South Carolina chongm@email.sc.edu Chong Ma (Statistics, USC) STAT 201
More informationUnit 9: Inferences for Proportions and Count Data
Unit 9: Inferences for Proportions and Count Data Statistics 571: Statistical Methods Ramón V. León 1/15/008 Unit 9 - Stat 571 - Ramón V. León 1 Large Sample Confidence Interval for Proportion ( pˆ p)
More informationSolutions for Examination Categorical Data Analysis, March 21, 2013
STOCKHOLMS UNIVERSITET MATEMATISKA INSTITUTIONEN Avd. Matematisk statistik, Frank Miller MT 5006 LÖSNINGAR 21 mars 2013 Solutions for Examination Categorical Data Analysis, March 21, 2013 Problem 1 a.
More informationSection IX. Introduction to Logistic Regression for binary outcomes. Poisson regression
Section IX Introduction to Logistic Regression for binary outcomes Poisson regression 0 Sec 9 - Logistic regression In linear regression, we studied models where Y is a continuous variable. What about
More informationChapter 2: Describing Contingency Tables - I
: Describing Contingency Tables - I Dipankar Bandyopadhyay Department of Biostatistics, Virginia Commonwealth University BIOS 625: Categorical Data & GLM [Acknowledgements to Tim Hanson and Haitao Chu]
More informationSociology 6Z03 Review II
Sociology 6Z03 Review II John Fox McMaster University Fall 2016 John Fox (McMaster University) Sociology 6Z03 Review II Fall 2016 1 / 35 Outline: Review II Probability Part I Sampling Distributions Probability
More informationChapter 11. Hypothesis Testing (II)
Chapter 11. Hypothesis Testing (II) 11.1 Likelihood Ratio Tests one of the most popular ways of constructing tests when both null and alternative hypotheses are composite (i.e. not a single point). Let
More informationCHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)
FROM: PAGANO, R. R. (007) I. INTRODUCTION: DISTINCTION BETWEEN PARAMETRIC AND NON-PARAMETRIC TESTS Statistical inference tests are often classified as to whether they are parametric or nonparametric Parameter
More informationMA : Introductory Probability
MA 320-001: Introductory Probability David Murrugarra Department of Mathematics, University of Kentucky http://www.math.uky.edu/~dmu228/ma320/ Spring 2017 David Murrugarra (University of Kentucky) MA 320:
More informationAnalysis of categorical data S4. Michael Hauptmann Netherlands Cancer Institute Amsterdam, The Netherlands
Analysis of categorical data S4 Michael Hauptmann Netherlands Cancer Institute Amsterdam, The Netherlands m.hauptmann@nki.nl 1 Categorical data One-way contingency table = frequency table Frequency (%)
More information8 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 informationssh tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm
Kedem, STAT 430 SAS Examples: Logistic Regression ==================================== ssh abc@glue.umd.edu, tap sas913, sas https://www.statlab.umd.edu/sasdoc/sashtml/onldoc.htm a. Logistic regression.
More informationGood Confidence Intervals for Categorical Data Analyses. Alan Agresti
Good Confidence Intervals for Categorical Data Analyses Alan Agresti Department of Statistics, University of Florida visiting Statistics Department, Harvard University LSHTM, July 22, 2011 p. 1/36 Outline
More information1) Answer the following questions with one or two short sentences.
1) Answer the following questions with one or two short sentences. a) What is power and how can you increase it? (2 marks) Power is the probability of rejecting a false null hypothesis. It may be increased
More informationHomework 1 Solutions
36-720 Homework 1 Solutions Problem 3.4 (a) X 2 79.43 and G 2 90.33. We should compare each to a χ 2 distribution with (2 1)(3 1) 2 degrees of freedom. For each, the p-value is so small that S-plus reports
More informationE509A: Principle of Biostatistics. GY Zou
E509A: Principle of Biostatistics (Effect measures ) GY Zou gzou@robarts.ca We have discussed inference procedures for 2 2 tables in the context of comparing two groups. Yes No Group 1 a b n 1 Group 2
More informationThe Multinomial Model
The Multinomial Model STA 312: Fall 2012 Contents 1 Multinomial Coefficients 1 2 Multinomial Distribution 2 3 Estimation 4 4 Hypothesis tests 8 5 Power 17 1 Multinomial Coefficients Multinomial coefficient
More informationStatistics Handbook. All statistical tables were computed by the author.
Statistics Handbook Contents Page Wilcoxon rank-sum test (Mann-Whitney equivalent) Wilcoxon matched-pairs test 3 Normal Distribution 4 Z-test Related samples t-test 5 Unrelated samples t-test 6 Variance
More informationLog-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 informationParametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami
Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami Parametric Assumptions The observations must be independent. Dependent variable should be continuous
More informationLecture 25. Ingo Ruczinski. November 24, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University
Lecture 25 Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University November 24, 2015 1 2 3 4 5 6 7 8 9 10 11 1 Hypothesis s of homgeneity 2 Estimating risk
More informationGoodness of Fit Tests
Goodness of Fit Tests Marc H. Mehlman marcmehlman@yahoo.com University of New Haven (University of New Haven) Goodness of Fit Tests 1 / 38 Table of Contents 1 Goodness of Fit Chi Squared Test 2 Tests of
More informationE509A: Principle of Biostatistics. GY Zou
E509A: Principle of Biostatistics (Week 4: Inference for a single mean ) GY Zou gzou@srobarts.ca Example 5.4. (p. 183). A random sample of n =16, Mean I.Q is 106 with standard deviation S =12.4. What
More information