proc anova data= Cluster_1 ;
class Consumer Sample ;
title Cluster_1 ;
model Overall_L Leaf_L Buywant = Consumer Sample ;
means Sample/lsd lines ;
run;
---------------------
1
2
I want a data value displayed in letters like on the picture2. However, when analyzing the data in the above method, it is difficult because the line graph comes out like the picture1 . Is there any way to convert a line graph into a table?
Hello ,
All output objects in the Results pane (tables, graphs, plots, ...) have underlying data of course.
To capture the underlying data in a data set, use ODS OUTPUT.
For the name of the output objects, use ODS TRACE ON; .
The names are listed in the LOG as a result of ODS TRACE ON; .
title1 'Nitrogen Content of Red Clover Plants';
data Clover;
input Strain $ Nitrogen @@;
datalines;
3DOK1 19.4 3DOK1 32.6 3DOK1 27.0 3DOK1 32.1 3DOK1 33.0
3DOK5 17.7 3DOK5 24.8 3DOK5 27.9 3DOK5 25.2 3DOK5 24.3
3DOK4 17.0 3DOK4 19.4 3DOK4 9.1 3DOK4 11.9 3DOK4 15.8
3DOK7 20.7 3DOK7 21.0 3DOK7 20.5 3DOK7 18.8 3DOK7 18.6
3DOK13 14.3 3DOK13 14.4 3DOK13 11.8 3DOK13 11.6 3DOK13 14.2
COMPOS 17.3 COMPOS 19.4 COMPOS 19.1 COMPOS 16.9 COMPOS 20.8
;
ODS trace on;
ODS exclude BoxPlot;
ODS output LinesPlot=work.LinesPlot;
proc anova data=Clover;
class Strain;
model Nitrogen = Strain;
means Strain / lsd lines;
run;
QUIT;
ODS TRACE OFF;
proc print data=work.LinesPlot;
run;
/* end of program */
Koen
This is a side issue, but you should not be using PROC ANOVA for two-way ANOVA, unless you have absolutely equal sample sizes in each cell. From the PROC ANOVA documentation:
Use PROC ANOVA for the analysis of balanced data only, with the following exceptions: one-way analysis of variance, Latin square designs, certain partially balanced incomplete block designs, completely nested (hierarchical) designs, and designs with cell frequencies that are proportional to each other and are also proportional to the background population. These exceptions have designs in which the factors are all orthogonal to each other.
Caution: If you use PROC ANOVA for analysis of unbalanced data, you must assume responsibility for the validity of the results.
Use PROC GLM instead.
proc glm data= sashelp.class ;
class sex age ;
model height weight =sex age ;
means age/LINESTABLE lines lsd ;
quit;
Adding to my comment above:
If you are doing a two-way ANOVA, I think you want to use LSMEANS and not MEANS (unless you have equal number of observations in each cell)
SORRY.. I DONT KNOW WHAT CAN I DO..
@greengg wrote:
SORRY.. I DONT KNOW WHAT CAN I DO..
Hello @greengg ,
Does it bother you that you marked a wrong post as a solution?
There's nothing more you can do about that. You can't reverse that, I guess.
But don't bother with it anymore. It's not a big deal. The question itself is no longer in status "open" and that's the most important thing.
And for the statistics of @PaigeMiller and @Ksharp , you don't have to correct it either. Those statistics are dizzying anyway. One solution more or less ... they will hardly notice.
BR,
Koen
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Select SAS Training centers are offering in-person courses. View upcoming courses for: