1 * example1.sas 2 * xref: 3 * input: blex.sas 4 * output: 5 * does - Example how to use GEE macro. 6 - The data step generates data at random. Its details 7 are not important. What matters is that it generates 8 variables:y, id, x1-x5. 9 - Notice that x2-x3 are cluster-level covariates, while 10 x4-x5 are observation-level covariates, x1=intercept. 11 ***************************************************; 12 filename BLEX "blex.sas"; 13 %include BLEX; 652 * options mprint; 653 ***************************************************; 654 data A; * generate a dataset; 655 k = 20; * # clusters; 656 n = 10 ; * cluster size; 657 beta1 = 1; * parameter values; 658 beta2 =-0.5; 659 beta3 = 0; 660 beta4 =-0.5; 661 beta5 = 0.5; 662 sigma = 1; 663 seed = 2141994; 664 retain x1 1 ; 665 array x x1-x5; 666 array beta beta1-beta5; 667 do id = 1 to k; * one cluster; 668 e = rannor(seed); 669 x2 = rannor(seed); 670 x3 = rannor(seed); 2 The SAS System 23:53 Sunday, June 14, 2020 671 do j = 1 to n; * one obs.; 672 x4 = rannor(seed); 673 x5 = rannor(seed); 674 lp = e * sigma; * linear predictor; 675 do l=1 to dim(beta); 676 lp=lp+x[l]*beta[l]; 677 end; 678 p = 1/(1+exp(-lp)); 679 y = (ranuni(seed) <= p); 680 output; 681 end; * one obs.; 682 end; * one cluster; 683 keep id y x1 - x5 ; 684 run; NOTE: The data set WORK.A has 200 observations and 7 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 685 ***************************************************; 686 title2 "A minimal run"; 687 %gee ( 688 data=A, /* required: dataset name */ 689 yvar=y, /* required: response 0/1 */ 690 xvar=x1 x2 x3 x4 x5, /* required: covariates */ 691 id=id ); /* required: cluster id */ NOTE: There were 200 observations read from the data set WORK.A. NOTE: The data set WORK.A has 200 observations and 7 variables. NOTE: PROCEDURE SORT used (Total process time): real time 0.00 seconds cpu time 0.01 seconds NOTE: There were 200 observations read from the data set WORK.A. NOTE: The data set WORK._N_ has 20 observations and 1 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.01 seconds cpu time 0.01 seconds NOTE: IML Ready NOTE: Module SIGNON defined. NOTE: Module INFO defined. NOTE: Module PSDINV defined. NOTE: Module GET1C defined. NOTE: Module ACC1C defined. NOTE: Module CHK1 defined. NOTE: Module ADJUST defined. NOTE: Module UPDATE defined. NOTE: Module RHORANGE defined. NOTE: Module GEE4 defined. NOTE: Module GEE3 defined. NOTE: Module GEE2 defined. NOTE: Module GEE1 defined. NOTE: Module GEE defined. NOTE: Module INITBETA defined. NOTE: Module GETDATA defined. NOTE: Module RESULTS1 defined. NOTE: Module RESULTS defined. 3 The SAS System 23:53 Sunday, June 14, 2020 692 ***************************************************; 693 title2 "Test output datasets"; 694 %gee ( 695 data=A, /* required: dataset name */ 696 yvar=y, /* required: response 0/1 */ 697 xvar=x1 x2 x3 x4 x5, /* required: covariates */ 698 id=id, /* required: cluster id */ 699 outest=EST, /* optional: estimates dataset */ 700 outs=RES); /* optional: residuals dataset */ NOTE: Exiting IML. NOTE: The PROCEDURE IML printed page 1. NOTE: PROCEDURE IML used (Total process time): real time 0.06 seconds cpu time 0.04 seconds NOTE: Input data set is already sorted, no sorting done. NOTE: PROCEDURE SORT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: There were 200 observations read from the data set WORK.A. NOTE: The data set WORK._N_ has 20 observations and 1 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.01 seconds cpu time 0.00 seconds NOTE: IML Ready NOTE: Module SIGNON defined. NOTE: Module INFO defined. NOTE: Module PSDINV defined. NOTE: Module GET1C defined. NOTE: Module ACC1C defined. NOTE: Module CHK1 defined. NOTE: Module ADJUST defined. NOTE: Module UPDATE defined. NOTE: Module RHORANGE defined. NOTE: Module GEE4 defined. NOTE: Module GEE3 defined. NOTE: Module GEE2 defined. NOTE: Module GEE1 defined. NOTE: Module GEE defined. NOTE: Module INITBETA defined. NOTE: Module GETDATA defined. NOTE: Module RESULTS1 defined. NOTE: Module DATAOUT1 defined. NOTE: Module DATAOUT defined. NOTE: Module RESULTS defined. NOTE: The data set WORK.RES has 200 observations and 10 variables. NOTE: The data set WORK._DS1_ has 11 observations and 3 variables. NOTE: The data set WORK._DS2_ has 11 observations and 6 variables. NOTE: Exiting IML. NOTE: The PROCEDURE IML printed page 2. NOTE: PROCEDURE IML used (Total process time): real time 0.07 seconds cpu time 0.03 seconds 4 The SAS System 23:53 Sunday, June 14, 2020 NOTE: There were 11 observations read from the data set WORK._DS1_. NOTE: There were 11 observations read from the data set WORK._DS2_. NOTE: The data set WORK.EST has 11 observations and 9 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.00 seconds 701 ***************************************************; 702 proc contents data=EST; 703 title2 "Estimates of parameters and covariance matrices"; 704 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.21 seconds cpu time 0.00 seconds NOTE: The PROCEDURE CONTENTS printed page 3. 705 ***************************************************; 706 proc print data=EST; 707 run; NOTE: There were 11 observations read from the data set WORK.EST. NOTE: The PROCEDURE PRINT printed page 4. NOTE: PROCEDURE PRINT used (Total process time): real time 0.03 seconds cpu time 0.00 seconds 708 ***************************************************; 709 proc contents data=RES; 710 title2 "Fitted values and residuals"; 711 run; NOTE: PROCEDURE CONTENTS used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: The PROCEDURE CONTENTS printed page 5. 712 ***************************************************; 713 proc print data=RES; 714 run; NOTE: There were 200 observations read from the data set WORK.RES. NOTE: The PROCEDURE PRINT printed pages 6-9. NOTE: PROCEDURE PRINT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 715 ***************************************************; 716 title2 "Test the offset option"; 717 %gee ( 718 data=A, /* required: dataset name */ 719 yvar=y, /* required: response 0/1 */ 720 xvar=x1 x2 x3 x4 x5, /* required: covariates */ 721 id=id, /* required: cluster id */ 722 offset=x1); /* optional: offset */ NOTE: Input data set is already sorted, no sorting done. NOTE: PROCEDURE SORT used (Total process time): 5 The SAS System 23:53 Sunday, June 14, 2020 real time 0.00 seconds cpu time 0.00 seconds NOTE: There were 200 observations read from the data set WORK.A. NOTE: The data set WORK._N_ has 20 observations and 1 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: IML Ready NOTE: Module SIGNON defined. NOTE: Module INFO defined. NOTE: Module PSDINV defined. NOTE: Module GET1C defined. NOTE: Module ACC1C defined. NOTE: Module CHK1 defined. NOTE: Module ADJUST defined. NOTE: Module UPDATE defined. NOTE: Module RHORANGE defined. NOTE: Module GEE4 defined. NOTE: Module GEE3 defined. NOTE: Module GEE2 defined. NOTE: Module GEE1 defined. NOTE: Module GEE defined. NOTE: Module INITBETA defined. NOTE: Module GETDATA defined. NOTE: Module RESULTS1 defined. NOTE: Module RESULTS defined. NOTE: Exiting IML. NOTE: The PROCEDURE IML printed page 10. NOTE: PROCEDURE IML used (Total process time): real time 0.03 seconds cpu time 0.03 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 0.87 seconds cpu time 0.32 seconds 23:53 Sunday, June 14, 2020 1 A minimal run Generalized estimating equations for exchangeably-correlated binary responses (version 2.3) (c) Bahjat Qaqish and Habib Moalem (1994, 1995) Department of Biostatistics CB 7400 Chapel Hill, NC 27599-7400 Data set: A Response: y Covariates: x1 x2 x3 x4 x5 Cluster ID: id Number of observations: 200 Number of covariates: 5 Number of clusters: 20 Cluster sizes: from 10 to 10 Converged, niter = 12 Number of estimable parameters = 5 Estimated intra-cluster correlation = 0.0754821 Summary of estimates and 0.95 confidence intervals: Results using the robust variance estimator: Estimate Robust SE z p-val Odds Ratio CI-lower CI-upper X1 0.953667 0.2140748 4.4548299 8.396E-6 2.595209 1.7058918 3.9481457 X2 -0.499767 0.1668982 -2.994443 0.0027495 0.6066719 0.4374112 0.8414298 X3 0.240798 0.242122 0.9945319 0.319964 1.272264 0.7915579 2.0448988 X4 -0.39017 0.1457437 -2.677099 0.0074263 0.6769415 0.5087376 0.9007586 X5 0.4943162 0.1716337 2.8800653 0.0039759 1.6393769 1.1710729 2.2949523 Results using the naive variance estimator: Estimate Naive SE z p-val Odds Ratio CI-lower CI-upper X1 0.953667 0.2244872 4.2482025 0.0000215 2.595209 1.6714311 4.0295465 X2 -0.499767 0.194944 -2.563645 0.0103579 0.6066719 0.4140161 0.8889769 X3 0.240798 0.2599894 0.9261841 0.3543503 1.272264 0.7643177 2.1177788 X4 -0.39017 0.1655212 -2.357222 0.0184122 0.6769415 0.4893946 0.9363605 X5 0.4943162 0.1792833 2.7571793 0.0058302 1.6393769 1.153646 2.3296197 23:53 Sunday, June 14, 2020 2 Test output datasets Generalized estimating equations for exchangeably-correlated binary responses (version 2.3) (c) Bahjat Qaqish and Habib Moalem (1994, 1995) Department of Biostatistics CB 7400 Chapel Hill, NC 27599-7400 Data set: A Response: y Covariates: x1 x2 x3 x4 x5 Cluster ID: id Number of observations: 200 Number of covariates: 5 Number of clusters: 20 Cluster sizes: from 10 to 10 Converged, niter = 12 Number of estimable parameters = 5 Estimated intra-cluster correlation = 0.0754821 Summary of estimates and 0.95 confidence intervals: Results using the robust variance estimator: Estimate Robust SE z p-val Odds Ratio CI-lower CI-upper X1 0.953667 0.2140748 4.4548299 8.396E-6 2.595209 1.7058918 3.9481457 X2 -0.499767 0.1668982 -2.994443 0.0027495 0.6066719 0.4374112 0.8414298 X3 0.240798 0.242122 0.9945319 0.319964 1.272264 0.7915579 2.0448988 X4 -0.39017 0.1457437 -2.677099 0.0074263 0.6769415 0.5087376 0.9007586 X5 0.4943162 0.1716337 2.8800653 0.0039759 1.6393769 1.1710729 2.2949523 Results using the naive variance estimator: Estimate Naive SE z p-val Odds Ratio CI-lower CI-upper X1 0.953667 0.2244872 4.2482025 0.0000215 2.595209 1.6714311 4.0295465 X2 -0.499767 0.194944 -2.563645 0.0103579 0.6066719 0.4140161 0.8889769 X3 0.240798 0.2599894 0.9261841 0.3543503 1.272264 0.7643177 2.1177788 X4 -0.39017 0.1655212 -2.357222 0.0184122 0.6769415 0.4893946 0.9363605 X5 0.4943162 0.1792833 2.7571793 0.0058302 1.6393769 1.153646 2.3296197 23:53 Sunday, June 14, 2020 3 Estimates of parameters and covariance matrices The CONTENTS Procedure Data Set Name WORK.EST Observations 11 Member Type DATA Variables 9 Engine V9 Indexes 0 Created 06/14/2020 23:53:19 Observation Length 72 Last Modified 06/14/2020 23:53:19 Deleted Observations 0 Protection Compressed NO Data Set Type Sorted NO Label Data Representation WINDOWS_32 Encoding wlatin1 Western (Windows) Engine/Host Dependent Information Data Set Page Size 65536 Number of Data Set Pages 1 First Data Page 1 Max Obs per Page 908 Obs in First Data Page 11 Number of Data Set Repairs 0 ExtendObsCounter YES Filename C:\Users\qaqish\AppData\Local\Temp\SAS Temporary Files\_TD30832_AMERICANUS_\est.sas7bdat Release Created 9.0401M6 Host Created W32_10PRO Owner Name AD\qaqish File Size 128KB File Size (bytes) 131072 Alphabetic List of Variables and Attributes # Variable Type Len 4 X1 Num 8 5 X2 Num 8 6 X3 Num 8 7 X4 Num 8 8 X5 Num 8 3 _DEPVAR_ Char 8 2 _NAME_ Char 8 9 _RHO_ Num 8 1 _TYPE_ Char 8 23:53 Sunday, June 14, 2020 4 Estimates of parameters and covariance matrices Obs _TYPE_ _NAME_ _DEPVAR_ X1 X2 X3 X4 X5 _RHO_ 1 PARMS Y 0.95367 -0.49977 0.24080 -0.39017 0.49432 0.075482 2 NCOV X1 Y 0.05039 -0.01094 0.00522 -0.00471 0.00847 0.075482 3 NCOV X2 Y -0.01094 0.03800 0.00316 0.00549 -0.00355 0.075482 4 NCOV X3 Y 0.00522 0.00316 0.06759 -0.00399 0.00133 0.075482 5 NCOV X4 Y -0.00471 0.00549 -0.00399 0.02740 -0.00314 0.075482 6 NCOV X5 Y 0.00847 -0.00355 0.00133 -0.00314 0.03214 0.075482 7 RCOV X1 Y 0.04583 -0.01396 -0.02455 0.00453 0.00348 0.075482 8 RCOV X2 Y -0.01396 0.02786 0.01828 -0.00532 0.00144 0.075482 9 RCOV X3 Y -0.02455 0.01828 0.05862 -0.01309 0.00584 0.075482 10 RCOV X4 Y 0.00453 -0.00532 -0.01309 0.02124 -0.00289 0.075482 11 RCOV X5 Y 0.00348 0.00144 0.00584 -0.00289 0.02946 0.075482 23:53 Sunday, June 14, 2020 5 Fitted values and residuals The CONTENTS Procedure Data Set Name WORK.RES Observations 200 Member Type DATA Variables 10 Engine V9 Indexes 0 Created 06/14/2020 23:53:19 Observation Length 80 Last Modified 06/14/2020 23:53:19 Deleted Observations 0 Protection Compressed NO Data Set Type Sorted NO Label Data Representation WINDOWS_32 Encoding wlatin1 Western (Windows) Engine/Host Dependent Information Data Set Page Size 65536 Number of Data Set Pages 1 First Data Page 1 Max Obs per Page 817 Obs in First Data Page 200 Number of Data Set Repairs 0 ExtendObsCounter YES Filename C:\Users\qaqish\AppData\Local\Temp\SAS Temporary Files\_TD30832_AMERICANUS_\res.sas7bdat Release Created 9.0401M6 Host Created W32_10PRO Owner Name AD\qaqish File Size 128KB File Size (bytes) 131072 Alphabetic List of Variables and Attributes # Variable Type Len 1 ID Num 8 3 Predict Num 8 4 Residual Num 8 5 StdResid Num 8 6 X1 Num 8 7 X2 Num 8 8 X3 Num 8 9 X4 Num 8 10 X5 Num 8 2 Y Num 8 23:53 Sunday, June 14, 2020 6 Fitted values and residuals Obs ID Y Predict Residual StdResid X1 X2 X3 X4 X5 1 1 1 0.92119 0.07881 0.29249 1 -0.89090 -0.19936 -2.00048 0.66195 2 1 1 0.84692 0.15308 0.42514 1 -0.89090 -0.19936 -1.15315 -0.18240 3 1 1 0.76212 0.23788 0.55869 1 -0.89090 -0.19936 0.43625 -0.03313 4 1 1 0.87321 0.12679 0.38105 1 -0.89090 -0.19936 -0.74902 0.57960 5 1 1 0.69924 0.30076 0.65584 1 -0.89090 -0.19936 -0.49235 -1.41475 6 1 1 0.81727 0.18273 0.47285 1 -0.89090 -0.19936 0.73505 0.87767 7 1 0 0.86317 -0.86317 -2.51167 1 -0.89090 -0.19936 -1.06473 0.15287 8 1 1 0.93278 0.06722 0.26846 1 -0.89090 -0.19936 -0.97573 1.81770 9 1 1 0.74403 0.25597 0.58654 1 -0.89090 -0.19936 0.05673 -0.52947 10 1 1 0.76575 0.23425 0.55309 1 -0.89090 -0.19936 1.29102 0.68229 11 2 0 0.42967 -0.42967 -0.86796 1 1.87356 -1.13099 -0.86995 -0.74372 12 2 0 0.49873 -0.49873 -0.99747 1 1.87356 -1.13099 -0.69143 -0.04010 13 2 1 0.63012 0.36988 0.76616 1 1.87356 -1.13099 -1.98634 0.02576 14 2 0 0.34289 -0.34289 -0.72236 1 1.87356 -1.13099 -1.11245 -1.67805 15 2 1 0.76054 0.23946 0.56112 1 1.87356 -1.13099 -2.44105 0.92703 16 2 1 0.55339 0.44661 0.89836 1 1.87356 -1.13099 -1.10839 0.07469 17 2 1 0.42854 0.57146 1.15478 1 1.87356 -1.13099 0.90964 0.65161 18 2 1 0.78280 0.21720 0.52675 1 1.87356 -1.13099 -2.70254 0.97634 19 2 0 0.59268 -0.59268 -1.20625 1 1.87356 -1.13099 -1.33382 0.22180 20 2 1 0.45147 0.54853 1.10226 1 1.87356 -1.13099 -0.33458 -0.14212 21 3 1 0.84350 0.15650 0.43074 1 -0.58635 0.76998 0.65941 1.03104 22 3 0 0.87272 -0.87272 -2.61855 1 -0.58635 0.76998 -1.73810 -0.37431 23 3 1 0.78521 0.21479 0.52301 1 -0.58635 0.76998 -1.23948 -1.25310 24 3 1 0.76934 0.23066 0.54755 1 -0.58635 0.76998 0.08051 -0.39674 25 3 1 0.78140 0.21860 0.52892 1 -0.58635 0.76998 0.29391 -0.08825 26 3 1 0.76837 0.23163 0.54905 1 -0.58635 0.76998 0.53583 -0.04836 27 3 1 0.81465 0.18535 0.47699 1 -0.58635 0.76998 -0.44934 -0.25673 28 3 0 0.55420 -0.55420 -1.11496 1 -0.58635 0.76998 0.87401 -1.76701 29 3 1 0.91859 0.08141 0.29771 1 -0.58635 0.76998 -0.61515 1.51959 30 3 1 0.74514 0.25486 0.58484 1 -0.58635 0.76998 0.04624 -0.69030 31 4 1 0.96481 0.03519 0.19097 1 -2.30265 -0.45421 -1.32714 1.61515 32 4 1 0.93613 0.06387 0.26119 1 -2.30265 -0.45421 -0.58451 0.93430 33 4 1 0.91126 0.08874 0.31205 1 -2.30265 -0.45421 -0.18219 0.53206 34 4 0 0.87216 -0.87216 -2.61196 1 -2.30265 -0.45421 0.63916 0.35302 35 4 0 0.86385 -0.86385 -2.51891 1 -2.30265 -0.45421 0.45476 0.06071 36 4 1 0.79014 0.20986 0.51537 1 -2.30265 -0.45421 1.48987 -0.17810 37 4 0 0.78927 -0.78927 -1.93529 1 -2.30265 -0.45421 1.42106 -0.24298 38 4 1 0.86403 0.13597 0.39670 1 -2.30265 -0.45421 0.26564 -0.08553 39 4 1 0.95560 0.04440 0.21555 1 -2.30265 -0.45421 -0.43769 1.82724 40 4 1 0.91615 0.08385 0.30254 1 -2.30265 -0.45421 -1.78965 -0.61148 41 5 1 0.84649 0.15351 0.42585 1 -0.35062 0.37466 -0.62055 0.49786 42 5 1 0.70193 0.29807 0.65165 1 -0.35062 0.37466 -0.64231 -1.24055 43 5 1 0.64112 0.35888 0.74819 1 -0.35062 0.37466 0.34380 -1.02115 44 5 1 0.69752 0.30248 0.65852 1 -0.35062 0.37466 -0.19550 -0.93031 45 5 0 0.50378 -0.50378 -1.00759 1 -0.35062 0.37466 -0.39519 -2.74759 46 5 1 0.74956 0.25044 0.57802 1 -0.35062 0.37466 1.11589 0.63230 47 5 1 0.85977 0.14023 0.40386 1 -0.35062 0.37466 0.12104 1.29771 48 5 1 0.75536 0.24464 0.56910 1 -0.35062 0.37466 1.18775 0.75194 49 5 1 0.86412 0.13588 0.39654 1 -0.35062 0.37466 -0.69414 0.72828 50 5 1 0.77309 0.22691 0.54176 1 -0.35062 0.37466 0.47154 0.38585 51 6 1 0.64395 0.35605 0.74359 1 -0.98488 -1.04884 -0.63825 -1.71915 52 6 1 0.74017 0.25983 0.59248 1 -0.98488 -1.04884 -0.76037 -0.89642 53 6 1 0.71378 0.28622 0.63323 1 -0.98488 -1.04884 0.96731 0.19812 54 6 1 0.92552 0.07448 0.28368 1 -0.98488 -1.04884 -1.94940 1.14475 55 6 1 0.90527 0.09473 0.32349 1 -0.98488 -1.04884 -1.05272 1.32120 56 6 1 0.80631 0.19369 0.49012 1 -0.98488 -1.04884 -0.60917 -0.00968 57 6 1 0.87993 0.12007 0.36940 1 -0.98488 -1.04884 -1.89699 0.11790 58 6 1 0.67490 0.32510 0.69405 1 -0.98488 -1.04884 1.22003 0.02652 59 6 1 0.43658 0.56342 1.13602 1 -0.98488 -1.04884 1.96081 -1.38239 60 6 1 0.71252 0.28748 0.63520 1 -0.98488 -1.04884 1.27552 0.42886 23:53 Sunday, June 14, 2020 7 Fitted values and residuals Obs ID Y Predict Residual StdResid X1 X2 X3 X4 X5 61 7 1 0.82372 0.17628 0.46260 1 0.05862 0.26346 -0.42949 0.78167 62 7 1 0.75805 0.24195 0.56496 1 0.05862 0.26346 0.11594 0.40345 63 7 1 0.77341 0.22659 0.54127 1 0.05862 0.26346 0.76822 1.09161 64 7 1 0.72579 0.27421 0.61466 1 0.05862 0.26346 0.89246 0.67524 65 7 1 0.55866 0.44134 0.88882 1 0.05862 0.26346 0.89481 -0.81517 66 7 1 0.59037 0.40963 0.83297 1 0.05862 0.26346 -0.30623 -1.50061 67 7 1 0.88379 0.11621 0.36261 1 0.05862 0.26346 -0.21064 1.93971 68 7 1 0.64062 0.35938 0.74899 1 0.05862 0.26346 -0.14234 -0.94125 69 7 0 0.64056 -0.64056 -1.33495 1 0.05862 0.26346 1.48674 0.34403 70 7 1 0.63386 0.36614 0.76003 1 0.05862 0.26346 -0.60080 -1.36235 71 8 0 0.52472 -0.52472 -1.05073 1 1.17181 -0.74873 1.22972 0.79104 72 8 1 0.64476 0.35524 0.74227 1 1.17181 -0.74873 -2.04344 -0.78685 73 8 1 0.54430 0.45570 0.91500 1 1.17181 -0.74873 -0.72173 -0.59007 74 8 1 0.68595 0.31405 0.67664 1 1.17181 -0.74873 -1.28910 0.18312 75 8 1 0.78092 0.21908 0.52967 1 1.17181 -0.74873 -0.79284 1.56566 76 8 0 0.50513 -0.50513 -1.01031 1 1.17181 -0.74873 0.62682 0.15644 77 8 1 0.52380 0.47620 0.95349 1 1.17181 -0.74873 0.27844 0.03268 78 8 0 0.66243 -0.66243 -1.40085 1 1.17181 -0.74873 -1.89231 -0.50962 79 8 1 0.53709 0.46291 0.92838 1 1.17181 -0.74873 -0.23615 -0.26551 80 8 1 0.49668 0.50332 1.00666 1 1.17181 -0.74873 0.14607 -0.29137 81 9 0 0.73182 -0.73182 -1.65193 1 0.05157 -0.60545 -1.12379 -0.43835 82 9 0 0.70862 -0.70862 -1.55946 1 0.05157 -0.60545 -0.44654 -0.13686 83 9 0 0.51315 -0.51315 -1.02666 1 0.05157 -0.60545 1.26104 -0.48037 84 9 0 0.43036 -0.43036 -0.86920 1 0.05157 -0.60545 1.09389 -1.28595 85 9 0 0.36747 -0.36747 -0.76221 1 0.05157 -0.60545 1.11068 -1.80416 86 9 0 0.73436 -0.73436 -1.66268 1 0.05157 -0.60545 -0.99457 -0.31012 87 9 1 0.67388 0.32612 0.69566 1 0.05157 -0.60545 0.53942 0.31183 88 9 0 0.68046 -0.68046 -1.45929 1 0.05157 -0.60545 -0.26769 -0.26431 89 9 1 0.73391 0.26609 0.60213 1 0.05157 -0.60545 0.77759 1.08401 90 9 1 0.57249 0.42751 0.86415 1 0.05157 -0.60545 0.28121 -0.76947 91 10 1 0.88572 0.11428 0.35921 1 -1.42346 1.34011 0.94201 0.86483 92 10 1 0.75195 0.24805 0.57435 1 -1.42346 1.34011 0.72422 -1.20602 93 10 0 0.92296 -0.92296 -3.46136 1 -1.42346 1.34011 0.34063 1.27138 94 10 1 0.85142 0.14858 0.41774 1 -1.42346 1.34011 1.39794 0.61393 95 10 1 0.94208 0.05792 0.24795 1 -1.42346 1.34011 -0.19342 1.46830 96 10 1 0.96116 0.03884 0.20102 1 -1.42346 1.34011 -1.89486 0.97439 97 10 1 0.90280 0.09720 0.32812 1 -1.42346 1.34011 1.08799 1.34624 98 10 1 0.85445 0.14555 0.41272 1 -1.42346 1.34011 -0.65109 -0.95450 99 10 1 0.82777 0.17223 0.45614 1 -1.42346 1.34011 0.34528 -0.57279 100 10 1 0.79661 0.20339 0.50529 1 -1.42346 1.34011 1.19096 -0.31931 101 11 0 0.62167 -0.62167 -1.28188 1 0.44121 -1.20462 0.89931 0.81819 102 11 1 0.66427 0.33573 0.71092 1 0.44121 -1.20462 0.41202 0.80929 103 11 0 0.63581 -0.63581 -1.32129 1 0.44121 -1.20462 1.08141 1.08443 104 11 1 0.64778 0.35222 0.73738 1 0.44121 -1.20462 -0.37697 0.03870 105 11 1 0.72663 0.27337 0.61337 1 0.44121 -1.20462 -2.60764 -0.97699 106 11 0 0.46285 -0.46285 -0.92826 1 0.44121 -1.20462 0.32727 -0.93924 107 11 0 0.60371 -0.60371 -1.23425 1 0.44121 -1.20462 0.46443 0.32175 108 11 1 0.35451 0.64549 1.34937 1 0.44121 -1.20462 1.25829 -1.11552 109 11 0 0.55241 -0.55241 -1.11094 1 0.44121 -1.20462 0.44464 -0.11977 110 11 0 0.80057 -0.80057 -2.00355 1 0.44121 -1.20462 -2.38310 0.03426 111 12 0 0.59659 -0.59659 -1.21608 1 0.57199 -0.22744 1.26091 0.54660 112 12 1 0.51465 0.48535 0.97112 1 0.57199 -0.22744 -0.01027 -1.12971 113 12 1 0.66840 0.33160 0.70436 1 0.57199 -0.22744 -0.76337 -0.42472 114 12 1 0.71377 0.28623 0.63325 1 0.57199 -0.22744 -0.04322 0.57430 115 12 1 0.60227 0.39773 0.81265 1 0.57199 -0.22744 -0.22099 -0.57522 116 12 0 0.48716 -0.48716 -0.97464 1 0.57199 -0.22744 0.29244 -1.11327 117 12 1 0.63909 0.36091 0.75149 1 0.57199 -0.22744 0.00793 -0.07798 118 12 1 0.52002 0.47998 0.96073 1 0.57199 -0.22744 0.27851 -0.85826 119 12 1 0.59922 0.40078 0.81783 1 0.57199 -0.22744 -0.69570 -0.97564 120 12 0 0.50369 -0.50369 -1.00740 1 0.57199 -0.22744 0.62603 -0.71620 23:53 Sunday, June 14, 2020 8 Fitted values and residuals Obs ID Y Predict Residual StdResid X1 X2 X3 X4 X5 121 13 1 0.76144 0.23856 0.55973 1 0.25345 -1.08201 -1.24190 0.22173 122 13 1 0.30812 0.69188 1.49848 1 0.25345 -1.08201 0.91805 -2.05772 123 13 1 0.68721 0.31279 0.67465 1 0.25345 -1.08201 0.59294 0.91441 124 13 0 0.55559 -0.55559 -1.11812 1 0.25345 -1.08201 -0.39335 -1.00470 125 13 1 0.55491 0.44509 0.89560 1 0.25345 -1.08201 0.71102 -0.13861 126 13 1 0.52195 0.47805 0.95702 1 0.25345 -1.08201 0.11683 -0.87599 127 13 1 0.58559 0.41441 0.84123 1 0.25345 -1.08201 0.92435 0.28318 128 13 1 0.56003 0.43997 0.88636 1 0.25345 -1.08201 0.32178 -0.40386 129 13 1 0.75805 0.24195 0.56496 1 0.25345 -1.08201 -0.04199 1.13121 130 13 1 0.51407 0.48593 0.97225 1 0.25345 -1.08201 0.70139 -0.47847 131 14 0 0.58158 -0.58158 -1.17895 1 1.19455 -0.03073 0.61915 0.44819 132 14 1 0.70581 0.29419 0.64561 1 1.19455 -0.03073 -1.77014 -0.33339 133 14 1 0.72297 0.27703 0.61901 1 1.19455 -0.03073 -0.35992 0.94992 134 14 0 0.45195 -0.45195 -0.90810 1 1.19455 -0.03073 0.97108 -0.33013 135 14 0 0.76235 -0.76235 -1.79105 1 1.19455 -0.03073 -0.62150 1.16089 136 14 0 0.50911 -0.50911 -1.01838 1 1.19455 -0.03073 1.34374 0.42776 137 14 1 0.52152 0.47848 0.95785 1 1.19455 -0.03073 0.32398 -0.27661 138 14 0 0.63467 -0.63467 -1.31805 1 1.19455 -0.03073 0.41991 0.74218 139 14 1 0.61257 0.38743 0.79528 1 1.19455 -0.03073 -0.25657 0.01768 140 14 0 0.51546 -0.51546 -1.03142 1 1.19455 -0.03073 -1.01184 -1.38004 141 15 0 0.66707 -0.66707 -1.41549 1 -0.75070 -0.39097 1.66981 0.22609 142 15 1 0.87437 0.12563 0.37905 1 -0.75070 -0.39097 -2.45587 -0.51128 143 15 0 0.79184 -0.79184 -1.95039 1 -0.75070 -0.39097 -1.51307 -0.98924 144 15 1 0.76561 0.23439 0.55330 1 -0.75070 -0.39097 0.59768 0.36857 145 15 1 0.94018 0.05982 0.25225 1 -0.75070 -0.39097 -1.89570 1.57863 146 15 0 0.58809 -0.58809 -1.19487 1 -0.75070 -0.39097 2.12687 -0.09870 147 15 1 0.84288 0.15712 0.43175 1 -0.75070 -0.39097 -2.39155 -0.98721 148 15 1 0.85439 0.14561 0.41282 1 -0.75070 -0.39097 -0.03667 1.05289 149 15 1 0.92644 0.07356 0.28177 1 -0.75070 -0.39097 -3.29541 0.02599 150 15 1 0.92990 0.07010 0.27457 1 -0.75070 -0.39097 -3.75252 -0.23010 151 16 0 0.56985 -0.56985 -1.15099 1 0.98430 0.07970 -0.03369 -0.43057 152 16 0 0.46548 -0.46548 -0.93318 1 0.98430 0.07970 1.13332 -0.35818 153 16 1 0.76308 0.23692 0.55720 1 0.98430 0.07970 0.43126 1.73366 154 16 1 0.60272 0.39728 0.81188 1 0.98430 0.07970 -0.47477 -0.50451 155 16 0 0.52680 -0.52680 -1.05511 1 0.98430 0.07970 0.03029 -0.73198 156 16 0 0.49632 -0.49632 -0.99267 1 0.98430 0.07970 0.42462 -0.66755 157 16 0 0.52651 -0.52651 -1.05451 1 0.98430 0.07970 0.40856 -0.43571 158 16 0 0.75372 -0.75372 -1.74942 1 0.98430 0.07970 -0.77283 0.67994 159 16 0 0.46031 -0.46031 -0.92354 1 0.98430 0.07970 -0.31216 -1.54115 160 16 1 0.65372 0.34628 0.72781 1 0.98430 0.07970 0.50000 0.70717 161 17 1 0.62625 0.37375 0.77252 1 -0.09695 0.70041 1.52420 -0.12117 162 17 1 0.94310 0.05690 0.24564 1 -0.09695 0.70041 -0.99291 2.52797 163 17 1 0.68323 0.31677 0.68092 1 -0.09695 0.70041 0.51969 -0.40334 164 17 1 0.74773 0.25227 0.58085 1 -0.09695 0.70041 -0.13223 -0.27484 165 17 1 0.67579 0.32421 0.69265 1 -0.09695 0.70041 0.50939 -0.48058 166 17 1 0.81323 0.18677 0.47924 1 -0.09695 0.70041 -1.77754 -0.79548 167 17 0 0.38208 -0.38208 -0.78634 1 -0.09695 0.70041 0.98572 -2.56298 168 17 1 0.90736 0.09264 0.31953 1 -0.09695 0.70041 -0.41291 1.92172 169 17 0 0.82094 -0.82094 -2.14120 1 -0.09695 0.70041 -0.11031 0.62494 170 17 0 0.64345 -0.64345 -1.34339 1 -0.09695 0.70041 -0.15774 -1.29863 171 18 1 0.78212 0.21788 0.52780 1 1.92128 1.13679 -0.54719 1.61304 172 18 0 0.44062 -0.44062 -0.88752 1 1.92128 1.13679 0.93811 -0.28287 173 18 0 0.67849 -0.67849 -1.45269 1 1.92128 1.13679 -1.24609 -0.01328 174 18 0 0.84700 -0.84700 -2.35285 1 1.92128 1.13679 0.68571 3.46255 175 18 1 0.47660 0.52340 1.04796 1 1.92128 1.13679 0.57376 -0.27720 176 18 1 0.59123 0.40877 0.83150 1 1.92128 1.13679 1.40490 1.31492 177 18 0 0.45864 -0.45864 -0.92043 1 1.92128 1.13679 -1.05199 -1.70637 178 18 0 0.61518 -0.61518 -1.26437 1 1.92128 1.13679 -0.58560 -0.05368 179 18 1 0.31397 0.68603 1.47818 1 1.92128 1.13679 0.85574 -1.44635 180 18 1 0.64299 0.35701 0.74515 1 1.92128 1.13679 -0.89050 -0.05322 23:53 Sunday, June 14, 2020 9 Fitted values and residuals Obs ID Y Predict Residual StdResid X1 X2 X3 X4 X5 181 19 1 0.74876 0.25124 0.57926 1 1.16367 1.31818 -1.10978 -0.06170 182 19 1 0.69601 0.30399 0.66088 1 1.16367 1.31818 1.35890 1.35348 183 19 1 0.65803 0.34197 0.72090 1 1.16367 1.31818 0.75248 0.52314 184 19 1 0.76752 0.23248 0.55036 1 1.16367 1.31818 -0.75667 0.42403 185 19 1 0.61781 0.38219 0.78653 1 1.16367 1.31818 -0.78306 -1.04141 186 19 1 0.43329 0.56671 1.14363 1 1.16367 1.31818 1.92979 -0.41470 187 19 0 0.64874 -0.64874 -1.35899 1 1.16367 1.31818 0.23726 0.03346 188 19 1 0.87960 0.12040 0.36997 1 1.16367 1.31818 -0.84271 1.96302 189 19 0 0.52935 -0.52935 -1.06053 1 1.16367 1.31818 0.37760 -0.85907 190 19 1 0.69138 0.30862 0.66812 1 1.16367 1.31818 -0.05732 0.19159 191 20 1 0.95738 0.04262 0.21100 1 -3.24157 1.27174 -0.13490 0.36262 192 20 1 0.95494 0.04506 0.21723 1 -3.24157 1.27174 1.22805 1.32066 193 20 1 0.93939 0.06061 0.25400 1 -3.24157 1.27174 -0.38264 -0.58341 194 20 1 0.88571 0.11429 0.35922 1 -3.24157 1.27174 0.82256 -1.03450 195 20 1 0.93745 0.06255 0.25830 1 -3.24157 1.27174 -0.86212 -1.02984 196 20 1 0.95886 0.04114 0.20714 1 -3.24157 1.27174 -2.39409 -1.34594 197 20 1 0.98735 0.01265 0.11318 1 -3.24157 1.27174 -0.84204 2.32460 198 20 1 0.91212 0.08788 0.31040 1 -3.24157 1.27174 0.82306 -0.44312 199 20 1 0.81634 0.18366 0.47432 1 -3.24157 1.27174 1.77999 -1.40334 200 20 0 0.91127 -0.91127 -3.20466 1 -3.24157 1.27174 0.55509 -0.67595 23:53 Sunday, June 14, 2020 10 Test the offset option Generalized estimating equations for exchangeably-correlated binary responses (version 2.3) (c) Bahjat Qaqish and Habib Moalem (1994, 1995) Department of Biostatistics CB 7400 Chapel Hill, NC 27599-7400 Data set: A Response: y Covariates: x1 x2 x3 x4 x5 Offset: x1 Cluster ID: id Number of observations: 200 Number of covariates: 5 Number of clusters: 20 Cluster sizes: from 10 to 10 Converged, niter = 10 Number of estimable parameters = 5 Estimated intra-cluster correlation = 0.0754769 Summary of estimates and 0.95 confidence intervals: Results using the robust variance estimator: Estimate Robust SE z p-val Odds Ratio CI-lower CI-upper X1 -0.046335 0.214077 -0.216441 0.8286439 0.954722 0.6275586 1.4524447 X2 -0.499763 0.1669023 -2.994343 0.0027504 0.6066746 0.4374096 0.8414402 X3 0.2408027 0.2421215 0.9945532 0.3199536 1.27227 0.7915623 2.0449064 X4 -0.390169 0.145745 -2.677069 0.0074269 0.6769422 0.5087369 0.9007618 X5 0.4943177 0.1716328 2.8800879 0.0039756 1.6393793 1.1710766 2.2949518 Results using the naive variance estimator: Estimate Naive SE z p-val Odds Ratio CI-lower CI-upper X1 -0.046335 0.2245003 -0.206392 0.8364847 0.954722 0.6148681 1.4824223 X2 -0.499763 0.1949553 -2.563474 0.010363 0.6066746 0.4140088 0.8890005 X3 0.2408027 0.2600041 0.9261496 0.3543682 1.27227 0.7642992 2.1178497 X4 -0.390169 0.1655227 -2.357195 0.0184136 0.6769422 0.4893937 0.9363642 X5 0.4943177 0.1792843 2.7571727 0.0058304 1.6393793 1.1536456 2.3296274