Hi @SAShole,
There is no linear transformation that satisfies all three conditions. So, if the condition "transformed values sum to the number of observations" is mandatory, you can obtain either a minimum of .25 or a maximum of 4:
data trans1;
set have;
a=0.75/1321.18;
b=1-1333.18*a;
HH_Weight_t=a*HH_Weight+b;
run;
proc means data=trans1 sum min max;
var HH_Weight_t;
run;
Result:
Sum Minimum Maximum
--------------------------------------------
50.0000000 0.2500000 1.6538587
--------------------------------------------
Same with a=3/1151.82 (and again b=1-1333.18*a):
Sum Minimum Maximum
--------------------------------------------
50.0000000 -2.4411106 4.0000000
--------------------------------------------
Or a compromise between these two (using least squares)? (a=0.0014472809)
Sum Minimum Maximum
--------------------------------------------
50.0000000 -0.9121186 2.6670071
--------------------------------------------
However, there are non-linear transformations which satisfy all three conditions. Would this make sense? Unfortunately, there is no suitable quadratic transformation (t(x)=ax²+bx+c) -- in spite of three free parameters. Reason: It would not be monotone, hence there would be no unique inverse transformation!
But how about an exponential transformation (t(x)=a exp(bx)+c), which is of course monotone?
data trans;
retain a 0.01556848794537
b 2.20865846733238e-3
c 0.2340133696564;
set have;
HH_Weight_t=a*exp(b*HH_Weight)+c;
run;
Result of PROC MEANS:
Sum Minimum Maximum
--------------------------------------------
50.0000000 0.2500000 4.0000000
--------------------------------------------
... View more