BookmarkSubscribeRSS Feed
Demographer
Pyrite | Level 9

Hi,

I wonder under a data statement, there is a function equivalent to NORM.DIST from Excel (which returns the non-cumulative probability of x giving an average and a SD). 

For instance, for an average of 26 and a SD is 10, I want the variable prob the value 0.001752 if x=1, 0.002239 if x=2, etc.

1 REPLY 1
ballardw
Super User

It looks like you want the PDF function. Example:

data example;
   input x;
   p2 = pdf('normal',x,26,10);
datalines;
1
2
3
26
;

'normal' is the name of the distribution. SAS will work with a number of distributions. X is the value of interest and the next parameters are the mean and standard deviation. If you leave off the mean and standard deviation SAS will use 0 and 1.

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1895 views
  • 0 likes
  • 2 in conversation