Hi all,
I computed the variables distribution percentiles by using the following macro:
%MACRO PERCENTILES(K);
PROC UNIVARIATE DATA = lib.c NOPRINT;
VAR var1 var2 var3
OUTPUT OUT = lib.PERCENTILES_&K.
PCTLPTS = &K. /* k-th quartile */
PCTLPRE = var1 var2 var3
PCTLNAME = _P&K.;
RUN;
%MEND;
Now, I would like to construct a set of dummy variables for each continuous variables assuming value equal to 1 if the correspondent value of the continuous variable drops in the quantiles range and 0 otherwise.
For istance, let's assume the var1 has the first percentile equal to 0.0124; the first dummy variable relative to var1 will have value equal to 1 if var1 is less or equal to 0.0124 and 0 otherwise.
Can someone of you suggest how I can get such dummy variables?
Any hint will be appreciated.