The 1E-6 is easy in SAS: That is acceptable as a fixed value though there might sometimes be some issues related to storage precision. The FORMAT you use to display the value might be of interest.
data example; file print; x=1E-6; put 'Best5. format' x= best5.; put '9.7 format ' x= 9.7; run;
Since you have the same long exponent in the numerator and denominator I would suggest calculating that as another variable and have much simpler code to type like
FAST = exp(thatvar)/ (1+Exp(thatvar));
The formula can be calculated in a single step, but as the same complex expression occurs twice, it is faster to calculate it in two steps:
- by "faster" I mean both the amount of typing to be done, and the CPU time for the calculation.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.