home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / APPS / STATISTI / ESDISK.ZIP / DEMO < prev    next >
Encoding:
Text File  |  1990-12-12  |  11.7 KB  |  506 lines

  1. ; Demo file for EASISTAT
  2. ; All lines beginning with a ';' will be ignored
  3.  
  4. ; An 'e' at the start of a line is short for 'echo' - the line will be 
  5. ; copied to the output but there will be no other effect
  6.  
  7. E                         EASISTAT - DEMONSTRATION
  8. E Welcome to this demonstration of EASISTAT. EASISTAT is a cheap and 
  9. E cheerful statistics package, and this demonstration is intended to show 
  10. E you most of its features so you can see what is available. 
  11. E This demonstration will pause intermittently to allow you to read what 
  12. E is displayed on the screen. When it is paused you have the option of 
  13. E stopping the demonstration (by typing 'E'), taking temporary control (by 
  14. E typing 'K') or carrying on with the rest of the demonstration (by 
  15. E pressing any other key). If this is your first experience of EASISTAT 
  16. E then it is probably best just to go straight through the demonstration. 
  17. E If you do want to finish it then after you have typed 'E' you can enter 
  18. E 'Q' for quit and then confirm it by entering 'Y' for yes and you will 
  19. E leave the program.
  20. PAUSE
  21. E                          A WORD ABOUT SHAREWARE
  22. E EASISTAT is distributed as a Shareware program. That means that you are 
  23. E legally allowed to copy it and give copies to other people who you think 
  24. E might like it - in fact you are encouraged to do so. However please note 
  25. E the following points:
  26. PAUSE
  27. E 1. The copyright of the program remains with ARC Scientific limited.
  28. E 2. You must not charge more than a nominal fee for the program if you 
  29. E pass it on to someone else, nor may you distribute the disc for any 
  30. E promotional purposes or for your personal gain. 
  31. E 3. Please acknowledge the program in any publications of work for which 
  32. E it was used. 
  33. E 4. If you pass it on you must do so in unmodified form and the following 
  34. E five files must all be passed on together:
  35. E EASISTAT.EXE   EASISTAT.DOC   EXAMPLE.DAT  DEMO  
  36. E DEMO.BAT       PRODUCTS       ORDINV.PRN   READ.ME
  37. PAUSE
  38. E
  39. E Once you have evaluated the program we hope you will pay for it (current 
  40. E price 30 pounds) and if you do so you will receive an up-to-date 
  41. E version of the program together with a full manual, and you will be 
  42. E supporting the concept of shareware. For details please read the file 
  43. E EASISTAT.DOC or contact: 
  44. E   ARC Scientific Limited,
  45. E   257 Woodstock Road,
  46. E   Oxford OX2 7AE.
  47. E   Tel. 0865 310167 
  48. E ....Coming next..... The Demonstration!
  49. PAUSE
  50. E Right, that's that over with. Let's show you some of EASISTAT'S 
  51. E commands. The first one is one to show us what commands are available 
  52. E and is called HELP, or H for short (you can always use upper or lower 
  53. E case letters, but maybe upper case is clearer for you to see what is 
  54. E happening). Once this pause is finished this DEMO file will type:
  55. E HELP
  56. PAUSE
  57.  
  58.  
  59.  
  60. HELP
  61. PAUSE
  62. E So, that's how to remind ourselves of the functions available. Now let's 
  63. E read in some data. If we want see what files are available on disc we 
  64. E can use the SYSTEM command like this (press any key afterwards to 
  65. E return to EASISTAT):
  66. E SYSTEM DIR
  67. PAUSE
  68. SYSTEM DIR
  69.  
  70. E Since EASISTAT is being run from a command file, it does not pause to
  71. E allow you to inspect the list of files. We already know we're going to
  72. E use the file called EXAMPLE.DAT. The command is:
  73. E DATA EXAMPLE.DAT
  74. PAUSE
  75.  
  76.  
  77.  
  78. DATA EXAMPLE.DAT
  79. E Let's see what we've read in. To do this we can use the LIST command, 
  80. E but we don't want to see all 80 lines of the data so we'll use the LIST 
  81. E IF option to look at just the first 5 lines, like this:
  82. E LIST IF ROW<=5
  83. PAUSE
  84.  
  85.  
  86.  
  87. LIST IF ROW<=5
  88. E The data is just arranged in vertical columns under one line of titles. 
  89. E There are too many titles to see all of them across the screen, and we 
  90. E also need to know the number of the columns they refer to. To do that we 
  91. E use the TITLE command like this: 
  92. E TITLE 
  93. PAUSE 
  94.  
  95.  
  96.  
  97. TITLE 
  98. E Now we can find out about one of the columns. Let's get the mean etc. of 
  99. E column 15, the score on the GHQ (a measure of psychological distress). 
  100. E We use the BASICS command like this: 
  101. E BASICS C15
  102. PAUSE
  103.  
  104.  
  105.  
  106. BASICS C15
  107. E Just like the LIST command we can use BASICS with IF to look at only 
  108. E some of our sample. How about the first 50 rows: 
  109. E BASICS C15 IF ROW<=50
  110. PAUSE
  111.  
  112.  
  113.  
  114. BASICS C15 IF ROW<=50
  115. E Or how about all the men (column 3 codes for sex):
  116. E BASICS C15 IF C3=1
  117. PAUSE
  118.  
  119.  
  120.  
  121. BASICS C15 IF C3=1
  122. E Not all the functions can use IF, so we need another way to be able to 
  123. E look at only some of the data. To do this we use the NARROW command. 
  124. E Another way to look at only the men is as follows:
  125. E NARROW C3=1
  126. E BASICS C15
  127. PAUSE
  128.  
  129.  
  130.  
  131. NARROW C3=1
  132. BASICS C15
  133. E In this case though, the data set will remain narrowed down permanently 
  134. E until we issue the WIDEN command. We'll do that now:
  135. E WIDEN
  136. PAUSE
  137.  
  138.  
  139.  
  140. WIDEN
  141. E Now we'll do our first statistical test. Maybe we could see if the men 
  142. E have higher GHQ scores than the women. Let's see if there are more men 
  143. E scoring 12 or above than women using a chi-squared test on a contingency 
  144. E table. We'll want 2 rows and 2 columns, and we'll need to define 
  145. E conditions to be included in each row and each column. The whole thing 
  146. E will look like this:
  147. E CHISQ
  148. E 2
  149. E 2
  150. E C15<12
  151. E C15>=12
  152. E C3=1
  153. E C3=2
  154. PAUSE
  155.  
  156.  
  157.  
  158. E Here we go then...
  159. CHISQ
  160. 2
  161. 2
  162. C15<12
  163. C15>=12
  164. C3=1
  165. C3=2
  166. E Or we could use Wilcoxon's rank sum test to see if the scores are 
  167. E generally higher for men or for women. That would look like this:
  168. E WILC C15
  169. E C3=1
  170. E C3=2
  171. PAUSE
  172.  
  173.  
  174.  
  175. WILC C15
  176. C3=1
  177. C3=2
  178. E If we think the data is reasonably distributed, we might prefer to use a 
  179. E T test to make the same comparison, like this:
  180. E TTEST C15
  181. E C3=1
  182. E C3=2
  183. PAUSE
  184.  
  185.  
  186.  
  187. TTEST C15
  188. C3=1
  189. C3=2
  190. E We can do a paired T test on two different columns to see if one is in 
  191. E general higher than the other by entering:
  192. E TTEST P C16 C17  (where the P stands for paired)
  193. PAUSE
  194.  
  195.  
  196.  
  197. TTEST P C16 C17
  198. E We can see how well correlated two columns are by using Kendall's rank 
  199. E correlation coefficient:
  200. E KENDALL C15 C16
  201. PAUSE
  202.  
  203.  
  204.  
  205. KENDALL C15 C16
  206. E The equivalent test to be used with normally distributed variables will 
  207. E also give us the least squares linear regression of one variable on the 
  208. E other:
  209. E REGRESS C15 C16
  210. PAUSE
  211.  
  212.  
  213.  
  214. REGRESS C15 C16
  215. E Or we can do multiple linear regression to determine how well one 
  216. E variable is predicted by a number of others:
  217. E MULT C27
  218. E 4
  219. E C19
  220. E C20
  221. E C21
  222. E C22
  223. PAUSE
  224.  
  225.  
  226.  
  227. MULT C27
  228. 4
  229. C19
  230. C20
  231. C21
  232. C22
  233. PAUSE
  234.  
  235.  
  236.  
  237. E If we can't measure a dependent variable directly, maybe we can deduce 
  238. E it's existence by doing principal component analysis:
  239. E COMP
  240. E 4
  241. E C19
  242. E C20
  243. E C21
  244. E C22
  245. E 0.05
  246. PAUSE
  247.  
  248.  
  249.  
  250. COMP
  251. 4
  252. C19
  253. C20
  254. C21
  255. C22
  256. 0.05
  257. PAUSE
  258.  
  259.  
  260.  
  261. E What we've also done is to make new columns which are the scores on all 
  262. E the principal components which contribute more than 0.05 to the overall 
  263. E variance. We've already been shown how well they correlate with each of 
  264. E the variables from which they were formed, but now it is also possible 
  265. E to study them in other ways. The first one went into C34. Maybe we could 
  266. E see how well it correlates with C27:
  267. E REGRESS C27 C34
  268. PAUSE
  269.  
  270.  
  271.  
  272. REGRESS C27 C34
  273. E We can make new columns anyhow we want. We'll make a new column 16 which 
  274. E will be 8 digits wide with 3 decimal places, and call it Frank:
  275. E NEW C16
  276. E FORMAT C16 8 3
  277. E LABEL C16 Frank
  278. E TITLE
  279. PAUSE
  280.  
  281.  
  282.  
  283. NEW C16
  284. FORMAT C16 8 3
  285. LABEL C16 Frank
  286. TITLE
  287. E There it is.
  288. PAUSE
  289.  
  290.  
  291.  
  292. E At the moment there's nothing in it:
  293. E BASICS C16
  294. BASICS C16
  295.  
  296.  
  297.  
  298. E Let's make it the difference between C15 and C17:
  299. E DERIVE C16
  300. E C15-C17
  301. E BASICS C16
  302. PAUSE
  303.  
  304.  
  305.  
  306. DERIVE C16
  307. C15-C17
  308. BASICS C16
  309. E Or about the natural log of C15? That would give us an error if 
  310. E C15 is ever zero, so we'll make any values less than or equal to zero 
  311. E to be 0.0001 instead first:
  312. E DERIVE C16
  313. E LN(C15*(C15>0)+0.0001*(C15<=0))
  314. PAUSE
  315.  
  316.  
  317.  
  318. DERIVE C16
  319. LN(C15*(C15>0)+0.0001*(C15<=0))
  320. E Looks complicated, but it shows the kind of thing that can be done. Of 
  321. E course we could have done it more simply using the narrow and widen 
  322. E commands:
  323. E NARROW C15<=0
  324. E DERIVE C16 
  325. E LN(0.0001)
  326. E WIDEN
  327. E NARROW C15>0
  328. E DERIVE C16
  329. E LN(C15)
  330. E WIDEN
  331. PAUSE
  332.  
  333.  
  334.  
  335. NARROW C15<=0
  336. DERIVE C16 
  337. LN(0.0001)
  338. WIDEN
  339. NARROW C15>0
  340. DERIVE C16
  341. LN(C15)
  342. WIDEN
  343. E There are two special functions to make life simple. The first derives a 
  344. E column from another by subtracting the mean and dividing by the 
  345. E standard deviation:
  346. E DERIVE C16 ZED C15
  347. E BASICS C16
  348. PAUSE
  349.  
  350.  
  351.  
  352. DERIVE C16 ZED C15
  353. BASICS C16
  354. E And the other takes the rank of the value in its column:
  355. E DERIVE C16 RANK C15
  356. E BASICS C16
  357. PAUSE
  358.  
  359.  
  360.  
  361. DERIVE C16 RANK C15
  362. BASICS C16
  363. E We can just do sums:
  364. E ARITH 
  365. E 5 +5*38
  366. E 2.6/7+(3.5-.6)pow(0.5)
  367. PAUSE
  368.  
  369.  
  370.  
  371. ARITH 
  372. 5 +5*38
  373. 2.6/7+(3.5-.6)pow(0.5)
  374.  
  375. ; The above blank line takes us out of the ARITHMETIC function
  376.  
  377. E Or we can use the probability look-up functions, e.g. to find the 
  378. E significance of a Chi-squared of 13.6 with 2 degrees of freedom:
  379. E ARITH 
  380. E 13.6PX2
  381. PAUSE
  382.  
  383.  
  384.  
  385. ARITH 
  386. 13.6PX2
  387.  
  388. PAUSE
  389.  
  390.  
  391.  
  392. E Now let's have a look at the special data editor supplied which is 
  393. E called up with the EDIT function. You can use the cursor keys to move 
  394. E around the data and alter it by typing in new values. New columns are 
  395. E added at the end by pushing Ctrl-RIGHT, and new rows are added with the 
  396. E ENTER key. When you have finished playing with the editor push the ESC 
  397. E key.
  398. E EDIT
  399. PAUSE
  400.  
  401.  
  402.  
  403. EDIT
  404. E
  405. E
  406. E Well, that gives you a rough idea of some of what's available. You can 
  407. E write output to files or printer, and you can input commands from the 
  408. E keyboard or from files like this one. There's a one-way analysis of 
  409. E variance test that we haven't mentioned, and a few other odds and ends 
  410. E around the place.
  411. E If you're going to use EASISTAT you are STRONGLY advised to print off 
  412. E this file (called DEMO), the documentation file called EASISTAT.DOC
  413. E and the file titled READ.ME and then to study them carefully. This is 
  414. E a fairly powerful package and you will probabably save yourself a lot of 
  415. E time and effort if you do this rather than diving straight in. 
  416. E Naturally we hope that you will decide to pay for the program and 
  417. E obtain a proper manual.
  418. PAUSE
  419.  
  420.  
  421.  
  422. E The demonstration is finishing now, and you will be able to control the 
  423. E program from the keyboard. When you have finished type QUIT (and then 
  424. E YES).
  425. E Good luck.
  426. E                                       ARC Scientific 1989
  427. E
  428. E STOP PRESS: A prototype version of EASIPLOT, a graph drawing program is 
  429. E now available for use with EASISTAT. There is also a demonstration 
  430. E for this which EASISTAT can run. If you do not wish to see the 
  431. E instructions for running this demonstration then press E now and you will
  432. E be left in control of EASISTAT. 
  433. PAUSE
  434. E
  435. E If you have a copy of EASIPLOT on its own floppy disk then just remove the
  436. E EASISTAT disk from the disk drive, insert the EASIPLOT disk instead, and
  437. E type:
  438. E INPUT PDEMO
  439. E If you have the EASIPLOT files in a different directory of the disk you 
  440. E are now using you must first change to that directory instead. If you 
  441. E have obtained EASISTAT and EASIPLOT on a 3" disk then the EASIPLOT files
  442. E should be in a directory called EPDISK, otherwise substitute below the 
  443. E full pathname of the directory in which you have installed the EASIPLOT 
  444. E files. Type:
  445. E SYSTEM CHDIR \EPDISK
  446. E INPUT PDEMO
  447. E
  448. E Type QUIT and then YES when you wish to leave EASISTAT.
  449.  
  450.  
  451.