|
|
|
||||
|
|
|||||
- Graph-N-Go
- SAS/INSIGHT
- SAS/ANALYST
- SAS/PROCS
- SAS Learning Module--Graphing Data in SAS: http://support.sas.com/sassamples/graphgallery/
- SAS/GRAPH Sample Programs: http://www.sas.com/service/techsup/sample/sample_graph.html
- Regression with Graphics: http://www.ats.ucla.edu/stat/books/rwg/
- SAS Library An Introduction to Publication Quality Graphics In SAS for Windows: http://www.ats.ucla.edu/stat/sas/library/graph_os.htm
- SAS Code Fragment: SAS/Gplot: http://www.ats.ucla.edu/stat/sas/code/proc_gplot_stuff.htm
1. Graph-N-Go
Graph-N-Go is mainly for reporting. Its strong point is in its flexibility to save a plot in various formats, including graphic format and html format. Its week point is that it only support a few graph types. We will show how to save a graph into a dynamic html format, so the graph can be modified later. We will also show how to save a graph in a graphic format.
Menu: Solution-->Reporting-->Graph-N-Go
Here is the html page that has been created.

2. SAS/Insight
SAS/Insight is another package that can be used to explore variables and relationships among variables. Its strong point is that it offers a lot of good detailed information on variables, such univariate statistics. You can save all the graphs to gif files, or other graphic format files. But it is not easy to modify the style or the color of the graphs. Its interactive feature makes it strong for exploring data both graphically and analytically.



3. SAS/Analyst
SAS/Analyst tries to be both for exploring and reporting. It is a good place to start to have a look at the graphs that you are interested. There are many types of graphs that you can create and the best part of it is that it also creates the SAS code for generating the plots in case you want to change some of the settings or modify the code for other use. This is not only true for graphics, it is also true for statistical analyses.

*-------------------------------------------+
| Generated: Tuesday, May 14, 2002 11:39:23 |
| Data: c:\temp\_TD416\Hsb2 |
+-------------------------------------------*;
title;
footnote;
goptions ftext=SWISS ctext=BLACK htext=1.0 cells;
goptions colors=(red green blue cyan purple tan pink orange
brown yellow plum peru salmon lime);
axis1 label=(a=90 r=0);
pattern value=solid;
*** Produce bar charts ***;
proc gchart data=Work.Hsb2 ;
vbar3d WRITE
/ description="Vertical Bar Chart of WRITE"
frame
woutline=1
type=FREQ
group=female
subgroup=GROUP
coutline=CX008080
cframe=CXF7E1C2
inside=FREQ
;
run;
goptions ftext= ctext= htext= ;
quit;
4. SAS/Procs: Univariate, Boxplot, Gplot, Gchart, G3d to create customized more complex plots.
proc univariate data = hsb2 noprint; histogram write; run;
/*A better one of the same histogram.*/ proc univariate data = hsb2 noprint; title "Histogram for variable write"; histogram write /cfill=ligr normal cframe=liy barwidth=8 cv=black; inset mean std max min; run; title;

proc sort data = hsb2; by group; run; goptions reset = all; proc boxplot data = hsb2; plot math*group; run;

goptions reset = all;
axis1 value=("Group 1" "Group 2" "Group 3" "Group 4") label=('Group');
axis2 label = ('Math Score' a=90 justify=center);
proc boxplot data = hsb2;
title1 'Boxplot of Math Score vs. group';
plot math*group /boxconnect=mean boxstyle=schematic haxis=axis1 vaxis = axis2;
run;
goptions reset = all gunit=pct border cback=white
colors=( blue green red black) ftext=swiss
ftitle=swissb htitle=3 htext=3.5 ctitle=black ctext=black;
axis1 label=(a=90 'Mean for Variable Write') minor=none;
proc gchart data=hsb2;
vbar group /sumvar=write axis=axis1
ERRORBAR= bars width = 5 gspace=2 discrete
type=mean cframe=ligr coutline= blue cerror=black;
run;
quit;
goptions reset = all;
symbol1 i = none c = blue v = dot w=1 pointlabel=("#id");
symbol2 i = none c = red v = dot;
proc gplot data = hsb2;
plot write*math = 1 ;
where math > 60;
run;
quit;
symbol1 i = none c = blue v = diamond; symbol2 i = none c = red v = triangle; proc gplot data=hsb2; plot math*read =1 science*read =2 /overlay hminor=0 vminor=0; run; quit;
proc sort data= hsb2; by read; run; symbol1 i = join v=star c=blue l = 1; symbol2 i = join v=circle c=red l = 21; proc glm data = hsb2; model write = read female female*read ; output out= pred p=pred; run; quit;
proc gplot data = pred; plot pred*read = female /overlay; run; quit;
proc g3d data= hsb2; scatter write*read =math; run; quit;
5. Regression diagnostic plots
/*regression diagnostic plots from proc reg*/ proc reg data = hsb2 noprint; model write = female math ; plot rstudent.*predicted. / vref =(-3 3) vrefl=4 cvrefl=red; plot rstudent.*obs.; plot cookd.*predicted.; plot cookd.*obs.; run; quit;




UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services