OPTIONS nocenter; FILENAME sibs 'selrand.vl'; DATA NEALE1; FILE sibs; array v{2}; x=.5; n=0; sample: IF N gt 500 THEN GO TO DONE; n=n+1; famfac=rannor(0); v(1)= SQRT(X)*famfac + SQRT(1-X)*RANNOR(0); dummy=rannor(0); if dummy gt 0 then do; v(2) = SQRT(X)*famfac + SQRT(1-X)*RANNOR(0); size=2; end; else do; v(2)=.; size=1; end; PUT SIZE; DO I=1 TO size; IF V{I} NE . THEN PUT i @@; /* Write the identifiers */ END; PUT; DO I=1 TO size; IF V{I} NE . THEN PUT V{I} 13.6 +1 @@; /* Write the data values */ END; PUT; OUTPUT; x1=v{1}; y=v{2}; GO TO sample; DONE: COMMENT sample complete; DATA CONKERS; SET NEALE1; PROC CORR COV; VAR x1 y; RUN; DATA CONKER2; SET NEALE1; if x1 gt 0; PROC CORR COV; VAR x1 y; RUN;