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;
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
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
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.