Hello community,
I would like to apply outlier detection using the hampel identifier, I've found this article
https://blogs.sas.com/content/iml/2021/06/01/hampel-filter-robust-outliers.html
but I want to apply that to my series.
I have a sample dataset for example like that
data DIFF_Q_NUM;
format date_gas yymmdd10.; /* Formatta la data */
do date_gas = '01JAN2023'd to '31DEC2023'd; /* Loop sulle date per un anno */
do cod_reg_clim = 1 to 5; /* Cinque regioni climatiche */
do i = 1 to 3; /* Tre zone climatiche per ogni regione */
zona_clim = byte(64 + i); /* Converte 1->A, 2->B, 3->C */
diff = rand("Normal", 0, 10); /* Valore casuale con media 0 e deviazione 10 */
output;
end;
end;
end;
run;
My y target is variable 'diff', I would like to find the outliers for each combination of cod_reg_clim and zona_clim
and thick them in my dataset.
Thank you in advance
... View more