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.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: