I created a dataset to calculate a threshold:
Data black;
Set blue;
Lower=p20-2;
Upper=p20+2;
Run;
I would like to use this value the output is something like:
Variables n lower upper
Val 123 -0.2 0.1
I would like to use upper and lower as thresholds:
Proc sql;
Create table one as
Select * from two
Where (Val < upper and Val > lower)
;quit;
Upper
and lower
should come from black
, while Val
should come from two
.
two
looks like
ID Val
42 1471
32 1742
74 4819
...
How can I include the threshold in my dataset in order to filter values from two
?
A possible solution could be adding lower value and upper value to two columns, but I do know how to assign the values to these columns.