1 The SAS System 11:10 Thursday, October 30, 2003 NOTE: Copyright (c) 1999-2001 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) Proprietary Software Release 8.2 (TS2M0) Licensed to UNC-CHAPEL HILL-SYSTEMWIDE-T/R, Site 0039466002. NOTE: This session is executing on the WIN_PRO platform. NOTE: SAS initialization used: real time 0.28 seconds cpu time 0.15 seconds NOTE: AUTOEXEC processing beginning; file is c:\local\sas 8x\autoexec.sas. NOTE: AUTOEXEC processing completed. 1 /* file: ~jpreisse/DIA/UI/diag_uigee_exch.sas */ 2 /* date: 06/28/03 */ 3 /* name: John Preisser */ 4 /* what: Logitstic Model Diagnostics under Exchangeable Correlation */ 5 /* for UI data using GEE macro */ 6 7 filename geed "diag100.sas"; 8 *filename geed "/home/faculty/jpreisse/DIA/geedia_100.mac"; 9 options fmtsearch=(work.format, formats.formats, fmt.format); 10 *options ls=72 ps=58 Mprint; 11 options ls=72 ps=58; 12 13 data UI; 14 input pract_id doct_id pat_id bothered female ageyrs age 14 ! weekacc dayacc 15 severe toilet mdage dobs rit hit; 16 cards; NOTE: The data set WORK.UI has 137 observations and 15 variables. NOTE: DATA statement used: real time 0.03 seconds cpu time 0.03 seconds 154 ; 155 156 /*********************************************/ 157 /* THIS PART WILL USE GENMOD TO FIND DFBETAS */ 158 /*********************************************/ 159 data UI; 160 set UI; 161 inter=1; 162 *if pat_id in (8,44,122) then delete; 163 164 /***********************************/ 165 /* IF MISSING THEN DELETE */ 166 /***********************************/ 167 if (bothered=. | female=. |age=. | dayacc=. | severe=. | 167 ! toilet=.) then delete; 2 The SAS System 11:10 Thursday, October 30, 2003 168 run; NOTE: There were 137 observations read from the data set WORK.UI. NOTE: The data set WORK.UI has 137 observations and 16 variables. NOTE: DATA statement used: real time 0.03 seconds cpu time 0.03 seconds 169 170 proc sort data=UI; 171 by pat_id; 172 run; NOTE: There were 137 observations read from the data set WORK.UI. NOTE: The data set WORK.UI has 137 observations and 16 variables. NOTE: PROCEDURE SORT used: real time 0.03 seconds cpu time 0.03 seconds 173 174 /************************************************************ 174 ! ******************/ 175 /* Run GEE/exch correlation using PROC GENMOD 175 ! */ 176 /************************************************************ 176 ! ******************/ 177 178 ods output covB=covB ObStats=ObStats 178 ! ParameterEstimates=ParameterEstimates; 179 proc genmod data=UI descending; 180 class pract_id; 181 model bothered = female age dayacc severe toilet/ dist=bin 181 ! link=logit r covB; 182 repeated subject=pract_id/ type=exch corrw; 183 run; NOTE: PROC GENMOD is modeling the probability that bothered='1'. NOTE: Algorithm converged. NOTE: The scale parameter was held fixed. NOTE: Algorithm converged. NOTE: The data set WORK.PARAMETERESTIMATES has 7 observations and 8 variables. NOTE: The data set WORK.OBSTATS has 137 observations and 3 variables. NOTE: The data set WORK.COVB has 6 observations and 7 variables. NOTE: The PROCEDURE GENMOD printed pages 1-6. NOTE: PROCEDURE GENMOD used: real time 0.14 seconds cpu time 0.14 seconds 184 185 *proc print data=gencook; 186 *run; 3 The SAS System 11:10 Thursday, October 30, 2003 187 188 /************************************************************ 188 ! *****************************/ 189 /* PRODUCE DFBETAS FOR LOGISTIC REGRESSION USING SAS GEE 189 ! MACRO, EXCHANGEABLE CORRELATION */ 190 /************************************************************ 190 ! *****************************/ 191 192 %inc geed; 1344 1345 %gee(data=ui, yvar=bothered, xvar=inter female age dayacc 1345 ! severe toilet, 1346 id=pract_id, link=3, vari=3, corr=4, monitor=no, 1346 ! clsout=clsobs); Worksize = 30720000 Symbol size = 262128 NOTE: IML Ready NOTE: Module LINKID defined. NOTE: Module DERI defined. NOTE: Module VARFUN defined. NOTE: Module DEVI defined. NOTE: Module CANON defined. NOTE: Module INFO defined. NOTE: Module DESC defined. NOTE: Module FIRSTB defined. NOTE: Module CONSCHK defined. NOTE: Module INIT defined. NOTE: Module FINDINV defined. NOTE: Module GLIM defined. NOTE: Module ESTB defined. NOTE: Module ESTRPHI defined. NOTE: Module XCH defined. NOTE: Module XCHINV defined. NOTE: Module INVCORR defined. NOTE: Module VARIAN defined. NOTE: Module MAIN defined. WARNING: End of File reached. statement : LIST at line 1345 column 1 traceback : module DESC at line 1345 column 1 module INIT at line 1345 column 1 module MAIN at line 1345 column 1 NOTE: The data set WORK.C has 1 observations and 7 variables. NOTE: The data set WORK.E has 38 observations and 7 variables. WARNING: End of File reached. statement : LIST at line 1345 column 1 traceback : module DESC at line 1345 column 1 module INIT at line 1345 column 1 module MAIN at line 1345 column 1 NOTE: The data set WORK.F has 1 observations and 7 variables. 1347 NOTE: Exiting IML. The SAS System NOTE: The data set WORK.CLSOBS has 38 observations and 12 variables. NOTE: The PROCEDURE IML printed pages 7-9. NOTE: PROCEDURE IML used: real time 0.23 seconds cpu time 0.23 seconds 1348 proc print data=clsobs; 1349 title "Cluster diagnostics for UI data: logistic model 1349 ! with exchangeable correlation"; 1350 title2 "including DFBETA (not standardized) for 1350 ! covariates"; 1351 run; NOTE: There were 38 observations read from the data set WORK.CLSOBS. NOTE: The PROCEDURE PRINT printed pages 10-11. NOTE: PROCEDURE PRINT used: real time 0.01 seconds cpu time 0.01 seconds 1352 1353 1354 NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 1.12 seconds cpu time 0.71 seconds The SAS System 11:10 Thursday, October 30, 2003 1 The GENMOD Procedure Model Information Data Set WORK.UI Distribution Binomial Link Function Logit Dependent Variable bothered Observations Used 137 Class Level Information Class Levels Values pract_id 38 8 24 27 41 45 55 56 60 65 89 102 107 108 111 113 118 124 125 127 130 132 137 146 153 156 182 185 195 201 206 207 208 211 216 220 228 232 235 Response Profile Ordered Total Value bothered Frequency 1 1 54 2 0 83 PROC GENMOD is modeling the probability that bothered='1'. Parameter Information Parameter Effect Prm1 Intercept Prm2 female Prm3 age Prm4 dayacc Prm5 severe Prm6 toilet Criteria For Assessing Goodness Of Fit Criterion DF Value Value/DF Deviance 131 127.1070 0.9703 Scaled Deviance 131 127.1070 0.9703 Pearson Chi-Square 131 136.5505 1.0424 Scaled Pearson X2 131 136.5505 1.0424 Log Likelihood -63.5535 The SAS System 11:10 Thursday, October 30, 2003 2 The GENMOD Procedure Algorithm converged. Estimated Covariance Matrix Prm1 Prm2 Prm3 Prm4 Prm5 Prm6 Prm1 1.22839 -0.29766 -0.23578 -0.01774 -0.25454 -0.03461 Prm2 -0.29766 0.37405 0.02960 0.003071 -0.008538 -0.003772 Prm3 -0.23578 0.02960 0.34193 -0.008241 0.01604 0.004056 Prm4 -0.01774 0.003071 -0.008241 0.009177 -0.001923 -0.000462 Prm5 -0.25454 -0.008538 0.01604 -0.001923 0.13290 -0.003912 Prm6 -0.03461 -0.003772 0.004056 -0.000462 -0.003912 0.007316 Analysis Of Initial Parameter Estimates Standard Wald 95% Confidence Chi- Parameter DF Estimate Error Limits Square Intercept 1 -3.2930 1.1083 -5.4653 -1.1208 8.83 female 1 -0.6723 0.6116 -1.8710 0.5264 1.21 age 1 -0.6406 0.5847 -1.7867 0.5055 1.20 dayacc 1 0.4154 0.0958 0.2277 0.6032 18.81 severe 1 0.8285 0.3646 0.1140 1.5431 5.17 toilet 1 0.1108 0.0855 -0.0568 0.2785 1.68 Scale 0 1.0000 0.0000 1.0000 1.0000 Analysis Of Initial Parameter Estimates Parameter Pr > ChiSq Intercept 0.0030 female 0.2717 age 0.2733 dayacc <.0001 severe 0.0230 toilet 0.1951 Scale NOTE: The scale parameter was held fixed. GEE Model Information Correlation Structure Exchangeable Subject Effect pract_id (38 levels) Number of Clusters 38 Correlation Matrix Dimension 8 Maximum Cluster Size 8 Minimum Cluster Size 1 The SAS System 11:10 Thursday, October 30, 2003 3 The GENMOD Procedure Algorithm converged. Working Correlation Matrix Col1 Col2 Col3 Col4 Row1 1.0000 0.0932 0.0932 0.0932 Row2 0.0932 1.0000 0.0932 0.0932 Row3 0.0932 0.0932 1.0000 0.0932 Row4 0.0932 0.0932 0.0932 1.0000 Row5 0.0932 0.0932 0.0932 0.0932 Row6 0.0932 0.0932 0.0932 0.0932 Row7 0.0932 0.0932 0.0932 0.0932 Row8 0.0932 0.0932 0.0932 0.0932 Working Correlation Matrix Col5 Col6 Col7 Col8 Row1 0.0932 0.0932 0.0932 0.0932 Row2 0.0932 0.0932 0.0932 0.0932 Row3 0.0932 0.0932 0.0932 0.0932 Row4 0.0932 0.0932 0.0932 0.0932 Row5 1.0000 0.0932 0.0932 0.0932 Row6 0.0932 1.0000 0.0932 0.0932 Row7 0.0932 0.0932 1.0000 0.0932 Row8 0.0932 0.0932 0.0932 1.0000 Analysis Of GEE Parameter Estimates Empirical Standard Error Estimates Standard 95% Confidence Parameter Estimate Error Limits Z Pr > |Z| Intercept -3.0543 0.9590 -4.9339 -1.1747 -3.18 0.0014 female -0.7453 0.6003 -1.9218 0.4312 -1.24 0.2144 age -0.6756 0.5606 -1.7743 0.4231 -1.21 0.2281 dayacc 0.3918 0.0932 0.2091 0.5746 4.20 <.0001 severe 0.8124 0.3590 0.1088 1.5161 2.26 0.0236 toilet 0.1078 0.0989 -0.0861 0.3017 1.09 0.2758 GEE Observation Statistics Observation Resraw Reschi 1 0.1019736 0.3369763 2 -0.064329 -0.262206 3 0.1309804 0.3882293 4 -0.103491 -0.339762 5 -0.250692 -0.578415 The SAS System 11:10 Thursday, October 30, 2003 4 The GENMOD Procedure GEE Observation Statistics Observation Resraw Reschi 6 -0.174461 -0.459706 7 0.0014454 0.0380454 8 -0.91738 -3.332211 9 -0.248157 -0.574513 10 0.005506 0.0744078 11 -0.641602 -1.33798 12 -0.422872 -0.85599 13 -0.506621 -1.013332 14 0.8101213 2.0655557 15 -0.135933 -0.396632 16 -0.212252 -0.519077 17 0.5287875 1.0593322 18 -0.19797 -0.496826 19 0.9062091 3.1083779 20 -0.151558 -0.422647 21 -0.331129 -0.703602 22 0.8073289 2.0469959 23 -0.207719 -0.512033 24 -0.183334 -0.473805 25 -0.449664 -0.90392 26 0.1884311 0.481852 27 0.0168291 0.1308325 28 -0.09458 -0.323202 29 -0.145972 -0.413427 30 0.5902359 1.2001786 31 -0.11379 -0.358331 32 -0.195928 -0.493629 33 -0.162064 -0.439783 34 -0.250692 -0.578415 35 -0.231358 -0.548632 36 0.4459269 0.8971153 37 -0.126542 -0.380624 38 0.065096 0.2638723 39 -0.163087 -0.441437 40 -0.184407 -0.475501 41 -0.243048 -0.566646 42 -0.873435 -2.626995 43 0.2740763 0.6144552 44 -0.748251 -1.724012 45 0.0462838 0.2202952 46 -0.641125 -1.336594 47 -0.506331 -1.012742 48 -0.223507 -0.536509 49 -0.164943 -0.444436 50 0.108362 0.3486136 51 0.6162576 1.267247 52 0.7178812 1.5951822 53 0.2381852 0.5591556 54 0.1748573 0.4603385 The SAS System 11:10 Thursday, October 30, 2003 5 The GENMOD Procedure GEE Observation Statistics Observation Resraw Reschi 55 0.7148495 1.5833255 56 0.0141424 0.119772 57 0.1576471 0.4326094 58 -0.152545 -0.424268 59 0.0033203 0.0577183 60 -0.199008 -0.498449 61 -0.105518 -0.34346 62 -0.318153 -0.683085 63 -0.082026 -0.298923 64 0.6616242 1.3983184 65 -0.34626 -0.727778 66 -0.214181 -0.522071 67 -0.29182 -0.641927 68 0.3461288 0.7275666 69 0.1033508 0.3395045 70 -0.196596 -0.494676 71 -0.151878 -0.423173 72 -0.652299 -1.369685 73 -0.209997 -0.515575 74 -0.271183 -0.609989 75 0.7438827 1.7042481 76 -0.519703 -1.040215 77 -0.067186 -0.268375 78 -0.074266 -0.283238 79 -0.206382 -0.509954 80 -0.075983 -0.28676 81 -0.285047 -0.631422 82 0.8111587 2.0725468 83 -0.1023 -0.337576 84 0.2456482 0.57065 85 0.6853938 1.4760002 86 0.1845944 0.4757977 87 0.8643519 2.5242858 88 0.9375465 3.8745194 89 -0.68832 -1.486076 90 0.3280092 0.6986528 91 -0.293318 -0.644254 92 -0.047419 -0.223113 93 0.4632431 0.929 94 -0.108673 -0.349175 95 0.5873401 1.1930226 96 0.3167979 0.6809521 97 0.004315 0.0658305 98 0.0786832 0.292238 99 0.6445761 1.3466781 100 0.5711032 1.1539338 101 -0.131275 -0.388732 102 -0.104223 -0.341101 103 -0.167009 -0.447764 The SAS System 11:10 Thursday, October 30, 2003 6 The GENMOD Procedure GEE Observation Statistics Observation Resraw Reschi 104 -0.108089 -0.348121 105 -0.459507 -0.922044 106 -0.152724 -0.424561 107 -0.328733 -0.6998 108 -0.219638 -0.530525 109 -0.346118 -0.727549 110 -0.399841 -0.816225 111 -0.24343 -0.567234 112 -0.148902 -0.418273 113 -0.247731 -0.573857 114 0.2145384 0.5226248 115 0.2963319 0.6489411 116 -0.114751 -0.360035 117 0.4266385 0.8626125 118 -0.119261 -0.367981 119 -0.22582 -0.540083 120 0.5604266 1.1291294 121 -0.086031 -0.306804 122 -0.434062 -0.875772 123 0.1163513 0.3628655 124 -0.11187 -0.354909 125 -0.263644 -0.598363 126 0.6660051 1.4121111 127 -0.132476 -0.390776 128 0.2216399 0.533622 129 -0.038152 -0.199161 130 -0.292106 -0.642371 131 0.0205069 0.1446936 132 0.1055221 0.3434684 133 0.3836053 0.7888834 134 -0.169256 -0.451377 135 0.7764339 1.8635854 136 -0.261026 -0.594329 137 0.3938076 0.8060032 The SAS System GEE with deletion diagnostics ( Ver - 1.00 ) ============================================ Data File: UI Outcome variable: BOTHERED Covariates: INTER FEMALE AGE DAYACC SEVERE TOILET Link: 3 (Logit) Variance: 3 (Binomial) Correlation: 4 (Exchangeable) Total number of records read: 137 Total number of clusters: 38 Maximum and minimum cluster size: 8 and 1 Averages of Outcome variable and Covariates (over all) BOTHERED INTER FEMALE AGE Observations: 0.3941606 1 0.8540146 0.5248175 Cluster Means: 0.4005326 1 0.8793546 0.5472932 DAYACC SEVERE TOILET Observations: 3.2513358 2.1167883 6.3722628 Cluster Means: 3.0362015 2.0884712 6.5309524 binary responses: scale parameter is fixed at 1 The SAS System Convergence after 5 iteration(s). Working exchangeable correlation is 0.093836 The SAS System Estimate, s.e. and z-score: Estimate s.e.-Naive s.e.-Robust z-robust INTER -3.0528 1.1092 0.9590 -3.183 FEMALE -0.7457 0.6003 0.6001 -1.243 AGE -0.6759 0.5750 0.5605 -1.206 DAYACC 0.3917 0.0919 0.0932 4.202 SEVERE 0.8123 0.3536 0.3590 2.263 TOILET 0.1078 0.0840 0.0989 1.090 Scale parameter is 1 Pseudo deviance 127.25498 Pseudo chi-square 131.89345 (c) J. S. Preisser, 2003 Department of Biostatistics University of North Carolina Chapel Hill, N.C. Cluster diagnostics for UI data: logistic model with exchangeable correl including DFBETA (not standardized) for covariates Obs ID I NI TRQWCLS COOKDCLS GCLS INTER FEMALE 1 8 1 3 0.08763 0.00467 0.00342 -0.08640 0.00481 2 24 2 2 0.05041 0.00192 0.01261 -0.04921 -0.01792 3 27 3 5 0.14208 0.16376 0.07891 -0.49041 0.29794 4 41 4 4 0.28369 0.14457 0.35258 0.25419 0.17517 5 45 5 4 0.15133 0.01374 0.09785 -0.25062 0.04856 6 55 6 2 0.03503 0.02084 0.07693 0.09799 0.04858 7 56 7 3 0.06091 0.00814 0.14733 -0.03515 0.02705 8 60 8 7 0.28668 0.04640 0.17786 0.11608 -0.26937 9 65 9 3 0.06460 0.00464 0.00996 -0.09441 -0.01677 10 89 10 4 0.19636 0.01610 0.08353 -0.15878 0.07216 11 102 11 5 0.17733 0.03508 0.09824 0.19064 -0.09167 12 107 12 3 0.41764 0.23976 0.16696 0.16322 0.01690 13 108 13 4 0.22917 0.03854 0.15970 0.09132 -0.09289 14 111 14 2 0.11245 0.00636 0.09189 -0.02183 0.04066 15 113 15 2 0.06583 0.01161 0.11214 -0.07194 0.04854 16 118 16 4 0.17946 0.02236 0.11197 -0.09182 0.04435 17 124 17 4 0.06451 0.00334 0.00953 -0.06929 -0.02377 18 125 18 8 0.51842 0.07181 0.24008 0.21535 -0.34000 19 127 19 4 0.14546 0.01391 0.10581 0.07242 -0.04501 20 130 20 1 0.05499 0.00382 0.01538 0.05605 -0.01751 21 132 21 3 0.12315 0.02511 0.19769 0.14554 0.04045 22 137 22 4 0.08945 0.00531 0.02259 -0.09290 -0.02310 23 146 23 3 0.13031 0.03064 0.11558 -0.03928 -0.03606 24 153 24 1 0.05452 0.02214 0.10713 -0.09001 0.02975 25 156 25 3 0.09698 0.09284 0.13198 0.29285 0.11557 Obs AGE DAYACC SEVERE TOILET 1 -0.03147 0.010144 0.03368 0.001240 2 0.00617 0.003133 0.00355 0.004002 3 0.21276 -0.051469 0.16839 -0.024253 4 -0.36370 -0.037168 -0.07200 -0.001375 5 -0.00755 0.003100 0.09095 0.002037 6 0.08099 -0.017032 0.00412 -0.016086 7 0.11260 -0.004588 0.00657 -0.005486 8 0.00404 0.004315 -0.02330 0.023655 9 0.03939 0.007188 0.00570 0.004972 10 -0.10434 0.009407 0.05751 -0.000678 11 0.08040 -0.020697 -0.04164 -0.011241 12 0.10468 0.001924 0.14738 -0.094379 13 -0.09381 -0.024292 0.02393 -0.003877 14 0.00985 0.006194 0.00648 -0.001290 15 0.04370 -0.000767 0.00554 0.008358 16 0.01427 -0.001569 -0.01589 0.022643 17 -0.01156 0.005694 0.01734 0.002932 18 -0.01926 0.010717 -0.04816 0.024918 19 0.02026 -0.001980 -0.02834 -0.006076 20 -0.05317 0.003063 0.00556 -0.008247 21 0.10477 0.010253 -0.08418 -0.012053 22 0.03672 0.006241 0.01561 0.001718 23 0.04772 -0.012422 -0.02267 0.028967 24 0.04344 -0.008614 -0.02123 0.024859 25 0.18985 -0.030912 -0.11866 -0.008108 Cluster diagnostics for UI data: logistic model with exchangeable correl including DFBETA (not standardized) for covariates Obs ID I NI TRQWCLS COOKDCLS GCLS INTER FEMALE 26 182 26 6 0.25855 0.03052 0.22580 0.02323 0.08824 27 185 27 5 0.14372 0.02722 0.18485 0.02218 0.07954 28 195 28 3 0.18001 0.01917 0.09487 0.17682 -0.17548 29 201 29 2 0.07464 0.00226 0.00483 -0.03719 -0.01043 30 206 30 4 0.19668 0.01661 0.07921 -0.19967 0.04444 31 207 31 3 0.13641 0.01184 0.06861 -0.04859 0.01270 32 208 32 2 0.07289 0.00380 0.01396 -0.07594 -0.02737 33 211 33 4 0.17766 0.02083 0.07177 -0.22626 0.04104 34 216 34 4 0.14327 0.01370 0.10160 -0.25924 0.01387 35 220 35 5 0.26894 0.03892 0.18889 0.16140 -0.00550 36 228 36 3 0.11159 0.00781 0.01249 0.02536 0.00233 37 232 37 4 0.19462 0.02492 0.06404 0.22209 -0.18999 38 235 38 4 0.22261 0.07675 0.18038 0.31651 0.07277 Obs AGE DAYACC SEVERE TOILET 26 -0.21351 0.002416 -0.00978 0.002199 27 -0.00848 0.014068 -0.03097 0.003783 28 -0.08179 -0.001322 0.02959 -0.003511 29 0.00419 0.005570 0.01857 -0.004335 30 0.00633 -0.002974 0.00665 0.015276 31 -0.07890 -0.001732 0.00746 0.002432 32 -0.01446 -0.001865 0.03472 0.002478 33 0.02114 0.018161 0.06316 0.006241 34 0.09107 0.002891 0.07857 0.005899 35 -0.08422 0.020258 -0.13640 0.018162 36 -0.07748 0.016492 -0.00121 -0.004414 37 -0.04821 0.016254 -0.03136 -0.000433 38 -0.01932 0.040315 -0.14622 -0.021409