1 The SAS System 22:46 Saturday, March 19, 1994 NOTE: Copyright(c) 1989 by SAS Institute Inc., Cary, NC USA. NOTE: SAS (r) Proprietary Software Release 6.08 TS404 Licensed to UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL, Site 0003944001. NOTE: AUTOEXEC processing beginning; file is c:\sas608\autoexec.sas. NOTE: AUTOEXEC processing completed. 1 * TEST3.SAS 2 * xref: 3 * input: 4 * output: TEST3.DAT 5 * does - generate data 6 ***************************************************; 7 filename OUT 'TEST3.DAT'; 8 ***************************************************; 9 data A; 10 file OUT; 11 k = 50 ; * # clusters; 12 n = 5 ; * cluster size; 13 beta1 = 1; * parameter values; 14 beta2 = 1; 15 sigma = 1; 16 seed = 2141994; 17 retain x1 1; 18 array x (*) x1-x2; 19 array beta (*) beta1-beta2; 20 do id = 1 to k; 21 e = rannor(seed); 22 do j = 1 to n; 23 x2 = (ranuni(seed) <= 0.5); 24 type = 1 + (ranuni(seed) <= 0.5); 25 lp = e * sigma; * linear predictor; 26 do l=1 to dim(beta); 27 lp=lp+x(l)*beta(l); 28 end; 29 p = 1/(1+exp(-lp)); 30 y = (ranuni(seed) <= p); 31 put id type y x1 x2; 32 end; 33 end; 34 run; NOTE: The file OUT is: FILENAME=C:\prj\gee\dos\TEST3.DAT, RECFM=V,LRECL=132 NOTE: 250 records were written to the file OUT. The minimum record length was 9. The maximum record length was 10. NOTE: The data set WORK.A has 1 observations and 16 variables. NOTE: The DATA statement used 1.15 seconds. 35 ***************************************************; NOTE: SAS Institute Inc., SAS Campus Drive, Cary, NC USA 27513-2414