Search code examples
sassas-macro

SAS: assign a quantile to a macro variable


In SAS, how can I assign the 97.5% quantile of the normal distribution to the macro variable z?


Not working 1

%let z = quantile("normal", 0.975); 

Not working 2

%let z = %sysfunc(quantile("normal", 0.975));

Solution

  • Macro does NOT like unnecessary quotes:

    %let z = %sysfunc(quantile(normal, 0.975));