Hello! I'm trying to calculate Q1, Q3 and IQR to identify outliers from a dataset. The problem is that I need Q1, Q3 and IQR for each client and each product. When I calculate the Median, I have no problems, but with the other measures it doesn't work the way I expect. proc sql;
create table "Output" as
select *, median(quantity) as median, PCTL(25,quantity) as Q1, PCTL(75,quantity) as Q3, IQR(quantity) as IQR
from work.documentX
group by Client, Product;
quit; I uploaded an example with an excel sheet. Thanks a lot for you help! Federico.
... View more