BookmarkSubscribeRSS Feed
zg5002
Calcite | Level 5

I am quite new to SAS, and I am trying to make a quantile diagram where the data is aligned along the 1. axis, and the normal distribution quantiles along the 2. axis, but I don't know how - when I use qqplot it aligns it the other way around.

 

Thanks!

5 REPLIES 5
DanH_sas
SAS Super FREQ

What are you using to create your graphics? What version of SAS are you using?

zg5002
Calcite | Level 5

I am using SAS 9.4, and the code I am using is

 

PROC UNIVARIATE data = diff;
QQPLOT differens / NORMAL(mu = est sigma = est l=2)
square;
RUN;

 

I hope that answers your question?

Rick_SAS
SAS Super FREQ

I assume you are using PROC UNIVARIATE.

 

The standard form is the way that PROC UNIVARIATE creates it, so I encourage you to use that form. However, if you insist of making the Q-Q plot "backawards," you have two options:

1. Forget about UNIVARIATE and create the data yourself by using the DATA step and the SCATTER statement in PROC SGPLOT. See the end of my blog post about Q-Q plots for an example.

2. Use PROC UNIVARIATE to create the plot, but write the data from the graph into a data set and then use PROC SGPLOT to reverse the axes.  To write the data, put the following statement before your UNIVARIATE call:

ODS OUTPUT QQPLOT=QQ;

Then use the techniques in my blog post "How to get data values out of ODS graphics" to figure out the names of the variables that you need. The SCATTER statement in PROC SGPLOT completes the job.

 

zg5002
Calcite | Level 5

Thanks, I'll see if I can get it working 🙂

Reeza
Super User

Out of curiousity why do you want it different than the standard view?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 5 replies
  • 1133 views
  • 1 like
  • 4 in conversation