Edpsy/Psych/Stat 587
C.J.Anderson
To
Produce Graphs
Under “Solutions” on the SAS toolbar select “ASSIST”
Select “Graphics”.
You will be able to select from
o
Bar Charts…
o
Pie Charts…
o
Plots…
o
Maps…
o
Utilities
o
Simple X*Y Plot…
o
X*Y Plot…
o
Multiple Plots per Axes…
Select “Multiple Plots per Axes”. The following window will open.
To graph the predictions of U_j
along with the confidence bands click on the “Vertical axis” button:
You put as many variables in the “Available” list
into the “Selected” box as you want plotted.
Then click on “OK”.
Do the same with the “Horizontal axis” (can only
select one variable).
Click on “Additional Options” (you will generally
want to make changes to the default settings).
If you selection “Axis options” you then select
“Vertical” or “Horizontal”. You can then
adjust the following
For example, select “Axis label” to enter a more
meaningful label for the vertical axis…
With multiple plots per axis you will want to modify
“Line and symbol options”:
The “1st plotted line…” will be the line
for the first variable listed under “vertical axis” in the main graph window.
Selecting “1st Plotted line…” opens the
following
The default interpolation method is to “JOIN” points
by a straight line. We’ll do this for
the predicted values of U_j.
The default symbol is “None”.
Now lets do this for the 2nd
plotted line, which will be the lower 95% CI:
I decided to use “+” to indicate the lower CI.
Also, I didn’t want them connected by a line so
under “Interpolation Method” I select “Leave points unconnected”, which is the
first option. Below are the options for
“Interpolation Method”
After making all “Additional Options” that you want,
click on the
run icon (or submit).
And you get….
To save this figure, under “File” on the main
toolbar go to “Export as Image”.
You will need to fill in the following:
·
Where you want the file to live.
·
The name you want to give the file.
·
The format of the file (“Save as type:”). Possible
formats are:
o
BMP file (*.bmp)
o
EMF file (*.emf)
o
WMF file (*.wmf)
o
JPEG file (*.jpg)
o
GIF file (*.gif)
o
TIF file (*.tif)
o
PS file (*.ps)
o
EPSI file (*.ps)
o
PBM file (*.pbm)
o
DIB file (*.dib)
Lastly, the SAS/GRAPH code is given to you in the
SAS/LOG. I often copy this into the
program editor and make changes, such as adding titles and editing graphs…editing
can also be done with graphs when you’re using SAS/ASSIST.