home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
e
/
estat21.zip
/
GDEMO
< prev
next >
Wrap
Text File
|
1992-07-24
|
9KB
|
369 lines
; Demo file for EASIGRAF
; All lines beginning with a ';' will be ignored
; An 'e' at the start of a line is short for 'echo' - the line will be
; copied to the output but there will be no other effect
E
E
E EASIGRAF - DEMONSTRATION
E
E Welcome to this demonstration of EASIGRAF. EASIGRAF is a
E graphics package which graphs data from EASISTAT or other
E programs.
E
E This is a demonstration of how EASISTAT works with EASIGRAF
E to produce graphs of EASISTAT's data. Each time EASISTAT
E pauses to allow you read a message (as now) you can either
E press 'E' to finish the demonstration, or 'K' to take
E temporary control at the keyboard, or any other key to allow
E the demonstration to proceed. If you do press 'K' then when
E you want to return to the demonstration type "INPUT CLOSE".
p
E
E NOTE:
E
E The demonstration will run MUCH faster from a hard disk than
E a floppy disk, because EASIGRAF will have to be reloaded
E every time a graph is displayed. You may want to quit the
E demonstration and EASISTAT and copy all the files onto your hard
E disk if you have not already done so.
E
E This demonstration assumes that the data from the example file
E EXAMPLE.DAT has already been loaded into EASISTAT. This will
E be the case if you have just finished running the EASISTAT
E demonstration using the command file DEMO. If the data has not
E been loaded you should do this now according to the following
E instructions:
p
E
E First jump to the end of the GDEMO file by pressing E.
E
E Then read in the EXAMPLE.DAT file by entering a command such
E as: DATA EXAMPLE.DAT
E
E If EXAMPLE.DAT is on a different disk then you should insert
E this disk in the drive and enter (for example):
E DATA A:EXAMPLE.DAT
E
E If necessary replace the disk containing (this) GDEMO file and
E enter: INPUT GDEMO
E
E This demonstration will restart and the example data will be
E available for it to use.
p
E
E EASIGRAF and EASISTAT are Shareware programs. If you find
E them useful then please become a registered user. Details are
E provided in the file READ.ME, or contact:
E
E ARC Scientific Limited,
E 257 Woodstock Road,
E Oxford OX2 7AE.
E
E Tel. 0865 310167
E
E You will receive up-to-date versions of the programs and a
E full printed manual.
E
E Now we'll start the demonstration.
E
E We'll start by producing a frequency distribution of HDA,
E a measure of emotional distress. (After all,
E this program was written by a psychiatrist.)
E
E To do this we will issue the BASICS command with the G option
E specified, like this:
E
E BASICS G HDA
p
BASICS G HDA
E
E Now the graph file called GRAPH.ME has been written to
E disk. Next we will run EASIGRAF to display the graph. The
E only thing you really need to know is how to quit
E EASIGRAF, which you do by pressing 'Q' when the graph is
E displayed. Then you will return to this demonstration.
E Information about the options available in EASIGRAF are
E described in the manual or on-disk documentation.
E
E You may wish to hide the menu displayed at the bottom of
E screen so that you can see the graph properly. To do this
E press 'M' and to get it back press 'M' again. You may also
E wish to view this graph as a histogram rather then a line
E chart. If so press 'V' (for vertical bar chart).
p
E
E There is one problem which may occur that is difficult to
E predict, which is that EASIGRAF may fail to correctly
E recognise your monitor. If this occurs you will have to set
E a DOS environment variable called FG_DISPLAY. Full
E instructions for doing this are in the documentaion. If
E EASIGRAF fails to display a graph and just gives a blank
E screen or one with "interference" you will need to do this.
E You will need to quit both EASIGRAF (which may be possible
E by pressing Q) and EASISTAT, otherwise reboot the computer.
p
E
E Briefly, try entering one of the following lines (at the DOS
E prompt) before trying to run this demonstration again:
E
E SET FG_DISPLAY=CGAHIRES
E SET FG_DISPLAY=EGAHIRES
E SET FG_DISPLAY=HERC
E SET FG_DISPLAY=VGA11
E
E depending on whether you have a CGA, EGA, Hercules or VGA
E monitor.
E
E Press a key (not 'K' or 'E') when you are ready to run
E EASIGRAF and view the graph.
p
sys easigraf
E
E Well, you got back here OK. If EASIGRAF didn't work
E properly then you will need to set FG_DISPLAY and you
E may want to consult the documentaion before continuing
E with this demonstation. If you wish to leave the
E demonstration press 'E', then type QUIT (ENTER) YES (ENTER).
p
E
E Still here? Good.
E
E Now let's see a breakdown of GHQ scores (more emotional
E distress) by social class. First we use the ANOVA function
E to provide the data in the correct groups, like this:
E
E ANOVA G GHQ
E 5
E C5=1
E C5=2
E C5=3
E C5=4
E C5=5
E
E Press a key to continue
p
ANOVA G GHQ
5
C5=1
C5=2
C5=3
C5=4
C5=5
E
E Now we'll display the graph. To see the means of each group
E when the graph is showing press 'R', then '3' then ENTER.
p
sys easigraf
E
E Next is a histogram of GHQ cases and non-cases (scores less
E than 12) against social class. We use the CHISQ function to
E provide the data:
E
E CHISQ G
E 2
E 5
E GHQ<12
E GHQ>12
E OCC=1
E OCC=2
E OCC=3
E OCC=4
E C5=5
E
E Press a key to continue
p
CHISQ G
2
5
GHQ<12
GHQ>12
OCC=1
OCC=2
OCC=3
OCC=4
OCC=5
E
E Press a key to view the graph. When it is showing 'X' will
E swap over the groupings and '3' will make the blocks solid.
p
system easigraf
E
E And now let's use the Kolmogorov Smirnov statistic to
E compare the age distributions of the GHQ cases and non-cases.
KOLM G OCC
GHQ<12
GHQ>=12
E
E The graph file contains data about the cumulative
E frequency of the Age variable in each group, and when the
E graph is plotted these two frequencies are displayed as the
E default.
p
system easigraf
E
E
E Now let's try plotting HDA against GHQ. Hopefully they'll
E correlate fairly well. To provide the graphing data we use
E the REGRESS function:
E
E REGRESS G GHQ HDA
REGRESS G GHQ HDA
E
E To view the regression line when the graph is showing press
E 'R', then '1' then ENTER.
p
sys easigraf
E
E To finish the demonstration we'll give examples of how
E EASISTAT can be used to produce graphs of mathematical
E functions. We can use the first four columns to hold our
E variables and there are 100 rows.
E
E Press a key to continue
p
der c1 0
der c2 0
der c3 0
der c4 0
fo c1 8 4
fo c2 6 4
fo c3 6 4
fo c4 8 4
label c1 X
label c2 SIN(X)
label c3 COS(X)
E
E Now we'll use EASISTAT to produce the data to plot trigonometric
E functions.
E
der c1 6.283*(row-1)/99
; 2PI
der c2 sin(c1)
der c3 cos(c1)
E
E Press a key to continue
p
E
E And then we'll output the data to a graph file using the
E COMPONENTS function:
co g 3
c1
c2
c3
o graph.me
e DATATYPE:XY1,3
e DATATYPE:XY2,3
o close
E
E That last bit was clever trick to add more information to
E the graph file. Press a key to see the graphs (they look
E good as line graphs, press 'L' when they appear).
p
sys easigraf
E
E We'll try for a pseudo-3D one now. It's called the frilly
E circle.
E
fo c4 8 4
label c4 SIN(8*X)
der c4 sin(c1*8)
co g 3
c2
c4
c3
o graph.me
e MINX:-1.5
e MAXX:1.5
e XINC:1
e MINY:-2
e MAXY:2
e YINC:1
o close
E
E Change it to a line graph first by pressing 'L', then to
E see the third dimension press '3'.
p
sys easigraf
E
E The equation for that curve was:
E X=SIN(theta) Y=SIN(8*theta) and Z=COS(theta)
E
E We can use the same data in a different way.
co g 3
c3
c4
c1
o graph.me
e MINX:-1
e MAXX:2
e XINC:1
e MINY:-1
e MAXY:2.5
e YINC:1
o close
E
E Once again change it to a line graph first by pressing
E 'L', then to see the third dimension press '3'.
p
sys easigraf
E
E That was:
E X=COS(theta) Y=SIN(8*theta) Z=theta
E
E Now we'll rescale the points and make a helix.
der c1 15*(row-1)/99
der c2 sin(c1)
der c3 cos(c1)
co g 3
c2
c3
c1
o graph.me
e MINX:-1
e MAXX:2
e XINC:1
e MINY:-1.5
e MAXY:3
e YINC:1
o close
E
E Again press 'L' and '3'
p
sys easigraf
E
E Now here's one of the normal distribution. It involves a
E bit of number crunching because EASISTAT has to work out
E some of the probabilities long-hand:
der c1 (row-50)/20
label c2 PHI(X)
der c2 pn(c1)
label c3 p(X)
der c3 exp(0-c1*c1/2)/((3.14159*2) POW 0.5)
co g 3
c1
c2
c3
o graph.me
e DATATYPE:XY1,3
o close
sys easigraf
E OK that's all for now.
E
E The demonstration is finishing, leaving you in control of
E EASISTAT. To leave EASISTAT type:
E
E QUIT
E YES
E
E Please read the manual or documentation files to learn more
E about EASIGRAF. If you like it then please become a
E registered user.
E
E ARC Scientific Limited,
E 257 Woodstock Road,
E Oxford OX2 7AE.