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

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ’ & ST3241 Categorical Data Analysis I Loglinear Models 2 × 2 Models For Contingency Tables 1 ’ & Two-way Tables • Consider an I × J contingency table that crossclassifies a sample of n subjects on two categorical responses. • Let Y ij be the observed cell frequency and μ ij be the expected cell frequency of the ( i,j )-th cell. • Then we assume that the cell counts Y ij are independent having Poisson( μ ij ) distribution. • Note that, if π ij is the cell probability, then μ ij = nπ ij . 2 ’ & Independence Model • Under statistical independence of the row and column classifications, π ij = π i + π + j and hence μ ij = nπ i + π + j . • Denote the row variable by X and the column variable by Y . • The formula expressing independence is multiplicative. Thus, log μ ij is additive log μ ij = λ + λ X i + λ Y j for a row effect λ X i and a column effect λ Y j . • This is the loglinear model of independence. • The null hypothesis of independence between two categorical variables is simply the hypothesis that this model holds. 3 ’ & Example: Belief in Afterlife Observed Fitted Log Fitted Frequency Value Value 435 147 432.10 149.90 6.069 5.010 375 134 377.90 131.10 5.935 4.876 4 ’ & Example: Belief in Afterlife Parameter Set 1 Set 2 Set 3 λ 4.876 6.069 5.472 λ X 1 0.134 0.0067 λ X 2-0.134-0.067 λ Y 1 1.059 0.529 λ Y 2-1.059-0.529 5 ’ & Some SAS Codes data after; input female $ belief $ count; datalines; Female Yes 435 Female No 147 Male Yes 375 Male No 134 ; run; 6 ’ & SAS Codes proc genmod data=after order=data; class belief female; model count= female belief/ dist=poisson; output out=temp p=predict; run; proc print data=temp; var female belief count predict; run; 7 ’ & Partial Output Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance 1 0.1620 0.1620 Scaled Deviance 1 0.1620 0.1620 Pearson Chi-Square 1 0.1621 0.1621 Scaled Pearson X2 1 0.1621 0.1621 Log Likelihood 5164.1959 Algorithm converged. 8 ’ & Partial Output Analysis Of Parameter Estimates StandardWald 95% Conf Chi- Parameter DFEstimate Error Limits SquarePr > ChiSq Intercept 1 4.8760 0.06794.7429 5.00905160.87 < .0001 female Female 1 0.1340 0.06070.0151 0.2530 4.88 0.0272 female Male 0 0.0000 0.00000.0000 0.0000-- belief Yes 1 1.0587 0.06920.9230 1.1944 233.83 < .0001 belief No 0 0.0000 0.00000.0000 0.0000-- Scale 0 1.0000 0.00001.0000 1.0000 9 ’ & Partial Output Obs female belief count predict 1 Female Yes 435 432.099 2 Female No 147 149.901 3 Male Yes 375 377.901 4 Male No 134 131.099 10 ’ & Interpretations of Parameters • For I × J tables, loglinear models treat the N = IJ cell counts as N independent observations of a Poisson random component....
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 / 109

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online