home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / apps / math / bstat247 / spsheet.doc < prev    next >
Text File  |  1993-04-09  |  11KB  |  244 lines

  1. -The data editor is designed for efficient entry of data for 
  2. further analysis.
  3.  
  4. -Data will be in the form of variables, with a column for each 
  5. variable.
  6.  
  7. -Commands are issued either through the menu or from the keyboard 
  8. on the command line.
  9.  
  10. -The first set of commands deals with columns. These allow you to 
  11. insert a column, blank a column, or delete columns. If you choose 
  12. the "Del Many" option you will be asked for the number of columns 
  13. to delete. That number of columns, starting at the column in which 
  14. the cursor resides and moving to the right, will be removed. 
  15. Blanking a column does not remove it but just erases the data. -
  16. You may either load or save an individual column, as well. This 
  17. allows you to save a data variable from one data set and bring it 
  18. into another.
  19.  
  20. -The actions available for rows are the same as those for columns, 
  21. except that you cannot save or load a row. One additional row 
  22. operation is available. The "delete Marked" option checks the 
  23. value of each row in the column in which the cursor resides. If 
  24. the value is other than zero then the row is removed. In no case 
  25. will the program reduce the number of rows below 1.
  26.  
  27. -The decimals selections are fairly straight forward. They simply 
  28. affect how the data will be displayed. If the "Global" option is 
  29. checked then any action will apply to all columns. If not, then 
  30. the action affects only the column in which the cursor currently 
  31. resides.
  32.  
  33. -The "Item" menu allows for the insertion or deletion of individual
  34. data items. This is useful if you find after typing in a whole
  35. series of data points that you forgot to enter the third one or
  36. that you entered the third one twice. It is also useful for 
  37. creating lagged variables to be used elsewhere in the program.
  38.  
  39. -The "Miscellaneous" section has naturally a variety of options. 
  40. By selecting "Mean", "Std Dev", "Largest", "Smallest" or quartiles 
  41. you will get the corresponding statistic for the variable in which 
  42. the cursor resides.
  43.  
  44. -The Auto right selection if chosen changes the default movement 
  45. of the cursor to a move right when the RETURN key is pressed 
  46. rather than down.
  47.  
  48. -The "Help" option will bring up this help file (as you can see).
  49.  
  50. -The "RELABEL" option allows you to change the labels which are at 
  51. the left hand side of the screen.
  52.  
  53. -The remaining options allow you to move to other menus. 
  54.  
  55. -Various operations can be performed on the variables by entering 
  56. commands on the command line.
  57.  
  58. The first group affect the variable in which the cursor is 
  59. located. Assume that variable Y contains the cursor.
  60. The operations are:
  61.  
  62. a+b         Column Y is the sum of column a and column b
  63. a+x         Column Y is the sum of column a and a constant "x" 
  64. a-b         Column Y is column a minus column b
  65. a-x         Column Y is column a minus a constant x
  66. x-a         Column Y is x minus column a
  67. a*b         Column Y is the product of column a and column b 
  68. a*x         Column Y is the product of column a and a constant "x"
  69. a/b         Column Y is column a divided by column b
  70. a/x         Column Y is column a divided by a constant "x"
  71. x/a         Column Y is x divided by column a
  72. a^b         Column Y is column a to the power of column b
  73. a^x         Column Y is a to power of constant "x"
  74. a<b         Column Y is 1 if column a is less than column b,
  75.             otherwise it is 0
  76. a<x         Column Y is 1 if column a is less than a constant "x",
  77.             otherwise it is 0
  78. a>b         Column Y is 1 if column a is greater than column b,
  79.             otherwise it is 0
  80. a>x         Column Y is 1 if column a is less than a constant "x",
  81.             otherwise it is 0
  82. a\b         Column Y is the minimum of column a and column b 
  83. a\x         Column Y is the minimum of a and a constant "x" 
  84. a|b         Column Y is the maximum of column a and column b 
  85. a|x         Column Y is the maximum of a and a constant "x" 
  86. a!b         Swaps column a and b. The column where the cursor
  87.             resides is not affected unless it is in column a or b 
  88. a!x         Column a is set equal to the constant "x"
  89. a@x         Column Y is the accumulation of the values in column 
  90.             a, where interest is asumed to be at "x" percent. The 
  91.             first payment is assumed to be at the end of the
  92.             period
  93. a@b         Similar to a@x, except that the percent interest rates 
  94.             for each period are in column b
  95. a&x         Similar to a@x, except that the payments are at the 
  96.             start of the period
  97. a&b         Similar to a@b, except that the payments are at the 
  98.             start of the period
  99. a$x         Column Y is the present value of all remaining periods 
  100.             in a, taken at interest rate x%, Payments are at the 
  101.             end of the period
  102. a$b         Similar to a$x, except that the interest rates are  
  103.             given in column b
  104. a#x         Similar to a$x, except that payments are at the start 
  105.             of the period
  106. a#b         Similar to a$b, except that payments are at the start 
  107.             of the period
  108. a%x         Calculates the rate of interest, such that the present 
  109.             value of the values in column a equal the constant   
  110.            "x". Payments in a are assumed to be at the end of     
  111.             each period
  112. a%b         Column Y is set equal to a series of rates, such that 
  113.             the present value of the items in a are equal to the 
  114.             values in b
  115.  
  116. -In addition, there are commands that operate on one column only:
  117. COUNTERxx   Creates a variable in column Y which has the natural 
  118.             numbers from 1 to xx in it
  119. RANDOMxx    Creates a variable in column Y with xx random numbers
  120. EXPONENTIALxx Creates a variable with xx exponentially distributed
  121.             deviates.
  122. NORMALxx    Creates a variable with xx normally distributed
  123.             deviates
  124. GAMMAxx,kk  Creates a variable with xx random deviates 
  125.             distributed with a gamma distribution of order kk
  126. POISSONxx,nn Creates a variable with xx random deviates 
  127.             distributed with a poisson distribution with mean nn
  128. BINOMIALxx,nn,pp Creates a cariable with xx random deviates
  129.             distributed binomially with nn trials and pp
  130.             probability of success. 
  131. deg(a)      Column Y is a conversion of column a from radians to 
  132.             degrees
  133. rad(a)      Column Y is a conversion of column a from degrees to 
  134.             radians
  135. mult(a)     Column Y is the running product of column a
  136. rot(a)      Column Y is the reverse order of column a
  137. fact(a)     Column Y is the factorial of the values in a
  138. abs(a)      Column Y is the absolute value of a
  139. rnd(a)      Column Y is a random real number from 0 to the value
  140.             in column a
  141. sqr(a)      Column Y is the square root of column a
  142. sin(a)      Column Y is the sine of column a. Radians are assumed
  143. cos(a)      Column Y is the cosine of column a
  144. tan(a)      Column Y is the tangent of column a
  145. asin(a)     Column Y is the arc sine of column a
  146. acos(a)     Column Y is the arc cos of column a
  147. asec(a)     Column Y is the arc secant of column a
  148. atn(a)      Column Y is the arc tangent of column a
  149. log(a)      Column Y is the natural log of column a
  150. log10(a)    Column Y is the log to base 10 of column a
  151. exp(a)      Column Y is "e" to the power of a
  152. exp10(a)    Column Y is 10 to the power of column a
  153. int(a)      Column Y is the next lower integer of a
  154. sinh(a)     Column Y is the hyperbolic sine of a
  155. cosh(a)     Column Y is the hyperbolic cosine of a
  156. tanh(a)     Column Y is the hyperbolic tangent of a
  157. asinh(a)    Column Y is the arc hyperbolic sine of a
  158. acosh(a)    Column Y is the arc hyperbolic cos of a
  159. atanh(a)    Column Y is the arc hyperbolic tan of a
  160. ndist(a)    Column Y is height of normal for value in a
  161. cundist(a)  Column Y is cumulative probability of value in a
  162. arccundist(a) Inverse of cundist(a)
  163. standardize(a) Column Y is formed from "a" by creation of variable
  164.              with mean of zero and standard deviation of 1
  165.  
  166. amort(amount,term,conv,payts,intr) amortizes a loan of amount 
  167. "amount" over a period of "term" years.
  168. interest is convertible "conv" times per year
  169. there are "payts" payments per year (ie monthly is 12)
  170. the interest rate is specified in percent by "intr"
  171.  
  172. These commands are relatively quick in execution since they  are
  173. not actually parsed as a line of code would be. As you  have
  174. probably noticed, they are all simple operations. B/STAT also  has
  175. a general parser. If the regular commands cannot be used, the 
  176. program reverts to the parser section. The parser section allows 
  177. many, but not all, of the commands above. It allows certain 
  178. modifiers, as well, which are not possible in the simple commands 
  179. above. The mathematical operations supported are:
  180. + - plus and minus
  181. ^ exponentiation
  182. * / multiply and divide
  183. < > = logical less than greater than and equals
  184. \ minimum
  185. | maximum
  186.  
  187. Three other logical operators are:
  188. OR logical or
  189. AND logical and
  190. XOR exclusive or
  191.  
  192. The functions may be combined in any way. Operator hierarchy is 
  193. standard algebraic. When in doubt use brackets. An example of the 
  194. use of these functions might be the following:
  195.  
  196. a*(( b<6) and (c>12))
  197.  
  198. This would create a variable with the same value as variable a 
  199. only for the points where b is less than 6 and c is greater than 
  200. 12
  201.  
  202. Another example is
  203.  
  204. (exp(a)-exp(-a))/(exp(a)+exp(a))
  205.  
  206. This formula is actually the formula for TANH(a) which would 
  207. accomplish the same thing.
  208.  
  209. OTHER Commands
  210.  
  211. >axx        Causes the cursor to go to column "a" row "xx"
  212.  
  213. flip        Swaps the rows and columns of the data matrix.
  214.  
  215. Cursor movements can be made using the arrow keys. Holding down 
  216. the "Control" or "Shift" key and pressing the arrow keys causes 
  217. movement of a full page. If you hold down both the "Control" and 
  218. "Shift" keys simultaneously and press an arrow key then you will 
  219. go to the end of the data in that direction.
  220.  
  221. sort(a)        Sorts column a in ascending order. Y is unused
  222.  
  223. sortall(a,b,c) Sorts whole data set with keys a,b,c. Not all keys 
  224.                are needed, but at least 1 must be used
  225.  
  226. blank          Column Y is blanked out
  227.  
  228. shrink         For any occurences of the same value in column Y 
  229.                the rows are added together. There will thus be 1 
  230.                row for each unique value in column Y.
  231.  
  232. label          The values in column Y become the labels in the 
  233.                label column. 
  234.  
  235. find(x)        Searches from the current cursor position to the 
  236. next occurrence of the value "x"
  237.  
  238. outprod(a,b,*) creates a matrix of data with the number of rows as
  239.                given by the number of values in column a and the
  240.                number of columns by the number of values in b. 
  241.                The operator is the third element. 
  242.                Available operators are
  243.                +,-,/,*,^,<,>,|,\
  244.