BookmarkSubscribeRSS Feed
Al_senior
Fluorite | Level 6

I am re-posting this question in hope of getting any answer. 

I am fitting different distributions to a data set. I am using the following code: 

 

proc capability data=pdlsf;
 specs usl=usl;
 var result;
 histogram / normal(indices) Lognormal(indices);
  by par1 par2;
 inset mean std cv n ppk="Ppk" normal(ESTPCTGTR) normal(ksdpval)/ cfill=white pos=ne;
run;
quit;

When running the code as expected I get a nice quantile table with predefined quantiles like 

1%, 5%, 10%,...., 99%. 

What I need is to get some certain quantiles that is not predefined. Let's say for some calculation I need to get 99.22% quantile estimated by lognormal. 

 

Can I get that non-pre-defined quantile with proc capability? if yeas, how? If not, what proc step can do that for me?

 

A desired outcome could be something like the following table which is basically a quantile table generated by proc capability step with only difference that I defined 99.22% to be calculated in this table.

                   Quantiles for lognormal Distribution

quantile                  observed                   estimated
1                           12                       11.422
99.22                       21                       19.485
3 REPLIES 3
jimbarbour
Meteorite | Level 14

I'm not familiar with Proc Capability, so this may be of no help at all, but here is a paper that discusses the best SAS procedures for generating custom percentiles:  https://www.lexjansen.com/wuss/2014/114_Final_Paper_PDF.pdf

 

It might be that you would need to define/determine the distribution using Proc Capability and then the percentiles with another procedure.  A bit of a pain to use multiple procedures, I know, but since no one else has responded, I thought I'd at least suggest supplemental procedures.

 

Jim

PGStats
Opal | Level 21

Here is how to get the observed quantile which does not depend on the assumed distribution:

 

proc capability data=sashelp.heart;
var cholesterol;
output out=perc n=n median=med geomean=geom pctlpts=99.22 pctlpre=pChol PCTLNDEC=2;
run;

proc print data=perc label noobs; run;

PGStats_0-1627162224383.png

 

PG
Ksharp
Super User



proc univariate data=sashelp.heart CIPCTLDF noprint;
var cholesterol;
output out=perc n=n median=med pctlpts=99.22 pctlpre=pChol;
run;

proc print;run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 710 views
  • 4 likes
  • 4 in conversation