a week ago - last edited a week ago
Hello I wish to to return the maximum of , CIWA_Score1, CIWA_Score2, CIWA_Score3, CIWA_Score4 as "Max_CIWA".
My data has _1_CIWA_Score, _2_CIWA_Score, _3_CIWA_Score, _4_CIWA_Score. Can any one help?
a week ago
665 data BH_New;
1666 set BH_New;
1667 CIWA_Score=max(of _1_CIWA_Score -_4_CIWA_Score);
ERROR: Missing numeric suffix on a numbered variable list (_1_CIWA_Score-_4_CIWA_Score).
ERROR 71-185: The MAX function call does not have enough arguments.
a week ago
I believe your challenge here is related to the variable naming convention. The '-' is used when a numeric indicator is at the end of a variable name (for example x1,x2,x3,x4), but not when it is internale to the name (x1_dat, x2_dat, x3_dat). What you can do, assuming that the variables are in this order on the program data vector (PDV) is use a double dash '--'.
In your case, _1_CIWA_Score --_4_CIWA_Score. This will include any variable in the DATA step created between the first introduction of _1_CIWA_Score and the first introduction of _4_CIWA_Score. If you view the DATA set and these variable appear together as a group with _1_CIWA_Score appearing first and _4_CIWA_Score appearing as the last, you will be fine.
Hope it helps.
Need further help from the community? Please ask a new question.