1
votes

Does anyone know how to winsorize data in SPSS? I have outliers for some of my variables and want to winsorize them. Someone taught me how to do use the Transform -> compute variable command, but I forgot what to do. I believe they told me to just compute the square root of the subjects measurement that I want to winsorize. Could someone please elucidate this process for me?

1

1 Answers

2
votes

There is a script online to do it already it appears. It could perhaps be simplified (the saving to separate files is totally unnecessary), but it should do the job. If you don't need a script and you know the values of the percentiles you need it would be as simple as;

Get the estimates for the percentiles for variable X (here I get the 5th and 95th percentile);

freq var X /format = notable /percentiles = 5 95.

Then lets say (just by looking at the output) the 5th percentile is equal to 100 and the 95th percentile is equal to 250. Then lets make a new variable named winsor_X replacing all values below the 5th and 95th percentile with the associated percentile.

compute winsor_X = X.
if X <= 100 winsor_X = 100.
if X >= 250 winsor_X = 250.

You could do the last part a dozen different ways, but hopefully that is clear enough to realize what is going on when you winsorize a variable.