Please help me with a PROC SUMMARY (only) statement to get the volume by category, weighted volume by category, mean of score by category.
Reason I want to use PROC SUMMARY is because I have other code using the same and PROC SUMMARY produces other metrics.
data test;
length category score wt 8;
input category score wt;
infile datalines dlm=",";
datalines;
1,67,2
1,50,5
1,55,6
2,56,6
2,68,5
3,70,5
4,73,8
run;
A couple of questions:
Can the admin please move this post to the Statistical group
proc summary data=have;
class category;
var wt score;
output out=stats mean(score)=score_mean sum(wt)=wt_volume;
run;
The variable _FREQ_ is the unweighted volume.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.