/********************************************* EPILEPSY DATA The variables are Y1 Y2 Y3 Y4 TRT BASE AGE Y1-Y4 = Two-week seizure counts TRT = Treatment (0=placebo, 1=progabide) BASE = 8-week baseline seizure count AGE = Age in years FILENAME: epilepsy.sas *********************************************/ data epilepsy; input Y1 Y2 Y3 Y4 TRT BASE AGE; PATIENT = _n_; cards; 5 3 3 3 0 11 31 3 5 3 3 0 11 30 2 4 0 5 0 6 25 4 4 1 4 0 8 36 7 18 9 21 0 66 22 5 2 8 7 0 27 29 6 4 0 2 0 12 31 40 20 23 12 0 52 42 5 6 6 5 0 23 37 14 13 6 0 0 10 28 26 12 6 22 0 52 36 12 6 8 5 0 33 24 4 4 6 2 0 18 23 7 9 12 14 0 42 36 16 24 10 9 0 87 26 11 0 0 5 0 50 26 0 0 3 3 0 18 28 37 29 28 29 0 111 31 3 5 2 5 0 18 32 3 0 6 7 0 20 21 3 4 3 4 0 12 29 3 4 3 4 0 9 21 2 3 3 5 0 17 32 8 12 2 8 0 28 25 18 24 76 25 0 55 30 2 1 2 1 0 9 40 3 1 4 2 0 10 19 13 15 13 12 0 47 22 11 14 9 8 1 76 18 8 7 9 4 1 38 32 0 4 3 0 1 19 20 3 6 1 3 1 10 20 2 6 7 4 1 19 18 4 3 1 3 1 24 24 22 17 19 16 1 31 30 5 4 7 4 1 14 35 2 4 0 4 1 11 57 3 7 7 7 1 67 20 4 18 2 5 1 41 22 2 1 1 0 1 7 28 0 2 4 0 1 22 23 5 4 0 3 1 13 40 11 14 25 15 1 46 43 10 5 3 8 1 36 21 19 7 6 7 1 38 35 1 1 2 4 1 7 25 6 10 8 8 1 36 26 2 1 0 0 1 11 25 102 65 72 63 1 151 22 4 3 2 4 1 22 32 8 6 5 7 1 42 25 1 3 1 5 1 32 35 18 11 28 13 1 56 21 6 3 4 0 1 24 41 3 5 4 3 1 16 32 1 23 19 8 1 22 26 2 3 0 1 1 25 21 0 0 0 0 1 13 36 1 4 3 2 1 12 37 ; /*Printout of data and descriptive statistics*/ title "Descriptive Statistics"; proc print; run; proc means; run; proc chart; hbar y1-y4 / discrete; run; /*Run Proc Genmod for count data*/ proc genmod; model y1 = trt base / dist=poisson; run; /*Overdispersed Poisson model*/ proc genmod; model y1 = trt base / dist=poisson dscale; run; /*Negative Binomial model*/ proc genmod; model y1 = trt base / dist=negbin; run; /*Rearrange Data for GEE analysis*/ data longit; set epilepsy; seizure=y1; time=1; output; seizure=y2; time=2; output; seizure=y3; time=3; output; seizure=y4; time=4; output; keep seizure trt time patient base; run; proc print data=longit; run; /*GEE analysis for Epilepsy Data*/ proc genmod data=longit; class patient time; model seizure = trt base time / dist=poisson type3; repeated subject = patient / within=time type=ar(1) corrw; run;