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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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