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.
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.
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.
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.