1 The SAS System 09:54 Friday, October 27, 2006 NOTE: Copyright (c) 2002-2003 by SAS Institute Inc., Cary, NC, USA. NOTE: SAS (r) 9.1 (TS1M3) Licensed to UNC-CHAPEL HILL-SYSTEMWIDE-T/R, Site 0039466002. NOTE: This session is executing on the XP_PRO platform. NOTE: SAS 9.1.3 Service Pack 3 NOTE: SAS initialization used: real time 0.47 seconds cpu time 0.14 seconds NOTE: AUTOEXEC processing beginning; file is c:\local\sas91\autoexec.sas. NOTE: AUTOEXEC processing completed. 1 * example2.sas 2 * xref: 3 * input: 4 * output: 5 * does: - example usage of the VCBD macro 6 ******************************************************************;; 7 filename MAC "vcbd.sas"; 8 %include MAC; 145 ******************************************************************;; 146 data A; 147 input practice provider response; 148 cards; NOTE: The data set WORK.A has 36 observations and 3 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 185 ; 186 run; 187 ******************************************************************;; 188 189 proc summary data=A nway; 190 class practice provider; 191 var response; 192 output out=B sum=y n=m; 193 run; NOTE: There were 36 observations read from the data set WORK.A. NOTE: The data set WORK.B has 12 observations and 6 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 194 ******************************************************************;; 195 proc print data=B; * take a look; 196 var practice provider y m; 197 run; NOTE: There were 12 observations read from the data set WORK.B. NOTE: The PROCEDURE PRINT printed page 1. NOTE: PROCEDURE PRINT used (Total process time): 2 The SAS System 09:54 Friday, October 27, 2006 real time 0.01 seconds cpu time 0.02 seconds 198 ******************************************************************;; 199 %vcbd (data = B, i = practice, mij = m, yij = y); NOTE: There were 12 observations read from the data set WORK.B. NOTE: The data set WORK._A_ has 12 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: There were 12 observations read from the data set WORK._A_. NOTE: The data set WORK._B_ has 5 observations and 8 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.00 seconds cpu time 0.01 seconds NOTE: There were 5 observations read from the data set WORK._B_. NOTE: The data set WORK._C_ has 5 observations and 11 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds NOTE: There were 5 observations read from the data set WORK._C_. NOTE: The data set WORK._D_ has 1 observations and 11 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 0.00 seconds cpu time 0.00 seconds Variance Components for Nested Binary Responses (Version 1.0) (c) Bahjat Qaqish and Habib Moalem (1993) Department of Biostatistics CB 7400 Chapel Hill, NC 27599-7420 Data set: B Response: y / m Practice ID: practice Total number of practices: 5 Total number of physicians: 12 Total number of patients: 36 Sum of y: 22 Mean of y: 0.6111111111 Estimates: Theta: 0.6111111111 Lambda_1: 0.3108445033 Lambda_2: 0.0528424377 Variance components: Between practices: 31.084450329 % Between providers within practice: 3.6416656409 % 3 The SAS System 09:54 Friday, October 27, 2006 Between patients Within provider: 65.27388403 % Correlation: Between providers within practice: 0.3108445033 Between patients within provider: 0.3472611597 Odds ratio: Between providers within practice: 3.7539942441 Between patients within provider: 4.4295061438 Macro VCBD done. NOTE: There were 1 observations read from the data set WORK._D_. NOTE: The data set WORK._E_ has 1 observations and 31 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414 NOTE: The SAS System used: real time 0.68 seconds cpu time 0.22 seconds 09:54 Friday, October 27, 2006 1 Obs practice provider y m 1 1 1 1 4 2 1 2 0 4 3 2 1 3 4 4 3 3 2 3 5 3 4 3 3 6 3 7 1 4 7 4 4 4 4 8 4 8 3 3 9 5 1 2 3 10 5 2 1 1 11 5 3 1 2 12 5 4 1 1