Hi All
I have a pretty basic question. Having used an estimated co variance matrix to calculate optimal weight ratios I now need to transform this data under three simple conditions. If weight is
between 0 and 1 leave it,
below 0 set to 0 and
above 1 set to 1
Does anyone have the simple coding for this?
Regards
Oil
Transforming data under simple conditions
Re: Transforming data under simple conditions
The simplest is
set weight = %max(%min(weight,1.0),0.0)
Alternatively
set weight = %if(weight<=0.0,0.0,%if(weight>=1.0,1.0,weight))
set weight = %max(%min(weight,1.0),0.0)
Alternatively
set weight = %if(weight<=0.0,0.0,%if(weight>=1.0,1.0,weight))