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-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 515 views
  • 2 likes
  • 3 in conversation