home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
e
/
estat21.zip
/
EASIDOC.ZIP
/
ESCHAP11.DOC
< prev
next >
Wrap
Text File
|
1992-06-30
|
17KB
|
397 lines
Chapter 11: USING EASIGRAF WITH EASISTAT
The easiest way to use EASIGRAF, and the purpose for
which it is specifically designed, is to provide a
graphical representation of some of EASISTAT's commands.
The syntax to produce a graph is the same for each
command and is very simple. In the description that
follows we will assume that you are familiar with the
EASISTAT documentation.
A graphing option is available from six of the EASISTAT
commands: CHISQ, ANOVA, BASICS, REGRESS, KOLMOGOROV and
COMPONENTS. Each produces a different type of graph. To
get one of these commands to produce a graph simply enter
G as an option after specifying the command name. (The G
is shown on the help screen by the relevant commands.)
When this option is specified then EASISTAT will write a
specially formatted graph file to disk and then will run
EASIGRAF to display the graph by using EASISTAT's SYSTEM
command. So all you need to do to get a frequency
distribution graph of column 15 of EASISTAT's data is to
type:
BASICS G C15
and EASISTAT will do the rest.
Here are other examples:
REGRESS G C15 C16
-> scatter plot of C16 against C15
ANOVA G C15
-> vertical scatter plots of C15 in groups
CHISQ G
-> bar charts of cells in contingency table
KOLMOGOROV G C15
-> cumulative distributions of C15 in two groups
COMPONENT G
-> general option for graphing multiple columns of data
Unless otherwise instructed EASISTAT will write a graph
file called GRAPH.ME and will ask EASIGRAF to display it.
If the G is followed immediately (no space) with a
filename then EASISTAT will use this instead of GRAPH.ME:
B GFRED.GRP C15
-> creates graph file called FRED.GRP
CHISQ GRAPH.ME
-> creates graph file called RAPH.ME
11:1. Problems running
EASIGRAF from EASISTAT
Although running EASIGRAF from EASISTAT is usually
straightforward, there are a number of problems which may
occur under some circumstances.
99
Using EASIGRAF with EASISTAT
11:1.1 Bad command or file name
If you get this error message then it simply means that
EASISTAT cannot find EASIGRAF.EXE. The file called
EASIGRAF.EXE must either be in the current working
directory or somewhere on the DOS search path. Note that
the current working directory is most likely to be the
one containing your data files and such like, and not
necessarily the one containing EASIGRAF.EXE (at least
this is what we suggested in the installation
instructions). Either you must copy EASIGRAF.EXE into the
same directory as the one you wish to work in (using the
COPY command from DOS), or you must change to the correct
directory before using EASIGRAF (using the CHDIR
command). If you have a hard disk then the best solution
by far is to put EASIGRAF.EXE into a subdirectory which
is somewhere on the search path - this is usually set up
with a PATH command in the AUTOEXEC.BAT file, see the
installation instructions for details.
If you get this error message then EASISTAT will still
have written the correct graph file to disk and there is
nothing to stop you running EASIGRAF using EASISTAT's
SYSTEM command and providing the full pathname for
EASIGRAF. Here's what we mean:
Suppose EASIGRAF.EXE and EASISTAT.EXE are on the hard
disk C: in subdirectory ESTAT, but that the data being
studied is on a disk in drive A:. The best way to start
EASISTAT would be as follows:
A:
C:\ESTAT\EASISTAT
If while using EASISTAT you want to draw a graph and type
B GBCOL5.GRP C5
then EASISTAT will write a graph file called BCOL5.GRP to
the disk in drive A:. It will then try to run EASIGRAF
but since EASIGRAF isn't on drive A: the following error
message will appear:
Bad command or file name
and one returns to EASISTAT without seeing a graph. But
the graph file is still there on disk so now one can
type:
SYSTEM C:\ESTAT\EASIGRAF BCOL5.GRP
and the graph will appear.
11:1.2 Unrecognised display type
This situation is dealt with in the general section about
problems with EASIGRAF.
11:1.3 Out of memory
If you get some kind of "Out of memory" error message
then it means that there is not room in your computer's
100
Using EASIGRAF with EASISTAT
memory for EASISTAT, EASISTAT's data, EASIGRAF,
EASIGRAF's data and the EASIGRAF's menus all at once.
However the graph file will have still been safely saved
to disk and can be displayed later by running EASIGRAF on
its own after you have quit EASISTAT.
11:1.4 Syntax errors
It is possible that you might get an error message from
EASIGRAF complaining about the syntax of its data,
although we hope that this should not happen. EASISTAT
should provide files in the correct syntax. Check you
have not made an error using EASISTAT, then try examining
the graph file with a word processor or text editor like
EDIT to see if you can see what the problem is.
11:2. The BASICS command
When the G option is selected from the BASICS command a
graph file is written to disk containing three columns of
figures. In the first column is a set of values for the
variable studied. The second column contains the number
of items having that value and the third column is a
cumulative total of the number of items having the stated
value or below.
The graph when first displayed plots the first column
along the X axis and the second on the Y axis, producing
a frequency distribution for the variable. If instead the
third column is plotted against the first then a
cumulative distibution is produced. To do this go to the
"Data" menu (type "D"), then select the XY columns option
(type "5") and select columns 1 and 3 (type "1,3" then
keep pressing ENTER till you arrive back at the main
menu). The cumulative frequency distribution will then be
displayed. (To see the original graph again select
columns 1 and 2 to be plotted against each other.)
No key is needed for this data. Either graph may be
displayed as a line graph instead of a bar chart by
typing "L" when the main menu is showing. However you
should note that the line will be drawn only between
values which are actually present in the data table, so
any values with zero frequency will not result in the
line going down to zero. This will be clear by comparing
the line and bar graphs on the screen.
There are a other few points that are worth noting. This
kind of frequency diagram can work very well for measures
for which only a small number of values are possible, for
example for social class (which only takes 5 values).
However for continuous variables or ones which can take
many values, the situation will be that each row of the
data set will have a different value, and all the points
on the frequency diagram will have a frequency of 1,
since only one row has that value. If you try to produce
a frequency distribution with this sort of data you will
produce a fairly meaningless graph, and you may even
think that the programs are not working correctly. The
solution would be to break the continous data down into
ranges and then produce a histogram. This can be done
101
Using EASIGRAF with EASISTAT
either by producing another column using the DERIVE
command, or by using the CHISQ command to produce a
contingency table one column wide with each row
representing an appropriate range of values.
Another thing that can be a problem with producing a
histogram is that the bars of the graph have a default
width of 1. This will be inappropriate if the variable
graphed takes large or small values. To change this bar
width you must enter a constant value for the third
"dimension" of the graph. This is is done by entering a
negative number for the Z axis. For example to produce a
histogram with bar width of 0.5 one would type "D5", then
"1,2,-0.5" and then press ENTER twice. To get a bar width
of 100 type "D5", then "1,2,-100" then ENTER twice.
Sometimes the autoscaling will mean that half of the
first or last column is not displayed. If this occurs and
is a problem then you should rescale the graph to
slightly change the minimum and maximum values for the X
axis. To do this first type "A7" and you will see the old
values for the X axis. Then you might want to backspace
over this line and enter for example "-1,60,1" instead of
"0,60,1". This reduces the mininum X value to negative 1
and prevents you losing the left half of the column whose
centre is at zero. Press ENTER to leave the Y axis
unchanged and then again to return to the main menu.
11:3. The CHISQ command
The rows and columns of the contingency table are output
as the rows and columns of a graph file, which then
produces a histogram of the values of the rows and
columns in the contingency table. This is accomplished by
EASIGRAF using the "Group by rows and columns" option to
organise the data. The bars of the histogram are grouped
according to the row of the table which they represent,
and are shaded according to the column of the table.
Appropriate titles and a key are provided. Each group of
bars is titled according to the condition used to specify
the row, while the key relates the shading to the
conditions specifying the columns. Selecting the
"Exchange" option (by typing "X") swaps round whether the
values are grouped into rows or columns of the table.
It is possible to create a table with just one column and
in this way an ordinary histogram of one variable can be
produced. This is especially useful when the variable is
continuous and takes many different values, since in
these circumstances the BASICS command does not produce a
very helpful graph. Instead, the CHISQ command can be
used to gather the values into different ranges and a
histogram with one bar for each range can be drawn. An
example application of this to the GHQ variable was
provided in the section on the CHISQ command in the
EASISTAT documentation.
11:4. The ANOVA command
102
Using EASIGRAF with EASISTAT
The ANOVA command divides the values up into groups
according to the conditions specified and values from
each group go into different columns of the graph file.
(Every value goes into a row of its own so there is only
one value per row.) EASIGRAF then groups the data in the
graph file by columns and displays a vertical scatter
chart of points in each group. The mean of each group can
be displayed as a horizontal line by selecting the
"Regression and mean" option from the main menu (by
typing "R") and then selecting "Toggle mean" (type "3"
and then press ENTER).
Although no graphing option is supplied for the TTEST
command of EASISTAT, if it is desired to represent an
unpaired t test graphically then instead an ANOVA command
can be performed with just two groups (this is equivalent
to an unpaired t test).
11:5. The REGRESS command
The values of the first variable go into the first column
of the graph file and those of the second into the
second. The option to organise the data as XY columns is
used by EASIGRAF to plot the second value against the
first in a scatter chart. To see the regression line
select the "Regression and mean" option from the main
menu (by typing "R") and then select "Toggle Y on X"
(type "1" and then press ENTER). Selecting "Exchange" (by
typing "X") will swap over the two variables.
11:6. The KOLMOGOROV command
This graph file is the most complicated. The first column
contains the values under consideration. The second and
sixth columns contain the number of items having that
value in each of the two groups. The third and seventh
columns contain the cumulative total of items having that
value or less, and the fourth and eighth columns contain
the percentages of each group having a given value and
the fifth and ninth columns contain the cumulative
percentages. The option to organise the data as XY
columns is used by EASIGRAF to plot the fifth and ninth
columns against the first to produce two overlaid plots
of the cumulative percentage totals for each group,
expressed as a fraction of the total number of items in
each group. (The Kolmogorov-Smirnov statistic is the
maximum vertical distance between these two lines.) Other
interesting plots are of the two absolute distributions
(type "D5", then "1,2" then ENTER and "1,6" then ENTER
twice), of the two cumulative distributions (type "D5",
then "1,3" then ENTER and "1,7" then ENTER twice) and of
the two percentage distributions (type "D5", then "1,4"
then ENTER and "1,8" then ENTER twice). Other
combinations can also be plotted.
11:7. The COMPONENTS command
Unlike the other commands, the graph produced has nothing
to do with the command itself and indeed if the "G"
103
Using EASIGRAF with EASISTAT
option is selected with this command then the principal
component analysis is not even performed. Instead, this
syntax is used simply as a convenient way to specify a
number of columns of data to be written to a graph file.
Any number of columns can be selected and they are simply
written into the graph file as they are. By default the
first three columns are assigned to the X, Y and Z axes
of the graph and the option to organise the data as XY
columns is used to produce a scatter diagram but it is
anticipated that the data could be used in many different
ways, including three-dimensional plots and multiple X-Y
plots. Some examples of the flexibility of this command
can be seen when GDEMO is used to drive EASISTAT (by
running EASISTAT and then entering INPUT GDEMO).
Sometimes it is desired to plot all the values from one
column in the EASISTAT data table in one vertical line
and those from another column in another line. To do this
use the COMPONENTS command to output the data from the
required columns into a graph file, and then change the
data organisation to be grouped by columns, by pressing
"D4" then ENTER. This differs from the graph produced by
the ANOVA command where although the values from
different groups are plotted in vertical lines, the
values actually all come from the same column of the data
table. Instead, one might be thinking more about the
relationship between two columns of values, perhaps in a
way more similar to the paired t test (although the
pairing itself cannot be displayed).
11:8. General points
EASIGRAF works well with EASISTAT. EASISTAT is used to
produce the basic data to be graphed and the titles,
graph type and scale can then be edited and adjusted by
EASIGRAF to produce quite a helpful graph. We recommend
that you give each graph file a specific name (rather
than just leaving it to be called GRAPH.ME). Then you can
produce a number of graph files during a session using
EASISTAT and afterwards you can use EASIGRAF to "fine-
tune" them.
If you have a very large data set then there is unlikely
to be room for EASIGRAF and EASISTAT to run at once and
you will have to just use EASISTAT to write graph files
to disk and then use EASIGRAF to view them later. If you
are running EASISTAT in batch mode (from a command file)
then when the "G" option is selected a graph file will be
written to disk but EASIGRAF will not be run
automatically. The reason for this is that EASIGRAF runs
mainly in interactive mode (from the keyboard) and so it
would not run unattended. If you wish to use an EASISTAT
command file to display a graph then you can easily do so
by having it run EASIGRAF explicitly using the SYSTEM
command, e.g.:
R GTIM C15 C16
SYSTEM EASIGRAF TIM
104