12.07.2015 Views

2006 HCSDB Adult Sampling Report - Tricare

2006 HCSDB Adult Sampling Report - Tricare

2006 HCSDB Adult Sampling Report - Tricare

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

*** Get the total number of observations. ***;proc means data=&dsn.;var prn;output out=total n=total;run;data total;set total (keep=total);run;*** Sort the frame. ***;PROC SORT DATA=&dsn. OUT=&dsn.;BY &by_vars.;RUN;*** Set up the table for the counts that will follow. ***;PROC MEANS DATA=&dsn. NOPRINT;BY &by_vars.;VAR prn;OUTPUTOUT=T0(KEEP=&by_vars.)N=DUMMY;RUN;PROC FREQ DATA=&dsn. NOPRINT;TABLES stratum/MISSING LIST OUT=T1(RENAME=(COUNT=PSUM0)KEEP=COUNT stratum) NOPERCENT NOCUM NOPRINT;RUN;PROC FREQ DATA=&dsn. NOPRINT;TABLES geosmpl/MISSING LIST OUT=T2(RENAME=(COUNT=PSUM1)KEEP=COUNT geosmpl) NOPERCENT NOCUM NOPRINT;RUN;PROC FREQ DATA=&dsn. NOPRINT;TABLES ebsmpl/MISSING LIST OUT=T3(RENAME=(COUNT=PSUM2)KEEP=COUNT ebsmpl) NOPERCENT NOCUM NOPRINT;RUN;*** Merge the tables together. ***;PROC SORT DATA=T0; BY stratum; RUN;DATA T0;MERGE T0 T1;BY stratum;RUN;PROC SORT DATA=T0; BY geosmpl; RUN;DATA T0;MERGE T0 T2;F-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!