Hello, I am working on creating a stability analysis program using macros to assist with our redundant stability analysis that we perform. For part of the program, I need to use a conditional statement to determine with model to run. However, in my example code I am unable to get the conditional statement to correctly execute based on a p-value that I have save into a dataset. The section of code that is giving me the issue is: %macro Stability(); data stats; set stats; %if PROB > 0.25 %then %do; proc glm data=stability; model RP=time; run; %end; %else %do; proc glm data=stability; class batch; model RP=batch time batch*time; run; %end; %mend Stability; %Stability(); where "%if PROB > 0.25 %then %do;" is not leading to the use of the correct proc glm procedure being executed. Basically, in this part of the code I am trying to automate the process of testing for poolability of data across batches or if the batches need to be kept separate. I have also attached an entire SAS code file for a full example. Any help would be greatly appreciated. Thank you, Jeff S. O.
... View more