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 / ESCHAP08.DOC < prev    next >
Text File  |  1992-06-30  |  13KB  |  463 lines

  1.  
  2.  
  3.      Chapter 8: SPECIAL COMMANDS
  4.  
  5.  
  6.      8:1. Help
  7.  
  8.      Format: H[elp]
  9.  
  10.      The HELP command simply outputs a list of all the
  11.      commands available, together with a brief reminder of
  12.      their syntax. You may want to use the OUTPUT PRN command
  13.      to print this list out on paper so you can refer to it
  14.      when you do not have the manual handy.
  15.  
  16.      Examples:
  17.  
  18.      Select command -  help
  19.  
  20.      Select command -  o prn
  21.      Select command -  h
  22.      Select command -  o close
  23.  
  24.      Outputs list of commands to printer.
  25.  
  26.      Output:
  27.  
  28.      Help                               Titles
  29.      Basics [G] [ranks] col [if cond]   Data [save] [filename]
  30.      List [if cond or Variables]        Chisq [G] [Fish] [Num] [c r]
  31.      Wilcoxon [S] [col]                 Ttest [paired]
  32.      Anova [G or N] [col]               Kendall's [col col]
  33.      Kolmogorov [G] [col]               Regress [G] [col col [col]]
  34.      Multiple regression [col [col]]    Component analysis [G]
  35.      Minimise [expression]              Narrow cond
  36.      Widen [cond]                       Arithmetic [expression]
  37.      New [col or row or next]           Label [col [name]]
  38.      Format [col or def [width dec]]    Derive [col [expression]]
  39.      Delete [col or row or all]         Echo
  40.      Input [filename or close]          Output [filename or close]
  41.      Log [filename or close]            Edit
  42.      Screen                             Sort [d[own]] [col]
  43.      Pause                              System [command]
  44.      Limits [cl]                        Copy [lc,tr,rc,br,new lc,new tr]
  45.      Macro [list or label exp]          Quit
  46.  
  47.  
  48.      8:2. System
  49.  
  50.      Format: Sy[stem] [command or program]
  51.  
  52.      This allows you to issue DOS commands to the operating
  53.      system or even run other programs, provided there is
  54.      enough memory available. The commands specified are
  55.      exactly what you would type at the DOS prompt and
  56.      EASISTAT will pass them on unchanged.
  57.  
  58.      Example:
  59.  
  60.      Select command - sys dir
  61.  
  62.      Produces a list of files in the current working
  63.      directory.
  64.  
  65.      
  66.        78 
  67.         Special commands  
  68.      
  69.      Select command - sys time
  70.  
  71.      Allows you to change the clock.
  72.  
  73.      Select command - sys edit command.log
  74.  
  75.      Runs the EDIT program to edit a file called COMMAND.LOG.
  76.  
  77.      When the command has been executed then EASISTAT will
  78.      pause and wait for a keypress before continuing (unless
  79.      it is being run from a command file).
  80.  
  81.      Comments
  82.  
  83.      You can use this command to list directories to remind
  84.      yourself of the names of files you wish to use, or you
  85.      can delete old output files before writing to a file with
  86.      the same name. You can run a test editor to edit files
  87.      and then automatically return to EASISTAT when you have
  88.      finished without having to reload the program or read in
  89.      data again. Do not however attempt to edit a file that is
  90.      currently in use by EASISTAT, e.g. a command file that it
  91.      is in the middle of reading.
  92.  
  93.      EASISTAT remains loaded in memory while the command is
  94.      performed, so there will not be as much memory available
  95.      to the second program as usual and if the second program
  96.      needs a large amount of memory it may not be able to run.
  97.      Do not run a memory resident or pop-up program using this
  98.      command because it will stay in memory and may prevent
  99.      EASISTAT from accessing memory which is in fact free.
  100.      Pop-up programs (such as EASIMATH) should be run before
  101.      EASISTAT is loaded.
  102.  
  103.      If you are familiar with DOS you will probably realise
  104.      that instead of a program name one can actually enter
  105.      SYSTEM COMMAND and run another copy of DOS from
  106.      COMMAND.COM. Then many commands and programs can be
  107.      executed before finally returning to EASISTAT. When you
  108.      do wish to return to EASISTAT after doing this, enter
  109.      EXIT.
  110.  
  111.      Because of the way DOS works it is not possible to
  112.      permanently change any "environment variables" from
  113.      within EASISTAT. This means that the DOS commands SET,
  114.      PROMPT and PATH will not have any effect if used from
  115.      within EASISTAT from the SYSTEM command. For example the
  116.      following line will not actually change the DOS search
  117.      path:
  118.  
  119.      Select command - sys set path=c:\utils
  120.  
  121.      If it is desired to change any environment variables in
  122.      this way then it is necessary to first quit EASISTAT.
  123.      This applies also to setting the FG_DISPLAY variable used
  124.      to inform EASIGRAF of the type of display in use.
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.      
  132.        79 
  133.         Special commands  
  134.      
  135.      8:3. Screen
  136.  
  137.      Format: S[creen]
  138.  
  139.      This simply redraws the EASISTAT screen if an error has
  140.      occurred which has messed it up.
  141.  
  142.      Example:
  143.  
  144.      Select command -  scr
  145.  
  146.  
  147.      8:4. Arithmetic
  148.  
  149.      Format: Ar[ithmetic] [expression]
  150.  
  151.      This command evaluates arithmetical and logical
  152.      expressions. Any such expression can be entered. If a
  153.      calculation is entered on the first line then it is
  154.      evaluated and the ARITHMETIC command finishes. If no
  155.      calculation is entered then EASISTAT will request one,
  156.      and will remain within the ARITHMETIC command until a
  157.      blank line or error is encountered.
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.      
  198.        80 
  199.         Special commands  
  200.      
  201.      Examples:
  202.  
  203.      Select command - ARITH
  204.      Enter calculation:   5 +5*38
  205.      Enter calculation:   2.6/7+(3.5-.6)pow(0.5)
  206.  
  207.      Select command - ar 5 +5*38
  208.  
  209.      One can use the probability look-up functions, e.g. to
  210.      find the significance of a chi-squared of 13.6 with 2
  211.      degrees of freedom:
  212.  
  213.      Select command - ARITH 13.6PX2
  214.  
  215.      If a column is specified then the value in the first
  216.      valid row is used. This means that an arithmetic command
  217.      can be put in an input file and used to carry out
  218.      manipulations of variables which are entered into the
  219.      first row:
  220.  
  221.      Select command - ar 
  222.      Enter calculation:   c1 pow(1/3)
  223.  
  224.      This outputs the cube root of the value in the first
  225.      column in the first valid row of the table.
  226.  
  227.      Often it is convenient to have formulae contained in a
  228.      command file such as this:
  229.  
  230.      e Normal approximation to binomial distribution
  231.      e
  232.      der v1 %1
  233.      der v2 %2
  234.      der v3 %3
  235.      e Observed value is:
  236.      ar v1
  237.      e Total number of trials is:
  238.      ar v2
  239.      e Expected ratio is:
  240.      ar v3
  241.      e One-tailed p value (with continuity correction):
  242.      ar 1-pn((abs(v1-v2*v3)-0.5)/((v2*v3*(1-v3))pow(0.5)))
  243.      i close
  244.  
  245.      This calculates an approximation to a binomial
  246.      probability of an observed event occurring x times out of
  247.      n trials if the chance of such an event occurring on each
  248.      trial is p. If the command file name is BINOM it can be
  249.      run as follows:
  250.  
  251.      Select command -  INPUT BINOM 12 15 0.4
  252.  
  253.      Here x is 12, n is 15 and p is 0.4.
  254.  
  255.      Here's another file to solve quadratic equations. The
  256.      three coefficients are passed as parameters to the file:
  257.  
  258.      Select command -  INPUT QUAD 3 5 1
  259.  
  260.      Command file QUAD contains the following lines:
  261.  
  262.  
  263.      
  264.        81 
  265.         Special commands  
  266.      
  267.      der v1 %1
  268.      der v2 %2
  269.      der v3 %3
  270.      e Solving quadratic equation with following coefficients:
  271.      ar
  272.      v1
  273.      v2
  274.      v3
  275.      ((v2*v2-4*v1*v3)pow0.5-v2)/(2*v1)
  276.      (0-(v2*v2-4*v1*v3)pow0.5-v2)/(2*v1)
  277.  
  278.      ; blank line above to finish arithmetic command
  279.      i close
  280.  
  281.      With coefficients 3, 5 and 1, these formulae find roots
  282.      at -0.232 and -1.434.
  283.  
  284.      Using this kind of technique one can build up a
  285.      collection of command files for evaluating different
  286.      expressions and can use EASISTAT like a programmable
  287.      calculator. If the number output is very large or very
  288.      small then it will be output in exponential notation
  289.      (described in the section on arithmetic expressions).
  290.  
  291.  
  292.      8:5. Macro
  293.  
  294.      Format: Ma[cro] [list or name expression]
  295.  
  296.      This allows you to produce abbreviations of complicated
  297.      expressions so that you can refer to them more succintly.
  298.      The macro can thereafter be incorporated in other
  299.      expressions in the same way as a value or variable. This
  300.      facility is indispensable when dealing with complicated
  301.      mathematical formulae, although it is true that its
  302.      usefulness is somewhat limited by the inability to pass
  303.      any arguments to the expression. Here is an example where
  304.      we define a macro QUAD to evaluate a quadratic expression
  305.      with the first three variables as coefficients and the
  306.      fourth as the value to use, then we define macros SOLP
  307.      and SOLM to be the roots based on the positive and
  308.      negative square roots in the formulae above. Then we can
  309.      assign different values to the four variables and
  310.      instantly compute the related values for quadratic QUAD,
  311.      SOLM and SOLP.
  312.  
  313.      Select command - mac quad v1*v4*v4 + v2*v4 + v3
  314.      Select command - mac solp ((v2*v2-4*v1*v3)pow0.5-v2)/(2*v1)
  315.      Select command - mac solm (0-(v2*v2-4*v1*v3)pow0.5-v2)/(2*v1)
  316.      Select command - der v1 3
  317.      Select command - der v2 5
  318.      Select command - der v3 1
  319.      Select command - der v4 1
  320.      Select command - ar quad
  321.      Select command - der v4 2
  322.      Select command - ar quad
  323.      Select command - der v4 3
  324.      Select command - ar quad
  325.      Select command - ar solp
  326.      Select command - ar solm
  327.      Select command - der v4 -0.232
  328.      Select command - ar quad
  329.      
  330.        82 
  331.         Special commands  
  332.      
  333.      Select command - der v4 -1.434
  334.      Select command - ar quad
  335.  
  336.      The quadratic function is evaluated with V4, the fourth
  337.      general purpose variable, set to values of 1, 2 and 3 and
  338.      then the two roots are found. Then V4 is set equal to
  339.      each of the roots and the function is again evaluated.
  340.      Each time the result is close to zero, confirming that
  341.      the correct values for the roots have been calculated.
  342.  
  343.      Here is another example of a macro which yields the
  344.      maximum of the values in the first three columns:
  345.  
  346.      Select command - macro max2 c1*(c1>c2)+c2*(c2>=c1) 
  347.      Select command - macro max3 c3*(c3>max2)+max2*(max2>=c3)
  348.  
  349.      This first defines a macro MAX2 which is the maximum of
  350.      the first two columns, then uses this macro to define
  351.      MAX3, the maximum of the third column and MAX2. The macro
  352.      can then be used freely in subsequent expressions, e.g.:
  353.  
  354.      Select command - der c5 7.2+max3*c4
  355.  
  356.      Macros can be nested in this way, and complicated
  357.      mathematical expressions can be built up. The same rules
  358.      apply to naming macros as apply to labelling columns and
  359.      variables - please refer to these if you have problems,
  360.      especially with syntax errors. Macros already defined can
  361.      be listed with the key word LIST (which cannot be
  362.      abbreviated) instead of a macro name:
  363.  
  364.      Select command - macro list
  365.  
  366.  
  367.      8:6. Limits
  368.  
  369.      Format: Lim[its] [value]
  370.  
  371.      Specifies a value for confidence limits to be output by
  372.      the BASICS, REGRESS and TTEST commands. The value
  373.      specified must be between 5 and 99.9 and is a percentage.
  374.      If a value of 0 is specified then confidence limits will
  375.      no longer be calculated.
  376.  
  377.      Example:
  378.  
  379.      Select command -  lim 95
  380.  
  381.      From now on 95% confidence limits will be calculated
  382.      where appropriate.
  383.  
  384.      Calculating confidence limits can slow down the
  385.      performance of EASISTAT so this is only done if
  386.      specifically requested by the LIMITS command.
  387.      Alternatively the command line switch /L can be used when
  388.      EASISTAT is first run:
  389.  
  390.      EASISTAT /L95
  391.  
  392.  
  393.  
  394.  
  395.      
  396.        83 
  397.         Special commands  
  398.      
  399.      8:7. Quit
  400.  
  401.      Format: Q[uit]
  402.  
  403.      Quits EASISTAT and returns control to the DOS command
  404.      line or the batch file from which EASISTAT was run.
  405.  
  406.      Example:
  407.  
  408.      Select command -  q
  409.      Quit EASISTAT        - ALL UNSAVED DATA WILL BE LOST -
  410.      Sure?
  411.      y
  412.  
  413.      Confirmation that you really do wish to leave EASISTAT is
  414.      requested, so if you wish to have a command file which
  415.      does quit EASISTAT at the end, the line containing the
  416.      QUIT command must be followed by a line saying YES or Y.
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.      
  462.        84 
  463.