@chmedi Your suggestion will work, but it will winsorize all interval inputs. What if we wanted to winsorize a single interval input without affecting the others? I have the same issue and I was able to use two SAS Code nodes as a workaround: the first one to calculate the extreme percentile limits, and the second one to use these values (entered manually) to winsorize the input of interest (see code below). While this works, it consumes more resources (data transfer from CAS to the client in SPRE) and uses manual input of the values for winsorization. SAS Technical Support recommended that I use the percentile action to compute the extreme percentile limits, extract these values into a macro variable, and then use this as a limit in a SAS code node. Do you know what code to use to make this work (i.e. to winsorize a single interval input)? SAS Code Node 1: /* Calculate Specific Percentiles */ proc stdize data=&dm_data PctlMtd=ORD_STAT outstat=percentiles pctlpts=5,95; var x1; run; /* output: P5=14000, P95=54100 */ SAS Code Node 2: /* SAS code */ %dmcas_metachange(NAME=REP_x1, ROLE=INPUT, LEVEL=INTERVAL); %dmcas_metachange(NAME=x1, ROLE=REJECT); /* SAS ds1 score code */ Length REP_x1 8; Label REP_x1='Replacement: Input Variable x1'; Format REP_x1 DOLLAR8.0; REP_x1=x1; If not(missing(x1)) then do; If x1<14000 then REP_x1=14000; Else if x1>54100 then REP_x1=54100; End;
... View more