BookmarkSubscribeRSS Feed
jens1
Calcite | Level 5

Hi!

Need some help. 

Have someone managed to create weighted percentile calculations in Visual Analytics ? 

If so, could you please show some examples how to create them ? 

We are working with Viya 3.5 and SAS VA 8.5.1. 

Regards

Jens Öberg, TietoEvry 

3 REPLIES 3
acordes
Rhodochrosite | Level 12

read this do-loop entry from @Rick_SAS 

https://blogs.sas.com/content/iml/2016/08/29/weighted-percentiles.html 

I follow on that. 

 

I think you can only achieve it if you duplicate the observations by their weight.

 

data public.weight(promote=yes);
input x wt;
datalines;
1    0.25
1.9  0.05
2.2  0.15
3.0  0.25
3.7  0.15
4.1  0.10
5    0.05
;

data public.weight1(promote=yes);
set public.weight;
decimals=input(scan(put(wt,best32.),2,'.'), best32.);
do i=1 to decimals;
output;
end;
drop i;
run;

ok1.pngok2.png

Rick_SAS
SAS Super FREQ

I am not familiar with computing weighted percentiles in SAS VA, but I don't think Arne's proposal will give the correct estimates.

 

jens1
Calcite | Level 5

Thanks for your answers. 

It seems to be difficult to create the weighted percentile calculations in Visual Analytics. We will try some more, otherwise we have to pre-aggregate the values before landing in VA. 

Regards

Jens

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1113 views
  • 2 likes
  • 3 in conversation