SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cloverhorizon
Calcite | Level 5

I am trying to calculate a 90% confidence interval in proc univariate for the 2.5th and 97.5th percentiles. I added in pctlpts to calculate the percentiles as they are not in the default values, and the output gives me the values. After adding in ciquantdf to get the 90% CI's of these percentiles though, the output no longer lists these specified percentiles, only the defaults. Does anyone know how to calculate the 90% CI's for these specified percentiles, even if not in univariate? Thank you!

 

proc univariate data=itd ciquantdf(alpha=.1);
var res;
output out=per pctlpts = 97.5 2.5 pctlpre = P_;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

 

Have a look at this :

 

Compute confidence intervals for percentiles in SAS
By Rick Wicklin on The DO Loop May 6, 2013
https://blogs.sas.com/content/iml/2013/05/06/compute-confidence-intervals-for-percentiles-in-sas.htm...

 

Cheers,

Koen

View solution in original post

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

Have a look at this :

 

Compute confidence intervals for percentiles in SAS
By Rick Wicklin on The DO Loop May 6, 2013
https://blogs.sas.com/content/iml/2013/05/06/compute-confidence-intervals-for-percentiles-in-sas.htm...

 

Cheers,

Koen

ballardw
Super User

You would have to request those items in the output statement. Example (may not have values for your data though)

output out=per pctlpts = 97.5 2.5 pctlpre = P_    
    ciquantdf=(lowerpre=LCL UpperPre= UCL);

The statistic request is again Ciquantdf. The LowerPre and UpperPre options specify the prefix for the variable names like Pctlpre does. The number of values and ranges might mean that some of the intervals aren't calculated, just as in the table output.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 2 replies
  • 2360 views
  • 6 likes
  • 3 in conversation