proc anova data= Cluster_1 ;
class Consumer Sample ;
title Cluster_1 ;
model Overall_L Leaf_L Buywant = Consumer Sample ;
means Sample/lsd lines ;
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?
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 */
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.
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.
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.
For SAS newbies, this video is a great way to get started. James Harroun walks through the process using SAS Studio for SAS OnDemand for Academics, but the same steps apply to any analytics project.
Find more tutorials on the SAS Users YouTube channel.