# Notes 3 - ’ & ST3241 Categorical Data Analysis I...

This preview shows pages 1–10. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ’ & ST3241 Categorical Data Analysis I Two-way Contingency Tables Odds Ratio and Tests of Independence 1 ’ & 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 ’ & 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 ˆ θ ) = r 1 n 11 + 1 n 12 + 1 n 21 + 1 n 22 3 ’ & 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 ’ & Example: Aspirin Usage • Sample Odds Ratio = 1.832 • Sample log odds ratio, log ˆ θ = log(1 . 832) = 0 . 2629 • ASE of log ˆ θ r 1 89 + 1 10933 + 1 10845 + 1 104 = 0 . 123 • 95% confidence interval for log θ equals . 605 ± 1 . 96 × . 123 • The corresponding confidence interval for θ is ( e . 365 ,e . 846 ) or (1.44,2.33) . 5 ’ & Recall SAS Output Estimates of the Relative Risk (Row1/Row2) Type of Study Value 95% Confidence Limits Case-Control (Odds Ratio) 1.8321 1.4400 2.3308 Cohort (Col1 Risk) 1.8178 1.4330 2.3059 Cohort (Col2 Risk) 0.9922 0.9892 0.9953 Sample Size = 22071 6 ’ & 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 ’ & Notes (p. 25) • Recall the formula for sample odds ratio ˆ θ = n 11 n 22 n 12 n 21 • The sample odds ratio is 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 11 + 0 . 5)( n 22 + 0 . 5) ( n 12 + 0 . 5)( n 21 + 0 . 5) • In the ASE formula also, n ij ’s are replaced by n ij + 0 . 5 . 8 ’ & Observations • A sample odds ratio 1.832 does not mean that p 1 is 1.832 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....
View Full Document

## This note was uploaded on 11/20/2011 for the course STATISTICS ST3241 taught by Professor Manwai's during the Spring '11 term at National University of Singapore.

### Page1 / 56

Notes 3 - ’ & ST3241 Categorical Data Analysis I...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online