I used the following code, but I want the columns in a different order.
ods graphics on;
proc glm plots=diagnostics;
class trt;
model pct_Juice Brix Acid Ratio BrimA = trt;
lsmeans trt/adjust=tukey alpha=0.05 lines;
run;
Here is the default graph, but the columns are in alphabetical order. I want "Control" as the first column on the left.
In your SAS data set, add a space in front of 'Control' so it is now ' Control'
Then run PROC GLM again
In your SAS data set, add a space in front of 'Control' so it is now ' Control'
Then run PROC GLM again
Generally you have two options:
1. Make the graph using the output and SGPLOT
2. Map numbers to the values you'd like ordering them in the order you'd like to see, ie Control = 0, Black = 1, Blue = 2 and use Labels to control the displayed value. Then once they're sorted by default they'll show the labels in the order desired.
@tebert wrote:
I used the following code, but I want the columns in a different order.
ods graphics on; proc glm plots=diagnostics; class trt; model pct_Juice Brix Acid Ratio BrimA = trt; lsmeans trt/adjust=tukey alpha=0.05 lines; run;
Here is the default graph, but the columns are in alphabetical order. I want "Control" as the first column on the left.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.