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.

un;***** Merge the data sets and construct the sampling weight. *****;proc sort data=frame;by stratum;run;proc sort data=sample;by stratum;run;data weight;merge frame sample;by stratum;bwt = Fcnt_str/ Scnt_str;run;title5 ’Information for the <strong>Sampling</strong> Weight’;proc print data=weight;var stratum Fcnt_str Scnt_str bwt;sum Fcnt_str Scnt_str;run;***** Append the sampling weight to the SAMPLA.SD2 file. *****;data wt;set weight (keep = stratum bwt);run;proc sort data=wt out=wt;by stratum;run;proc sort data=sampla out=sample;by stratum;run;data bwt wonly sonly problem;merge wt (in=inw) sample (in=ins);by stratum;if pnsexcd = "M" then sexsmpl = 1;else if pnsexcd = "F" then sexsmpl = 2;else if pnsexcd in ("Z"," ") then sexsmpl = 1;else sexsmpl = 3;if svccd = "A" then svcsmpl = 1;else if svccd = "N" then svcsmpl = 2;else if svccd = "M" then svcsmpl = 3;else if svccd = "F" then svcsmpl = 4;else if svccd = "C" then svcsmpl = 5;else svcsmpl = 6;if inw = 1 and ins = 1 then output bwt;else if inw = 1 and ins = 0 then output wonly;else if inw = 0 and ins = 1 then output sonly;F-2

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

Saved successfully!

Ooh no, something went wrong!