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

 

Secure your spot at the must-attend AI and analytics event of 2024: SAS Innovate 2024! Get ready for a jam-packed agenda featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.

 

Register by March 1 to snag the Early Bird rate of just $695! Don't miss out on this exclusive offer. 

 

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