BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
kaet78ha
Calcite | Level 5

I'm trying to calculate the following stats : 

25th percentile (95% CI)
Median (Weeks) (95% CI)
75th percentile (95% CI)

by using proc univariate 

 And I'm getting the results:

kaet78ha_0-1622539990481.png

But I'm a little bit confused with output CI to the datset, I'm trying like:

   ods select Quantiles;
   proc univariate data=Sashelp.Cars ciquantnormal(alpha=.1 );
   var MPG_City;
   output out=a1 q1=q25 q3=q75 median=median min=min max=max lclm=lci uclm=dfd;
  run;

But I'm getting an error :

ERROR 22-322: Syntax error, expecting one of the following: CSS, CV, GEOMEAN, GINI, KURTOSIS, MAD, MAX, MEAN, MEDIAN, MIN, MODE,
MSIGN, N, NMISS, NOBS, NORMAL, P1, P10, P5, P90, P95, P99, PCTLNAME, PCTLPRE, PROBM, PROBN, PROBS, PROBT, Q1, Q3, QN,
QRANGE, RANGE, SIGNRANK, SKEWNESS, SN, STD, STDMEAN, STD_GINI, STD_MAD, STD_QN, STD_QRANGE, STD_SN, SUM, SUMWGT, T,
USS, VAR.

I suppose I'm using the wrong way for output CI, can somebody help? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @kaet78ha,

 

Replace the OUTPUT statement with an ODS OUTPUT statement to get what you want:

ods output Quantiles=want;

Also, if you want 95% CIs, then omit the ALPHA= option (or use ALPHA=.05 explicitly).

View solution in original post

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @kaet78ha,

 

Replace the OUTPUT statement with an ODS OUTPUT statement to get what you want:

ods output Quantiles=want;

Also, if you want 95% CIs, then omit the ALPHA= option (or use ALPHA=.05 explicitly).

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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