DATA Step, Macro, Functions and more

Calculating average by two varaiables

Reply
Occasional Contributor
Posts: 19

Calculating average by two varaiables

Hi 

 

I have three columns supoose named as int_rate, grade and sub_grade.

Sample value are as below 

int_rate grade sub_grade

0.1701      B      B4 

0.0788      C      C5 

 

I need to calculate average int_rate by grade and sub_grade.

 

Thanks & regards 

Vishal 

Trusted Advisor
Posts: 1,131

Re: Calculating average by two varaiables

proc means data=have nway;
class grade sub_grade;
var int_rate;
output out=want mean=;
run;
Thanks,
Jag
Ask a Question
Discussion stats
  • 1 reply
  • 83 views
  • 0 likes
  • 2 in conversation