Using SAS 9.4
PRE_SL_W_count | Post_SL_W_2wk | Post_SL_W_6wk | PRE_SL_E_count | Post_SL_E_2wk | Post_SL_E_6wk | PRE_CL_W_count | Post_CL_W_2wk | Post_CL_W_6wk | PRE_CL_E_count | Post_CL_E_2wk | Post_CL_E_6wk |
8 | 8 | 8 | 4 | 4 | 4 | 8 | 8 | 8 | 4 | 4 | 4 |
8 | 8 | 8 | 0 | 4 | 4 | 8 | 8 | 8 | 4 | 4 | 4 |
8 | 8 | 9 | 4 | 5 | 5 | 8 | 9 | 9 | 4 | 5 | 5 |
8 | 8 | 0 | 5 | 5 | 0 | 8 | 8 | 0 | 5 | 5 | 0 |
8 | 8 | 8 | 5 | 5 | 5 | 8 | 8 | 8 | 5 | 0 | 0 |
I have the above data and I want to find the minimum value (as long as it is greater than zero) in specific variables.
I have attempted the array below but I am not sure how to return values >0
data test2;
set have;
array min_SL_W {*} _numeric_ PRE_SL_W_count Post_SL_W_2wk Post_SL_W_6wk;
min = min(of min_SL_W[*]);
array min_SL_E {*} _numeric_ PRE_SL_E_count Post_SL_E_2wk Post_SL_E_6wk;
min2 = min(of min_SL_W[*]);
array min_CL_W {*} _numeric_ PRE_CL_W_count Post_CL_W_2wk Post_CL_W_6wk;
min3 = min(of min_CL_W[*]);
array min_CL_E {*} _numeric_ PRE_CL_E_count Post_CL_E_2wk Post_CL_E_6wk;
min4 = min(of min_CL_W[*]);
run;
Is there a good method to return only values >0 within each of the 4 variables groupings above? Thank you