Download presentation
Presentation is loading. Please wait.
1
Linear statistical models 2009 Count data Contingency tables and log-linear models Poisson regression
2
Linear statistical models 2009 Contingency tables and log-linear models Expected frequency: Log-linear models are linear models of the log expected frequency (log is used as link function)
3
Linear statistical models 2009 A log-linear model for independence The last parameter of each kind can be set to zero
4
Linear statistical models 2009 The saturated log-linear model Independence can be tested by relating the difference in deviance D 2 – D 1 to a 2 distribution with df 2 – df 1 degrees of freedom. What is D 1 and df 1 for the saturated model?
5
Linear statistical models 2009 Analysis of example data (1) proc genmod data=linear.snoring; class snore heart; model count = snore heart/link=log dist=Poisson; run; Can a Poisson distribution be justified?
6
Linear statistical models 2009 Analysis of example data (2) Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 4.4922 0.0958 4.3044 4.6801 2197.28 <.0001 Snore Often 1 -1.4630 0.0514 -1.5637 -1.3624 811.67 <.0001 Snore Seldom 0 0.0000 0.0000 0.0000 0.0000.. Heart No 1 3.0719 0.0975 2.8807 3.2630 992.02 <.0001 Heart Yes 0 0.0000 0.0000 0.0000 0.0000.. Scale 0 1.0000 0.0000 1.0000 1.0000 Estimates of log( )
7
Linear statistical models 2009 Contingency table with one response variable Consider the example data written in the following form proc genmod data=linear.snoring2; class snore; model heart/total = snore/link=logit dist=binomial; run;
8
Linear statistical models 2009 Analysis of example data (2) Analysis Of Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Pr > ChiSq Intercept 1 -2.0989 0.1484 -2.3896 -1.8081 200.13 <.0001 Snore No 1 -1.4033 0.1987 -1.7927 -1.0139 49.89 <.0001 Snore Yes 0 0.0000 0.0000 0.0000 0.0000.. Scale 0 1.0000 0.0000 1.0000 1.0000 log(p/(1- p)) p Yes-2.09890.109204 No-3.50220.02925
9
Linear statistical models 2009 The multinomial distribution Consider a nominal random variable that takes k distinct values with probabilities p 1, p 2, …, p k Assume that have made n independent observations of that variable Then where n j is the number of times the j th value is observed Note that n is fixed in a multinomial distribution. If the observations arrive randomly, a Poisson distribution is usually preferable.
10
Linear statistical models 2009 Higher order tables Consider the following data on drug use Model:
11
Linear statistical models 2009 Terminology A = alcoholC = cigaretteM = marijuana Model A C M: mutual independence model Model A C M A*C A*M C*M: homogeneous association model Model A C M A*C A*M: Model in which C and M are mutually independent when controlling for A
12
Linear statistical models 2009 Poisson regression I Poisson distribution Log link where x is a covariate
13
Linear statistical models 2009 Poisson regression II Poisson distribution Log link where the parameters are row, column and treatment effects
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.