Should I trim/winsorize raw data or computed metric used in models? Question: Should I rather winsorise (or trim, where relevant) my raw data, or the intermediary metric I use in my models?
Context: My analysis consists in 3 steps:

*

*Collect raw data,

*Compute intermediary metrics,

*Run regressions with the intermediary metrics as dependent/endogenous variable.

The raw data are the same measure (say $GDP(country,\ year)$) by 3 different observers ($A$, $B$, and $C$).
The intermediary metrics are based on these raw data:

*

*$\sigma\left[GDP_A(country,\ year), GDP_B(country,\ year), GDP_C(country,\ year)\right]$

*$\text{mean}\left[GDP_A(country,\ year), GDP_B(country,\ year), GDP_C(country,\ year)\right] − baseline(country,\ year)$
The raw data contain a few obvious outliers that are not meaningful. This usually cause the resulting intermediary metric value to be an outlier too.
But there are also a few case where all raw data points can be considered as not outliers, yet the resulting variable appear as an outlier.
So should I windsorise/trim my raw data, or the intermediary metric I use in my models… or both?

Provided you are sure that transforming to those "metrics" is conducive to solving your problem and you want to make your regression more robust towards outliers, then you have to winsorize/trim the very input to your regression, i.e. those metrics.
The fact that you have somehow contradictory notions of outliers is however an indication that you might want to rethink your transformations. Domain knowledge should tell you what really is an outlier and what is not.
