Quartz | Level 8

## Calculate difference in ratio/proportions between two survey samples using proc surveymeans

I can do this for difference in weighted frequencies by making the previous month's employment variable negative (-1) and the current month's employment variable positive (+1), which produces the net sample-to-sample change in the variable "employed", as well as the CV. But I don't know how to do it for ratios (for example the total rate of employment).

data output.newcombined ;
set output.combined;
if employed=1;
if sampledate in (previousmonth) then changeemployed= -1;
if sampledate in (currentmonth)  then changeemployed=  1;
run;

proc surveymeans data=output.newcombined varmethod=brr clm nobs mean median CV  cvwt SUMWGT Sum CVSum CLSum  alpha=0.32;
var changeemployed;
weight finalwt ;
repweights bw1-bw1000 ;

run ;
Super User

## Re: Calculate difference in ratio/proportions between two survey samples using proc surveymeans

I'm not really clear on what you are attempting to do. Are attempting to compare between to groups of records? That might mean you want a DOMAIN analysis to generate the summaries for the two groups and then examine the results.

Is your employed variable a 0/1 dichotomous to indicate a status? then perhaps that varaible should be the VAR and Sampledate or your changeemployed as DOMAIN variables.

Discussion stats