- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys, I'd like to calculate percentile based on z-score. My data is massive where using z-score-percentile conversion table is futile. Please help? Below is first few observation of my data. Thanks!!!!
data p.temp;
input zcore;
cards;
0.16
3.1
-0.33
1.72
;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use the PROBNORM function
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use the PROBNORM function
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot @PaigeMiller.
data temp1; set temp;
pctl=probnorm(zcore);
run;
zcore pctl
0.16 0.56
3.1 0.99
-0.33 0.37
1.7 0.96
Please correct me if I'm wrong. But it looks like it. I will double check with the conversion table as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Function PROBNORM() is too old ,Check CDF().
data temp;
input zcore;
p=cdf('normal',zcore);
cards;
0.16
3.1
-0.33
1.72
;
proc print;run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Too old? What risk does this pose to the user? The function is still supported by SAS, and the probabilities of a normal distribution haven't changed.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It is better to explain by @Rick_SAS
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes, there is a caveat regarding the "older" PROBXXX functions in Rick's Blog ("The DO Loop"). Just found it again: https://blogs.sas.com/content/iml/2013/07/10/stop-using-ranuni.html (at the bottom of the blog entry).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the link, @FreelanceReinh. That's very interesting.
If I am understanding properly, the new functions will perform better when you have very small or very large values, but in the range of –10 to +10, I just wrote a program and PROBNORM(x) and CDF('normal',x) give the same answers (at least to 14 decimal places).
In any event, SAS ought to update the PROBNORM (and similar functions) documentation to specifically say that users ought to use the newer CDF function, and state the reasons.
Paige Miller