Thanks for the quick reply. Sadly, the QUANTILE function does not work for certain probabilities either. For example: proc iml;
mean = 0.975;
sdev = 0.10;
alpha = (mean**2)*(1-mean)/(sdev**2)-mean;
beta = (alpha)*(1-mean)/mean;
invalid = quantile('beta',0.652,alpha,beta);
quit;
/*I found that 0.652 did not work by including this code and checking the error message:*/
output = j(1000,1,.);
do i = 1 to nrow(output) - 1;
output[i] = quantile('beta',i/nrow(output),alpha,beta);
end;
print output;
quit; Do you think QUANTILE is suffering from the same internal precision issue? If so, any other thoughts on an alternative method? I need a reliable function because the probability parameter will always be uniform random. I do not control it. I would be okay with a function equivalent to Excel's =iferror(calc,value if error), but SAS does not have one to my knowledge. The SAS function coalesce() returns the first non-missing value, but in this case it does not work, because it resolves as error and not missing. Thanks again for your help.
... View more