Hello,
I am new to SAS, so this is probably a simple solution. Attached is the PROC CONTENTS of my data and the results from PROC FREQ. Below is the code I used.
proc freq data=Homework.inpatientAmountoregon;
table bene_sex_ident_cd*inpatientTotalAmount;
title "Gender Total Payments";
run;I don't really care about the frequency within each interval of inpatientTotalAmount. I only want the total payments made for each gender. How would I go about making a 2x2 table to display that?
proc freq data=Homework.inpatientAmountoregon;
table bene_sex_ident_cd;
weight inpatientTotalAmount;
title "Gender Total Payments";
run;
I only want the total payments made for each gender.
How about this?
proc freq data=Homework.inpatientAmountoregon;
table bene_sex_ident_cd;
title "Gender Total Payments";
run;
Wouldn't that only get me the number of males and females in dataset?
proc freq data=Homework.inpatientAmountoregon;
table bene_sex_ident_cd;
weight inpatientTotalAmount;
title "Gender Total Payments";
run;
Yes! I figured out how to do it with PROC SUMMARY too, and the numbers match up. Thank you!
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.