How to calculate mean for a variable by group?
Suppose Q1 is a numeric variable and Age a grouping variable. You wish to compute mean for Q1 by Age.
PROC MEANS DATA=READIN;
VAR Q1;
CLASS AGE;
RUN;