Generalized Linear Models 1 Dobson A Generalized Linear

Generalized Linear Models 1

Dobson A: Generalized Linear Models. Chapman and Hall, New York, 1990. 2

It all starts with the exponential family of distributions. 3

The exponential family: 4

5

The normal distribution 6

The Binomial distribution 7

The Poisson Distribution 8

Who cares? 9

If X comes from the exponential family then lots of estimation and modeling problems can be formulated and solved within the context of the exponential family. 10

The normal distribution 11

Exercise, derive the mean and variance of the Poisson and Bernoulli distributions using their characterization as members of the exponential family. 12

The generalized linear model. 13

14

15

The linear model 16

Logistic regression 17

Proc Genmod 18

%clearall ods select parameterestimates; proc genmod data=a. chd 2018_a descending; title "Proc Genmod"; model chd=age / dist = bin link = logit; run; ods select parameterestimates; proc logistic data=a. chd 2018_a descending; title "Proc Logistic"; model chd=age; run; title; 19

Poisson Regression data skin; input cases city $ age $ population; log_pop=log(population); datalines; 1 MSP 15 -24 172675 16 MSP 25 -34 123065 30 MSP 35 -44 96216 71 MSP 45 -54 92051 102 MSP 55 -64 72159 130 MSP 65 -74 54722 133 MSP 75 -84 32185 40 MSP 85+ 8328 4 DFW 15 -24 181343 38 DFW 25 -34 146207 119 DFW 35 -44 121374 221 DFW 45 -54 111353 259 DFW 55 -64 83004 310 DFW 65 -74 55932 295 DFW 75 -84 36518 65 DFW 85+ 7583 ; run; 20

Poisson Regression %clearall proc genmod data=skin; class city (param=ref ref=last) age (param=ref ref=last); model cases= city age / offset=log_pop dist=poi link=log type 3; run; 21
- Slides: 21