Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 If we live with a deep sense of gratitude, our life will be greatly embellished.

Similar presentations


Presentation on theme: "1 If we live with a deep sense of gratitude, our life will be greatly embellished."— Presentation transcript:

1 1 If we live with a deep sense of gratitude, our life will be greatly embellished.

2 2 Categorical Data Analysis Chapter 10: Tests for Matched Pairs

3 3 Meta Analysis Also known as stratified analysis Section 6.3.2: Cochran-Mantel-Haenszel test; test for conditional independence Situation: When another variable (strata Z) may “pollute” the effect of a categorical explanatory variable X on a categorical response Y Goal: Study the effect of X on Y while controlling the stratification variable Z without assuming a model

4 4 Example: Respiratory Improvement (SAS textbook, P. 46) CenterTreatmentYesNoTotal 1Test291645 1Placebo143145 Total434790 2Test37945 2Placebo242145 Total612990

5 5 SAS Output Summary Statistics for trtmnt by response Controlling for center Cochran-Mantel-Haenszel Statistics (Based on Table Scores) Statistic Alternative Hypothesis DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 1 Nonzero Correlation 1 18.4106 <.0001 2 Row Mean Scores Differ 1 18.4106 <.0001 3 General Association 1 18.4106 <.0001

6 What to Do if Dependent (Section 6.3.5) When X and Y are NOT conditionally independent given Z, we would like to test for homogeneous association (Section 6.3.6) If X, Y, Z have homogeneous association, we would like to estimate the common conditional odds ratio for X, Y given Z 6

7 7 SAS Output Estimates of the Common Relative Risk (Row1/Row2) Type of Study Method Value 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Case-Control Mantel-Haenszel 4.0288 2.1057 7.7084 (Odds Ratio) Logit 4.0286 2.1057 7.7072 Cohort Mantel-Haenszel 1.7368 1.3301 2.2680 (Col1 Risk) Logit 1.6760 1.2943 2.1703 Cohort Mantel-Haenszel 0.4615 0.3162 0.6737 (Col2 Risk) Logit 0.4738 0.3264 0.6877 Breslow-Day Test for Homogeneity of the Odds Ratios ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 0.0002 DF 1 Pr > ChiSq 0.9900 Total Sample Size = 180

8 8 Matched-pair Data Comparing categorical responses for two “paired” samples When either Each sample has the same subjects (or say subjects are measured twice) Or A natural pairing exists between each subject in one sample and a subject from the other sample (eg. Twins)

9 9 Example: Rating for Prime Minister Second Survey First SurveyApproveDisapprove Approve794150 Disapprove86570

10 10 Marginal Homogeneity The probabilities of “success” for both samples are identical (The data table shows “symmetry” across the main diagonal) Eg. The probability of approve at the first and 2 nd surveys are identical

11 11 Estimating Differences of Proportions Sample estimate: P +1 -P 1+ Standard error of P +1 -P 1+ (based on the multinomial distribution of data): Asymptotical (1- confidence interval:

12 12 McNemar Test (for 2x2 Tables only) See SAS textbook Sec 3.7 (p. 40) Ho: marginal homogeneity Ha: no marginal homogeneity A special case of C-M-H test; an approximate test (when n*=n 12 +n 21 >10) Exact test (when n*=n 12 +n 21 <10)

13 Level of Agreement: Kappa Coefficient The larger the Kappa coefficient is; the stronger the agreement is The difference between observed agreement and that expected under independence compared to the maximum possible difference is called Kappa coefficient 13

14 14 SAS Output McNemar's Test Statistic (S) 17.3559 DF 1 Asymptotic Pr > S <.0001 Exact Pr >= S 3.716E-05 Simple Kappa Coefficient Kappa 0.6996 ASE 0.0180 95% Lower Conf Limit 0.6644 95% Upper Conf Limit 0.7348 Sample Size = 1600 Level of agreement

15 15 Chi-square Test for Square Tables Consider a IxI table Marginal homogeneity: Symmetry: for all pairs of cells, Symmetry => marginal homogeneity <=

16 16 Chi-square Test for Square Tables Ho: symmetry vs. Ha: not symmetry Fitted values: Standardized Pearson residuals: Pearson Chi-square Test statistic: X^2 follows approximately Chi-square with df = I(I-1)/2

17 17 Example: Coffee Purchase 2 nd purchase 1 st purchase High point Taster’sSankaNescafeBrim High point 931744710 Taster’s9461109 Sanka1711155912 Nescafe649152 Brim10412227

18 18 Example: Coffee Purchase X^2 = 20.4 and df is 5(5-1)/2=10  lack of fit (reject Ho: symmetry)  which pairs of cells cause the lack of fit? Examine their standardized Pearson residuals  The pair (1,3) and (3,1) contribute the most; other pairs are fine (r ij ^2 is around 1 or less)


Download ppt "1 If we live with a deep sense of gratitude, our life will be greatly embellished."

Similar presentations


Ads by Google