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 >
Text File  |  1992-06-30  |  17KB  |  397 lines

  1.  
  2.  
  3.      Chapter 11: USING EASIGRAF WITH EASISTAT
  4.  
  5.      The easiest way to use EASIGRAF, and the purpose for
  6.      which it is specifically designed, is to provide a
  7.      graphical representation of some of EASISTAT's commands.
  8.      The syntax to produce a graph is the same for each
  9.      command and is very simple. In the description that
  10.      follows we will assume that you are familiar with the
  11.      EASISTAT documentation.
  12.  
  13.      A graphing option is available from six of the EASISTAT
  14.      commands: CHISQ, ANOVA, BASICS, REGRESS, KOLMOGOROV and
  15.      COMPONENTS. Each produces a different type of graph. To
  16.      get one of these commands to produce a graph simply enter
  17.      G as an option after specifying the command name. (The G
  18.      is shown on the help screen by the relevant commands.)
  19.      When this option is specified then EASISTAT will write a
  20.      specially formatted graph file to disk and then will run
  21.      EASIGRAF to display the graph by using EASISTAT's SYSTEM
  22.      command. So all you need to do to get a frequency
  23.      distribution graph of column 15 of EASISTAT's data is to
  24.      type:
  25.  
  26.      BASICS G C15
  27.  
  28.      and EASISTAT will do the rest.
  29.  
  30.      Here are other examples:
  31.  
  32.      REGRESS G C15 C16
  33.      -> scatter plot of C16 against C15
  34.  
  35.      ANOVA G C15
  36.      -> vertical scatter plots of C15 in groups
  37.  
  38.      CHISQ G
  39.      -> bar charts of cells in contingency table
  40.  
  41.      KOLMOGOROV G C15
  42.      -> cumulative distributions of C15 in two groups
  43.  
  44.      COMPONENT G
  45.      -> general option for graphing multiple columns of data
  46.  
  47.      Unless otherwise instructed EASISTAT will write a graph
  48.      file called GRAPH.ME and will ask EASIGRAF to display it.
  49.      If the G is followed immediately (no space) with a
  50.      filename then EASISTAT will use this instead of GRAPH.ME:
  51.  
  52.      B GFRED.GRP C15
  53.      -> creates graph file called FRED.GRP
  54.  
  55.      CHISQ GRAPH.ME
  56.      -> creates graph file called RAPH.ME
  57.  
  58.  
  59.      11:1. Problems running
  60.      EASIGRAF from EASISTAT
  61.  
  62.      Although running EASIGRAF from EASISTAT is usually
  63.      straightforward, there are a number of problems which may
  64.      occur under some circumstances.
  65.      
  66.        99 
  67.         Using EASIGRAF with EASISTAT  
  68.      
  69.      11:1.1 Bad command or file name
  70.  
  71.      If you get this error message then it simply means that
  72.      EASISTAT cannot find EASIGRAF.EXE. The file called
  73.      EASIGRAF.EXE must either be in the current working
  74.      directory or somewhere on the DOS search path. Note that
  75.      the current working directory is most likely to be the
  76.      one containing your data files and such like, and not
  77.      necessarily the one containing EASIGRAF.EXE (at least
  78.      this is what we suggested in the installation
  79.      instructions). Either you must copy EASIGRAF.EXE into the
  80.      same directory as the one you wish to work in (using the
  81.      COPY command from DOS), or you must change to the correct
  82.      directory before using EASIGRAF (using the CHDIR
  83.      command). If you have a hard disk then the best solution
  84.      by far is to put EASIGRAF.EXE into a subdirectory which
  85.      is somewhere on the search path - this is usually set up
  86.      with a PATH command in the AUTOEXEC.BAT file, see the
  87.      installation instructions for details.
  88.  
  89.      If you get this error message then EASISTAT will still
  90.      have written the correct graph file to disk and there is
  91.      nothing to stop you running EASIGRAF using EASISTAT's
  92.      SYSTEM command and providing the full pathname for
  93.      EASIGRAF. Here's what we mean:
  94.  
  95.      Suppose EASIGRAF.EXE and EASISTAT.EXE are on the hard
  96.      disk C: in subdirectory ESTAT, but that the data being
  97.      studied is on a disk in drive A:. The best way to start
  98.      EASISTAT would be as follows:
  99.  
  100.      A: 
  101.      C:\ESTAT\EASISTAT
  102.  
  103.      If while using EASISTAT you want to draw a graph and type
  104.  
  105.      B GBCOL5.GRP C5
  106.  
  107.      then EASISTAT will write a graph file called BCOL5.GRP to
  108.      the disk in drive A:. It will then try to run EASIGRAF
  109.      but since EASIGRAF isn't on drive A: the following error
  110.      message will appear:
  111.  
  112.      Bad command or file name
  113.  
  114.      and one returns to EASISTAT without seeing a graph. But
  115.      the graph file is still there on disk so now one can
  116.      type:
  117.  
  118.      SYSTEM C:\ESTAT\EASIGRAF BCOL5.GRP
  119.  
  120.      and the graph will appear.
  121.  
  122.      11:1.2 Unrecognised display type
  123.  
  124.      This situation is dealt with in the general section about
  125.      problems with EASIGRAF.
  126.  
  127.      11:1.3 Out of memory
  128.  
  129.      If you get some kind of "Out of memory" error message
  130.      then it means that there is not room in your computer's
  131.      
  132.        100 
  133.         Using EASIGRAF with EASISTAT  
  134.      
  135.      memory for EASISTAT, EASISTAT's data, EASIGRAF,
  136.      EASIGRAF's data and the EASIGRAF's menus all at once.
  137.      However the graph file will have still been safely saved
  138.      to disk and can be displayed later by running EASIGRAF on
  139.      its own after you have quit EASISTAT.
  140.  
  141.      11:1.4 Syntax errors
  142.  
  143.      It is possible that you might get an error message from
  144.      EASIGRAF complaining about the syntax of its data,
  145.      although we hope that this should not happen. EASISTAT
  146.      should provide files in the correct syntax. Check you
  147.      have not made an error using EASISTAT, then try examining
  148.      the graph file with a word processor or text editor like
  149.      EDIT to see if you can see what the problem is.
  150.  
  151.  
  152.      11:2. The BASICS command
  153.  
  154.      When the G option is selected from the BASICS command a
  155.      graph file is written to disk containing three columns of
  156.      figures. In the first column is a set of values for the
  157.      variable studied. The second column contains the number
  158.      of items having that value and the third column is a
  159.      cumulative total of the number of items having the stated
  160.      value or below.
  161.  
  162.      The graph when first displayed plots the first column
  163.      along the X axis and the second on the Y axis, producing
  164.      a frequency distribution for the variable. If instead the
  165.      third column is plotted against the first then a
  166.      cumulative distibution is produced. To do this go to the
  167.      "Data" menu (type "D"), then select the XY columns option
  168.      (type "5") and select columns 1 and 3 (type "1,3" then
  169.      keep pressing ENTER till you arrive back at the main
  170.      menu). The cumulative frequency distribution will then be
  171.      displayed. (To see the original graph again select
  172.      columns 1 and 2 to be plotted against each other.)
  173.  
  174.      No key is needed for this data. Either graph may be
  175.      displayed as a line graph instead of a bar chart by
  176.      typing "L" when the main menu is showing. However you
  177.      should note that the line will be drawn only between
  178.      values which are actually present in the data table, so
  179.      any values with zero frequency will not result in the
  180.      line going down to zero. This will be clear by comparing
  181.      the line and bar graphs on the screen.
  182.  
  183.      There are a other few points that are worth noting. This
  184.      kind of frequency diagram can work very well for measures
  185.      for which only a small number of values are possible, for
  186.      example for social class (which only takes 5 values).
  187.      However for continuous variables or ones which can take
  188.      many values, the situation will be that each row of the
  189.      data set will have a different value, and all the points
  190.      on the frequency diagram will have a frequency of 1,
  191.      since only one row has that value. If you try to produce
  192.      a frequency distribution with this sort of data you will
  193.      produce a fairly meaningless graph, and you may even
  194.      think that the programs are not working correctly. The
  195.      solution would be to break the continous data down into
  196.      ranges and then produce a histogram. This can be done
  197.      
  198.        101 
  199.         Using EASIGRAF with EASISTAT  
  200.      
  201.      either by producing another column using the DERIVE
  202.      command, or by using the CHISQ command to produce a
  203.      contingency table one column wide with each row
  204.      representing an appropriate range of values.
  205.  
  206.      Another thing that can be a problem with producing a
  207.      histogram is that the bars of the graph have a default
  208.      width of 1. This will be inappropriate if the variable
  209.      graphed takes large or small values. To change this bar
  210.      width you must enter a constant value for the third
  211.      "dimension" of the graph. This is is done by entering a
  212.      negative number for the Z axis. For example to produce a
  213.      histogram with bar width of 0.5 one would type "D5", then
  214.      "1,2,-0.5" and then press ENTER twice. To get a bar width
  215.      of 100 type "D5", then "1,2,-100" then ENTER twice.
  216.  
  217.      Sometimes the autoscaling will mean that half of the
  218.      first or last column is not displayed. If this occurs and
  219.      is a problem then you should rescale the graph to
  220.      slightly change the minimum and maximum values for the X
  221.      axis. To do this first type "A7" and you will see the old
  222.      values for the X axis. Then you might want to backspace
  223.      over this line and enter for example "-1,60,1" instead of
  224.      "0,60,1". This reduces the mininum X value to negative 1
  225.      and prevents you losing the left half of the column whose
  226.      centre is at zero. Press ENTER to leave the Y axis
  227.      unchanged and then again to return to the  main menu.
  228.  
  229.  
  230.      11:3. The CHISQ command
  231.  
  232.      The rows and columns of the contingency table are output
  233.      as the rows and columns of a graph file, which then
  234.      produces a histogram of the values of the rows and
  235.      columns in the contingency table. This is accomplished by
  236.      EASIGRAF using the "Group by rows and columns" option to
  237.      organise the data. The bars of the histogram are grouped
  238.      according to the row of the table which they represent,
  239.      and are shaded according to the column of the table.
  240.      Appropriate titles and a key are provided. Each group of
  241.      bars is titled according to the condition used to specify
  242.      the row, while the key relates the shading to the
  243.      conditions specifying the columns. Selecting the
  244.      "Exchange" option (by typing "X") swaps round whether the
  245.      values are grouped into rows or columns of the table.
  246.  
  247.      It is possible to create a table with just one column and
  248.      in this way an ordinary histogram of one variable can be
  249.      produced. This is especially useful when the variable is
  250.      continuous and takes many different values, since in
  251.      these circumstances the BASICS command does not produce a
  252.      very helpful graph. Instead, the CHISQ command can be
  253.      used to gather the values into different ranges and a
  254.      histogram with one bar for each range can be drawn. An
  255.      example application of this to the GHQ variable was
  256.      provided in the section on the CHISQ command in the
  257.      EASISTAT documentation.
  258.  
  259.  
  260.      11:4. The ANOVA command
  261.  
  262.  
  263.      
  264.        102 
  265.         Using EASIGRAF with EASISTAT  
  266.      
  267.      The ANOVA command divides the values up into groups
  268.      according to the conditions specified and values from
  269.      each group go into different columns of the graph file.
  270.      (Every value goes into a row of its own so there is only
  271.      one value per row.)  EASIGRAF then groups the data in the
  272.      graph file by columns and displays a vertical scatter
  273.      chart of points in each group. The mean of each group can
  274.      be displayed as a horizontal line by selecting the
  275.      "Regression and mean" option from the main menu (by
  276.      typing "R") and then selecting "Toggle mean" (type "3"
  277.      and then press ENTER).
  278.  
  279.      Although no graphing option is supplied for the TTEST
  280.      command of EASISTAT, if it is desired to represent an
  281.      unpaired t test graphically then instead an ANOVA command
  282.      can be performed with just two groups (this is equivalent
  283.      to an unpaired t test).
  284.  
  285.  
  286.      11:5. The REGRESS command
  287.  
  288.      The values of the first variable go into the first column
  289.      of the graph file and those of the second into the
  290.      second. The option to organise the data as XY columns is
  291.      used by EASIGRAF to plot the second value against the
  292.      first in a scatter chart. To see the regression line
  293.      select the  "Regression and mean" option from the main
  294.      menu (by typing "R") and then select "Toggle Y on X"
  295.      (type "1" and then press ENTER). Selecting "Exchange" (by
  296.      typing "X") will swap over the two variables.
  297.  
  298.  
  299.      11:6. The KOLMOGOROV command
  300.  
  301.      This graph file is the most complicated. The first column
  302.      contains the values under consideration. The second and
  303.      sixth columns contain the number of items having that
  304.      value in each of the two groups. The third and seventh
  305.      columns contain the cumulative total of items having that
  306.      value or less, and the fourth and eighth columns contain
  307.      the percentages of each group having a given value and
  308.      the fifth and ninth columns contain the cumulative
  309.      percentages. The option to organise the data as XY
  310.      columns is used by EASIGRAF to plot the fifth and ninth
  311.      columns against the first to produce two overlaid plots
  312.      of the cumulative percentage totals for each group,
  313.      expressed as a fraction of the total number of items in
  314.      each group. (The Kolmogorov-Smirnov statistic is the
  315.      maximum vertical distance between these two lines.) Other
  316.      interesting plots are of the two absolute distributions
  317.      (type "D5", then "1,2" then ENTER and "1,6" then ENTER
  318.      twice), of the two cumulative distributions (type "D5",
  319.      then "1,3" then ENTER and "1,7" then ENTER twice) and of
  320.      the two percentage distributions (type "D5", then "1,4"
  321.      then ENTER and "1,8" then ENTER twice). Other
  322.      combinations can also be plotted.
  323.  
  324.  
  325.      11:7. The COMPONENTS command
  326.  
  327.      Unlike the other commands, the graph produced has nothing
  328.      to do with the command itself and indeed if the "G"
  329.      
  330.        103 
  331.         Using EASIGRAF with EASISTAT  
  332.      
  333.      option is selected with this command then the principal
  334.      component analysis is not even performed. Instead, this
  335.      syntax is used simply as a convenient way to specify a
  336.      number of columns of data to be written to a graph file.
  337.      Any number of columns can be selected and they are simply
  338.      written into the graph file as they are. By default the
  339.      first three columns are assigned to the X, Y and Z axes
  340.      of the graph and the option to organise the data as XY
  341.      columns is used to produce a scatter diagram but it is
  342.      anticipated that the data could be used in many different
  343.      ways, including three-dimensional plots and multiple X-Y
  344.      plots. Some examples of the flexibility of this command
  345.      can be seen when GDEMO is used to drive EASISTAT (by
  346.      running EASISTAT and then entering INPUT GDEMO).
  347.  
  348.      Sometimes it is desired to plot all the values from one
  349.      column in the EASISTAT data table in one vertical line
  350.      and those from another column in another line. To do this
  351.      use the COMPONENTS command to output the data from the
  352.      required columns into a graph file, and then change the
  353.      data organisation to be grouped by columns, by pressing
  354.      "D4" then ENTER. This differs from the graph produced by
  355.      the ANOVA command where although the values from
  356.      different groups are plotted in vertical lines, the
  357.      values actually all come from the same column of the data
  358.      table. Instead, one might be thinking more about the
  359.      relationship between two columns of values, perhaps in a
  360.      way more similar to the paired t test (although the
  361.      pairing itself cannot be displayed).
  362.  
  363.  
  364.      11:8. General points
  365.  
  366.      EASIGRAF works well with EASISTAT. EASISTAT is used to
  367.      produce the basic data to be graphed and the titles,
  368.      graph type and scale can then be edited and adjusted by
  369.      EASIGRAF to produce quite a helpful graph. We recommend
  370.      that you give each graph file a specific name (rather
  371.      than just leaving it to be called GRAPH.ME). Then you can
  372.      produce a number of graph files during a session using
  373.      EASISTAT and afterwards you can use EASIGRAF to "fine-
  374.      tune" them.
  375.  
  376.      If you have a very large data set then there is unlikely
  377.      to be room for EASIGRAF and EASISTAT to run at once and
  378.      you will have to just use EASISTAT to write graph files
  379.      to disk and then use EASIGRAF to view them later. If you
  380.      are running EASISTAT in batch mode (from a command file)
  381.      then when the "G" option is selected a graph file will be
  382.      written to disk but EASIGRAF will not be run
  383.      automatically. The reason for this is that EASIGRAF runs
  384.      mainly in interactive mode (from the keyboard) and so it
  385.      would not run unattended. If you wish to use an EASISTAT
  386.      command file to display a graph then you can easily do so
  387.      by having it run EASIGRAF explicitly using the SYSTEM
  388.      command, e.g.:
  389.  
  390.      R GTIM C15 C16 
  391.      SYSTEM EASIGRAF TIM
  392.  
  393.  
  394.  
  395.      
  396.        104 
  397.