
/* change the path */
proc import datafile = "...\Data2stCCS.csv"
            out      = pop 
            dbms     = csv 
			replace;
			DELIMITER=";" ; 
run;

/**********************SELECT CCS SIxSI *****************************/
proc freq data=pop;tables ID_i/out=popM;run;
proc surveyselect data=popM method=srs n=320 seed= 2289 stats out=echM ;
run; 

proc freq data=pop;tables ID_k/out=popD;run;
proc surveyselect data=popD method=srs n=25 seed= 2368 stats out=echD ;
run; 

proc sort data=pop; by ID_i; run;
proc sort data=echM; by ID_i; run;
data echA; merge echM (in=A) pop;
   by ID_i;   if A;
run;
proc sort data=echA; by ID_k; run;
proc sort data=echD; by ID_k; run;
data ech; merge echD (in=A) echA;
 by ID_k;   if A;
   /*Dummy_CCS=1;*/
run;


/* The cross-classified sample (of size 320*25=8000) is in 'ech'. */
