/*
PROC MEANS ;
BY
CLASS variable(s)
;
FREQ variable;
ID variable(s);
OUTPUT
;
TYPES request(s);
VAR variable(s)
< / WEIGHT=weight-variable>;
WAYS list;
WEIGHT variable;
BY : Calculate separate statistics for each BY group
CLASS : Identify variables whose values define subgroups for the analysis
FREQ : Identify a variable whose values represent the frequency of each observation
ID : Include additional identification variables in the output data set
OUTPUT : Create an output data set that contains specified statistics and identification variables
TYPES : Identify specific combinations of class variables to use to subdivide the data
VAR : Identify the analysis variables and their order in the results
WAYS : Specify the number of ways to make unique combinations of class variables
WEIGHT : Identify a variable whose values weight each observation in the statistical calculations
--> 최대값(max), 최소값(min), 평균값(mean), 표준값(std) 출력함..
*/
proc sort data=sashelp.prdsal2 out=test;
by country state;
run;
proc means data=test;
by country state;
class year month;
output out = aaa;
var actual predict;
quit;
********************************************
*
* Do your best!!
*
* Homepage : http://www.javarang.net
* Javarang Lee
*
********************************************