BookmarkSubscribeRSS Feed
Quartz | Level 8

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;
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

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.


Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.


Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 2 in conversation