Get quantified by group in SAS
I have a table like this:
Cluster Age FR
8 70 153
...
I want to get a table: for each cluster and for each age, the average FR in every 10th quantile. It should look like this:
Cluster Age Quantile FR
1 1 10% 12
1 1 20% 14
1 1 30% 16
1 1 40% 18
1 1 50% 20
1 1 60% 22
1 1 70% 24
1 1 80% 26
1 1 90% 28
1 1 100% 30
1 2 10% 13
1 2 20% 15
1 2 30% 17
I have tried doing this with a uniprocessor, but no success ...
proc univariate data=etude.Presta_cluster_panier noprint;
var FR;
output out=pctls pctlpre=P_ pctlpts=0 to 100 by 10;
run;
+3
source to share
2 answers